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
{{ message }}
Repository navigation
Commit dc3eef6
Browse filesBrowse the repository at this point in the historyBrowse files
fix(telegram): rotate preamble only on a fresh resume, not every tool boundary
The eager tool-boundary rotation re-rendered the full cumulative snapshot into a
new bubble at EVERY tool boundary, so multi-tool turns produced a staircase of
duplicated messages (S1, S1+S2, S1+S2+S3). Partials are full cumulative snapshots
(no delta), so each rotation after a reset re-printed everything.
Defer the rotation to the next answer event (flag set at onToolStart) and rotate
ONLY when the resumed snapshot does NOT continue the already-streamed text (a
genuine preamble->answer transition; the fresh text is itself the un-shown delta).
Ordinary continuation across multiple tool boundaries keeps editing one bubble —
no staircase, no superset re-render. Compare against lastAnswerPartialText (not the
send-lagged lastDeliveredText) so fast timing classifies correctly. Keeps the
single preamble->tool->resume guarantee and the below-debounce no-spurious gate.
Adds a staircase regression test (no sent message may be a superset re-render of
another) that catches this class offline.
0 commit comments