From de3e878ad12bbd3e609bd5b7d741fc792c72f255 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Mon, 16 Mar 2026 03:51:43 +0200 Subject: Decompose App God struct into embedded section structs Replace 60+ flat fields in App with 4 embedded section structs: CoreConfig, ProviderConfig, PromptConfig, FeatureConfig. Go field promotion preserves all existing field access patterns. Updated flattenAppConfig to recurse into embedded structs for runtimeconfig. Co-Authored-By: Claude Opus 4.6 --- internal/lsp/server_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/lsp/server_test.go') diff --git a/internal/lsp/server_test.go b/internal/lsp/server_test.go index 836e43f..dc20eed 100644 --- a/internal/lsp/server_test.go +++ b/internal/lsp/server_test.go @@ -11,7 +11,7 @@ import ( func TestPromptSetUsesConfigStoreSnapshot(t *testing.T) { s := newTestServer() - initial := appconfig.App{MaxTokens: 77} + initial := appconfig.App{CoreConfig: appconfig.CoreConfig{MaxTokens: 77}} store := runtimeconfig.New(initial) s.configStore = store @@ -75,7 +75,7 @@ func (stubLLMClient) DefaultModel() string { return "stub-model" } func TestServerApplyOptions(t *testing.T) { s := newTestServer() client := stubLLMClient{} - cfg := appconfig.App{MaxTokens: 88} + cfg := appconfig.App{CoreConfig: appconfig.CoreConfig{MaxTokens: 88}} opts := ServerOptions{Config: &cfg, Client: client} s.ApplyOptions(opts) if s.currentLLMClient() != client { -- cgit v1.2.3