summaryrefslogtreecommitdiff
path: root/packages/core/src/tools/grep.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/core/src/tools/grep.ts')
-rw-r--r--packages/core/src/tools/grep.ts13
1 files changed, 3 insertions, 10 deletions
diff --git a/packages/core/src/tools/grep.ts b/packages/core/src/tools/grep.ts
index 4cac389f..86988c44 100644
--- a/packages/core/src/tools/grep.ts
+++ b/packages/core/src/tools/grep.ts
@@ -17,7 +17,6 @@ import {
ToolInvocation,
ToolResult,
} from './tools.js';
-import { SchemaValidator } from '../utils/schemaValidator.js';
import { makeRelative, shortenPath } from '../utils/paths.js';
import { getErrorMessage, isNodeError } from '../utils/errors.js';
import { isGitRepository } from '../utils/gitUtils.js';
@@ -614,15 +613,9 @@ export class GrepTool extends BaseDeclarativeTool<GrepToolParams, ToolResult> {
* @param params Parameters to validate
* @returns An error message string if invalid, null otherwise
*/
- override validateToolParams(params: GrepToolParams): string | null {
- const errors = SchemaValidator.validate(
- this.schema.parametersJsonSchema,
- params,
- );
- if (errors) {
- return errors;
- }
-
+ protected override validateToolParamValues(
+ params: GrepToolParams,
+ ): string | null {
try {
new RegExp(params.pattern);
} catch (error) {