summaryrefslogtreecommitdiff
path: root/internal/lsp/handlers_document.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-03-02 14:05:16 +0200
committerPaul Buetow <paul@buetow.org>2026-03-02 14:05:16 +0200
commit8fa31daeba7a6617f08027a5f9f68bb612587772 (patch)
tree25979d0c922eff767ef33e14091d66bb8fcee20a /internal/lsp/handlers_document.go
parent4649658bd71c4754dc5dde2fb5e1f4de2fe269d4 (diff)
lsp: cancel handler contexts on shutdown via server context (task 423)
Diffstat (limited to 'internal/lsp/handlers_document.go')
-rw-r--r--internal/lsp/handlers_document.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/internal/lsp/handlers_document.go b/internal/lsp/handlers_document.go
index b907014..e39022e 100644
--- a/internal/lsp/handlers_document.go
+++ b/internal/lsp/handlers_document.go
@@ -2,7 +2,6 @@
package lsp
import (
- "context"
"encoding/json"
"strings"
"time"
@@ -166,7 +165,7 @@ func (s *Server) detectAndHandleChat(uri string) {
return
}
go func(prompt string, remove int) {
- ctx, cancel := context.WithTimeout(context.Background(), 25*time.Second)
+ ctx, cancel := s.requestTimeoutContext(25 * time.Second)
defer cancel()
// Build messages with history and context_mode aware extras.
pos := Position{Line: lineIdx, Character: lastIdx + 1}