feat: add experimental background subagents (#27084)
This commit is contained in:
@@ -2013,7 +2013,9 @@ function Task(props: ToolProps<typeof TaskTool>) {
|
||||
|
||||
const content = createMemo(() => {
|
||||
if (!props.input.description) return ""
|
||||
let content = [`${Locale.titlecase(props.input.subagent_type ?? "General")} Task — ${props.input.description}`]
|
||||
const description =
|
||||
props.metadata.background === true ? `${props.input.description} (background)` : props.input.description
|
||||
let content = [`${Locale.titlecase(props.input.subagent_type ?? "General")} Task — ${description}`]
|
||||
|
||||
if (isRunning() && tools().length > 0) {
|
||||
// content[0] += ` · ${tools().length} toolcalls`
|
||||
@@ -2025,7 +2027,11 @@ function Task(props: ToolProps<typeof TaskTool>) {
|
||||
}
|
||||
|
||||
if (props.part.state.status === "completed") {
|
||||
content.push(`└ ${tools().length} toolcalls · ${Locale.duration(duration())}`)
|
||||
content.push(
|
||||
props.metadata.background === true
|
||||
? `└ ${tools().length} toolcalls`
|
||||
: `└ ${tools().length} toolcalls · ${Locale.duration(duration())}`,
|
||||
)
|
||||
}
|
||||
|
||||
return content.join("\n")
|
||||
|
||||
Reference in New Issue
Block a user