Guides
Message Branching
Switch between different conversation branches.
A new branch is created when:
- a user message is edited
- an assistant message is reloaded
Branches are automatically tracked by assistant-ui by observing changes to the messages
array.
Enabling branch support
You can show a branch picker by using BranchPickerPrimitive
.
API
You can access the current branch state or navigate via the API as well.
These APIs rely on the message state and may only be called inside a message component.