diff options
| author | Jaana Dogan <[email protected]> | 2025-04-17 12:03:02 -0700 |
|---|---|---|
| committer | N. Taylor Mullen <[email protected]> | 2025-04-17 14:15:20 -0700 |
| commit | 81ba61df7f967f141cd8abc57d58a3612dfd4c2b (patch) | |
| tree | e4cf1a244c0b79fb7167105672c037954144783c /packages/cli/src/tools/edit.tool.ts | |
| parent | 898a83031c695f6da8705848ebe9998a7b626019 (diff) | |
Improve readability issues
This is only the first change of many changes.
* Remove redundant autogenerated comments
* Use the recommended file name style
* Use camelCase for variable names
* Don't introduce submodules for relevant types
* Don't introduce constants like modules, these are implementation details
* Remove empty files
Diffstat (limited to 'packages/cli/src/tools/edit.tool.ts')
| -rw-r--r-- | packages/cli/src/tools/edit.tool.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/packages/cli/src/tools/edit.tool.ts b/packages/cli/src/tools/edit.tool.ts index 28199c24..6f7ebe8a 100644 --- a/packages/cli/src/tools/edit.tool.ts +++ b/packages/cli/src/tools/edit.tool.ts @@ -2,8 +2,7 @@ import fs from 'fs'; import path from 'path'; import * as Diff from 'diff'; import { SchemaValidator } from '../utils/schemaValidator.js'; -import { ToolResult } from './ToolResult.js'; -import { BaseTool } from './BaseTool.js'; +import { BaseTool, ToolResult } from './tool.js'; import { ToolCallConfirmationDetails, ToolConfirmationOutcome, ToolEditConfirmationDetails } from '../ui/types.js'; import { makeRelative, shortenPath } from '../utils/paths.js'; import { ReadFileTool } from './read-file.tool.js'; @@ -67,7 +66,7 @@ export class EditTool extends BaseTool<EditToolParams, EditToolResult> { `Replaces a SINGLE, UNIQUE occurrence of text within a file. Requires providing significant context around the change to ensure uniqueness. For moving/renaming files, use the Bash tool with \`mv\`. For replacing entire file contents or creating new files use the ${WriteFileTool.Name} tool. Always use the ${ReadFileTool.Name} tool to examine the file before using this tool.`, { properties: { - file_path: { + filePath: { description: 'The absolute path to the file to modify. Must start with /. When creating a new file, ensure the parent directory exists (use the `LS` tool to verify).', type: 'string' }, |
