Skip to content
kerfjsGitHub

Reasoning

The assistant's thinking, folded away once it is done.

SourcePackage @kerf-js/veneer

Preview

tsx
import { Reasoning } from '@kerf-js/veneer'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 @kerf-js/veneer

Usage

tsx
import { Reasoning } from '@kerf-js/veneer'<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 '@kerf-js/veneer'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 veneer'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