feat(tui): modes

This commit is contained in:
adamdottv
2025-07-10 09:53:18 -05:00
parent ba5be6b625
commit ce4cb820f7
20 changed files with 430 additions and 87 deletions

View File

@@ -86,6 +86,7 @@ func (r CommandRegistry) Matches(msg tea.KeyPressMsg, leader bool) []Command {
const (
AppHelpCommand CommandName = "app_help"
SwitchModeCommand CommandName = "switch_mode"
EditorOpenCommand CommandName = "editor_open"
SessionNewCommand CommandName = "session_new"
SessionListCommand CommandName = "session_list"
@@ -152,6 +153,12 @@ func LoadFromConfig(config *opencode.Config) CommandRegistry {
Keybindings: parseBindings("<leader>h"),
Trigger: []string{"help"},
},
{
Name: SwitchModeCommand,
Description: "switch mode",
Keybindings: parseBindings("tab"),
Trigger: []string{"mode"},
},
{
Name: EditorOpenCommand,
Description: "open editor",