continue-custom/extensions/cli/src/tools/writeChecklist.ts
Nate be45ab63ca Add 'extensions/cli/' from commit 'e27a5c87d520e28844c9eac10bc6d301feee4b5e'
git-subtree-dir: extensions/cli
git-subtree-mainline: 1674c2aff1
git-subtree-split: e27a5c87d5
2025-08-20 17:19:56 -07:00

32 lines
1 KiB
TypeScript

import type { Tool } from "./types.js";
export const writeChecklistTool: Tool = {
name: "Checklist",
displayName: "Checklist",
description:
"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.",
readonly: false,
isBuiltIn: true,
parameters: {
checklist: {
type: "string",
description:
"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.",
required: true,
},
},
preprocess: async (args: { checklist: string }) => {
return {
preview: [
{
type: "checklist" as const,
content: args.checklist,
},
],
args,
};
},
run: async (args: { checklist: string }) => {
return `Task list status:\n${args.checklist}`;
},
};