diff options
Diffstat (limited to 'packages/core/src/tools/glob.ts')
| -rw-r--r-- | packages/core/src/tools/glob.ts | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/packages/core/src/tools/glob.ts b/packages/core/src/tools/glob.ts index df0cc348..eaedc20f 100644 --- a/packages/core/src/tools/glob.ts +++ b/packages/core/src/tools/glob.ts @@ -15,7 +15,6 @@ import { ToolInvocation, ToolResult, } from './tools.js'; -import { Type } from '@google/genai'; import { shortenPath, makeRelative } from '../utils/paths.js'; import { Config } from '../config/config.js'; @@ -255,26 +254,26 @@ export class GlobTool extends BaseDeclarativeTool<GlobToolParams, ToolResult> { pattern: { description: "The glob pattern to match against (e.g., '**/*.py', 'docs/*.md').", - type: Type.STRING, + type: 'string', }, path: { description: 'Optional: The absolute path to the directory to search within. If omitted, searches the root directory.', - type: Type.STRING, + type: 'string', }, case_sensitive: { description: 'Optional: Whether the search should be case-sensitive. Defaults to false.', - type: Type.BOOLEAN, + type: 'boolean', }, respect_git_ignore: { description: 'Optional: Whether to respect .gitignore patterns when finding files. Only available in git repositories. Defaults to true.', - type: Type.BOOLEAN, + type: 'boolean', }, }, required: ['pattern'], - type: Type.OBJECT, + type: 'object', }, ); } @@ -283,7 +282,10 @@ export class GlobTool extends BaseDeclarativeTool<GlobToolParams, ToolResult> { * Validates the parameters for the tool. */ validateToolParams(params: GlobToolParams): string | null { - const errors = SchemaValidator.validate(this.schema.parameters, params); + const errors = SchemaValidator.validate( + this.schema.parametersJsonSchema, + params, + ); if (errors) { return errors; } |
