mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-30 16:00:41 -07:00
refactor(core): Centralize 'write_file' tool name (#10694)
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
|
||||
export const GLOB_TOOL_NAME = 'glob';
|
||||
export const WRITE_TODOS_TOOL_NAME = 'write_todos';
|
||||
export const WRITE_FILE_TOOL_NAME = 'write_file';
|
||||
|
||||
// TODO: Migrate other tool names here to follow this pattern and prevent future circular dependencies.
|
||||
// Candidates for migration:
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import * as Diff from 'diff';
|
||||
import { WRITE_FILE_TOOL_NAME } from './tool-names.js';
|
||||
import type { Config } from '../config/config.js';
|
||||
import { ApprovalMode } from '../config/config.js';
|
||||
import type {
|
||||
@@ -389,7 +390,7 @@ export class WriteFileTool
|
||||
extends BaseDeclarativeTool<WriteFileToolParams, ToolResult>
|
||||
implements ModifiableDeclarativeTool<WriteFileToolParams>
|
||||
{
|
||||
static readonly Name: string = 'write_file';
|
||||
static readonly Name: string = WRITE_FILE_TOOL_NAME;
|
||||
|
||||
constructor(private readonly config: Config) {
|
||||
super(
|
||||
|
||||
Reference in New Issue
Block a user