mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 23:40:45 +00:00
fix(tui): preserve streamed text during tool call transitions
Fixes #27674 The TUI was erasing already-streamed assistant text when tool calls were triggered. This happened because the finalize() method in TuiStreamAssembler was not using the protectBoundaryDrops option when updating run state. Now finalize() applies the same boundary drop protection as ingestDelta(), ensuring that streamed text before tool calls is preserved when the final payload drops earlier content blocks.
This commit is contained in:
committed by
Peter Steinberger
parent
03159f3942
commit
d6cbaea434
@@ -151,7 +151,7 @@ export class TuiStreamAssembler {
|
||||
const streamedDisplayText = state.displayText;
|
||||
const streamedTextBlocks = [...state.contentBlocks];
|
||||
const streamedSawNonTextContentBlocks = state.sawNonTextContentBlocks;
|
||||
this.updateRunState(state, message, showThinking);
|
||||
this.updateRunState(state, message, showThinking, { protectBoundaryDrops: true });
|
||||
const finalComposed = state.displayText;
|
||||
const shouldKeepStreamedText =
|
||||
streamedSawNonTextContentBlocks &&
|
||||
|
||||
Reference in New Issue
Block a user