# Tool (Andromeda Pro)

Tool is a component of the Premium Andromeda Pro design system from AI Canvas (https://aicanvas.me). Index of every system, component and install setup: https://aicanvas.me/llms.txt

Reports one agent step with its status and duration, and opens to show what it produced.

- Design system: [Andromeda Pro](https://aicanvas.me/design-systems/andromeda-pro.md)
- License: Premium (proprietary)
- Install slug: `andromeda-pro-tool`
- Page: https://aicanvas.me/design-systems/andromeda-pro/tool

## Install

```bash
npx shadcn@latest add @aicanvas/andromeda-pro-tool
```

Requires Premium. Without a Premium token the command writes a placeholder (a `PremiumLocked` notice) instead of the component.

Every Andromeda Pro component at once: `npx shadcn@latest add @aicanvas/andromeda-pro`.

Token setup: the Install section of https://aicanvas.me/llms.txt.

## Use it

It installs to `components/aicanvas/andromeda-pro/components/Tool.tsx` (under `src/` if your project has one). With the usual `@/` alias:

```tsx
import { Tool } from '@/components/aicanvas/andromeda-pro/components/Tool'
```

## Example

```tsx
import { Tool } from '@/components/aicanvas/andromeda-pro/components/Tool'

<Tool title="Checked overdue invoices" status="done" duration={1.8} defaultOpen>
  <p>Three overdue invoices were found.</p>
</Tool>
```

## Variants

- `status`: running, done, stopped or error (default 'done')
- `size`: sm or md (default 'sm')

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `title` | `React.ReactNode` |  | What the step did, in sentence case ("Searched the web"). |
| `status?` | `'running'\|'done'\|'stopped'\|'error'` | `'done'` | Running shows the Spinner and cannot open; stopped cannot open; done and error open when there is a body. |
| `duration?` | `number` |  | How long the step took, in milliseconds. Read on a done row as one-decimal seconds ("1.2 s"); a done row without it shows no meta. |
| `open?` | `boolean` |  | Controlled open state. Pair with onOpenChange. Ignored (shut) while the row cannot open. |
| `defaultOpen?` | `boolean` | `false` | Initial open state when uncontrolled. |
| `onOpenChange?` | `(open: boolean) => void` |  | Called with the next open state when the row is pressed, and with true when openOnDone opens it. |
| `openOnDone?` | `boolean` | `false` | Opens the row the moment status is seen to turn 'done' from another status: the reader lands on what just ran. A row that mounts already done starts open, with no callback. Give it to the last step only. |
| `labels?` | `{ running?: string, stopped?: string, error?: string }` |  | Overrides the status words ("Running", "Stopped", "Failed") for localisation. |
| `size?` | `'sm'\|'md'` | `'sm'` | Row rung, forwarded to the trigger: 12 / 14px title, 16 / 18px glyph. |
| `children?` | `React.ReactNode` |  | What the step produced: a card, a paragraph, the error detail. Hangs off the branch rule when open. |
| `className?` | `string` |  | Additional CSS classes applied to the root element. |
| `style?` | `React.CSSProperties` |  | Inline styles applied to the root element. |

## Remix prompt

Only when the user wants Tool rebuilt from scratch instead of installed: the public part of its remix prompt is in the Remix panel at https://aicanvas.me/design-systems/andromeda-pro/tool.

## More Andromeda Pro components

- [Tooltip](https://aicanvas.me/design-systems/andromeda-pro/tooltip.md)
- [Top Bar](https://aicanvas.me/design-systems/andromeda-pro/top-bar.md)
- [User Card](https://aicanvas.me/design-systems/andromeda-pro/user-card.md)
- [User Menu](https://aicanvas.me/design-systems/andromeda-pro/user-menu.md)
- [Orb](https://aicanvas.me/design-systems/andromeda-pro/orb.md)
