diff options
| author | Aiden Cline <[email protected]> | 2025-08-11 00:46:38 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-08-11 01:46:38 -0400 |
| commit | 62b8c7aee0cb4da28b3dbb99ed1aed4be4360127 (patch) | |
| tree | d96030970a95c5390e430e9e4680185e8fab5369 /packages/tui/internal/commands | |
| parent | 6145dfcca0b6c611abef992610fd57370f9e3886 (diff) | |
| download | opencode-62b8c7aee0cb4da28b3dbb99ed1aed4be4360127.tar.gz opencode-62b8c7aee0cb4da28b3dbb99ed1aed4be4360127.zip | |
feat (tui): agents dialog (#1802)
Diffstat (limited to 'packages/tui/internal/commands')
| -rw-r--r-- | packages/tui/internal/commands/command.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/packages/tui/internal/commands/command.go b/packages/tui/internal/commands/command.go index cb54bd09d..55f118aaa 100644 --- a/packages/tui/internal/commands/command.go +++ b/packages/tui/internal/commands/command.go @@ -64,12 +64,13 @@ func (r CommandRegistry) Sorted() []Command { commands = append(commands, command) } slices.SortFunc(commands, func(a, b Command) int { - // Priority order: session_new, session_share, model_list, app_help first, app_exit last + // Priority order: session_new, session_share, model_list, agent_list, app_help first, app_exit last priorityOrder := map[CommandName]int{ SessionNewCommand: 0, AppHelpCommand: 1, SessionShareCommand: 2, ModelListCommand: 3, + AgentListCommand: 4, } aPriority, aHasPriority := priorityOrder[a.Name] @@ -119,6 +120,7 @@ const ( SessionExportCommand CommandName = "session_export" ToolDetailsCommand CommandName = "tool_details" ModelListCommand CommandName = "model_list" + AgentListCommand CommandName = "agent_list" ThemeListCommand CommandName = "theme_list" FileListCommand CommandName = "file_list" FileCloseCommand CommandName = "file_close" @@ -249,6 +251,12 @@ func LoadFromConfig(config *opencode.Config) CommandRegistry { Trigger: []string{"models"}, }, { + Name: AgentListCommand, + Description: "list agents", + Keybindings: parseBindings("<leader>a"), + Trigger: []string{"agents"}, + }, + { Name: ThemeListCommand, Description: "list themes", Keybindings: parseBindings("<leader>t"), |
