fix: hide task background instructions by default (#27872)
This commit is contained in:
@@ -24,6 +24,14 @@ export interface TaskPromptOps {
|
||||
}
|
||||
|
||||
const id = "task"
|
||||
const BACKGROUND_DESCRIPTION = [
|
||||
"",
|
||||
"",
|
||||
[
|
||||
"Background mode: background=true launches the subagent asynchronously.",
|
||||
"Use task_status(task_id=..., wait=false) to poll, or wait=true to block until done.",
|
||||
].join(" "),
|
||||
].join("\n")
|
||||
|
||||
const BaseParameters = Schema.Struct({
|
||||
description: Schema.String.annotate({ description: "A short (3-5 words) description of the task" }),
|
||||
@@ -327,7 +335,7 @@ export const TaskTool = Tool.define(
|
||||
})
|
||||
|
||||
return {
|
||||
description: DESCRIPTION,
|
||||
description: flags.experimentalBackgroundSubagents ? DESCRIPTION + BACKGROUND_DESCRIPTION : DESCRIPTION,
|
||||
parameters: Parameters,
|
||||
jsonSchema: flags.experimentalBackgroundSubagents ? undefined : ToolJsonSchema.fromSchema(BaseParameters),
|
||||
execute: (params: Schema.Schema.Type<typeof Parameters>, ctx: Tool.Context) =>
|
||||
|
||||
Reference in New Issue
Block a user