Improve story summary assembly and UI
This commit is contained in:
@@ -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 || [];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user