diff --git a/src/vs/workbench/contrib/void/browser/chatThreadService.ts b/src/vs/workbench/contrib/void/browser/chatThreadService.ts index 26115b88..e50e841f 100644 --- a/src/vs/workbench/contrib/void/browser/chatThreadService.ts +++ b/src/vs/workbench/contrib/void/browser/chatThreadService.ts @@ -716,8 +716,6 @@ class ChatThreadService extends Disposable implements IChatThreadService { const toolResult_ = toolResult as RawMCPToolCall if (toolResult_.event === 'text') { toolResultStr = toolResult_.text - } else if (toolResult_.event === 'error') { - toolResultStr = `Error: ${toolResult_.text}` } else if (toolResult_.event === 'image') { toolResultStr = `[Image: ${toolResult_.image.mimeType}]` } else if (toolResult_.event === 'audio') { diff --git a/src/vs/workbench/contrib/void/common/mcpService.ts b/src/vs/workbench/contrib/void/common/mcpService.ts index f2406d6e..3920aa3d 100644 --- a/src/vs/workbench/contrib/void/common/mcpService.ts +++ b/src/vs/workbench/contrib/void/common/mcpService.ts @@ -298,6 +298,9 @@ class MCPService extends Disposable implements IMCPService { public async callMCPTool(toolData: MCPToolCallParams): Promise<{ result: RawMCPToolCall }> { const result = await this.channel.call('callTool', toolData); + if (result.event === 'error') { + throw new Error(`Error: ${result.text}`) + } return { result }; }