mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-10-07 02:58:15 +00:00
fix(claude-code): prevent reasoning text duplication
The thinking_complete handler was re-emitting the full reasoning text after it had already been streamed via reasoning chunks. This caused the reasoning content to appear twice in the UI. Now the thinking_complete case only captures the signature for tool use continuations without re-emitting the text.
This commit is contained in:
parent
4bb2d98d0b
commit
a2ea1acd3e
1 changed files with 3 additions and 8 deletions
|
|
@ -219,17 +219,12 @@ export class ClaudeCodeHandler implements ApiHandler, SingleCompletionHandler {
|
|||
case "thinking_complete":
|
||||
// Capture the signature for persistence in api_conversation_history
|
||||
// This enables tool use continuations where thinking blocks must be passed back
|
||||
// NOTE: We do NOT emit the text here because it was already streamed via
|
||||
// "reasoning" chunks. Re-emitting would duplicate the reasoning in the UI.
|
||||
// The signature is retrieved via getThoughtSignature() after streaming completes.
|
||||
if (chunk.signature) {
|
||||
this.lastThinkingSignature = chunk.signature
|
||||
}
|
||||
// Emit a complete thinking block with signature
|
||||
// This is critical for interleaved thinking with tool use
|
||||
// The signature must be included when passing thinking blocks back to the API
|
||||
yield {
|
||||
type: "reasoning",
|
||||
text: chunk.thinking,
|
||||
signature: chunk.signature,
|
||||
}
|
||||
break
|
||||
|
||||
case "tool_call_partial":
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue