ACP: update package, fix slash command bug (#3906)

This commit is contained in:
Aiden Cline
2025-11-05 00:50:48 -06:00
committed by GitHub
parent 3ebec2435a
commit 1e0596bc46
6 changed files with 87 additions and 35 deletions

View File

@@ -77,7 +77,15 @@ export namespace MCP {
}
},
async (state) => {
await Promise.all(Object.values(state.clients).map((client) => client.close()))
await Promise.all(
Object.values(state.clients).map((client) =>
client.close().catch((error) => {
log.error("Failed to close MCP client", {
error,
})
}),
),
)
},
)
@@ -201,7 +209,15 @@ export namespace MCP {
const result = await withTimeout(mcpClient.tools(), mcp.timeout ?? 5000).catch(() => {})
if (!result) {
await mcpClient.close()
await mcpClient.close().catch((error) => {
log.error("Failed to close MCP client", {
error,
})
})
status = {
status: "failed",
error: "Failed to get tools",
}
return {
mcpClient: undefined,
status: {