ToolCall
Generic display of a single AI tool call: a collapsible header showing the tool name, status and compact input args, expanding to its input params and (once available) output or error. Input and output rendering go through the tool render registry, so a host can contribute domain views. Renders both clicky dynamic-tool parts and typed tool-<name> parts, keyed off part.state.
Import
Section titled “Import”import { ToolCall } from "@flanksource/clicky-ui/chat";The props table documents the component-specific surface. Standard DOM attributes inherited from React, such as className, event handlers, and accessibility attributes, may also be accepted when the component’s prop type extends a native element.
| Prop | Type | Default | Description |
|---|---|---|---|
className |
string |
— | — |
defaultOpen |
boolean |
false |
Whether the call body starts expanded. Defaults to false. |
onApprove |
(…) => … |
— | Respond to an approval request (only used when state is `approval-requested`). Receives the approval id, the decision, and an optional reason. |
part* |
AnyToolPart |
— | The tool part from an assistant message (typed or dynamic). |
registry |
ToolRenderRegistry |
— | Renderer registry override. Defaults to the provided context registry. |
renderToolResult |
ToolResultRenderer |
— | — |
subcalls |
AnyToolPart[] |
[] |
Calls made by the subagent this call spawned (an Agent/Task call), nested beneath it. A background subagent keeps calling after its parent returns. |
subcallsByParent |
ReadonlyMap<string, AnyToolPart[]> |
— | Descendants grouped by the call that spawned them. |
tool |
ToolMeta |
— | Catalog entry for this tool. Defaults to the registry's catalog lookup. |