diff --git a/src/core/prompts/tools/native-tools/new_task.ts b/src/core/prompts/tools/native-tools/new_task.ts index f846eaf73a..42da8faf4a 100644 --- a/src/core/prompts/tools/native-tools/new_task.ts +++ b/src/core/prompts/tools/native-tools/new_task.ts @@ -44,12 +44,13 @@ export default { permissions: { type: ["string", "null"], description: PERMISSIONS_PARAMETER_DESCRIPTION, + }, background: { type: ["string", "null"], description: BACKGROUND_PARAMETER_DESCRIPTION, }, }, - required: ["mode", "message", "todos"], + required: ["mode", "message", "todos", "task_queue", "permissions", "background"], additionalProperties: false, }, }, diff --git a/src/shared/tools.ts b/src/shared/tools.ts index 0179e1c551..4ecba976bb 100644 --- a/src/shared/tools.ts +++ b/src/shared/tools.ts @@ -105,9 +105,14 @@ export type NativeToolArgs = { edit_file: { file_path: string; old_string: string; new_string: string; expected_replacements?: number } apply_patch: { patch: string } list_files: { path: string; recursive?: boolean } - new_task: { mode: string; message: string; todos?: string; task_queue?: string; permissions?: string } - new_task: { mode: string; message: string; todos?: string; background?: string } - new_task: { mode: string; message: string; todos?: string } + new_task: { + mode: string + message: string + todos?: string + task_queue?: string + permissions?: string + background?: string + } ask_followup_question: { question: string follow_up: Array<{ text: string; mode?: string }> @@ -245,10 +250,9 @@ export interface SwitchModeToolUse extends ToolUse<"switch_mode"> { export interface NewTaskToolUse extends ToolUse<"new_task"> { name: "new_task" - params: Partial, "mode" | "message" | "todos" | "task_queue">> - params: Partial, "mode" | "message" | "todos" | "permissions">> - params: Partial, "mode" | "message" | "todos" | "background">> - params: Partial, "mode" | "message" | "todos">> + params: Partial< + Pick, "mode" | "message" | "todos" | "task_queue" | "permissions" | "background"> + > } export interface RunSlashCommandToolUse extends ToolUse<"run_slash_command"> {