fix(opencode): pass abort signal to MCP tool calls (#31455)
This commit is contained in:
parent
0efc334ff9
commit
79cff288a6
1 changed files with 2 additions and 1 deletions
|
|
@ -178,7 +178,7 @@ function convertMcpTool(mcpTool: MCPToolDef, client: MCPClient, timeout?: number
|
||||||
return dynamicTool({
|
return dynamicTool({
|
||||||
description: mcpTool.description ?? "",
|
description: mcpTool.description ?? "",
|
||||||
inputSchema: jsonSchema(schema),
|
inputSchema: jsonSchema(schema),
|
||||||
execute: async (args: unknown) => {
|
execute: async (args: unknown, options) => {
|
||||||
return client.callTool(
|
return client.callTool(
|
||||||
{
|
{
|
||||||
name: mcpTool.name,
|
name: mcpTool.name,
|
||||||
|
|
@ -187,6 +187,7 @@ function convertMcpTool(mcpTool: MCPToolDef, client: MCPClient, timeout?: number
|
||||||
CallToolResultSchema,
|
CallToolResultSchema,
|
||||||
{
|
{
|
||||||
resetTimeoutOnProgress: true,
|
resetTimeoutOnProgress: true,
|
||||||
|
signal: options.abortSignal,
|
||||||
timeout,
|
timeout,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue