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

@@ -24,6 +24,7 @@ export const toolUseNames = [
"ask_followup_question",
"attempt_completion",
"switch_mode",
"new_task",
] as const
// Converts array of tool call names into a union type ("execute_command" | "read_file" | ...)
@@ -53,6 +54,8 @@ export const toolParamNames = [
"mode_slug",
"reason",
"operations",
"mode",
"message",
] as const
export type ToolParamName = (typeof toolParamNames)[number]
@@ -130,3 +133,8 @@ export interface SwitchModeToolUse extends ToolUse {
name: "switch_mode"
params: Partial<Pick<Record<ToolParamName, string>, "mode_slug" | "reason">>
}
export interface NewTaskToolUse extends ToolUse {
name: "new_task"
params: Partial<Pick<Record<ToolParamName, string>, "mode" | "message">>
}