fix(opencode): pass abort signal to MCP tool calls (#31455)

This commit is contained in:
Aiden Cline 2026-06-08 22:47:05 -05:00 committed by GitHub
parent 0efc334ff9
commit 79cff288a6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -178,7 +178,7 @@ function convertMcpTool(mcpTool: MCPToolDef, client: MCPClient, timeout?: number
return dynamicTool({
description: mcpTool.description ?? "",
inputSchema: jsonSchema(schema),
execute: async (args: unknown) => {
execute: async (args: unknown, options) => {
return client.callTool(
{
name: mcpTool.name,
@ -187,6 +187,7 @@ function convertMcpTool(mcpTool: MCPToolDef, client: MCPClient, timeout?: number
CallToolResultSchema,
{
resetTimeoutOnProgress: true,
signal: options.abortSignal,
timeout,
},
)