summaryrefslogtreecommitdiff
path: root/internal/lsp/codeaction_custom_test.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-03-16 03:51:43 +0200
committerPaul Buetow <paul@buetow.org>2026-03-16 03:51:43 +0200
commitde3e878ad12bbd3e609bd5b7d741fc792c72f255 (patch)
tree06d92b93ea0ad532c5d3a761033baac05abe2a5e /internal/lsp/codeaction_custom_test.go
parent2e9cabb1c8bf1f0246e513fe1f86a552e07eee94 (diff)
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 <noreply@anthropic.com>
Diffstat (limited to 'internal/lsp/codeaction_custom_test.go')
-rw-r--r--internal/lsp/codeaction_custom_test.go18
1 files changed, 11 insertions, 7 deletions
diff --git a/internal/lsp/codeaction_custom_test.go b/internal/lsp/codeaction_custom_test.go
index 36f99d4..d7fe283 100644
--- a/internal/lsp/codeaction_custom_test.go
+++ b/internal/lsp/codeaction_custom_test.go
@@ -30,13 +30,17 @@ func capResp(t *testing.T, buf *bytes.Buffer) Response {
func TestHandleCodeAction_ListsCustomActions(t *testing.T) {
var out bytes.Buffer
cfg := appconfig.App{
- InlineOpen: ">!",
- InlineClose: ">",
- ChatSuffix: ">",
- ChatPrefixes: []string{"?", "!", ":", ";"},
- CustomActions: []appconfig.CustomAction{
- {ID: "extract", Title: "Extract function", Scope: "selection", Kind: "refactor.extract", Instruction: "Extract into function"},
- {ID: "fix", Title: "Fix diagnostics", Scope: "diagnostics", Kind: "quickfix", User: "Fix:\n{{diagnostics}}\n\n{{selection}}"},
+ CoreConfig: appconfig.CoreConfig{
+ InlineOpen: ">!",
+ InlineClose: ">",
+ ChatSuffix: ">",
+ ChatPrefixes: []string{"?", "!", ":", ";"},
+ },
+ PromptConfig: appconfig.PromptConfig{
+ CustomActions: []appconfig.CustomAction{
+ {ID: "extract", Title: "Extract function", Scope: "selection", Kind: "refactor.extract", Instruction: "Extract into function"},
+ {ID: "fix", Title: "Fix diagnostics", Scope: "diagnostics", Kind: "quickfix", User: "Fix:\n{{diagnostics}}\n\n{{selection}}"},
+ },
},
}
s := &Server{