Checkpoint travelPro
Time travel over saved graph checkpoints, fork from any checkpoint.
On this page
ProA run and a fork that tried a goodwill refund.
Installation
Usage
import { CheckpointTravel } from "@/components/ui/chatcn/pro/checkpoint-travel"
<CheckpointTravel checkpoints={checkpoints} onFork={fork} onReplay={replay} />One lane per branch, forks drawn from the checkpoint they came from. Each checkpoint shows what its node changed against the one before, then the full state.
Examples
States
ProA fork that fails, and no checkpoints yet.
Props
| Prop | Type | Notes |
|---|---|---|
checkpoints | { id, node, at, state, parentId?, branch? }[] | Oldest first |
value, defaultValue, onValueChange | string | Selected checkpoint |
onFork | (id) => Promise<void> | Reject with a message to show it |
onReplay | (id) => void | Run again |
Accessibility
- Arrow keys move along a lane and between lanes; Home and End jump to its ends.
- Changes carry Added, Removed or Changed as text.