Instatic icon indicating copy to clipboard operation
Instatic copied to clipboard

feat(agent): compact tool-call rows in the agent panel

Open DavidBabinec opened this issue 5 months ago • 0 comments

What changed

Restyles the agent panel's tool-call display and tightens how a run of tool calls is grouped — built directly on current main's MessageBubble/ToolCallRow and token vocabulary.

  • Compact rows — each tool call now renders as a single-line row (status icon · bold bright title · muted detail) instead of a rounded pill. The title (tool type) is bright/semibold-mono, the detail (formatActionLabel) is muted, separated by a middle dot that only appears when a detail exists.
  • Tight grouping — consecutive tool-call blocks in a message now share one toolCallsContainer (1px grid gap) via a new groupMessageBlocks helper, so a sequence of tools reads as one tight block. Text blocks stay separate bubbles in emission order.
  • Bigger icon→label gap; borderless subtle-surface rows; all colours/spacing from existing --text-* / --space-* / --overlay-* tokens (no hex, no var() fallbacks).

Why

The previous pills wrapped one-per-container with loose spacing, so a burst of tool activity was hard to scan. Rows + tight grouping make the agent's actions read as a compact, scannable log.

Impact

  • User-facing only: agent panel tool-call visuals. Row role="status" + aria-labels preserved for screen readers.
  • No API / schema / DB changes. ToolCallBadge renamed to ToolCallRow (local component); old .toolCallBadge/.toolCallType classes removed.

Verification

  • tsc -b — clean (exit 0)
  • bun test src/__tests__/panels/agentPanel.test.tsx — 5 pass, 0 fail
  • eslint on the edited file — clean
  • Rebased onto latest main (clean); verified live via dev-server HMR

Supersedes

Replaces #132, which was built on a pre-refactor AgentPanel (old --editor-* tokens + MessageGroup structure) that main has since replaced. This PR re-applies the same design onto main's current structure. #132 will be closed.

DavidBabinec avatar Jul 01 '26 00:07 DavidBabinec