// A turn's collapsed activity block: two or more tool rows after the same // `User` row, plus the narration absorbed between them. The header counts tool // rows only (docs/STRUCTURED-VIEW.md) and shows the last/current tool label so // the operator sees activity at a glance without expanding. Opening it reveals // tools and text in chronological order. import type { ReactNode } from "react"; export interface ToolGroupProps { id: string; toolCount: number; /** Label of the last (or running) tool, e.g. "Execute". */ lastToolLabel: string; /** Argument of the last tool, e.g. "`git status`". */ lastToolArg: string; expanded: boolean; onExpandedChange(expanded: boolean): void; children: ReactNode; } export function ToolGroup({ id, toolCount, lastToolLabel, lastToolArg, expanded, onExpandedChange, children }: ToolGroupProps) { const summary = lastToolArg ? `${toolCount} tool calls · ${lastToolLabel} \u2018${lastToolArg}\u2019` : `${toolCount} tool calls`; return (
{children}
); }