Skip to content

feat: group consecutive tool calls with verb labels and improved UI#94

Draft
tellaho wants to merge 7 commits intomainfrom
tho/tool-call-grouping-v3
Draft

feat: group consecutive tool calls with verb labels and improved UI#94
tellaho wants to merge 7 commits intomainfrom
tho/tool-call-grouping-v3

Conversation

@tellaho
Copy link
Copy Markdown
Collaborator

@tellaho tellaho commented Apr 3, 2026

Summary

  • Consecutive same-type tool calls collapse into expandable groups ("Edited 3 files", "Ran 2 commands") with animated slide-in transition
  • Solo tool calls show past-tense verb + filename labels ("Edited content-design-review.md") with layout-animated trigger that hides filename on expand
  • Per-tool artifact candidates instead of single primary host per message — each tool call shows its own open-file action
  • Artifact actions render as inline filename + arrow-up-right link below code block, clickable to open file
  • Groups split by execution outcome so errors aren't hidden behind success labels
  • Redundant bottom labels (e.g. bare "Ran") hidden when they add no info beyond the trigger
  • Extracted ToolChainCards and toolLabelUtils into dedicated files
Screen.Recording.2026-04-03.at.9.55.35.AM-compressed.mp4

Test plan

  • Verify consecutive same-type tool calls collapse into expandable group row
  • Verify solo tool calls show "Edited filename.md" with chevron, filename disappears on expand
  • Verify expanding solo tool call shows content with left border + filename link below
  • Verify clicking filename link opens the file
  • Verify grouped items show just filename with arrow-up-right link
  • Verify failed tool calls are not grouped with successful ones
  • Verify labels like "Ran" or "Delegate" don't show redundantly below expanded content

🤖 Generated with Claude Code

tellaho and others added 7 commits April 3, 2026 11:03
Consecutive same-type tool calls collapse into expandable groups
("Wrote 3 files", "Ran 2 commands") with animated slide-in transition.
Solo items show past-tense verbs ("Wrote foo.html", "Read", "Ran").
Extract ToolChainCards and toolLabelUtils into dedicated files.
Make tool calls full-width, hide result labels, and add context-aware
spacing between tool and prose sections.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… filenames

- Distribute artifact candidates per tool call instead of single primary host
- Solo tool calls: animated expand with layout transitions for verb/filename
  in trigger, slide-in content with left border matching grouped style
- Grouped items: show just filename with inline open-file arrow link
- Extract filenames from tool name, args path keys, or result text
- Use "Edited" verb for write operations, inline ArrowUpRight icon for open
- Artifact actions render as clickable label+arrow, not separate link below

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Grouping now keys on both tool type and status, so failed or
executing calls are never collapsed with completed ones. This
prevents "Edited 2 files" from hiding a failure in the group.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Only show the filename label below expanded content when there's a
filename detail or artifact candidate. Labels like "Ran" or "Delegate"
that just repeat the trigger text are now hidden.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ction

- toolLabelUtils: 20 tests covering getToolType, getToolDetail, getToolVerb,
  getToolLabel, and extractFileDetail (from name, args, and result text)
- MessageBubble: groups consecutive same-type calls, splits by outcome,
  verb labels with filenames, filename extraction from args path keys
- ToolCallAdapter: redundant label hidden when no detail, filename shown
  below content when displayDetail is provided

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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