mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-27 13:34:15 -07:00
refactor(core): migrate web search tool to tool-names (#10782)
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
export const GLOB_TOOL_NAME = 'glob';
|
||||
export const WRITE_TODOS_TOOL_NAME = 'write_todos';
|
||||
export const WRITE_FILE_TOOL_NAME = 'write_file';
|
||||
export const WEB_SEARCH_TOOL_NAME = 'google_web_search';
|
||||
|
||||
// TODO: Migrate other tool names here to follow this pattern and prevent future circular dependencies.
|
||||
// Candidates for migration:
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
import { WEB_SEARCH_TOOL_NAME } from './tool-names.js';
|
||||
import type { GroundingMetadata } from '@google/genai';
|
||||
import type { ToolInvocation, ToolResult } from './tools.js';
|
||||
import { BaseDeclarativeTool, BaseToolInvocation, Kind } from './tools.js';
|
||||
@@ -184,7 +185,7 @@ export class WebSearchTool extends BaseDeclarativeTool<
|
||||
WebSearchToolParams,
|
||||
WebSearchToolResult
|
||||
> {
|
||||
static readonly Name: string = 'google_web_search';
|
||||
static readonly Name: string = WEB_SEARCH_TOOL_NAME;
|
||||
|
||||
constructor(private readonly config: Config) {
|
||||
super(
|
||||
|
||||
Reference in New Issue
Block a user