refactor(core): Centralize 'write_file' tool name (#10694)

This commit is contained in:
Abhi
2025-10-09 00:33:31 -04:00
committed by GitHub
parent 3ea5581ad7
commit 3d24575239
8 changed files with 24 additions and 16 deletions

View File

@@ -33,6 +33,7 @@ import {
parseAndFormatApiError,
ToolConfirmationOutcome,
promptIdContext,
WRITE_FILE_TOOL_NAME,
} from '@google/gemini-cli-core';
import { type Part, type PartListUnion, FinishReason } from '@google/genai';
import type {
@@ -69,7 +70,7 @@ enum StreamProcessingStatus {
Error,
}
const EDIT_TOOL_NAMES = new Set(['replace', 'write_file']);
const EDIT_TOOL_NAMES = new Set(['replace', WRITE_FILE_TOOL_NAME]);
function showCitations(settings: LoadedSettings): boolean {
const enabled = settings?.merged?.ui?.showCitations;