refactor(session): route construction through Session.create

This commit is contained in:
imccyu
2026-08-05 11:56:14 +08:00
parent c7f693aa40
commit 8cbdd5b9d0
61 files changed
+305 -292

No files matched your search

@@ -143,7 +143,7 @@ export abstract class SessionQueryService extends Service {
*/
async readSession(sessionId: SessionId): Promise<SessionLogSnapshot> {
const loaded = await this._corpus.load(sessionId)
new Session(sessionId, loaded.events, loaded.header)
Session.create(sessionId, loaded.events, loaded.header)
return {
session: structuredClone(loaded.header),
events: loaded.events.map(snapshotSessionEvent),