Hyperflow UI
ComponentsTimeline

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

PropDefaultType
pairs—ToolCallPair[]
Associated tool calls and results.
toolResources—Record<string, ResourceLink>
Resources available to the group.
streaming—boolean
Whether the group is still receiving updates.
locale—string
Locale used for labels and formatting.
inputRequiredMessage"input_required (in attesa di risposta)"string
Fallback text for a tool awaiting input.
labelContext—ToolLabelContext
Additional context for tool labels.

On this page