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:
parent
eb9877ee20
commit
6bb1c84f7f
4 changed files with 87 additions and 20 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue