diff --git a/pkg/tools/web.go b/pkg/tools/web.go deleted file mode 100644 index 003cd860c..000000000 --- a/pkg/tools/web.go +++ /dev/null @@ -1,1139 +0,0 @@ -package tools - -import ( - "bytes" - "context" - "encoding/json" - "errors" - "fmt" - "io" - "net" - "net/http" - "net/url" - "regexp" - "strings" - "sync/atomic" - "time" -) - -const ( - userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" - - // HTTP client timeouts for web tool providers. - searchTimeout = 10 * time.Second // Brave, Tavily, DuckDuckGo - perplexityTimeout = 30 * time.Second // Perplexity (LLM-based, slower) - fetchTimeout = 60 * time.Second // WebFetchTool - - defaultMaxChars = 50000 - maxRedirects = 5 -) - -// Pre-compiled regexes for HTML text extraction -var ( - reScript = regexp.MustCompile(``) + reStyle = regexp.MustCompile(`
Content