summaryrefslogtreecommitdiffhomepage
path: root/cmd
diff options
context:
space:
mode:
authorKujtim Hoxha <[email protected]>2025-04-04 14:23:08 +0200
committerKujtim Hoxha <[email protected]>2025-04-04 14:23:08 +0200
commit6bb1c84f7f7f0430f2808d50c533e923aae4c787 (patch)
tree2a92f077570d505d5ae0387660a0d246de0fa43a /cmd
parenteb9877ee20c44b7cd34f78e9110d315db71977f6 (diff)
downloadopencode-6bb1c84f7f7f0430f2808d50c533e923aae4c787.tar.gz
opencode-6bb1c84f7f7f0430f2808d50c533e923aae4c787.zip
Improve Sourcegraph tool with context window and fix diagnostics
- 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 <[email protected]>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/lsp/main.go12
1 files changed, 12 insertions, 0 deletions
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)
}