From faf87a23a782bc7d717e363a3a399a64d6a34146 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Thu, 28 Aug 2025 11:16:03 +0300 Subject: lsp/chat: remove '..' trigger; docs: update triggers; tests: align throttle test; version: bump to 0.2.1 --- internal/lsp/handlers.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'internal/lsp/handlers.go') 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 } -- cgit v1.2.3