fix: preserve Pi projection continuity

This commit is contained in:
2026-08-23 08:40:58 +08:00
parent 3599064bc4
commit 4bbe3f8b1e
7 changed files with 248 additions and 9 deletions

View File

@@ -361,7 +361,9 @@ export async function projectPiSessionSnapshot(
worker: { status: 'ready', generation: input.workerGeneration },
cursor: {
workerGeneration: input.workerGeneration,
seq: 0,
seq: input.snapshot.cursor.workerGeneration === input.workerGeneration
? input.snapshot.cursor.seq
: 0,
...(typeof response.leafId === 'string' ? { leafEntryId: response.leafId } : {}),
},
};