@yeaft/webchat-agent 1.0.233 → 1.0.235
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/index.js +1 -1
- package/local-runtime/version.json +1 -1
- package/local-runtime/web/app.bundle.js +107 -95
- package/local-runtime/web/app.bundle.js.gz +0 -0
- package/local-runtime/web/index.html +2 -2
- package/local-runtime/web/style.bundle.css +1 -1
- package/local-runtime/web/style.bundle.css.gz +0 -0
- package/package.json +1 -1
- package/yeaft/web-bridge.js +7 -4
|
Binary file
|
package/package.json
CHANGED
package/yeaft/web-bridge.js
CHANGED
|
@@ -6694,19 +6694,22 @@ export async function handleYeaftLoadMoreHistory(msg) {
|
|
|
6694
6694
|
};
|
|
6695
6695
|
const traceDuration = (phase, start, extra = {}) => tracePerf(phase, { durationMs: perfNowMs() - start, ...extra });
|
|
6696
6696
|
tracePerf('history_more.received');
|
|
6697
|
-
if (!
|
|
6697
|
+
if (!sessionId) {
|
|
6698
6698
|
emitHistoryChunk({ sessionId, messages: [], mode: 'older', oldestSeq: null, hasMore: false, perfTraceId });
|
|
6699
|
-
traceDuration('history_more.handler_total', perfStart, { ok: false, detail: {
|
|
6699
|
+
traceDuration('history_more.handler_total', perfStart, { ok: false, detail: { missingSessionId: true } });
|
|
6700
6700
|
return;
|
|
6701
6701
|
}
|
|
6702
6702
|
|
|
6703
6703
|
const beforeSeq = (typeof msg.beforeSeq === 'number') ? msg.beforeSeq : null;
|
|
6704
|
-
const turns = (typeof msg.turns === 'number' && msg.turns > 0) ? msg.turns :
|
|
6704
|
+
const turns = Math.min(50, (typeof msg.turns === 'number' && msg.turns > 0) ? Math.floor(msg.turns) : 20);
|
|
6705
6705
|
|
|
6706
6706
|
let result;
|
|
6707
6707
|
try {
|
|
6708
6708
|
const loadStart = perfNowMs();
|
|
6709
|
-
|
|
6709
|
+
const store = session?.conversationStore || new ConversationStore(
|
|
6710
|
+
resolveSessionYeaftDir(ctx.CONFIG?.yeaftDir || DEFAULT_YEAFT_DIR, sessionId),
|
|
6711
|
+
);
|
|
6712
|
+
result = loadVisibleGroupHistoryPage(store, sessionId, turns, beforeSeq);
|
|
6710
6713
|
traceDuration('history_more.store_load', loadStart, { detail: { count: result.messages?.length || 0, beforeSeq, turns } });
|
|
6711
6714
|
} catch (err) {
|
|
6712
6715
|
console.error('[Yeaft] loadOlderBySession failed:', err.message);
|