summaryrefslogtreecommitdiff
path: root/internal/lsp/testfakes_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/lsp/testfakes_test.go')
-rw-r--r--internal/lsp/testfakes_test.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/internal/lsp/testfakes_test.go b/internal/lsp/testfakes_test.go
new file mode 100644
index 0000000..bfe536e
--- /dev/null
+++ b/internal/lsp/testfakes_test.go
@@ -0,0 +1,18 @@
+package lsp
+
+import (
+ "context"
+ "hexai/internal/llm"
+)
+
+// countingLLM counts Chat calls; minimal implementation for tests that need
+// to assert whether the chat-based completion path ran.
+type countingLLM struct{ calls int }
+
+func (f *countingLLM) Chat(_ context.Context, _ []llm.Message, _ ...llm.RequestOption) (string, error) {
+ f.calls++
+ return "x := 1", nil
+}
+func (f *countingLLM) Name() string { return "fake" }
+func (f *countingLLM) DefaultModel() string { return "m" }
+