diff options
Diffstat (limited to 'packages/core/src/tools/write-file.ts')
| -rw-r--r-- | packages/core/src/tools/write-file.ts | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/packages/core/src/tools/write-file.ts b/packages/core/src/tools/write-file.ts index b018d653..5cdba419 100644 --- a/packages/core/src/tools/write-file.ts +++ b/packages/core/src/tools/write-file.ts @@ -18,7 +18,6 @@ import { Icon, } from './tools.js'; import { ToolErrorType } from './tool-error.js'; -import { Type } from '@google/genai'; import { SchemaValidator } from '../utils/schemaValidator.js'; import { makeRelative, shortenPath } from '../utils/paths.js'; import { getErrorMessage, isNodeError } from '../utils/errors.js'; @@ -89,21 +88,24 @@ export class WriteFileTool file_path: { description: "The absolute path to the file to write to (e.g., '/home/user/project/file.txt'). Relative paths are not supported.", - type: Type.STRING, + type: 'string', }, content: { description: 'The content to write to the file.', - type: Type.STRING, + type: 'string', }, }, required: ['file_path', 'content'], - type: Type.OBJECT, + type: 'object', }, ); } validateToolParams(params: WriteFileToolParams): string | null { - const errors = SchemaValidator.validate(this.schema.parameters, params); + const errors = SchemaValidator.validate( + this.schema.parametersJsonSchema, + params, + ); if (errors) { return errors; } |
