From a1031b761ff0c5cd79f3f0906e5c3b33fa849f37 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 25 Apr 2026 16:12:23 +0300 Subject: 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 --- internal/hexaiaction/run.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'internal/hexaiaction/run.go') 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 -- cgit v1.2.3