perf(session): reuse immutable event snapshots

This commit is contained in:
_Kerman
2026-08-28 13:43:16 +08:00
parent 5660f44d29
commit bcfec8d1c3
43 changed files with 116 additions and 116 deletions
@@ -882,7 +882,7 @@ describe('compaction region transaction', () => {
expect(head.content[0]?.type === 'text' ? head.content[0].text : '').toContain('<compacted-summary>')
expect(head.content.at(-1)).toEqual({ type: 'text', text: '</compacted-summary>' })
const replay = Session.create(SessionId('replay'), [...session.snapshotEvents()])
const replay = Session.create(SessionId('replay'), session.snapshotEvents())
expect(replay.deriveMessages()).toEqual(session.deriveMessages())
})