Skip to content

Commit 85e2038

Browse files
committed
Add missing global shortcuts to help dialog
Previously the help dialog only showed bindings exposed in Bindings() method, which didn't include many global shortcuts that were actually available. Now includes: - Ctrl+y - toggle yolo mode - Ctrl+o - toggle hide tool results - Ctrl+s - cycle agent - Ctrl+m - model picker - Ctrl+x - clear queue - Ctrl+z - suspend - Ctrl+b - toggle sidebar (when not in lean mode) These shortcuts are all functional but weren't discoverable before. Assisted-By: docker-agent
1 parent 14a21d5 commit 85e2038

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

pkg/tui/tui.go

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1582,6 +1582,44 @@ func (m *appModel) Bindings() []key.Binding {
15821582
key.WithHelp("Ctrl+h", "help"),
15831583
))
15841584

1585+
// Additional global shortcuts
1586+
bindings = append(bindings, key.NewBinding(
1587+
key.WithKeys("ctrl+y"),
1588+
key.WithHelp("Ctrl+y", "toggle yolo mode"),
1589+
))
1590+
1591+
bindings = append(bindings, key.NewBinding(
1592+
key.WithKeys("ctrl+o"),
1593+
key.WithHelp("Ctrl+o", "toggle hide tool results"),
1594+
))
1595+
1596+
bindings = append(bindings, key.NewBinding(
1597+
key.WithKeys("ctrl+s"),
1598+
key.WithHelp("Ctrl+s", "cycle agent"),
1599+
))
1600+
1601+
bindings = append(bindings, key.NewBinding(
1602+
key.WithKeys("ctrl+m"),
1603+
key.WithHelp("Ctrl+m", "model picker"),
1604+
))
1605+
1606+
bindings = append(bindings, key.NewBinding(
1607+
key.WithKeys("ctrl+x"),
1608+
key.WithHelp("Ctrl+x", "clear queue"),
1609+
))
1610+
1611+
bindings = append(bindings, key.NewBinding(
1612+
key.WithKeys("ctrl+z"),
1613+
key.WithHelp("Ctrl+z", "suspend"),
1614+
))
1615+
1616+
if !m.leanMode {
1617+
bindings = append(bindings, key.NewBinding(
1618+
key.WithKeys("ctrl+b"),
1619+
key.WithHelp("Ctrl+b", "toggle sidebar"),
1620+
))
1621+
}
1622+
15851623
// Show newline help based on keyboard enhancement support
15861624
if m.keyboardEnhancementsSupported {
15871625
bindings = append(bindings, key.NewBinding(

0 commit comments

Comments
 (0)