@@ -95,46 +95,42 @@ export const CheckpointMenu = ({
9595 </ div >
9696 </ div >
9797 < div className = "flex flex-col gap-1 group hover:text-foreground" >
98- < div className = "flex flex-col gap-1 group hover:text-foreground" >
99- { ! isConfirming ? (
98+ { ! isConfirming ? (
99+ < Button
100+ variant = "secondary"
101+ onClick = { ( ) => setIsConfirming ( true ) }
102+ data-testid = "restore-files-and-task-btn" >
103+ { t ( "chat:checkpoint.menu.restoreFilesAndTask" ) }
104+ </ Button >
105+ ) : (
106+ < >
100107 < Button
101- variant = "secondary"
102- onClick = { ( ) => setIsConfirming ( true ) }
103- data-testid = "restore-files-and-task-btn" >
104- { t ( "chat:checkpoint.menu.restoreFilesAndTask" ) }
108+ variant = "default"
109+ onClick = { onRestore }
110+ className = "grow"
111+ data-testid = "confirm-restore-btn" >
112+ < div className = "flex flex-row gap-1" >
113+ < CheckIcon />
114+ < div > { t ( "chat:checkpoint.menu.confirm" ) } </ div >
115+ </ div >
105116 </ Button >
106- ) : (
107- < >
108- < Button
109- variant = "default"
110- onClick = { onRestore }
111- className = "grow"
112- data-testid = "confirm-restore-btn" >
113- < div className = "flex flex-row gap-1" >
114- < CheckIcon />
115- < div > { t ( "chat:checkpoint.menu.confirm" ) } </ div >
116- </ div >
117- </ Button >
118- < Button variant = "secondary" onClick = { ( ) => setIsConfirming ( false ) } >
119- < div className = "flex flex-row gap-1" >
120- < Cross2Icon />
121- < div > { t ( "chat:checkpoint.menu.cancel" ) } </ div >
122- </ div >
123- </ Button >
124- </ >
125- ) }
126- { isConfirming ? (
127- < div
128- data-testid = "checkpoint-confirm-warning"
129- className = "text-destructive font-bold" >
130- { t ( "chat:checkpoint.menu.cannotUndo" ) }
131- </ div >
132- ) : (
133- < div className = "text-muted transition-colors group-hover:text-foreground" >
134- { t ( "chat:checkpoint.menu.restoreFilesAndTaskDescription" ) }
135- </ div >
136- ) }
137- </ div >
117+ < Button variant = "secondary" onClick = { ( ) => setIsConfirming ( false ) } >
118+ < div className = "flex flex-row gap-1" >
119+ < Cross2Icon />
120+ < div > { t ( "chat:checkpoint.menu.cancel" ) } </ div >
121+ </ div >
122+ </ Button >
123+ </ >
124+ ) }
125+ { isConfirming ? (
126+ < div data-testid = "checkpoint-confirm-warning" className = "text-destructive font-bold" >
127+ { t ( "chat:checkpoint.menu.cannotUndo" ) }
128+ </ div >
129+ ) : (
130+ < div className = "text-muted transition-colors group-hover:text-foreground" >
131+ { t ( "chat:checkpoint.menu.restoreFilesAndTaskDescription" ) }
132+ </ div >
133+ ) }
138134 </ div >
139135 </ div >
140136 </ PopoverContent >
0 commit comments