@yeaft/webchat-agent 1.0.146 → 1.0.147
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/yeaft/web-bridge.js +9 -6
package/package.json
CHANGED
package/yeaft/web-bridge.js
CHANGED
|
@@ -207,7 +207,7 @@ function scheduleYeaftLoadHistoryMetadataReplay(sessionId) {
|
|
|
207
207
|
tools: status.tools,
|
|
208
208
|
yeaftDir: ctx.CONFIG?.yeaftDir || null,
|
|
209
209
|
tasks: replaySession.taskManager ? replaySession.taskManager.listActiveTasks() : [],
|
|
210
|
-
});
|
|
210
|
+
}, { sessionId });
|
|
211
211
|
sendSessionSnapshotBroadcast();
|
|
212
212
|
if (sessionId && session === replaySession) {
|
|
213
213
|
sendDreamSnapshotForSession(sessionId, { trigger: 'load_history' }).catch(() => null);
|
|
@@ -1108,7 +1108,7 @@ function emitVisibleHistoryReplay({ store, sessionId, limit, beforeSeq = null, m
|
|
|
1108
1108
|
hasMore: visiblePage.hasMore,
|
|
1109
1109
|
oldestSeq: visiblePage.oldestSeq,
|
|
1110
1110
|
latestSeq: Number.isFinite(latestSeq) ? latestSeq : null,
|
|
1111
|
-
},
|
|
1111
|
+
}, { sessionId, perfTraceId });
|
|
1112
1112
|
return;
|
|
1113
1113
|
}
|
|
1114
1114
|
|
|
@@ -4005,7 +4005,10 @@ export async function ensureSessionLoaded(opts = {}) {
|
|
|
4005
4005
|
tools: bootStatus.tools,
|
|
4006
4006
|
yeaftDir: ctx.CONFIG?.yeaftDir || null,
|
|
4007
4007
|
tasks: session.taskManager ? session.taskManager.listActiveTasks() : [],
|
|
4008
|
-
},
|
|
4008
|
+
}, {
|
|
4009
|
+
sessionId: opts?.sessionMeta?.id || opts?.sessionId || null,
|
|
4010
|
+
perfTraceId: opts?.perfTraceId || null,
|
|
4011
|
+
});
|
|
4009
4012
|
sendSessionSnapshotBroadcast();
|
|
4010
4013
|
// vp-status: rebuild frontend status table from authoritative agent
|
|
4011
4014
|
// memory. Sent unconditionally so reconnect/refresh paths get the same
|
|
@@ -5623,7 +5626,7 @@ export async function handleYeaftLoadHistory(msg) {
|
|
|
5623
5626
|
sessionId,
|
|
5624
5627
|
latestSeq: delta.latestSeq,
|
|
5625
5628
|
afterSeq,
|
|
5626
|
-
},
|
|
5629
|
+
}, { sessionId, perfTraceId });
|
|
5627
5630
|
return;
|
|
5628
5631
|
}
|
|
5629
5632
|
|
|
@@ -5700,7 +5703,7 @@ export async function handleYeaftLoadHistory(msg) {
|
|
|
5700
5703
|
hasMore,
|
|
5701
5704
|
oldestSeq,
|
|
5702
5705
|
latestSeq,
|
|
5703
|
-
},
|
|
5706
|
+
}, { sessionId, perfTraceId });
|
|
5704
5707
|
};
|
|
5705
5708
|
|
|
5706
5709
|
if (!session) {
|
|
@@ -5749,7 +5752,7 @@ export async function handleYeaftLoadHistory(msg) {
|
|
|
5749
5752
|
perfTraceId,
|
|
5750
5753
|
});
|
|
5751
5754
|
traceDuration('history.emit_chunk', emitStart, { detail: { mode: 'delta', count: projectedMessages.length, cold: true } });
|
|
5752
|
-
sendSessionEvent({ type: 'history_loaded', mode: 'delta', count: projectedMessages.length, sessionId, latestSeq: delta.latestSeq, afterSeq },
|
|
5755
|
+
sendSessionEvent({ type: 'history_loaded', mode: 'delta', count: projectedMessages.length, sessionId, latestSeq: delta.latestSeq, afterSeq }, { sessionId, perfTraceId });
|
|
5753
5756
|
} else if (!metadataOnly) {
|
|
5754
5757
|
const replayStart = perfNowMs();
|
|
5755
5758
|
emitVisibleHistoryReplay({ store: coldStore, sessionId, limit, mode: 'recent', perfTraceId });
|