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
TUI keeps stale streamed text when a terminal text.complete rewrite truncates it #688
When a plugin's experimental.text.complete hook rewrites an assistant text part at text-end to a final text that is a strict prefix of the streamed text (including empty), the TUI keeps displaying the streamed text instead of the terminal one.
Example: a part streams Hello secret; the terminal rewrite returns Hello (or ""). The reducer's stale-prefix preservation runs before the terminal snapshot is accepted, so the displayed text remains Hello secret.
Reducer-level reproduction on dev-vibecoded (d6107cf): applying a terminal update with text Hello after streamed Hello secret leaves Hello secret in the part; applying terminal "" likewise keeps Hello secret.
Expected
The first terminal text snapshot is honored even when it truncates the streamed text to a prefix or to empty. Prefix preservation for non-terminal streamed updates stays as is.
Notes
The processor explicitly lets experimental.text.complete rewrite output before publishing the terminal snapshot; only the TUI reducer ordering drops the rewrite.
Reasoning parts are unaffected (separate prefix behavior).
Activity