Skip to content

feat(chat): clearer streaming activity for agents and sub-agents#42

Merged
albanm merged 10 commits into
mainfrom
feat-better-activity
Jun 21, 2026
Merged

feat(chat): clearer streaming activity for agents and sub-agents#42
albanm merged 10 commits into
mainfrom
feat-better-activity

Conversation

@albanm

@albanm albanm commented Jun 21, 2026

Copy link
Copy Markdown
Member

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:

  • One shared applyStreamPart builds the transcript for both the main assistant stream and every sub-agent stream (deletes the separate uiMessageToChatMessages snapshot path).
  • The activity indicator 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.
  • A blinking caret marks the live end of a streaming message, so it's clear the answer isn't finished. It stops as soon as a sub-agent completes, independent of the main agent.

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:

albanm and others added 10 commits June 21, 2026 18:58
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>
@albanm albanm merged commit 6e7f2f6 into main Jun 21, 2026
4 checks passed
@albanm albanm deleted the feat-better-activity branch June 21, 2026 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant