mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-25 04:24:51 -07:00
refactor: move web_fetch tool name to tool-names.ts (#11174)
This commit is contained in:
@@ -12,6 +12,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';
|
||||
export const WEB_FETCH_TOOL_NAME = 'web_fetch';
|
||||
|
||||
// TODO: Migrate other tool names here to follow this pattern and prevent future circular dependencies.
|
||||
// Candidates for migration:
|
||||
|
||||
@@ -28,6 +28,7 @@ import {
|
||||
logWebFetchFallbackAttempt,
|
||||
WebFetchFallbackAttemptEvent,
|
||||
} from '../telemetry/index.js';
|
||||
import { WEB_FETCH_TOOL_NAME } from './tool-names.js';
|
||||
|
||||
const URL_FETCH_TIMEOUT_MS = 10000;
|
||||
const MAX_CONTENT_LENGTH = 100000;
|
||||
@@ -379,7 +380,7 @@ export class WebFetchTool extends BaseDeclarativeTool<
|
||||
WebFetchToolParams,
|
||||
ToolResult
|
||||
> {
|
||||
static readonly Name: string = 'web_fetch';
|
||||
static readonly Name: string = WEB_FETCH_TOOL_NAME;
|
||||
|
||||
constructor(
|
||||
private readonly config: Config,
|
||||
|
||||
Reference in New Issue
Block a user