Tool Call
AI · Reasoning, ToolCall
Shows what an agent did between your question and its answer. ToolCall is one tool use; Reasoning is the agent's plan.
ToolCall props: name, icon, status ("running" | "done" | "error" | "waiting"), summary (one line, past tense when done), duration, input, output (string or object, shown as JSON), defaultOpen.
Reasoning props: steps (string[]) or text, duration, streaming (shimmering "Thinking…"), defaultOpen.
- Collapsed by default: the one-line summary is what people read; details are there when they doubt it.
- Status icon colors follow the status map: mint done, sky running, butter waiting, blush error.
- Put them in ChatMessage's
beforeslot, reasoning first, tools in the order they ran.
- Find the latest thread from Northwind
- Check seat pricing and the renewal date
- Draft a short reply, ask before sending
Input
{
"query": "from:ida@northwind.io",
"limit": 3
}Result
{
"messages": 3,
"latest": "We need 40 more seats before 1 May."
}Props
Reasoning
| Prop | Type | Notes |
|---|---|---|
steps? | string[] | |
text? | ReactNode | |
duration? | string | |
streaming? | boolean | |
defaultOpen? | boolean | |
className? | string | Extra class on the root element. |
style? | CSSProperties | Inline style on the root element. |
ToolCall
| Prop | Type | Notes |
|---|---|---|
name | string | Required |
icon? | IconName | |
status? | "running" | "done" | "error" | "waiting" | |
summary? | ReactNode | |
duration? | string | |
input? | unknown | |
output? | unknown | |
defaultOpen? | boolean | |
className? | string | Extra class on the root element. |
style? | CSSProperties | Inline style on the root element. |