Improve story summary assembly and UI

This commit is contained in:
2026-01-27 22:51:44 +08:00
parent 4043e120ae
commit 1dfa9f95f2
5 changed files with 266 additions and 124 deletions

View File

@@ -31,9 +31,12 @@ export function getKeepVisibleCount() {
return store?.keepVisibleCount ?? 3;
}
export function calcHideRange(lastSummarized) {
// boundary隐藏边界由调用方决定语义LLM总结边界 or 向量边界)
export function calcHideRange(boundary) {
if (boundary == null || boundary < 0) return null;
const keepCount = getKeepVisibleCount();
const hideEnd = lastSummarized - keepCount;
const hideEnd = boundary - keepCount;
if (hideEnd < 0) return null;
return { start: 0, end: hideEnd };
}
@@ -285,4 +288,4 @@ export async function clearSummaryData(chatId) {
export function getWorldSnapshot() {
const store = getSummaryStore();
return store?.json?.world || [];
}
}