diff options
| author | Paul Buetow <paul@buetow.org> | 2026-04-25 08:49:02 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-04-25 08:49:02 +0300 |
| commit | e33cd60277bc717ad7a8c73cf01c7bedad0d1837 (patch) | |
| tree | cf3e72b6e16223a207883c7049ae200ac57aee2d /internal/appconfig | |
| parent | caa7876ac8bdb5cc23e12db4d4cb65cf86861151 (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/appconfig')
| -rw-r--r-- | internal/appconfig/app_sections.go | 2 | ||||
| -rw-r--r-- | internal/appconfig/config_load.go | 4 | ||||
| -rw-r--r-- | internal/appconfig/config_merge.go | 2 | ||||
| -rw-r--r-- | internal/appconfig/config_types.go | 4 |
4 files changed, 12 insertions, 0 deletions
diff --git a/internal/appconfig/app_sections.go b/internal/appconfig/app_sections.go index 430ebce..5426f2a 100644 --- a/internal/appconfig/app_sections.go +++ b/internal/appconfig/app_sections.go @@ -90,6 +90,8 @@ type PromptConfig struct { PromptCodeActionGoTestUser string `json:"-"` PromptCodeActionSimplifySystem string `json:"-"` PromptCodeActionSimplifyUser string `json:"-"` + PromptCodeActionFixTyposSystem string `json:"-"` + PromptCodeActionFixTyposUser string `json:"-"` // CLI PromptCLIDefaultSystem string `json:"-"` PromptCLIExplainSystem string `json:"-"` diff --git a/internal/appconfig/config_load.go b/internal/appconfig/config_load.go index 4c6214c..88750fd 100644 --- a/internal/appconfig/config_load.go +++ b/internal/appconfig/config_load.go @@ -440,6 +440,8 @@ func applyPromptCodeAction(fc *fileConfig, out *App) { strings.TrimSpace(ca.GoTestUser) == "" && strings.TrimSpace(ca.SimplifySystem) == "" && strings.TrimSpace(ca.SimplifyUser) == "" && + strings.TrimSpace(ca.FixTyposSystem) == "" && + strings.TrimSpace(ca.FixTyposUser) == "" && len(ca.Custom) == 0 { return } @@ -453,6 +455,8 @@ func applyPromptCodeAction(fc *fileConfig, out *App) { setIfNotBlank(&out.PromptCodeActionGoTestUser, ca.GoTestUser) setIfNotBlank(&out.PromptCodeActionSimplifySystem, ca.SimplifySystem) setIfNotBlank(&out.PromptCodeActionSimplifyUser, ca.SimplifyUser) + setIfNotBlank(&out.PromptCodeActionFixTyposSystem, ca.FixTyposSystem) + setIfNotBlank(&out.PromptCodeActionFixTyposUser, ca.FixTyposUser) if len(ca.Custom) > 0 { out.CustomActions = append(out.CustomActions, toCustomActions(ca.Custom)...) } diff --git a/internal/appconfig/config_merge.go b/internal/appconfig/config_merge.go index d474fb7..e31e0dc 100644 --- a/internal/appconfig/config_merge.go +++ b/internal/appconfig/config_merge.go @@ -205,6 +205,8 @@ func mergeCodeActionPrompts(dst, src *App) { mergeStringField(&dst.PromptCodeActionGoTestUser, src.PromptCodeActionGoTestUser) mergeStringField(&dst.PromptCodeActionSimplifySystem, src.PromptCodeActionSimplifySystem) mergeStringField(&dst.PromptCodeActionSimplifyUser, src.PromptCodeActionSimplifyUser) + mergeStringField(&dst.PromptCodeActionFixTyposSystem, src.PromptCodeActionFixTyposSystem) + mergeStringField(&dst.PromptCodeActionFixTyposUser, src.PromptCodeActionFixTyposUser) } func mergeCLIPrompts(dst, src *App) { diff --git a/internal/appconfig/config_types.go b/internal/appconfig/config_types.go index 05befb2..54f9bcf 100644 --- a/internal/appconfig/config_types.go +++ b/internal/appconfig/config_types.go @@ -125,6 +125,8 @@ func defaultPromptConfig() PromptConfig { PromptCodeActionGoTestUser: "Function under test:\n{{function}}", PromptCodeActionSimplifySystem: "You are a precise code improvement engine. Simplify and improve the given code while preserving behavior. Return only the improved code with no prose or backticks.", PromptCodeActionSimplifyUser: "Improve this code:\n{{selection}}", + PromptCodeActionFixTyposSystem: "You are a precise proofreader. Fix all typos, spelling errors, and grammatical mistakes in the given text. Improve clarity and readability while preserving the original meaning, tone, and structure. Return only the corrected text with no prose or backticks.", + PromptCodeActionFixTyposUser: "Fix typos and improve grammar and clarity:\n{{selection}}", PromptCLIDefaultSystem: "You are Hexai CLI. Default to very short, concise answers. If the user asks for commands, output only the commands (one per line) with no commentary or explanation. Only when the word 'explain' appears in the prompt, produce a verbose explanation.", PromptCLIExplainSystem: "You are Hexai CLI. The user requested an explanation. Provide a clear, verbose explanation with reasoning and details. If commands are needed, include them with brief context.", @@ -322,6 +324,8 @@ type sectionPromptsCodeAction struct { GoTestUser string `toml:"go_test_user"` SimplifySystem string `toml:"simplify_system"` SimplifyUser string `toml:"simplify_user"` + FixTyposSystem string `toml:"fix_typos_system"` + FixTyposUser string `toml:"fix_typos_user"` Custom []sectionCustomAction `toml:"custom"` } |
