feat(web): rewrite subagent conversations for FIFO activation

This commit is contained in:
Dudu-0223
2026-07-30 23:33:07 +08:00
committed by Tianyi Cui
parent f0ab04273d
commit 8a518e353b
52 changed files with 829 additions and 420 deletions

View File

@@ -88,6 +88,8 @@ export function childSessionMeta(
return {
...parentHeader.cwd !== undefined ? { cwd: parentHeader.cwd } : {},
parentSession: parentHeader.id,
// Navigation classification only; the descriptor remains the authority
// for mode and continuation capability.
origin: 'subagent',
// Durable: the recursion budget must survive persistence and resume.
delegationDepth: childDepth,

View File

@@ -211,6 +211,7 @@ describe('SubagentService.startContinuable', () => {
expect('surfaceOp' in descriptor).toBe(false)
expect(loaded.meta.id).toBe(started.childId)
expect(loaded.meta.parentSession).toBe(SessionId('parent'))
expect(loaded.meta.origin).toBe('subagent')
})
it('rolls the child back completely when the caller signal aborts before acceptance', async () => {