summaryrefslogtreecommitdiff
path: root/internal/appconfig/app_sections.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-03-16 03:55:40 +0200
committerPaul Buetow <paul@buetow.org>2026-03-16 03:55:40 +0200
commit35f1097f473e51be82f68e93ea2db48dd1c98519 (patch)
tree1b0a316caa9bbbbfab20b6665b424f356f411ac2 /internal/appconfig/app_sections.go
parent93dfe3798e03e74766b229418cde364a5ef29ae9 (diff)
Fix mixed pointer/value receivers on appconfig.App
Change all value receivers on App to pointer receivers for consistency. Update callers that pass App values to pass pointers where needed for the actionConfig interface. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'internal/appconfig/app_sections.go')
-rw-r--r--internal/appconfig/app_sections.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/appconfig/app_sections.go b/internal/appconfig/app_sections.go
index 7422152..430ebce 100644
--- a/internal/appconfig/app_sections.go
+++ b/internal/appconfig/app_sections.go
@@ -127,7 +127,7 @@ type AppSections struct {
}
// Sections returns the app configuration split into focused sub-configs.
-func (a App) Sections() AppSections {
+func (a *App) Sections() AppSections {
return AppSections{
Core: a.CoreSection(),
Providers: a.ProviderSection(),
@@ -146,7 +146,7 @@ func (a *App) ApplySections(sections AppSections) {
// CoreSection returns a deep copy of the core runtime and interaction settings.
// Slices are cloned to prevent callers from mutating the original.
-func (a App) CoreSection() CoreConfig {
+func (a *App) CoreSection() CoreConfig {
c := a.CoreConfig
c.TriggerCharacters = slices.Clone(a.TriggerCharacters)
c.ChatPrefixes = slices.Clone(a.ChatPrefixes)
@@ -163,7 +163,7 @@ func (a *App) ApplyCoreSection(core CoreConfig) {
// ProviderSection returns a deep copy of provider endpoint/model settings.
// Surface config slices are cloned to prevent callers from mutating the original.
-func (a App) ProviderSection() ProviderConfig {
+func (a *App) ProviderSection() ProviderConfig {
p := a.ProviderConfig
p.CompletionConfigs = cloneSurfaceConfigs(a.CompletionConfigs)
p.CodeActionConfigs = cloneSurfaceConfigs(a.CodeActionConfigs)
@@ -184,7 +184,7 @@ func (a *App) ApplyProviderSection(providers ProviderConfig) {
// PromptSection returns a deep copy of prompt templates and custom action settings.
// The CustomActions slice is cloned to prevent callers from mutating the original.
-func (a App) PromptSection() PromptConfig {
+func (a *App) PromptSection() PromptConfig {
p := a.PromptConfig
p.CustomActions = append([]CustomAction{}, a.CustomActions...)
return p
@@ -199,7 +199,7 @@ func (a *App) ApplyPromptSection(prompts PromptConfig) {
// FeatureSection returns a deep copy of non-LLM feature toggles and integrations.
// Slices are cloned to prevent callers from mutating the original.
-func (a App) FeatureSection() FeatureConfig {
+func (a *App) FeatureSection() FeatureConfig {
f := a.FeatureConfig
f.IgnoreExtraPatterns = slices.Clone(a.IgnoreExtraPatterns)
f.TmuxEditAgents = append([]TmuxEditAgentCfg{}, a.TmuxEditAgents...)