summaryrefslogtreecommitdiff
path: root/internal/hexaiaction/run.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-04-25 08:49:02 +0300
committerPaul Buetow <paul@buetow.org>2026-04-25 08:49:02 +0300
commite33cd60277bc717ad7a8c73cf01c7bedad0d1837 (patch)
treecf3e72b6e16223a207883c7049ae200ac57aee2d /internal/hexaiaction/run.go
parentcaa7876ac8bdb5cc23e12db4d4cb65cf86861151 (diff)
Release v0.35.0: fix-typos action and tmux popup for hexai-tmux-actionv0.35.0
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'internal/hexaiaction/run.go')
-rw-r--r--internal/hexaiaction/run.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/internal/hexaiaction/run.go b/internal/hexaiaction/run.go
index 2a3ade1..0330354 100644
--- a/internal/hexaiaction/run.go
+++ b/internal/hexaiaction/run.go
@@ -251,6 +251,7 @@ func codeActionHandlers() map[ActionKind]CodeActionHandler {
ActionDocument: codeActionHandler{build: buildDocumentPlan},
ActionGoTest: codeActionHandler{build: buildGoTestPlan},
ActionSimplify: codeActionHandler{build: buildSimplifyPlan},
+ ActionFixTypos: codeActionHandler{build: buildFixTyposPlan},
ActionCustomPrompt: codeActionHandler{build: buildCustomPromptPlan},
}
}
@@ -304,6 +305,15 @@ func buildSimplifyPlan(parts InputParts, cfg actionConfig, client chatDoer, _ io
}, true
}
+func buildFixTyposPlan(parts InputParts, cfg actionConfig, client chatDoer, _ io.Writer) (actionPlan, bool) {
+ return actionPlan{
+ fallback: parts.Selection,
+ run: func(ctx context.Context) (string, error) {
+ return handleFixTyposAction(ctx, parts, cfg, client)
+ },
+ }, true
+}
+
func buildCustomPromptPlan(parts InputParts, cfg actionConfig, client chatDoer, stderr io.Writer) (actionPlan, bool) {
return actionPlan{
fallback: parts.Selection,
@@ -348,6 +358,12 @@ func handleSimplifyAction(ctx context.Context, parts InputParts, cfg actionConfi
})
}
+func handleFixTyposAction(ctx context.Context, parts InputParts, cfg actionConfig, client chatDoer) (string, error) {
+ return runWithTimeout(ctx, timeout20s, func(cctx context.Context) (string, error) {
+ return runFixTypos(cctx, cfg, client, parts.Selection)
+ })
+}
+
func handleCustomAction(ctx context.Context, parts InputParts, cfg actionConfig, client chatDoer, selectedCustom *appconfig.CustomAction) (string, error) {
if selectedCustom == nil {
return parts.Selection, nil