From c3c71345db9086392cd9b7529c7f5287009c226e Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Wed, 24 Sep 2025 23:21:43 +0300 Subject: Add runtime config store and reload command --- internal/lsp/context_test.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'internal/lsp/context_test.go') diff --git a/internal/lsp/context_test.go b/internal/lsp/context_test.go index dcda042..875eec9 100644 --- a/internal/lsp/context_test.go +++ b/internal/lsp/context_test.go @@ -9,8 +9,8 @@ import ( func TestWindowContext_Bounds(t *testing.T) { s := newTestServer() - s.windowLines = 4 // half=2 - s.maxContextTokens = 9999 + s.cfg.ContextWindowLines = 4 // half=2 + s.cfg.MaxContextTokens = 9999 lines := make([]string, 10) for i := 0; i < 10; i++ { lines[i] = "L" + strconv.Itoa(i) @@ -28,7 +28,7 @@ func TestWindowContext_Bounds(t *testing.T) { func TestBuildAdditionalContext_Minimal(t *testing.T) { s := newTestServer() - s.contextMode = "minimal" + s.cfg.ContextMode = "minimal" if ctx, ok := s.buildAdditionalContext(false, "file:///x.go", Position{}); ok || ctx != "" { t.Fatalf("expected no context in minimal mode; got ok=%v ctx=%q", ok, ctx) } @@ -36,8 +36,8 @@ func TestBuildAdditionalContext_Minimal(t *testing.T) { func TestBuildAdditionalContext_FileOnNewFunc(t *testing.T) { s := newTestServer() - s.contextMode = "file-on-new-func" - s.maxContextTokens = 9999 + s.cfg.ContextMode = "file-on-new-func" + s.cfg.MaxContextTokens = 9999 uri := "file:///x.go" body := "package x\n\nfunc a(){}\n" s.setDocument(uri, body) @@ -51,8 +51,8 @@ func TestBuildAdditionalContext_FileOnNewFunc(t *testing.T) { func TestBuildAdditionalContext_AlwaysFull(t *testing.T) { s := newTestServer() - s.contextMode = "always-full" - s.maxContextTokens = 9999 + s.cfg.ContextMode = "always-full" + s.cfg.MaxContextTokens = 9999 uri := "file:///x.go" body := "line1\nline2\n" s.setDocument(uri, body) -- cgit v1.2.3