Merge master while preserving subagent lifecycle changes
This commit is contained in:
commit
3dde36b5bb
81 files changed
+697
-368
No files matched your search
@@ -60,7 +60,8 @@ export function flattenLineage(
|
||||
const children = new Map<SessionId, TitledSessionSummary[]>()
|
||||
const roots: TitledSessionSummary[] = []
|
||||
for (const s of summaries) {
|
||||
if (s.parentSessionId !== undefined && byId.has(s.parentSessionId)) {
|
||||
// Historical ordinary forks may retain a parent id without being subagents.
|
||||
if (s.origin === 'subagent' && s.parentSessionId !== undefined && byId.has(s.parentSessionId)) {
|
||||
const list = children.get(s.parentSessionId) ?? []
|
||||
list.push(s)
|
||||
children.set(s.parentSessionId, list)
|
||||
|
||||
@@ -530,7 +530,7 @@ export class SessionManager {
|
||||
* immediately (same synchronous-addressability guarantee as create).
|
||||
* Blankness starts provisionally true so the authoritative Host summary can
|
||||
* preserve it or lower it after an exact cut before the first `turn/start`;
|
||||
* lineage rides parentSessionId. A child published before Workspace
|
||||
* the fork has no durable source relationship. A child published before Workspace
|
||||
* attachment fails is also reconciled into the list.
|
||||
* @param opts - source session, optional exact inclusive boundary seq, and permission to start migration.
|
||||
* @returns the fork result (the child session id).
|
||||
@@ -550,7 +550,6 @@ export class SessionManager {
|
||||
if (childId !== undefined) {
|
||||
this.recordMutation({ kind: 'placeholder', summary: { agentAvailable: true,
|
||||
sessionId: childId, updatedAt: Date.now(), running: false, blank: true,
|
||||
parentSessionId: opts.sessionId,
|
||||
...(source?.cwd !== undefined ? { cwd: source.cwd } : {}),
|
||||
} })
|
||||
}
|
||||
|
||||
@@ -273,7 +273,6 @@ export class SessionCommandController {
|
||||
inheritedEventCount: SessionLogOffset(boundary + 1),
|
||||
meta: {
|
||||
...(source.header.cwd === undefined ? {} : { cwd: source.header.cwd }),
|
||||
parentSession: source.header.id,
|
||||
isSeeded: true,
|
||||
...(composition.agentPreset === undefined
|
||||
? {}
|
||||
|
||||
Reference in new issue
Block a user