Skip to content

Commit 79cff28

Browse files
authored
fix(opencode): pass abort signal to MCP tool calls (anomalyco#31455)
1 parent 0efc334 commit 79cff28

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎packages/opencode/src/mcp/index.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ function convertMcpTool(mcpTool: MCPToolDef, client: MCPClient, timeout?: number
178178
return dynamicTool({
179179
description: mcpTool.description ?? "",
180180
inputSchema: jsonSchema(schema),
181-
execute: async (args: unknown) => {
181+
execute: async (args: unknown, options) => {
182182
return client.callTool(
183183
{
184184
name: mcpTool.name,
@@ -187,6 +187,7 @@ function convertMcpTool(mcpTool: MCPToolDef, client: MCPClient, timeout?: number
187187
CallToolResultSchema,
188188
{
189189
resetTimeoutOnProgress: true,
190+
signal: options.abortSignal,
190191
timeout,
191192
},
192193
)

0 commit comments

Comments
 (0)