summaryrefslogtreecommitdiff
path: root/internal/lsp/testfakes_test.go
blob: bfe536e59881fa1d4616761a539df77bda81d681 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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" }