@@ -3,6 +3,7 @@ import {ipcRenderer} from "electron";
33import { Terminal } from "xterm" ;
44import { PersistedSession , SessionConfig , SessionType } from "./types" ;
55import { isClaudeSessionReady } from "./terminal-utils" ;
6+ import * as path from "path" ;
67
78interface Session {
89 id : string ;
@@ -915,7 +916,9 @@ document.getElementById("new-session")?.addEventListener("click", async () => {
915916
916917 if ( lastSettings . projectDir ) {
917918 selectedDirectory = lastSettings . projectDir ;
918- projectDirInput . value = lastSettings . projectDir ;
919+ // Show last part of path in parentheses before full path
920+ const dirName = path . basename ( lastSettings . projectDir ) ;
921+ projectDirInput . value = `(${ dirName } ) ${ lastSettings . projectDir } ` ;
919922
920923 // Load git branches for the last directory
921924 await loadAndPopulateBranches ( lastSettings . projectDir , lastSettings . parentBranch ) ;
@@ -971,7 +974,9 @@ browseDirBtn?.addEventListener("click", async () => {
971974 const dir = await ipcRenderer . invoke ( "select-directory" ) ;
972975 if ( dir ) {
973976 selectedDirectory = dir ;
974- projectDirInput . value = dir ;
977+ // Show last part of path in parentheses before full path
978+ const dirName = path . basename ( dir ) ;
979+ projectDirInput . value = `(${ dirName } ) ${ dir } ` ;
975980
976981 // Load git branches
977982 await loadAndPopulateBranches ( dir ) ;
0 commit comments