From 5706c6ad3add2ad4eb6c3d152f0fa72b701027c4 Mon Sep 17 00:00:00 2001 From: adamdottv <2363879+adamdottv@users.noreply.github.com> Date: Fri, 13 Jun 2025 09:57:54 -0500 Subject: wip: refactoring tui --- packages/tui/internal/commands/command.go | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 packages/tui/internal/commands/command.go (limited to 'packages/tui/internal/commands') 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 -- cgit v1.2.3