Tool
Server ComponentCollapsible tool-call panel with input, output, and status.
Import
tsx
import { Tool } from "@cronus-ui/ui";
bash
npx cronus-ui add tool
Examples
API Reference
Generated from the component's exported types.
ToolLabels
| Prop | Type | Default | Description |
|---|---|---|---|
pending | string | — | — |
running | string | — | — |
completed | string | — | — |
error | string | — | — |
parameters | string | — | — |
result | string | — | — |
errorHeading | string | — | — |
ToolProps
Extends ComponentProps<typeof Collapsible>
No own props — see the extended type above for available props.
ToolHeaderProps
Extends HTMLAttributes<HTMLButtonElement>
| Prop | Type | Default | Description |
|---|---|---|---|
title | string | — | — |
type* | ToolUIPart["type"] | — | — |
state* | ToolUIPart["state"] | — | — |
labels | ToolLabels | — | Override default English strings. |
ToolContentProps
Extends ComponentProps<typeof CollapsibleContent>
No own props — see the extended type above for available props.
ToolInputProps
Extends HTMLAttributes<HTMLDivElement>
| Prop | Type | Default | Description |
|---|---|---|---|
input* | ToolUIPart["input"] | — | — |
labels | Pick<ToolLabels, "parameters"> | — | Override default English strings. |
ToolOutputProps
Extends HTMLAttributes<HTMLDivElement>
| Prop | Type | Default | Description |
|---|---|---|---|
output* | ToolUIPart["output"] | — | — |
errorText | ToolUIPart["errorText"] | — | — |
labels | Pick<ToolLabels, "result" | "errorHeading"> | — | Override default English strings. |