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 authored and Julius Marminge committed 2026-02-18 21:59:17 -08:00
1 parent 5209967a7e
commit ec5c3c32cd
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);