Skip to content
weftGitHub

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/warp

Usage

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

PropTypeDefaultDescription
textstring—The thinking.
streamingbooleanfalseIt is still arriving.
secondsnumber—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

RelatedAssistantShimmer