refactor(tools): Move all tool names into tool-names.ts (#11493)

This commit is contained in:
Abhi
2025-10-19 20:53:53 -04:00
committed by GitHub
parent 0f77c37b9b
commit b8561d2a40
17 changed files with 90 additions and 100 deletions
+2 -3
View File
@@ -409,7 +409,7 @@ class EditToolInvocation implements ToolInvocation<EditToolParams, ToolResult> {
logFileOperation(
this.config,
new FileOperationEvent(
EditTool.Name,
EDIT_TOOL_NAME,
operation,
editData.newContent.split('\n').length,
mimetype,
@@ -464,10 +464,9 @@ export class EditTool
extends BaseDeclarativeTool<EditToolParams, ToolResult>
implements ModifiableDeclarativeTool<EditToolParams>
{
static readonly Name = EDIT_TOOL_NAME;
constructor(private readonly config: Config) {
super(
EditTool.Name,
EDIT_TOOL_NAME,
'Edit',
`Replaces text within a file. By default, replaces a single occurrence, but can replace multiple occurrences when \`expected_replacements\` is specified. This tool requires providing significant context around the change to ensure precise targeting. Always use the ${READ_FILE_TOOL_NAME} tool to examine the file's current content before attempting a text replacement.