Add web_search tool and wire into prompts, tools, and UI#10678
Add web_search tool and wire into prompts, tools, and UI#10678hannesrudolph wants to merge 1 commit intomainfrom
Conversation
Review completed. Flagged a couple of small inconsistencies to address before merging.
Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
| description: MAX_RESULTS_PARAMETER_DESCRIPTION, | ||
| }, | ||
| }, | ||
| required: ["query", "max_results"], |
There was a problem hiding this comment.
max_results is described as optional, but the native tool schema marks it as required (required: ["query", "max_results"]). With strict: true, this forces the model to always send max_results and can lead to validation failures if it omits it. Consider removing max_results from required and keeping the runtime defaulting in the tool implementation.
Fix it with Roo Code or mention @roomote and request a fix.
| const dirTools = ["listFiles", "list_files", "listFilesRecursive", "listFilesTopLevel"] | ||
| const searchTools = ["searchFiles", "search_files"] | ||
| const searchTools = ["searchFiles", "search_files", "webSearch", "web_search"] | ||
| const commandTools = ["executeCommand", "execute_command"] |
There was a problem hiding this comment.
web_search is treated as a browser tool in filtering (browserToolEnabled) and grouped under browser, but it is categorized as a search tool in the CLI UI. This mismatch is confusing for users and makes browser enable/disable semantics harder to reason about. Consider categorizing webSearch/web_search under the browser tool group in the CLI UI as well.
Fix it with Roo Code or mention @roomote and request a fix.
Motivation
Description
WebSearchToolatsrc/core/tools/WebSearchTool.tswhich queries DuckDuckGo JSON API, normalizes results, enforces timeouts andmax_results, and uses the existing approval/result push flow.web_searchin types and shared tool registries (packages/types/src/tool.ts,src/shared/tools.ts) and added native tool schema (src/core/prompts/tools/native-tools/web_search.ts) and XML-style description (src/core/prompts/tools/web-search.ts).presentAssistantMessage) and added filtering soweb_searchis included in the browser group and respectsbrowserToolEnabledsettings.webview-ui/src/components/chat/ChatRow.tsx, manywebview-uilocale files,apps/clirenderer files).Testing
turbo lint --log-order grouped --output-logs new-onlyas part of the commit hooks and the lint step completed successfully.Codex Task
Important
Introduces
WebSearchToolfor real-time web searches via DuckDuckGo, integrating it into the system's tool dispatch and UI components.WebSearchToolinWebSearchTool.tsto query DuckDuckGo API, normalize results, enforce timeouts, and handlemax_results.web_searchinto tool dispatch inpresentAssistantMessageand respectsbrowserToolEnabledsettings.web_searchintool.ts,vscode-extension-host.ts, andshared/tools.ts.native-tools/web_search.tsand description inweb-search.ts.ChatRow.tsxto display web search results.This description was created by
for f215437. You can customize this summary. It will automatically update as commits are pushed.