fix: keybind panic (#2092)

This commit is contained in:
Aiden Cline 2025-08-19 22:39:59 -05:00 committed by GitHub
commit 574be9febf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 19 additions and 4 deletions

View file

@ -671,10 +671,22 @@ func renderToolDetails(
body = strings.Join(steps, "\n")
body += "\n\n"
body += baseStyle(app.Keybind(commands.SessionChildCycleCommand)) +
mutedStyle(", ") +
baseStyle(app.Keybind(commands.SessionChildCycleReverseCommand)) +
mutedStyle(" navigate child sessions")
// Build navigation hint with proper spacing
cycleKeybind := app.Keybind(commands.SessionChildCycleCommand)
cycleReverseKeybind := app.Keybind(commands.SessionChildCycleReverseCommand)
var navParts []string
if cycleKeybind != "" {
navParts = append(navParts, baseStyle(cycleKeybind))
}
if cycleReverseKeybind != "" {
navParts = append(navParts, baseStyle(cycleReverseKeybind))
}
if len(navParts) > 0 {
body += strings.Join(navParts, mutedStyle(", ")) + mutedStyle(" navigate child sessions")
}
}
body = defaultStyle(body)
default: