diff options
Diffstat (limited to 'internal/lsp/testhelper_capture_llm_test.go')
| -rw-r--r-- | internal/lsp/testhelper_capture_llm_test.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/internal/lsp/testhelper_capture_llm_test.go b/internal/lsp/testhelper_capture_llm_test.go new file mode 100644 index 0000000..3274141 --- /dev/null +++ b/internal/lsp/testhelper_capture_llm_test.go @@ -0,0 +1,18 @@ +package lsp + +import ( + "context" + + "codeberg.org/snonux/hexai/internal/llm" +) + +// captureLLM captures messages sent to Chat for assertions. +type captureLLM struct{ msgs []llm.Message } + +func (c *captureLLM) Chat(_ context.Context, m []llm.Message, _ ...llm.RequestOption) (string, error) { + c.msgs = append([]llm.Message{}, m...) + return "OK", nil +} +func (*captureLLM) Name() string { return "cap" } +func (*captureLLM) DefaultModel() string { return "m" } + |
