From a0993a3ba079352c5911a9a9fc2024f560bf6108 Mon Sep 17 00:00:00 2001 From: cte Date: Sat, 8 Feb 2025 01:19:12 -0800 Subject: [PATCH] Remove "Restore" option on current checkpoint --- .../chat/checkpoints/CheckpointMenu.tsx | 92 +++++++++---------- .../chat/checkpoints/CheckpointSaved.tsx | 2 +- 2 files changed, 47 insertions(+), 47 deletions(-) diff --git a/webview-ui/src/components/chat/checkpoints/CheckpointMenu.tsx b/webview-ui/src/components/chat/checkpoints/CheckpointMenu.tsx index 49a76a505a..954dc2e8f3 100644 --- a/webview-ui/src/components/chat/checkpoints/CheckpointMenu.tsx +++ b/webview-ui/src/components/chat/checkpoints/CheckpointMenu.tsx @@ -46,20 +46,20 @@ export const CheckpointMenu = ({ ts, commitHash, currentCheckpointHash }: Checkp - {!isCurrent && ( - { - setIsOpen(open) - setIsConfirming(false) - }}> - - - - -
+ { + setIsOpen(open) + setIsConfirming(false) + }}> + + + + +
+ {!isCurrent && (
+ )} +
-
- {!isConfirming ? ( - + ) : ( + <> + - ) : ( - <> - - - - )} - {isConfirming ? ( -
This action cannot be undone.
- ) : ( -
- Restores your project's files back to a snapshot taken at this point and - deletes all messages after this point. -
- )} -
+ + + )} + {isConfirming ? ( +
This action cannot be undone.
+ ) : ( +
+ Restores your project's files back to a snapshot taken at this point and deletes + all messages after this point. +
+ )}
-
-
- )} +
+
+
) } diff --git a/webview-ui/src/components/chat/checkpoints/CheckpointSaved.tsx b/webview-ui/src/components/chat/checkpoints/CheckpointSaved.tsx index b5e243db05..d5c0050e53 100644 --- a/webview-ui/src/components/chat/checkpoints/CheckpointSaved.tsx +++ b/webview-ui/src/components/chat/checkpoints/CheckpointSaved.tsx @@ -11,7 +11,7 @@ export const CheckpointSaved = (props: CheckpointSavedProps) => { return (
-
+
Checkpoint {isCurrent && Current}