Add a new_task tool

This commit is contained in:
Matt Rubens
2025-01-29 01:28:32 -05:00
parent 4026a87d2c
commit 13de490c3b
12 changed files with 343 additions and 9 deletions

View File

@@ -159,6 +159,8 @@ export type ClineSay =
| "command"
| "mcp_server_request_started"
| "mcp_server_response"
| "new_task_started"
| "new_task"
export interface ClineSayTool {
tool:
@@ -171,6 +173,7 @@ export interface ClineSayTool {
| "listCodeDefinitionNames"
| "searchFiles"
| "switchMode"
| "newTask"
path?: string
diff?: string
content?: string

View File

@@ -16,6 +16,7 @@ export const TOOL_DISPLAY_NAMES = {
ask_followup_question: "ask questions",
attempt_completion: "complete tasks",
switch_mode: "switch modes",
new_task: "create new task",
} as const
// Define available tool groups
@@ -25,12 +26,18 @@ export const TOOL_GROUPS: Record<string, ToolGroupValues> = {
browser: ["browser_action"],
command: ["execute_command"],
mcp: ["use_mcp_tool", "access_mcp_resource"],
modes: ["switch_mode", "new_task"],
}
export type ToolGroup = keyof typeof TOOL_GROUPS
// Tools that are always available to all modes
export const ALWAYS_AVAILABLE_TOOLS = ["ask_followup_question", "attempt_completion", "switch_mode"] as const
export const ALWAYS_AVAILABLE_TOOLS = [
"ask_followup_question",
"attempt_completion",
"switch_mode",
"new_task",
] as const
// Tool name types for type safety
export type ToolName = keyof typeof TOOL_DISPLAY_NAMES