-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Implement web_search tool from cline/cline #11075
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Reviewed commit 9114e64 which adds proper error tracking for CloudService unavailability. The error tracking implementation looks correct. The 2 previously flagged semantic correctness issues remain unaddressed.
Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
Co-authored-by: hannesrudolph <[email protected]>
Co-authored-by: hannesrudolph <[email protected]>
| // Create message for approval | ||
| const completeMessage = JSON.stringify({ | ||
| tool: "webSearch", | ||
| path: query, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ClineSayTool interface has a dedicated query property for search queries (see line 824 in vscode-extension-host.ts), but this code uses path instead. Using path is semantically incorrect since it typically represents file paths in this interface. This could cause confusion in the UI layer when displaying tool approval dialogs.
| path: query, | |
| query, |
Fix it with Roo Code or mention @roomote and request a fix.
| const query: string | undefined = block.params.query | ||
| const sharedMessageProps: ClineSayTool = { | ||
| tool: "webSearch", | ||
| path: query ?? "", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same issue as above: using path instead of query. The ClineSayTool interface has a dedicated query property that should be used here for semantic correctness.
| path: query ?? "", | |
| query: query ?? "", |
Fix it with Roo Code or mention @roomote and request a fix.
Co-authored-by: hannesrudolph <[email protected]>
Description
Ported
web_searchtool from cline/cline, adapted to Roo-Code's architecture. Tool performs web searches via CloudAPI with optional domain filtering.Implementation:
web_searchto ToolName enum, NativeToolArgs, and ClineSayTool interfacenative-tools/web_search.tswith query (required) and domain filter paramsWebSearchToolextends BaseTool, validates mutual exclusivity of allowed/blocked domainsCloudAPI.webSearch()calling/api/v1/search/websearchendpointKey decisions:
consecutiveMistakeCount,recordToolError,didToolFailInCurrentTurnExample usage:
Test Procedure
TypeScript compilation verified across all affected packages (types, cloud, src). Manual testing requires:
Pre-Submission Checklist
Screenshots / Videos
N/A - Backend API integration, no UI changes
Documentation Updates
Additional Notes
fetch_instructionsand other read-only toolsGet in Touch
N/A
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/repos/microsoft/ripgrep-prebuilt/releases/tags/v15.0.0/usr/local/bin/node node ./lib/postinstall.js(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.