fix: route Exa and CodeGraph through shared mcp adapter

This commit is contained in:
云服务部-叶林立
2026-08-19 12:10:24 +08:00
parent a0a4ae44d4
commit 6293ef1c63
9 changed files with 104 additions and 65 deletions
+6 -3
View File
@@ -32,11 +32,14 @@ test("Exa API override keeps registered and active tool names aligned", () => {
});
api.registerTool({ name: "web_fetch_exa", label: "MCP: web_fetch_exa" });
api.setActiveTools(["read", "web_fetch_exa", "web_fetch_exa"]);
api.registerTool({ name: "codegraph_explore", label: "MCP: codegraph_explore" });
api.setActiveTools(["read", "web_fetch_exa", "web_fetch_exa", "codegraph_explore"]);
api.unregisterTool("web_fetch_exa");
api.unregisterTool("codegraph_explore");
assert.equal(registered[0]?.name, "exa_web_fetch");
assert.equal(registered[0]?.label, "Exa Web Fetch");
assert.deepEqual(active, ["read", "exa_web_fetch"]);
assert.deepEqual(unregistered, ["exa_web_fetch"]);
assert.equal(registered[1]?.name, "codegraph_explore");
assert.deepEqual(active, ["read", "exa_web_fetch", "codegraph_explore"]);
assert.deepEqual(unregistered, ["exa_web_fetch", "codegraph_explore"]);
});