diff options
| author | Paul Buetow <paul@buetow.org> | 2025-08-18 09:13:41 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-08-18 09:13:41 +0300 |
| commit | 6d29ac7e4b2604b5c7df50f33f8ef2357709faf2 (patch) | |
| tree | 6a164ee0a7c5a1f726447e8f29ab871af63528a1 /internal/appconfig | |
| parent | 3217d2738af345629e7da14c52fa4ee5cb288fe9 (diff) | |
feat(lsp): add coding_temperature knob and remove hardcoded temps\n\n- Add to app config and server options.\n- Use in LSP code actions and completions.\n- Default to provider temperature when not set.\n- Update README and config.json.example.
Diffstat (limited to 'internal/appconfig')
| -rw-r--r-- | internal/appconfig/config.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/internal/appconfig/config.go b/internal/appconfig/config.go index c377467..4fa3441 100644 --- a/internal/appconfig/config.go +++ b/internal/appconfig/config.go @@ -17,7 +17,9 @@ type App struct { ContextMode string `json:"context_mode"` ContextWindowLines int `json:"context_window_lines"` MaxContextTokens int `json:"max_context_tokens"` - LogPreviewLimit int `json:"log_preview_limit"` + LogPreviewLimit int `json:"log_preview_limit"` + // Single knob for LSP requests; if set, overrides hardcoded temps in LSP. + CodingTemperature *float64 `json:"coding_temperature"` TriggerCharacters []string `json:"trigger_characters"` Provider string `json:"provider"` @@ -48,6 +50,7 @@ func newDefaultConfig() App { ContextWindowLines: 120, MaxContextTokens: 4000, LogPreviewLimit: 100, + CodingTemperature: &t, OpenAITemperature: &t, OllamaTemperature: &t, CopilotTemperature: &t, @@ -115,6 +118,9 @@ func (a *App) mergeWith(other *App) { if other.LogPreviewLimit >= 0 { a.LogPreviewLimit = other.LogPreviewLimit } + if other.CodingTemperature != nil { // allow explicit 0.0 + a.CodingTemperature = other.CodingTemperature + } if len(other.TriggerCharacters) > 0 { a.TriggerCharacters = slices.Clone(other.TriggerCharacters) } |
