perf: cache static assets and validate only requested refresh regions

This commit is contained in:
abaishu0730 committed 2026-10-28 12:11:19 +08:00
1 parent f317314a3c
commit 73773f9526
31 files changed
+554 -41

No files matched your search

+1
View File
@@ -14,6 +14,7 @@ class AssistantStore{
CREATE TABLE IF NOT EXISTS turns(id TEXT PRIMARY KEY,conversation_id TEXT NOT NULL,status TEXT NOT NULL,payload BLOB NOT NULL,day TEXT NOT NULL,created_at TEXT NOT NULL);
CREATE INDEX IF NOT EXISTS conversation_turns ON turns(conversation_id,created_at);`);
this.conversationHistory=new ConversationHistory(this);
require('../../shared/refresh-revisions.cjs').installRevisionTracking(this.db,['config',['conversations',"'owner:' || $row.owner"],['turns',"'owner:' || (SELECT owner FROM conversations WHERE id=$row.conversation_id)"],['turns',"'usage:' || $row.day",'OLD.day IS NOT NEW.day']]);
} catch(error) {
try { this.db?.close(); } catch {}
try { this.vault?.destroy(); } catch {}