Utility
Terminal
Installation
$ pnpm dlx shadcn@latest add @termcn/ink/tool-call
Usage
import { ToolCall } from "@/components/ui/tool-call";<ToolCall
name="search_codebase"
args={{ query: "handleSubmit", maxResults: 10 }}
status="success"
result="Found 3 matches in src/components/"
duration={245}
/>API Reference
ToolCall
| Prop | Type | Default |
|---|---|---|
name | string | required |
args | Record<string, unknown> | - |
status | "pending" | "running" | "success" | "error" | required |
result | unknown | - |
duration | number | - |
collapsible | boolean | true |
defaultCollapsed | boolean | true |
Notes
Accessibility
termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim.
- Keyboard:
Enter/Spaceactivate the focused action when enabled;Escapedismisses or cancels when supported;Tab/Shift+Tabmove through Ink focus targets. - Focus and composition: Input is active only while the component's focus target is focused, enabled, active, and inside the topmost focus scope.
- Screen reader: Ink labels and semantic state expose the component without relying on visual styling alone.