chore: if we're in the home dir top level show the full path

Christian Rocha created

Change summary

internal/tui/components/chat/sidebar/sidebar.go | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

Detailed changes

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)