Elffuss BraidHub

kikocis/continue public

main · 1.1 KiBRawPermalink
1import type { Tool } from "./types.js";
2
3export const writeChecklistTool: Tool = {
4 name: "Checklist",
5 displayName: "Checklist",
6 description:
7 "Create or update a task checklist. The old checklist can be seen in the chat history if it exists. Use this tool to write a new checklist or edit the existing one.",
8 readonly: false,
9 isBuiltIn: true,
10 parameters: {
11 type: "object",
12 required: ["checklist"],
13 properties: {
14 checklist: {
15 type: "string",
16 description:
17 "The complete checklist in markdown format using - [ ] for incomplete tasks and - [x] for completed tasks. Avoid headers and additional content unless specifically being used to group checkboxes. Try to keep the list short, and make each item specific and actionable.",
18 },
19 },
20 },
21 preprocess: async (args: { checklist: string }) => {
22 return {
23 preview: [
24 {
25 type: "checklist" as const,
26 content: args.checklist,
27 },
28 ],
29 args,
30 };
31 },
32 run: async (args: { checklist: string }) => {
33 return `Task list status:\n${args.checklist}`;
34 },
35};