diff --git a/internal/tui/components/chat/sidebar/sidebar.go b/internal/tui/components/chat/sidebar/sidebar.go index 12beb139071da58168e9c4f07b991c9ad05f7320..52921f1c2c86a1d1a6497761123d321b736599d8 100644 --- a/internal/tui/components/chat/sidebar/sidebar.go +++ b/internal/tui/components/chat/sidebar/sidebar.go @@ -509,9 +509,10 @@ func (s *sidebarCmp) currentModelBlock() string { func cwd() string { cwd := config.WorkingDirectory() t := styles.CurrentTheme() - // replace home directory with ~ + // Replace home directory with ~, unless we're at the top level of the + // home directory). homeDir, err := os.UserHomeDir() - if err == nil { + if err == nil && cwd != homeDir { cwd = strings.ReplaceAll(cwd, homeDir, "~") } return t.S().Muted.Render(cwd)