Elffuss BraidHub

kikocis/continue public

8cf316c34504 · 1023 BRawPermalink
1import { Tool } from "../..";
2import { BUILT_IN_GROUP_NAME, BuiltInToolNames } from "../builtIn";
3
4export const createNewFileTool: Tool = {
5 type: "function",
6 displayTitle: "Create New File",
7 wouldLikeTo: "create a new file at {{{ filepath }}}",
8 isCurrently: "creating a new file at {{{ filepath }}}",
9 hasAlready: "created a new file at {{{ filepath }}}",
10 group: BUILT_IN_GROUP_NAME,
11 readonly: false,
12 isInstant: true,
13 function: {
14 name: BuiltInToolNames.CreateNewFile,
15 description:
16 "Create a new file. Only use this when a file doesn't exist and should be created",
17 parameters: {
18 type: "object",
19 required: ["filepath", "contents"],
20 properties: {
21 filepath: {
22 type: "string",
23 description:
24 "The path where the new file should be created, relative to the root of the workspace",
25 },
26 contents: {
27 type: "string",
28 description: "The contents to write to the new file",
29 },
30 },
31 },
32 },
33};