Message Branches
Message versions and a conversation branch tree. Pro · AI chat and agents › Chat
ChatGPT-style switcher between the versions of an edited message or a regenerated reply.
Installation
npx valyro-cli@latest login
npx valyro-cli@latest add message-branches
npm install valyro-ui-pro
import 'valyro-ui-pro/styles.css';
import { MessageBranches } from 'valyro-ui-pro';
Props
| Prop | Type | Default | |
|---|---|---|---|
count * | number | How many versions the message has (edits or regenerations). | |
index | number | Shown version, 0-based. | |
defaultIndex | number | Defaults to the newest version. | |
onIndexChange | (index: number) => void | Called with the new index when it changes. | |
locale | string | BCP 47 locale for the numbers; defaults to the ThemeProvider's. | |
labels | Partial<MessageBranchesLabels> | Overrides for the built-in English text; keys left out keep their defaults. |
Related components
- AI Chat Window — AI chat window
- Chat Message — Messages with streaming output
- Streaming Text — Smooth token streaming
- Markdown Preview — Rendered Markdown
- Response Feedback — Answer rating and a rubric for reviewers
- Prompt Composer — Prompt field with attachments
- Inline Suggestion — Inline autocomplete suggestion
- Model Selector — AI model picker
- Model Comparison — Side-by-side answers from several models
- Prompt Library — Prompt library with variables
- Chain of Thought — Model reasoning steps
- Tool Call — Tool call with approval
Previous: Chat Message · Next: Streaming Text · All AI chat and agents