summaryrefslogtreecommitdiff
path: root/internal/hexaiaction/prompts.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-03-17 11:28:19 +0200
committerPaul Buetow <paul@buetow.org>2026-03-17 11:28:19 +0200
commit6f1c8bf7a36eb7044ed7aad30f84664cbbf0d303 (patch)
treedd2ac6e1433177fb59c167a12fa0b4b91132f34a /internal/hexaiaction/prompts.go
parent10562cc510f64d5ac38aeb76f03e18eb76cca40f (diff)
Fix bugs, remove duplication, and clean up code quality issues
- Log swallowed JSON unmarshal errors in stats and LSP handlers - Fix debug log file handle leak in tmuxedit (return closer from initDebugLog) - Check f.Close() errors on write paths in promptstore and tmuxedit - Fix cacheGet TOCTOU race by using single write lock - Fix readInput to use passed stdin reader instead of os.Stdin.Stat() - Remove 45 'moved to' comment tombstones from lsp/handlers.go - Deduplicate canonicalProvider wrappers (use llmutils.CanonicalProvider directly) - Remove SetWindow side effect from stats.TakeSnapshot (pure read now) - Move duplicated splitLines to textutil.SplitLinesBytes - Collapse StatusSink.SetGlobal 10 params into GlobalStatus struct - Simplify LRU touchLocked to in-place delete-and-append Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'internal/hexaiaction/prompts.go')
-rw-r--r--internal/hexaiaction/prompts.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/internal/hexaiaction/prompts.go b/internal/hexaiaction/prompts.go
index 8cf8c48..03a9441 100644
--- a/internal/hexaiaction/prompts.go
+++ b/internal/hexaiaction/prompts.go
@@ -38,10 +38,6 @@ func providerOf(c any) string {
return "llm"
}
-func canonicalProvider(name string) string {
- return llmutils.CanonicalProvider(name)
-}
-
// selectActionTemperature resolves the effective temperature for a code action,
// delegating GPT-5 override logic to llmutils.ResolveTemperature.
func selectActionTemperature(cfg actionConfig, provider string, entry appconfig.SurfaceConfig, model string) (float64, bool) {
@@ -148,14 +144,14 @@ func reqOptsFrom(cfg actionConfig) requestArgs {
if core.MaxTokens > 0 {
opts = append(opts, llm.WithMaxTokens(core.MaxTokens))
}
- provider := canonicalProvider(core.Provider)
+ provider := llmutils.CanonicalProvider(core.Provider)
entries := providers.CodeActionConfigs
if len(entries) == 0 {
entries = []appconfig.SurfaceConfig{{Provider: core.Provider, Model: strings.TrimSpace(llmutils.DefaultModelForProvider(fullCfg, provider))}}
}
primary := entries[0]
if strings.TrimSpace(primary.Provider) != "" {
- provider = canonicalProvider(primary.Provider)
+ provider = llmutils.CanonicalProvider(primary.Provider)
}
model := strings.TrimSpace(primary.Model)
if model == "" {