mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-21 09:44:21 +01:00
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 <noreply@termai.io>
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user