continue-custom/core/tools/definitions/searchWeb.ts
xiaohuanxiong3 acbba9c6d2
feat: move tool icon names to tool definitions (#7322)
* feat: Adding the isExecutionResultSearchable property to the Tool indicates whether the tool indicates whether the result is inspectable
fix: 移除 SimpleToolCallUI 中 ToggleWithIcon 重复的 onClick 函数

* feat: Adding the isExecutionResultSearchable property to the Tool indicates whether the tool's execution results are checkable
fix: 移除 SimpleToolCallUI 中 ToggleWithIcon 重复的 onClick 函数

* fix: cleanup file security pr

* fix: ignore .idea etc.

* fix: move .continue from security to indexing ignore

* fix: move ide dirs and venv dirs to indexing not security ignores

* feat: remove isExecutionResultSearchable from Tool

* feat: prettier

---------

Co-authored-by: Dallin Romney <dallinromney@gmail.com>
2025-09-16 12:51:41 -07:00

34 lines
1.3 KiB
TypeScript

import { Tool } from "../..";
import { BUILT_IN_GROUP_NAME, BuiltInToolNames } from "../builtIn";
export const searchWebTool: Tool = {
type: "function",
displayTitle: "Search Web",
wouldLikeTo: 'search the web for "{{{ query }}}"',
isCurrently: 'searching the web for "{{{ query }}}"',
hasAlready: 'searched the web for "{{{ query }}}"',
readonly: true,
group: BUILT_IN_GROUP_NAME,
function: {
name: BuiltInToolNames.SearchWeb,
description:
"Performs a web search, returning top results. Use this tool sparingly - only for questions that require specialized, external, and/or up-to-date knowledege. Common programming questions do not require web search.",
parameters: {
type: "object",
required: ["query"],
properties: {
query: {
type: "string",
description: "The natural language search query",
},
},
},
},
defaultToolPolicy: "allowedWithoutPermission",
systemMessageDescription: {
prefix: `To search the web, use the ${BuiltInToolNames.SearchWeb} tool with a natural language query. For example, to search for the current weather, you would respond with:`,
exampleArgs: [["query", "What is the current weather in San Francisco?"]],
},
toolCallIcon: "GlobeAltIcon",
};