From 9bd97d0cd5a88e10704cf31e7abee18ebf5f87f1 Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Tue, 15 Apr 2025 17:30:35 -0700 Subject: [PATCH] Claude reasoning small fix --- .../contrib/void/browser/convertToLLMMessageService.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/void/browser/convertToLLMMessageService.ts b/src/vs/workbench/contrib/void/browser/convertToLLMMessageService.ts index 5518d810..053d25bd 100644 --- a/src/vs/workbench/contrib/void/browser/convertToLLMMessageService.ts +++ b/src/vs/workbench/contrib/void/browser/convertToLLMMessageService.ts @@ -143,13 +143,19 @@ const prepareMessages_anthropic_tools = (messages: SimpleLLMMessage[], supportsA // add anthropic reasoning if (currMsg.role === 'assistant') { if (currMsg.anthropicReasoning && supportsAnthropicReasoning) { - const content = currMsg.content newMessages[i] = { role: 'assistant', content: content ? [...currMsg.anthropicReasoning, { type: 'text' as const, text: content }] : currMsg.anthropicReasoning } } + else { + newMessages[i] = { + role: 'assistant', + content: currMsg.content, + // strip away anthropicReasoning + } + } continue }