summaryrefslogtreecommitdiff
path: root/internal/lsp/server.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-08-28 23:56:28 +0300
committerPaul Buetow <paul@buetow.org>2025-08-28 23:56:28 +0300
commit32a72e6533ecf3d4e0c53137692c658b512abcd1 (patch)
tree91b05a597974e4da89aa7647dc207e16e1bc94a7 /internal/lsp/server.go
parent30d233d689f77d4688a49c6fa221ab63a8482db2 (diff)
lsp: limit to one in-flight LLM query; return visible 'LLM busy' completion item with provider/model; retain chat EOL suppression
Diffstat (limited to 'internal/lsp/server.go')
-rw-r--r--internal/lsp/server.go11
1 files changed, 7 insertions, 4 deletions
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.