Improve persistence and runtime SQLite compatibility

- add a SQLite adapter that works in both Bun and Node/Electron, with tests
- persist and backfill `assistantMessageId` on turn summaries to keep thread diffs linked
- prevent web state regressions by preserving turn summaries and deduplicating terminal/settings sync updates
78b7070042Julius Marminge committed on 2/20/2026, 4:49:27 AMparent1332c48
13 files changedLine totals unavailable