11'use client'
22
33import { type FC , memo , useMemo , useState } from 'react'
4- import { Check , Copy , CornerDownLeft , RotateCcw , Square , ThumbsDown , ThumbsUp } from 'lucide-react'
4+ import { Check , Copy , RotateCcw , Square , ThumbsDown , ThumbsUp } from 'lucide-react'
55import { Button } from '@/components/emcn'
66import { createLogger } from '@/lib/logs/console/logger'
77import { InlineToolCall } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel-new/components/copilot/components'
@@ -263,29 +263,33 @@ const CopilotMessage: FC<CopilotMessageProps> = memo(
263263
264264 { /* Inline Checkpoint Discard Confirmation - shown below input in edit mode */ }
265265 { showCheckpointDiscardModal && (
266- < div className = 'mt-2 rounded-lg border border-gray-200 bg-gray-50 p-2.5 dark:border-gray-700 dark:bg-gray-900' >
267- < p className = 'mb-2 text-foreground text-sm' > Continue from a previous message?</ p >
268- < div className = 'flex gap-1.5' >
269- < button
266+ < div className = 'mt-[8px] rounded-[4px] border border-[#3D3D3D] bg-[#282828] p-[10px] dark:border-[#3D3D3D] dark:bg-[#353535]' >
267+ < p className = 'mb-[8px] text-[#E6E6E6] text-sm' >
268+ Continue from a previous message?
269+ </ p >
270+ < div className = 'flex gap-[6px]' >
271+ < Button
270272 onClick = { handleCancelCheckpointDiscard }
271- className = 'flex flex-1 items-center justify-center gap-1.5 rounded-md border border-gray-300 bg-muted px-2 py-1 text-foreground text-xs transition-colors hover:bg-muted/80 dark:border-gray-600 dark:bg-background dark:hover:bg-muted'
273+ variant = 'default'
274+ className = 'flex flex-1 items-center justify-center gap-[6px] px-[8px] py-[4px] text-xs'
272275 >
273276 < span > Cancel</ span >
274- < span className = 'text-[10px ] text-muted-foreground ' > (Esc)</ span >
275- </ button >
276- < button
277+ < span className = 'text-[#787878 ] text-[10px] ' > (Esc)</ span >
278+ </ Button >
279+ < Button
277280 onClick = { handleContinueWithoutRevert }
278- className = 'flex-1 rounded-md border border-border bg-background px-2 py-1 text-xs transition-colors hover:bg-muted dark:bg-muted dark:hover:bg-muted/80'
281+ variant = 'outline'
282+ className = 'flex-1 px-[8px] py-[4px] text-xs'
279283 >
280284 Continue
281- </ button >
282- < button
285+ </ Button >
286+ < Button
283287 onClick = { handleContinueAndRevert }
284- className = 'flex flex-1 items-center justify-center gap-1.5 rounded-md bg-[var(--brand-primary-hover-hex)] px-2 py-1 text-white text-xs transition-colors hover:bg-[var(--brand-primary-hex)]'
288+ variant = 'outline'
289+ className = 'flex-1 px-[8px] py-[4px] text-xs'
285290 >
286- < span > Continue and revert</ span >
287- < CornerDownLeft className = 'h-3 w-3' />
288- </ button >
291+ Revert
292+ </ Button >
289293 </ div >
290294 </ div >
291295 ) }
@@ -373,18 +377,19 @@ const CopilotMessage: FC<CopilotMessageProps> = memo(
373377 ) }
374378
375379 { /* Revert button on hover (only when has checkpoints and not generating) */ }
376- { ! isSendingMessage && hasCheckpoints && (
377- < div className = 'pointer-events-auto absolute top-2 right-2 opacity-0 transition-opacity group-hover:opacity-100 ' >
378- < button
380+ { ! isSendingMessage && hasCheckpoints && isHoveringMessage && (
381+ < div className = 'pointer-events-auto absolute right-[6px] bottom-[6px] ' >
382+ < Button
379383 onClick = { ( e ) => {
380384 e . stopPropagation ( )
381385 handleRevertToCheckpoint ( )
382386 } }
383- className = 'flex h-6 w-6 items-center justify-center rounded-full bg-muted text-muted-foreground transition-all duration-200 hover:bg-muted-foreground/20'
387+ variant = 'ghost'
388+ className = 'h-[22px] w-[22px] rounded-full p-0'
384389 title = 'Revert to checkpoint'
385390 >
386- < RotateCcw className = 'h-3 w-3' />
387- </ button >
391+ < RotateCcw className = 'h-3.5 w-3.5 ' />
392+ </ Button >
388393 </ div >
389394 ) }
390395 </ div >
@@ -393,29 +398,28 @@ const CopilotMessage: FC<CopilotMessageProps> = memo(
393398
394399 { /* Inline Restore Checkpoint Confirmation */ }
395400 { showRestoreConfirmation && (
396- < div className = 'mt-2 rounded-lg border border-gray-200 bg-gray-50 p-2.5 dark:border-gray-700 dark:bg-gray-900 ' >
397- < p className = 'mb-2 text-foreground text-sm' >
401+ < div className = 'mt-[8px] rounded-[4px] border border-[#3D3D3D] bg-[#282828] p-[10px] dark:border-[#3D3D3D] dark:bg-[#353535] ' >
402+ < p className = 'mb-[8px] text-[#E6E6E6] text-sm' >
398403 Revert to checkpoint? This will restore your workflow to the state saved at this
399404 checkpoint.{ ' ' }
400- < span className = 'font-medium text-red-600 dark:text-red-400' >
401- This action cannot be undone.
402- </ span >
405+ < span className = 'font-medium text-[#EF4444]' > This action cannot be undone.</ span >
403406 </ p >
404- < div className = 'flex gap-1.5 ' >
405- < button
407+ < div className = 'flex gap-[6px] ' >
408+ < Button
406409 onClick = { handleCancelRevert }
407- className = 'flex flex-1 items-center justify-center gap-1.5 rounded-md border border-gray-300 bg-muted px-2 py-1 text-foreground text-xs transition-colors hover:bg-muted/80 dark:border-gray-600'
410+ variant = 'default'
411+ className = 'flex flex-1 items-center justify-center gap-[6px] px-[8px] py-[4px] text-xs'
408412 >
409413 < span > Cancel</ span >
410- < span className = 'text-[10px ] text-muted-foreground ' > (Esc)</ span >
411- </ button >
412- < button
414+ < span className = 'text-[#787878 ] text-[10px] ' > (Esc)</ span >
415+ </ Button >
416+ < Button
413417 onClick = { handleConfirmRevert }
414- className = 'flex flex-1 items-center justify-center gap-1.5 rounded-md bg-red-500 px-2 py-1 text-white text-xs transition-colors hover:bg-red-600'
418+ variant = 'outline'
419+ className = 'flex-1 px-[8px] py-[4px] text-xs'
415420 >
416- < span > Revert</ span >
417- < CornerDownLeft className = 'h-3 w-3' />
418- </ button >
421+ Revert
422+ </ Button >
419423 </ div >
420424 </ div >
421425 ) }
0 commit comments