refactor: add canonical transcript assembly seam

This commit is contained in:
tommy0103
2026-07-21 00:58:34 +08:00
parent 3ee44de4e5
commit f79f1b3e3b
39 changed files with 1741 additions and 670 deletions
+3 -3
View File
@@ -9,7 +9,7 @@ import {
loadSessionDetail,
materializeSessionDetailPatch,
} from '../app/src/renderer/src/data.js';
import { assembleSessionMessages } from '../app/src/shared/session-detail-assembly.mjs';
import { assembleSessionDetail } from '../app/src/shared/session-detail-assembly.mjs';
import { createSessionPatch } from '../app/src/shared/session-patch.mjs';
test('live updates coalesce while scrolling and load only the latest after scroll end', async () => {
@@ -123,13 +123,13 @@ test('a skipped live patch does not advance the visible patch baseline', async t
getSessionWorkflows: async () => [],
getSessionSummaries: async () => [],
getSessionPatch: async (_id, cursor) => {
const snapshotAtCall = { messages: assembleSessionMessages({
const snapshotAtCall = { messages: assembleSessionDetail({
messages: rows,
toolCalls: [],
toolResults: [],
subagents: [],
workflows: [],
}), workflows: [] };
}).messages, workflows: [] };
patchCalls++;
if (patchCalls === 1) {
firstPatchStarted();