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 00:29:42 -08:00
1 parent b8559eb341
commit 92e6389519
1 file changed
+10
+10
View File
@@ -989,6 +989,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);