Checkpoint
A point in the conversation the reader can go back to, before the agent changed things.
NewInstallation
Copy and paste the following code into your project.
Update the import paths to match your project structure.
Anatomy
Place it between turns, right before the agent edits files or data. It is a quiet line across the thread with a label and a Restore link, so it marks the spot without competing with the messages. Without
onRestore it is only a marker.Restoring is your app's job:
onRestore tells you which point the reader picked. Confirm first when restoring throws away work that was done since.Accessibility
- The line is a
groupnamed bylabel, so screen readers announce where they are before the Restore button. - The decorative lines and the icon are hidden from assistive tech.
API Reference
Checkpoint
| Prop | Type | Default | Description |
|---|---|---|---|
label | ReactNode | 'Checkpoint' | What this point is |
onRestore | () => void | - | Shows the Restore button and handles it |
restoreLabel | string | 'Restore' | Text of the button |
icon | ReactNode | flag | Replaces the icon before the label |
className | string | - | Additional CSS classes |
Found something to improve?
Notice a bug, typo, or missing detail on this page? Help us make the documentation better by opening a GitHub issue.