fix(subagent): keep one-shot labels optional

This commit is contained in:
Dudu-0223
2026-07-27 17:22:40 +08:00
committed by Tianyi Cui
parent 774ee34b9a
commit 03d95d0d84
28 changed files with 124 additions and 147 deletions

View File

@@ -49,16 +49,8 @@ function text(blocks: { type: string; text?: string }[]): string {
return blocks.filter(b => b.type === 'text').map(b => b.text).join('')
}
function start(
ctx: Context,
provider: string,
request: Omit<SubagentStartRequest, 'label' | 'signal'> & { label?: string; signal?: AbortSignal },
) {
return ctx.subagents.start(provider, {
label: request.label ?? 'child task',
signal: request.signal ?? new AbortController().signal,
...request,
})
function start(ctx: Context, provider: string, request: Omit<SubagentStartRequest, 'signal'> & { signal?: AbortSignal }) {
return ctx.subagents.start(provider, { signal: request.signal ?? new AbortController().signal, ...request })
}
/** Invoke the child lifecycle effect while its parent-owned setup is still unpublished. */