Store Assistent chats, UI state, and taste in sqlite.

Runtime session data belongs in one DB so History can FTS-search and follow the volume; persona overlays and sidecar cards stay files.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Leonid Pershin
2026-08-22 01:10:57 +03:00
co-authored by Cursor
parent 8702b64e12
commit ac8e30c7c8
10 changed files with 582 additions and 155 deletions
+2 -2
View File
@@ -4047,7 +4047,7 @@
}
/**
* Fills fields the browser has never seen from Assistent/ui-state.json, so a fresh
* Fills fields the browser has never seen from sqlite ui_state, so a fresh
* browser on the same volume inherits the previous session. Existing localStorage wins.
* auto_download is only ever restored when it is off the danger flag stays opt-in.
*/
@@ -5361,7 +5361,7 @@
}
const remoteUpdated = remote.updated || 0;
const localUpdated = state.taste?.updated || 0;
// Disk taste.json is the source of truth; localStorage only wins when it is strictly newer.
// sqlite taste is the source of truth; localStorage only wins when it is strictly newer.
const localEmpty = !localUpdated
&& !(state.taste?.styles?.length || state.taste?.likes?.length || state.taste?.avoid?.length);
if (localEmpty || remoteUpdated >= localUpdated) {