加入officecli相关支持

This commit is contained in:
2026-10-18 15:40:44 +08:00
parent fd617b0b8d
commit d5e1ff374f
6 changed files with 124 additions and 7 deletions
+1 -1
View File
@@ -1613,7 +1613,7 @@ const HANDLERS = {
async function executeTool(baseCtx, name, args) {
const handler = HANDLERS[name];
if (handler) return handler(baseCtx, args || {});
if (mcp.hasTool(name)) return mcp.callTool(name, args || {});
if (mcp.hasTool(name)) return mcp.callTool(name, args || {}, baseCtx); // baseCtx.taskDir → X-Session-Dir 头下发给 MCP 服务
return 'Error: 未知工具 ' + name;
}