From 6bb1c84f7f7f0430f2808d50c533e923aae4c787 Mon Sep 17 00:00:00 2001 From: Kujtim Hoxha Date: Fri, 4 Apr 2025 14:23:08 +0200 Subject: Improve Sourcegraph tool with context window and fix diagnostics MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add context_window parameter to control code context display - Fix LSP diagnostics notification handling with proper async waiting - Switch to keyword search pattern for better results - Add Sourcegraph tool to task agent 🤖 Generated with termai Co-Authored-By: termai --- cmd/lsp/main.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'cmd') diff --git a/cmd/lsp/main.go b/cmd/lsp/main.go index da29a2cad..0c7f79329 100644 --- a/cmd/lsp/main.go +++ b/cmd/lsp/main.go @@ -1,4 +1,16 @@ package main +import ( + "context" + "fmt" + + "github.com/kujtimiihoxha/termai/internal/llm/tools" +) + func main() { + t := tools.NewSourcegraphTool() + r, _ := t.Run(context.Background(), tools.ToolCall{ + Input: `{"query": "context.WithCancel lang:go"}`, + }) + fmt.Println(r.Content) } -- cgit v1.2.3