summaryrefslogtreecommitdiff
path: root/internal/hexaiaction/run.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-04-25 16:12:23 +0300
committerPaul Buetow <paul@buetow.org>2026-04-25 16:12:23 +0300
commita1031b761ff0c5cd79f3f0906e5c3b33fa849f37 (patch)
tree18e9401ecc83ebe0c1a35bf92152a81a195e24f2 /internal/hexaiaction/run.go
parentc73a92022d39e73d41b00cf72d959bf0d26c8d6f (diff)
feat: configurable hexai-tmux-action menu via [[tmux_action.menu]]
When [[tmux_action.menu]] is defined in config it fully replaces the built-in menu. Each entry takes a kind (built-in or "custom"), optional title/hotkey overrides, and optional custom_id for embedding custom actions directly in the main menu. Hotkey dispatch is now dynamic so any single-character hotkey works without code changes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'internal/hexaiaction/run.go')
-rw-r--r--internal/hexaiaction/run.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/hexaiaction/run.go b/internal/hexaiaction/run.go
index 0330354..92aa72d 100644
--- a/internal/hexaiaction/run.go
+++ b/internal/hexaiaction/run.go
@@ -89,6 +89,12 @@ func NewRunner() *Runner {
}
func chooseActionFromConfig(cfg appconfig.App) (actionChoice, error) {
+ // Config-driven menu takes priority when defined.
+ if len(cfg.TmuxActionMenu) > 0 {
+ kind, custom, err := RunTUIFromConfig(cfg.TmuxActionMenu, cfg.CustomActions)
+ return actionChoice{kind: kind, custom: custom}, err
+ }
+ // Default path: built-in menu, with optional custom-actions submenu.
if len(cfg.CustomActions) == 0 {
kind, err := RunTUI()
return actionChoice{kind: kind}, err