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/hexaiaction/parse_test.go | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'internal/hexaiaction/parse_test.go') diff --git a/internal/hexaiaction/parse_test.go b/internal/hexaiaction/parse_test.go index ba5cd96..40ddd9a 100644 --- a/internal/hexaiaction/parse_test.go +++ b/internal/hexaiaction/parse_test.go @@ -81,14 +81,16 @@ func (f *fakeClient) DefaultModel() string { return "m" } func TestRuners_Prompts(t *testing.T) { cfg := appconfig.App{ - PromptCodeActionRewriteSystem: "SYS-R", - PromptCodeActionRewriteUser: "R {{instruction}} :: {{selection}}", - PromptCodeActionDiagnosticsSystem: "SYS-D", - PromptCodeActionDiagnosticsUser: "D {{diagnostics}} :: {{selection}}", - PromptCodeActionDocumentSystem: "SYS-C", - PromptCodeActionDocumentUser: "C {{selection}}", - PromptCodeActionGoTestSystem: "SYS-T", - PromptCodeActionGoTestUser: "T {{function}}", + PromptConfig: appconfig.PromptConfig{ + PromptCodeActionRewriteSystem: "SYS-R", + PromptCodeActionRewriteUser: "R {{instruction}} :: {{selection}}", + PromptCodeActionDiagnosticsSystem: "SYS-D", + PromptCodeActionDiagnosticsUser: "D {{diagnostics}} :: {{selection}}", + PromptCodeActionDocumentSystem: "SYS-C", + PromptCodeActionDocumentUser: "C {{selection}}", + PromptCodeActionGoTestSystem: "SYS-T", + PromptCodeActionGoTestUser: "T {{function}}", + }, } f := &fakeClient{out: "```\nDONE\n```"} ctx := context.Background() -- cgit v1.2.3