| 1 | import { Tool } from "../.."; |
| 2 | import { BUILT_IN_GROUP_NAME, BuiltInToolNames } from "../builtIn"; |
| 3 | |
| 4 | export const globSearchTool: Tool = { |
| 5 | type: "function", |
| 6 | displayTitle: "Glob File Search", |
| 7 | wouldLikeTo: 'find file matches for "{{{ pattern }}}"', |
| 8 | isCurrently: 'finding file matches for "{{{ pattern }}}"', |
| 9 | hasAlready: 'retrieved file matches for "{{{ pattern }}}"', |
| 10 | readonly: true, |
| 11 | isInstant: true, |
| 12 | group: BUILT_IN_GROUP_NAME, |
| 13 | function: { |
| 14 | name: BuiltInToolNames.FileGlobSearch, |
| 15 | description: |
| 16 | "Search for files recursively in the project using glob patterns. Supports ** for recursive directory search. Output may be truncated; use targeted patterns", |
| 17 | parameters: { |
| 18 | type: "object", |
| 19 | required: ["pattern"], |
| 20 | properties: { |
| 21 | pattern: { |
| 22 | type: "string", |
| 23 | description: "Glob pattern for file path matching", |
| 24 | }, |
| 25 | }, |
| 26 | }, |
| 27 | }, |
| 28 | }; |