fix: hide task background instructions by default (#27872)
This commit is contained in:
parent
321db7a819
commit
68af95390d
2 changed files with 13 additions and 6 deletions
|
|
@ -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) =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue