summaryrefslogtreecommitdiff
path: root/internal/lsp/handlers_document.go
diff options
context:
space:
mode:
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}