From 32a72e6533ecf3d4e0c53137692c658b512abcd1 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Thu, 28 Aug 2025 23:56:28 +0300 Subject: lsp: limit to one in-flight LLM query; return visible 'LLM busy' completion item with provider/model; retain chat EOL suppression --- internal/lsp/server.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'internal/lsp/server.go') diff --git a/internal/lsp/server.go b/internal/lsp/server.go index 7bc52c1..54efdf7 100644 --- a/internal/lsp/server.go +++ b/internal/lsp/server.go @@ -40,10 +40,13 @@ type Server struct { // Small LRU cache for recent code completion outputs (keyed by context) compCache map[string]string compCacheOrder []string // most-recent at end; cap ~10 - // Outgoing JSON-RPC id counter for server-initiated requests - nextID int64 - // Minimum identifier chars required for manual invoke to bypass prefix checks - manualInvokeMinPrefix int + // Outgoing JSON-RPC id counter for server-initiated requests + nextID int64 + // Minimum identifier chars required for manual invoke to bypass prefix checks + manualInvokeMinPrefix int + + // LLM concurrency guard: allow at most one in-flight request + llmBusy bool } // ServerOptions collects configuration for NewServer to avoid long parameter lists. -- cgit v1.2.3