diff options
| author | joshualitt <[email protected]> | 2025-08-19 13:55:06 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-08-19 20:55:06 +0000 |
| commit | b9cece767d1abccd06fb95cab759afd06cc2c1e1 (patch) | |
| tree | 8c29a49bbaedd0a706bd2dba82eb4c587797ba7e /packages/core/src/tools/read-file.ts | |
| parent | 2143731f6efdf1aafff38ec249caf01a8bcd163e (diff) | |
feat(core): Cleanup after migrating tools. (#6199)
Co-authored-by: Jacob Richman <[email protected]>
Diffstat (limited to 'packages/core/src/tools/read-file.ts')
| -rw-r--r-- | packages/core/src/tools/read-file.ts | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/packages/core/src/tools/read-file.ts b/packages/core/src/tools/read-file.ts index dde3cc0c..da8a004d 100644 --- a/packages/core/src/tools/read-file.ts +++ b/packages/core/src/tools/read-file.ts @@ -5,7 +5,6 @@ */ import path from 'path'; -import { SchemaValidator } from '../utils/schemaValidator.js'; import { makeRelative, shortenPath } from '../utils/paths.js'; import { BaseDeclarativeTool, @@ -199,18 +198,14 @@ export class ReadFileTool extends BaseDeclarativeTool< ); } - protected override validateToolParams( + protected override validateToolParamValues( params: ReadFileToolParams, ): string | null { - const errors = SchemaValidator.validate( - this.schema.parametersJsonSchema, - params, - ); - if (errors) { - return errors; + const filePath = params.absolute_path; + if (params.absolute_path.trim() === '') { + return "The 'absolute_path' parameter must be non-empty."; } - const filePath = params.absolute_path; if (!path.isAbsolute(filePath)) { return `File path must be absolute, but was relative: ${filePath}. You must provide an absolute path.`; } |
