mirror of
https://github.com/hellodigua/ChatLab.git
synced 2026-10-26 02:04:37 +08:00
The unified directory migration (needsUnifiedDirMigration) would re-trigger after a user changed their data directory, overwriting config.toml back to the old Electron path. Root cause: no persistent flag tracking whether the migration had already completed. If old databases remained (cleanup failure or timing), it would re-detect and re-run. Fix: - Add `electron_migration_done` flag to config.toml [data] section - Set flag after migrateToUnifiedDirs succeeds and in setCustomDataDir - Check flag at start of needsUnifiedDirMigration to skip if done - Add "migrate to default" button when data is at non-default path - Fix NLP directory path: move from userDataDir to systemDir (~/.chatlab/nlp) Co-authored-by: Cursor <cursoragent@cursor.com>