chore: improve error handling for scraping configuration in tools.go

This commit is contained in:
Kayvan Sylvan
2025-07-09 03:23:29 -07:00
parent 6e2f00090c
commit be82b4b013

View File

@@ -56,7 +56,11 @@ func handleToolProcessing(currentFlags *Flags, registry *core.PluginRegistry) (m
}
}
if (currentFlags.ScrapeURL != "" || currentFlags.ScrapeQuestion != "") && registry.Jina.IsConfigured() {
if currentFlags.ScrapeURL != "" || currentFlags.ScrapeQuestion != "" {
if !registry.Jina.IsConfigured() {
err = fmt.Errorf("scraping functionality is not configured. Please set up Jina to enable scraping")
return
}
// Check if the scrape_url flag is set and call ScrapeURL
if currentFlags.ScrapeURL != "" {
var website string