continue-custom/core/tools/definitions/globSearch.ts
Dallin Romney caf5b56db4 merge main
2025-08-05 17:46:21 -07:00

33 lines
1.1 KiB
TypeScript

import { Tool } from "../..";
import { BUILT_IN_GROUP_NAME, BuiltInToolNames } from "../builtIn";
export const globSearchTool: Tool = {
type: "function",
displayTitle: "Glob File Search",
wouldLikeTo: 'find file matches for "{{{ pattern }}}"',
isCurrently: 'finding file matches for "{{{ pattern }}}"',
hasAlready: 'retrieved file matches for "{{{ pattern }}}"',
readonly: true,
isInstant: true,
group: BUILT_IN_GROUP_NAME,
function: {
name: BuiltInToolNames.FileGlobSearch,
description:
"Search for files recursively in the project using glob patterns. Supports ** for recursive directory search. Output may be truncated; use targeted patterns",
parameters: {
type: "object",
required: ["pattern"],
properties: {
pattern: {
type: "string",
description: "Glob pattern for file path matching",
},
},
},
},
defaultToolPolicy: "allowedWithoutPermission",
systemMessageDescription: {
prefix: `To return a list of files based on a glob search pattern, use the ${BuiltInToolNames.FileGlobSearch} tool`,
exampleArgs: [["pattern", "*.py"]],
},
};