feat(tui): shift+tab to cycle modes backward (#1049)

This commit is contained in:
Adi Yeroslav 2025-07-16 15:43:48 +03:00 committed by GitHub
parent add81b9739
commit 57d1a60efc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 35 additions and 6 deletions

View file

@ -87,6 +87,7 @@ func (r CommandRegistry) Matches(msg tea.KeyPressMsg, leader bool) []Command {
const (
AppHelpCommand CommandName = "app_help"
SwitchModeCommand CommandName = "switch_mode"
SwitchModeReverseCommand CommandName = "switch_mode_reverse"
EditorOpenCommand CommandName = "editor_open"
SessionNewCommand CommandName = "session_new"
SessionListCommand CommandName = "session_list"
@ -156,9 +157,14 @@ func LoadFromConfig(config *opencode.Config) CommandRegistry {
},
{
Name: SwitchModeCommand,
Description: "switch mode",
Description: "next mode",
Keybindings: parseBindings("tab"),
},
{
Name: SwitchModeReverseCommand,
Description: "previous mode",
Keybindings: parseBindings("shift+tab"),
},
{
Name: EditorOpenCommand,
Description: "open editor",