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:
+2
-2
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user