summaryrefslogtreecommitdiff
path: root/internal/lsp/handlers.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-08-28 11:16:03 +0300
committerPaul Buetow <paul@buetow.org>2025-08-28 11:16:03 +0300
commitfaf87a23a782bc7d717e363a3a399a64d6a34146 (patch)
tree40d94eee9ee43f3784ca33d0746f07f1c58359a6 /internal/lsp/handlers.go
parentd7c52fc31e233e97d80a5340cf2a1c451ae465af (diff)
lsp/chat: remove '..' trigger; docs: update triggers; tests: align throttle test; version: bump to 0.2.1v0.2.1
Diffstat (limited to 'internal/lsp/handlers.go')
-rw-r--r--internal/lsp/handlers.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/internal/lsp/handlers.go b/internal/lsp/handlers.go
index f0f73ed..1b7436e 100644
--- a/internal/lsp/handlers.go
+++ b/internal/lsp/handlers.go
@@ -553,7 +553,7 @@ func (s *Server) detectAndHandleChat(uri string) {
continue
}
pair := raw[j-1 : j+1]
- isTrigger := pair == ".." || pair == "??" || pair == "!!" || pair == "::"
+ isTrigger := pair == "??" || pair == "!!" || pair == "::"
if !isTrigger {
continue
}
@@ -690,7 +690,7 @@ func (s *Server) buildChatHistory(uri string, lineIdx int, currentPrompt string)
}
// stripTrailingTrigger removes a single trailing punctuation from the set
-// [.,?,!,:] or both semicolons if present at end, mirroring the inline trigger rules.
+// [?,!,:] or both semicolons if present at end, mirroring the inline trigger rules.
func stripTrailingTrigger(sx string) string {
s := strings.TrimRight(sx, " \t")
if strings.HasSuffix(s, ";;") {
@@ -699,10 +699,10 @@ func stripTrailingTrigger(sx string) string {
if len(s) == 0 {
return sx
}
- last := s[len(s)-1]
- switch last {
- case '.', '?', '!', ':':
- return strings.TrimRight(s[:len(s)-1], " \t")
+ last := s[len(s)-1]
+ switch last {
+ case '?', '!', ':':
+ return strings.TrimRight(s[:len(s)-1], " \t")
default:
return sx
}