Elffuss BraidHub

kikocis/continue public

c657d7bd6e88 · 1.0 KiBRawPermalink
1import { Tool } from "../..";
2
3import { BUILT_IN_GROUP_NAME, BuiltInToolNames } from "../builtIn";
4
5export const lsTool: Tool = {
6 type: "function",
7 displayTitle: "ls",
8 wouldLikeTo: "list files and folders in {{{ dirPath }}}",
9 isCurrently: "listing files and folders in {{{ dirPath }}}",
10 hasAlready: "listed files and folders in {{{ dirPath }}}",
11 readonly: true,
12 isInstant: true,
13 group: BUILT_IN_GROUP_NAME,
14 function: {
15 name: BuiltInToolNames.LSTool,
16 description: "List files and folders in a given directory",
17 parameters: {
18 type: "object",
19 required: ["dirPath", "recursive"],
20 properties: {
21 dirPath: {
22 type: "string",
23 description:
24 "The directory path relative to the root of the project. Always use forward slash paths like '/'. rather than e.g. '.'",
25 },
26 recursive: {
27 type: "boolean",
28 description:
29 "If true, lists files and folders recursively. To prevent unexpected large results, use this sparingly",
30 },
31 },
32 },
33 },
34};