Reasoning
The assistant's thinking, folded away once it is done.
SourcePackage @weft-js/warp
Preview
tsx
import { Reasoning } from '@weft-js/warp'export function Thinking() { return ( <Reasoning streaming text="The build passed, so the failure is in the health check. I'll read which check failed and in which region." /> )}Installation
npm install @weft-js/warpUsage
tsx
import { Reasoning } from '@weft-js/warp'<Reasoning streaming text="The build passed, so the failure is in the health check. I'll read which check failed and in which region." />Finished
Folded, with how long it took.
tsx
import { Reasoning } from '@weft-js/warp'export function Finished() { return ( <Reasoning seconds={4} text="The build passed, so the failure is in the health check. The log shows ap-south timing out three times in a row." /> )}Accessibility
- This has no shortcuts of its own: controls inside it use Tab, Enter and Space as usual, and warp's parts keep their roles and labels.
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
text | string | — | The thinking. |
streaming | boolean | false | It is still arriving. |
seconds | number | — | How long it took. |
Parts
Every element carries a stable name, so you can style it from your own CSS: [data-scope="reasoning"] [data-part="chev"]
chevbody