summaryrefslogtreecommitdiff
path: root/internal/lsp/completion_cache_test.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-08-28 23:28:31 +0300
committerPaul Buetow <paul@buetow.org>2025-08-28 23:28:31 +0300
commit86aafe22eaf04687288e5a730acf0a473719c514 (patch)
treeb1a618442f903cf5de37d65f0b9d86392bb8194d /internal/lsp/completion_cache_test.go
parente3a7a18558fa5631c44fb70af673877d855206fc (diff)
copilot: add session token + codex code completion; lsp: prefer native CodeCompleter with chat fallback; remove obsolete throttle path; add tests; bump version to 0.3.0v0.3.0
Diffstat (limited to 'internal/lsp/completion_cache_test.go')
-rw-r--r--internal/lsp/completion_cache_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/lsp/completion_cache_test.go b/internal/lsp/completion_cache_test.go
index 0207a9f..a350281 100644
--- a/internal/lsp/completion_cache_test.go
+++ b/internal/lsp/completion_cache_test.go
@@ -21,7 +21,7 @@ func TestCompletionCache_IgnoresWhitespaceBeforeCursor(t *testing.T) {
// First request with trailing spaces before cursor
line := "foo "
p := CompletionParams{ Position: Position{ Line: 0, Character: len(line) }, TextDocument: TextDocumentIdentifier{URI: "file://x.go"} }
- items, ok, _ := s.tryLLMCompletion(p, "", line, "", "", "", false, "")
+ items, ok := s.tryLLMCompletion(p, "", line, "", "", "", false, "")
if !ok || len(items) == 0 || fake.calls != 1 {
t.Fatalf("expected first call to invoke LLM; ok=%v len=%d calls=%d", ok, len(items), fake.calls)
}
@@ -29,7 +29,7 @@ func TestCompletionCache_IgnoresWhitespaceBeforeCursor(t *testing.T) {
// Same logical context but with a different amount of trailing whitespace
line2 := "foo "
p2 := CompletionParams{ Position: Position{ Line: 0, Character: len(line2) }, TextDocument: TextDocumentIdentifier{URI: "file://x.go"} }
- items2, ok2, _ := s.tryLLMCompletion(p2, "", line2, "", "", "", false, "")
+ items2, ok2 := s.tryLLMCompletion(p2, "", line2, "", "", "", false, "")
if !ok2 || len(items2) == 0 {
t.Fatalf("expected cache hit to still return items")
}