ValyroUI Русская версия

Chain of Thought

Model reasoning steps. Pro · AI chat and agents › Agents and reasoning

Collapsible reasoning trace: the steps a model took before answering.

Installation

npx valyro-cli@latest login
npx valyro-cli@latest add chain-of-thought
npm install valyro-ui-pro

import 'valyro-ui-pro/styles.css';
import { ChainOfThought } from 'valyro-ui-pro';

Props

PropTypeDefault
steps *ThoughtStep[]Reasoning steps in order; while streaming, the active one is previewed in the collapsed header.
streamingbooleanfalseThe model is still reasoning: the header shimmers and the panel opens.
durationnumberReasoning time in milliseconds, for the "Thought for 12s" summary.
openbooleanControlled open; use with onOpenChange.
defaultOpenbooleanDefault: open while streaming.
onOpenChange(open: boolean) => voidCalled with the new open when it changes.
autoCollapsebooleantrueCollapse when streaming turns off, so the answer takes the focus. Default true.
localestringBCP 47 locale for the duration; defaults to the ThemeProvider's.
labelsPartial<ChainOfThoughtLabels>Overrides for the built-in English text; keys left out keep their defaults.

Related components

Previous: Prompt Library · Next: Tool Call · All AI chat and agents