@@ -5,6 +5,17 @@ import { useExtensionState } from "@/context/ExtensionStateContext"
55import { vscode } from "@/utils/vscode"
66import { useDebouncedAction } from "@/components/ui/hooks/useDebouncedAction"
77
8+ // Helper functions for file path display
9+ const getFileName = ( uri : string ) : string => {
10+ return uri . split ( "/" ) . pop ( ) || uri
11+ }
12+
13+ const getFilePath = ( uri : string ) : string => {
14+ const parts = uri . split ( "/" )
15+ parts . pop ( ) // Remove filename
16+ return parts . length > 0 ? parts . join ( "/" ) : "/"
17+ }
18+
819/**
920 * FilesChangedOverview is a self-managing component that listens for checkpoint events
1021 * and displays file changes. It manages its own state and communicates with the backend
@@ -350,10 +361,12 @@ const FileItem: React.FC<FileItemProps> = React.memo(
350361 className = "flex justify-between items-center px-2 py-1.5 mb-1 bg-[var(--vscode-list-hoverBackground)] rounded text-xs min-h-[32px] leading-tight" >
351362 < div className = "flex-1 min-w-0" >
352363 < div className = "font-mono text-xs text-[var(--vscode-editor-foreground)] overflow-hidden text-ellipsis whitespace-nowrap font-medium" >
353- { file . uri }
364+ < span > { getFileName ( file . uri ) } </ span >
365+ < span className = "mx-1 opacity-60" > •</ span >
366+ < span className = "opacity-60 text-[11px]" > { t ( `file-changes:file_types.${ file . type } ` ) } </ span >
354367 </ div >
355- < div className = "text-[11px ] text-[var(--vscode-descriptionForeground)] mt-0.5" >
356- { t ( ` file-changes:file_types. ${ file . type } ` ) }
368+ < div className = "text-[10px ] text-[var(--vscode-descriptionForeground)] opacity-60 mt-0.5 overflow-hidden text-ellipsis whitespace-nowrap " >
369+ { getFilePath ( file . uri ) }
357370 </ div >
358371 </ div >
359372
@@ -367,8 +380,8 @@ const FileItem: React.FC<FileItemProps> = React.memo(
367380 disabled = { isProcessing }
368381 title = { t ( "file-changes:actions.view_diff" ) }
369382 data-testid = { `diff-${ file . uri } ` }
370- className = "bg-transparent text-[var(--vscode-button-foreground)] border border-[var(--vscode-button-border)] rounded px-1.5 py-0.5 text-[11px] min-w-[50px ] disabled:opacity-60 disabled:cursor-not-allowed cursor-pointer" >
371- { t ( "file-changes:actions.view_diff" ) }
383+ className = "bg-transparent text-[var(--vscode-button-foreground)] border border-[var(--vscode-button-border)] rounded px-1.5 py-0.5 text-[11px] min-w-[35px ] disabled:opacity-60 disabled:cursor-not-allowed cursor-pointer" >
384+ Diff
372385 </ button >
373386 < button
374387 onClick = { ( ) => handleWithDebounce ( ( ) => onRejectFile ( file . uri ) ) }
0 commit comments