mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-24 16:54:43 +00:00
The renderer showed two assistant bubbles for one turn — a partial streamed copy plus the clean final copy (#63679). A reload fixed it, so the persisted transcript was correct; this was live reconciliation. Root cause is in completeAssistantMessage (use-message-stream/index.ts). message.interim fires for BOTH verify-on-stop candidates AND ordinary tool-call turns (tui_gateway _load_interim_assistant_messages), and the interim seal clears streamId + sets interimBoundaryPending. So at message.complete the streamId fast-path is skipped and it enters the fallback. There the settle-onto-interim branch was gated on responsePreviewed — true ONLY for verify-on-stop. A normal tool-call turn whose final text matched its sealed interim satisfied neither settle branch and fell through to append a brand-new bubble. Two rows, distinct ids, id-based dedup cannot collapse them → renders twice. Fix: settle onto the sealed interim whenever the final CONTINUES it — final == interim, final starts with interim (streamed + trailing delta), or interim starts with final (streaming dropped characters). This is gated on existing.interim so it only ever collapses a genuine sealed interim, and a genuinely DIFFERENT final still appends as its own bubble. responsePreviewed is retained as an OR so the verify-on-stop continuation-budget case (final text rewritten, no shared prefix) still settles as before. The prior test that asserted a non-previewed identical interim+final produced TWO bubbles was encoding the bug; rewritten to assert one. Added coverage: prefix-extended non-previewed final collapses; a genuinely different final still appends (no over-collapse). Community analysis on the issue (seedSeenBubbleKeys / kind-guard) was against a pre-refactor v0.7.0 bundle — those symbols no longer exist; this is the current-code root cause. Co-authored-by: SHL0MS <SHL0MS@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| bootstrap-installer | ||
| desktop | ||
| shared | ||