You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The gateway sends the full accumulated assistant text in each streaming
delta event. When a tool call interrupts the stream, the client saves
the current chatStream as a segment. Subsequent deltas (still containing
the full accumulated text) then show overlapping content: each segment
contains all prior text, and the live stream bubble repeats it again.
This was previously masked by a loadChatHistory() call after every tool
result (removed in 0e8672a to fix a reload storm).
Fix: track chatStreamSegmentOffset — the length of text already committed
to segments. When saving a new segment, slice off the known prefix to
store only the delta. When rendering the live stream bubble, strip the
offset prefix so only new text appears.
Adds test coverage for the segment dedup in chat.test.ts.
0 commit comments