summaryrefslogtreecommitdiff
path: root/internal/hexaiaction/run.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-09-15 08:07:51 +0300
committerPaul Buetow <paul@buetow.org>2025-09-15 08:07:51 +0300
commitdac90ba0e3036a15779da70e771c5cf2818c817f (patch)
treebd6ddb850a640b3fce79f5e65b27ce41b95e11a3 /internal/hexaiaction/run.go
parent828d1cc59ac22d10cd1298aac0488f868e2280db (diff)
release: v0.10.1v0.10.1
- Fix TUI 'p' hotkey: open editor for Custom prompt - Introduce ActionCustomPrompt to disambiguate from Custom actions submenu - Bump version to 0.10.1
Diffstat (limited to 'internal/hexaiaction/run.go')
-rw-r--r--internal/hexaiaction/run.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/internal/hexaiaction/run.go b/internal/hexaiaction/run.go
index d32edbf..b07fbbb 100644
--- a/internal/hexaiaction/run.go
+++ b/internal/hexaiaction/run.go
@@ -101,7 +101,12 @@ func executeAction(ctx context.Context, kind ActionKind, parts InputParts, cfg a
selectedCustom = nil // clear after use
return out, err
}
- // Fallback: open editor for free-form instruction
+ // No selected custom; treat as no-op
+ return parts.Selection, nil
+ case ActionCustomPrompt:
+ cctx, cancel := timeout10s(ctx)
+ defer cancel()
+ // Open editor for free-form instruction
prompt, err := editor.OpenTempAndEdit(nil)
if err != nil || strings.TrimSpace(prompt) == "" {
fmt.Fprintln(stderr, logging.AnsiBase+"hexai-tmux-action: custom prompt canceled or empty; echoing input"+logging.AnsiReset)