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
@@ -420,13 +420,10 @@ describe('runWorkerSession over an in-process MessageChannel', () => {
`))
await host.result()
const starts = host.ofType(WorkerToHostType.AgentStart).map(m => m.info)
const requests = host.ofType(WorkerToHostType.ChildStart).map(m => m.request)
expect(starts[0]).toMatchObject({ seq: 1, phase: 'Find' })
expect(starts[0]!.label.length).toBeLessThanOrEqual(48)
expect(starts[0]!.label).not.toContain('second line')
expect(starts[1]).toMatchObject({ seq: 2, label: 'named', phase: 'Custom' })
expect(requests[0]!.label).toBe(starts[0]!.label)
expect(requests[1]!.label).toBe('named')
host.close()
})