Merge branch 'dev' into llm-mcp-flow

This commit is contained in:
aadesh18 2026-04-14 21:53:08 -07:00 committed by GitHub
commit 140ee7eb86
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -23,12 +23,15 @@ function getDocsToolsBaseUrl(): string {
async function postDocsToolAction(action: Record<string, unknown>): Promise<string> {
const base = getDocsToolsBaseUrl();
try {
const res = await fetch(`${base}/api/internal/docs-tools`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(action),
});
const res = await fetch(`${base}/api/internal/docs-tools`, {
method: "POST",
headers: {
"Content-Type": "application/json",
// MCP-style JSON-RPC endpoint requires clients to advertise both JSON and SSE.
Accept: "application/json, text/event-stream",
},
body: JSON.stringify(action),
});
if (!res.ok) {
const errBody = await res.text();