diff options
Diffstat (limited to 'internal/lsp/handlers_completion.go')
| -rw-r--r-- | internal/lsp/handlers_completion.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/lsp/handlers_completion.go b/internal/lsp/handlers_completion.go index 14c5f3e..9ef62f1 100644 --- a/internal/lsp/handlers_completion.go +++ b/internal/lsp/handlers_completion.go @@ -10,6 +10,7 @@ import ( "codeberg.org/snonux/hexai/internal/llm" "codeberg.org/snonux/hexai/internal/logging" + "codeberg.org/snonux/hexai/internal/stats" ) func (s *Server) handleCompletion(req Request) { @@ -257,6 +258,10 @@ func (s *Server) tryProviderNativeCompletion(current string, p CompletionParams, // Update counters and heartbeat s.incSentCounters(sentBytes) s.incRecvCounters(len(suggestions[0])) + // Contribute to global stats (provider-native path) + if s.llmClient != nil { + _ = stats.Update(ctx2, s.llmClient.Name(), s.llmClient.DefaultModel(), sentBytes, len(suggestions[0])) + } s.logLLMStats() cleaned := strings.TrimSpace(suggestions[0]) if cleaned != "" { |
