mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-13 05:12:55 -07:00
refactor(core): centralize core tool definitions and support model-specific schemas (#18662)
This commit is contained in:
@@ -4,21 +4,35 @@
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
import {
|
||||
GLOB_TOOL_NAME,
|
||||
GREP_TOOL_NAME,
|
||||
LS_TOOL_NAME,
|
||||
READ_FILE_TOOL_NAME,
|
||||
SHELL_TOOL_NAME,
|
||||
WRITE_FILE_TOOL_NAME,
|
||||
} from './definitions/coreTools.js';
|
||||
|
||||
// Centralized constants for tool names.
|
||||
// This prevents circular dependencies that can occur when other modules (like agents)
|
||||
// need to reference a tool's name without importing the tool's implementation.
|
||||
|
||||
export const GLOB_TOOL_NAME = 'glob';
|
||||
export {
|
||||
GLOB_TOOL_NAME,
|
||||
GREP_TOOL_NAME,
|
||||
LS_TOOL_NAME,
|
||||
READ_FILE_TOOL_NAME,
|
||||
SHELL_TOOL_NAME,
|
||||
WRITE_FILE_TOOL_NAME,
|
||||
};
|
||||
|
||||
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';
|
||||
export const EDIT_TOOL_NAME = 'replace';
|
||||
export const SHELL_TOOL_NAME = 'run_shell_command';
|
||||
export const GREP_TOOL_NAME = 'grep_search';
|
||||
export const READ_MANY_FILES_TOOL_NAME = 'read_many_files';
|
||||
export const READ_FILE_TOOL_NAME = 'read_file';
|
||||
export const LS_TOOL_NAME = 'list_directory';
|
||||
export const LS_TOOL_NAME_LEGACY = 'list_directory'; // Just to be safe if anything used the old exported name directly
|
||||
|
||||
export const MEMORY_TOOL_NAME = 'save_memory';
|
||||
export const GET_INTERNAL_DOCS_TOOL_NAME = 'get_internal_docs';
|
||||
export const ACTIVATE_SKILL_TOOL_NAME = 'activate_skill';
|
||||
|
||||
Reference in New Issue
Block a user