feat(chat): clearer streaming activity for agents and sub-agents#42
Merged
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…dicator Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ssage While text streams there was no in-progress signal: renderStreamingMarkdown rendered no cursor and #40 removed the discreet 'receiving more' skeleton, setting activity=null during text. Append an inline blinking caret to the streamed markdown (before the last leaf block closer so it sits inline at the true end of the text), removed once the turn settles. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The sub-message caret was gated on isStreaming (the whole turn), so it kept blinking on a completed sub-agent while the main agent streamed on toward its final text. Also require the sub-agent's own invocation to still be pending. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Unify the chat's streaming into one shared message builder and make the activity indicator clearer for both the main agent and sub-agents.
What changed:
applyStreamPartbuilds the transcript for both the main assistant stream and every sub-agent stream (deletes the separateuiMessageToChatMessagessnapshot path).activityindicator is now a discriminated union; a sub-agent's live phase (starting / thinking / running a tool / analyzing) shows inside its panel, while top-level phases stay on the bottom line.Why: the sub-agent flow felt sluggish — the enter/leave/inside-sub-agent steps had no indication, and once text started streaming there was no in-progress signal at all.
Heads-up:
use-agent-chat.tscarries the fix(chat): stop conversations dropping silently or on over-eager moderation #38/fix(chat): prevent stalled turns from hanging and show activity status #40 silent-drop + hang hardening; the unification preserves it but it's the file to review hardest.execute()before the main loop sets the parent message, so the parent is read live (liveParent) — see the comment at the sub-agent tool.