mirror of
https://github.com/davidkaya/aryx.git
synced 2026-07-24 13:38:43 +02:00
Sub-agent messages bypass the streaming path (turn-delta) entirely due to SDK batching behavior. They arrive only at turn-complete time via FinalizeCompletedMessages. Without classification, they appear as separate chat bubbles cluttering the transcript. Two-pronged fix: Sidecar: FinalizeCompletedMessages now tags messages from _reclassifiedMessageIds with MessageKind='thinking'. This covers messages that WERE streamed and reclassified during the turn. Added MessageKind property to ChatMessageDto. Main process: finalizeTurn detects unstreamed assistant messages (not in existing session.messages) and classifies them as thinking when a visible response was already streamed. Emits message-reclassified events so the renderer can update incrementally, though the primary path is the workspace:updated broadcast which already includes the correct messageKind. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>