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 --- cmd/hexai/main_test.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'cmd') diff --git a/cmd/hexai/main_test.go b/cmd/hexai/main_test.go index 7c20cc4..810dcb2 100644 --- a/cmd/hexai/main_test.go +++ b/cmd/hexai/main_test.go @@ -109,9 +109,11 @@ func TestSplitConfigPath(t *testing.T) { func TestPickDefaultModel(t *testing.T) { cfg := appconfig.App{ - OllamaModel: "llama3", - AnthropicModel: "claude-sonnet", - OpenAIModel: "gpt-4o", + ProviderConfig: appconfig.ProviderConfig{ + OllamaModel: "llama3", + AnthropicModel: "claude-sonnet", + OpenAIModel: "gpt-4o", + }, } tests := []struct { provider string -- cgit v1.2.3