# ReasoningTrace

> A collapsible streaming reasoning trace.

## Install

```bash
npx shadcn@latest add https://crate.onerollstudios.com/r/reasoning-trace.json
```

## Import

```tsx
import { ReasoningTrace } from "@/components/agent-wait-states/reasoning-trace";
```

## Props

| Prop | Type | Required | Default | Notes |
| --- | --- | --- | --- | --- |
| `className` | `string` | no |  |  |
| `accent` | `boolean` | no | `false` |  |
| `labels` | `Partial<CrateLabels>` | no |  | Replace any of this component's labels. Overrides CrateProvider. |
| `text` | `string` | no | `""` |  |
| `done` | `boolean` | no | `false` |  |
| `durationSeconds` | `number` | no |  |  |
| `defaultOpen` | `boolean` | no |  |  |

## Labels

Override with the `labels` prop or a `CrateProvider`.

| Label | English default |
| --- | --- |
| `showThinking` | `"Show thinking"` |
| `thoughtDone` | `"Done thinking"` |
| `thoughtFor` | `` (seconds, f) => `Thought for ${f.seconds(seconds)}` `` |
| `reasoningPlaceholder` | `"Working through the details…"` |

## Example

```tsx
<ReasoningTrace text={reasoning} done={finished} durationSeconds={12} accent />
```
