fix(webui): cache and defer thread history

This commit is contained in:
chengyongru authored and chengyongru committed 2026-09-12 17:09:51 +08:00
1 parent 7ba60c2ef0
commit a490cd629b
30 files changed
+1306 -145

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
import { MemoryLruCache } from "./memory-lru-cache";
import type { WebuiThreadPersistedPayload } from "./types";
/** Process-local canonical replay cache used for stale-while-revalidate session entry. */
export class WebuiThreadCache extends MemoryLruCache<WebuiThreadPersistedPayload> {
constructor(
maxBytes = 16 * 1024 * 1024,
maxEntries = 12,
) {
super(maxBytes, maxEntries);
}
}
export const webuiThreadCache = new WebuiThreadCache();