authorgravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-02-18 00:29:42-08:00
committergravatar for jmarminge@gmail.comJulius Marminge <jmarminge@gmail.com> 2026-02-18 21:59:17-08:00
logec5c3c32cd2acaec16f0b6b26d2f0e6bb3030e3c
treec6595f02bace1d7b676d7720ba540a9892775de4
parent5209967a7e8b7a8aad24653c7e15264dbc7b7f4f

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

1 files changed, 10 insertions(+), 0 deletions(-)

apps/web/src/components/ChatView.tsx+10
...@@ -1533,6 +1533,16 @@ export default function ChatView() {...@@ -1533,6 +1533,16 @@ export default function ChatView() {
1533 setThreadError(activeThread.id, "Interrupt the current turn before reverting checkpoints.");1533 setThreadError(activeThread.id, "Interrupt the current turn before reverting checkpoints.");
1534 return;1534 return;
1535 }1535 }
1536 const confirmed = await api.dialogs.confirm(
1537 [
1538 `Revert this thread to checkpoint ${turnCount}?`,
1539 "This will discard newer messages and turn diffs in this thread.",
1540 "This action cannot be undone.",
1541 ].join("\n"),
1542 );
1543 if (!confirmed) {
1544 return;
1545 }
15361546
1537 setIsRevertingCheckpoint(true);1547 setIsRevertingCheckpoint(true);
1538 setThreadError(activeThread.id, null);1548 setThreadError(activeThread.id, null);