blob: 3d42587b13a2444c55381f49755b020c5ef744d2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
package lsp
import (
"context"
"codeberg.org/snonux/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" }
|