AI Tool Call
A collapsible record of a tool the model called, its arguments and its result.
- AI
- 1 file
- 2 npm packages
- Accessibility notes
pnpm dlx @dowel-ui/cli add ai-toolnpm packages installed: class-variance-authority, radix-ui.
import { Tool } from "@/components/ui/ai-tool";Default
Statuses
Custom Status Wording
Failed
Ring Indicator
With Summary
<Tool>
| Prop | Type | Default |
|---|---|---|
status | ToolStatus | "pending" |
Every prop of Radix UI’s Collapsible.Root, plus className.
<ToolHeader>
| Prop | Type | Default |
|---|---|---|
name (required)The tool's name, as the model called it. | string | — |
icon | ReactNode | — |
indicatorStatus mark style. | "icon" | "ring" | "icon" |
status | ToolStatus | "pending" |
statusLabelOverrides the status wording. | string | — |
summaryA short note before the status — "3 sources", "1.2s". It is part of the trigger's accessible name, so keep it short. | ReactNode | — |
Every prop of Radix UI’s Collapsible.Trigger, plus className.
<ToolContent>
Every prop of Radix UI’s Collapsible.Content, plus className.
<ToolSection>
| Prop | Type | Default |
|---|---|---|
label (required) | string | — |
Plus every attribute of <div>.
<ToolPayload>
| Prop | Type | Default |
|---|---|---|
label | string | "Payload" |
Plus every attribute of <pre>.
9/9
checks passed
- Tested — passes
- axe assertion — passes
- Keyboard tested — passes
- Storybook examples — passes
- Accessibility documented — passes
- Semantic tokens only — passes
- Motion from tokens — passes
- className merged — passes
- Visible focus — does not apply
- No fixed widths — passes