diff options
| author | Paul Buetow <paul@buetow.org> | 2025-08-28 23:28:31 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-08-28 23:28:31 +0300 |
| commit | 86aafe22eaf04687288e5a730acf0a473719c514 (patch) | |
| tree | b1a618442f903cf5de37d65f0b9d86392bb8194d /internal/lsp/testfakes_test.go | |
| parent | e3a7a18558fa5631c44fb70af673877d855206fc (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/testfakes_test.go')
| -rw-r--r-- | internal/lsp/testfakes_test.go | 18 |
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" } + |
