diff options
Diffstat (limited to 'packages/tui/internal/commands')
| -rw-r--r-- | packages/tui/internal/commands/command.go | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/packages/tui/internal/commands/command.go b/packages/tui/internal/commands/command.go new file mode 100644 index 000000000..c2b8f2eae --- /dev/null +++ b/packages/tui/internal/commands/command.go @@ -0,0 +1,25 @@ +package commands + +import ( + "github.com/charmbracelet/bubbles/v2/key" +) + +// Command represents a user-triggerable action. +type Command struct { + // Name is the identifier used for slash commands (e.g., "new"). + Name string + // Description is a short explanation of what the command does. + Description string + // KeyBinding is the keyboard shortcut to trigger this command. + KeyBinding key.Binding +} + +// Registry holds all the available commands. +type Registry struct { + Commands map[string]Command +} + +// ExecuteCommandMsg is a message sent when a command should be executed. +type ExecuteCommandMsg struct { + Name string +}
\ No newline at end of file |
