Prompt before reverting thread checkpoint

- Add a confirmation dialog before checkpoint revert
- Warn that newer messages and turn diffs will be discarded
- Cancel revert when the user does not confirm
This commit is contained in:
Julius Marminge committed 2026-02-18 01:09:33 -08:00
1 parent 72158ca943
commit d35ca869ec
1 file changed
+10
+10
View File
@@ -1533,6 +1533,16 @@ export default function ChatView() {
setThreadError(activeThread.id, "Interrupt the current turn before reverting checkpoints.");
return;
}
const confirmed = await api.dialogs.confirm(
[
`Revert this thread to checkpoint ${turnCount}?`,
"This will discard newer messages and turn diffs in this thread.",
"This action cannot be undone.",
].join("\n"),
);
if (!confirmed) {
return;
}
setIsRevertingCheckpoint(true);
setThreadError(activeThread.id, null);