-
Notifications
You must be signed in to change notification settings - Fork 2.6k
/
Copy pathglobTool.ts
32 lines (30 loc) · 969 Bytes
/
globTool.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import { Tool } from "../..";
import { BUILT_IN_GROUP_NAME, BuiltInToolNames } from "../builtIn";
export const globTool: Tool = {
type: "function",
displayTitle: "Glob Tool",
wouldLikeTo: "search files and folders in {{{ dirPath }}}",
isCurrently: "searching files and folders in {{{ dirPath }}}",
hasAlready: "listed files and folders in {{{ dirPath }}}",
readonly: true,
group: BUILT_IN_GROUP_NAME,
function: {
name: BuiltInToolNames.GlobTool,
description: "Finds files based on pattern matching",
parameters: {
type: "object",
required: ["pattern", "path"],
properties: {
pattern: {
type: "string",
description: "ripgrep glob pattern",
},
path: {
type: "string",
description:
"The directory path to search relative to the root of the project. Always use forward slash paths like '/'. rather than e.g. '.'",
},
},
},
},
};