Skip to content

feat(tui): coalesce streamed tool calls into one live block + concise summary - #23

Merged
JasonZQH merged 1 commit into
devfrom
feat/tui-toolcall-activity
Jul 23, 2026
Merged

feat(tui): coalesce streamed tool calls into one live block + concise summary#23
JasonZQH merged 1 commit into
devfrom
feat/tui-toolcall-activity

Conversation

@JasonZQH

Copy link
Copy Markdown
Owner

Reworks how streamed provider tool-calls are shown, based on how industry tools display agent activity (Claude Code ⏺ tool(arg), grok-build's compact scrollback, Orca's status-oriented display).

Before: each TOOL_CALL = its own transcript line with the full command → a big shell command wrapped over 3 lines and repeated.

After:

  • Consecutive same-type tool calls stream into one live block above the input, coalesced: ⏺ command_execution ×3 <latest cmd, one line>, updated in place.
  • When the group closes (a non-tool event, a new tool type, or the run ending), one concise summary lands in the scrollback: ⏺ command_execution · 4 calls (a lone call keeps its truncated command).
  • Command collapsed to one line + truncated — no wrap-spam. Glyph + tool name in accent, args/count dimmed.

Verification

5 new tests (coalescing, summary flush on non-tool event / new type / run end, single-call detail, one-line truncation). 364 tests pass, ruff clean. Captured render confirms the live block + committed summaries.

Not merging yet per request — open for review.

🤖 Generated with Claude Code

… summary

Before: every provider TOOL_CALL rendered as its own transcript line with the
full command, so a big shell command wrapped over 3 lines and repeated — noisy
and hard to read.

Now, following the Claude Code "⏺ tool(arg)" pattern (and grok-build's compact
scrollback / Orca's status-oriented display):
- Consecutive same-type tool calls stream into ONE live block above the input
  ("⏺ command_execution ×3  <latest cmd, one line>"), updated in place.
- When the group closes (a non-tool event, a new tool type, or the run ending),
  a single concise summary lands in the scrollback ("⏺ command_execution ·
  4 calls"; a lone call keeps its truncated command).
- The command is collapsed to one line and truncated — no more wrap-spam. Glyph
  and tool name in accent, args/count dimmed.

5 tests cover coalescing, the summary flush (non-tool event / new type / run
end), single-call detail, and one-line truncation. 364 tests pass, ruff clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@JasonZQH
JasonZQH merged commit 61f43f5 into dev Jul 23, 2026
5 checks passed
@JasonZQH
JasonZQH deleted the feat/tui-toolcall-activity branch July 23, 2026 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant