009
A conversation you can fork from any message, with a little branch map up top that shows every path you tried and hops between them in one click.
akaconversation tree·fork chat·branching
Run this in any project set up for the shadcn CLI. It copies the Chat Branches source into your components folder, so the code is yours to change.
npx shadcn@latest add https://devl.dev/r/chat-branches.jsonImport it and render it. Every prop has a typed default, so it works straight away, and you pass your own data when you’re ready.
import { ChatBranches } from "@/components/chat-branches";
export default function Page() {
return <ChatBranches />;
}A free React component in the Conversation collection, written in TypeScript with Tailwind CSS on coss ui. MIT licensed.
Read from the Chat Branches source. Everything is optional unless it says required.
| Prop | Type | Default |
|---|---|---|
| title | string | "Release note, v2.4" |
| messagesrequired | BranchMessage[] | — |
| defaultLeafId | string | — |
| respond | (text: string, history: BranchMessage[]) => string | — |
| assistantName | string | "Lumen" |
| className | string | — |