ToolGroupItem
A grouped visual treatment for tool calls and their results.
ToolGroupItem renders related tool calls, their status, inputs, and results as one timeline entry.
Usage
Replace tool groups through a custom entry view when the presentation of tool activity needs to change.
import {
TimelineEntryView,
ToolGroupItem,
type TimelineEntryViewProps,
type ToolGroupItemProps,
} from '@hyperflow/chakra-ui'
function ProjectToolGroup(props: ToolGroupItemProps) {
return <ToolGroupItem {...props} />
}
function ProjectEntry(props: TimelineEntryViewProps) {
return (
<TimelineEntryView
{...props}
toolGroupComponent={ProjectToolGroup}
/>
)
}Examples
Provide a product-specific pending label
Change the text shown when a tool requires input but has no question metadata.
function ProjectToolGroup(props: ToolGroupItemProps) {
return (
<ToolGroupItem
{...props}
inputRequiredMessage="Waiting for tool input"
/>
)
}Guide
Keep calls and results grouped
pairs associates a tool call with its result. Render the supplied collection as one semantic activity rather than treating its calls and outputs as unrelated messages.
Use supplied resource metadata
toolResources contains the resource links associated with the group. Keep it available when rendering tool details or links.
Reflect streaming state
Use streaming to distinguish an active group from completed work. The default component animates the active tool label while data is still arriving.
Props
| Prop | Default | Type |
|---|---|---|
pairs | — | ToolCallPair[]Associated tool calls and results. |
toolResources | — | Record<string, ResourceLink>Resources available to the group. |
streaming | — | booleanWhether the group is still receiving updates. |
locale | — | stringLocale used for labels and formatting. |
inputRequiredMessage | "input_required (in attesa di risposta)" | stringFallback text for a tool awaiting input. |
labelContext | — | ToolLabelContextAdditional context for tool labels. |