Files
ChatLab/packages/node-runtime
digua 61a6e72c64 refactor: unify data directory for Electron and CLI
Split PathProvider into dual-root architecture: systemDir (~/.chatlab/)
for config/logs/cache/ai/settings, and userDataDir (~/.chatlab/data/ by
default) for chat databases. Both Electron and CLI share the same
config.toml for user_data_dir resolution.

- Refactor PathProvider interface (getSystemDir + getUserDataDir)
- Update config schema (data.dir → data.user_data_dir)
- Add writeConfigField() for config.toml manipulation
- Fix needsUnifiedDirMigration() to detect old Electron data even when
  user_data_dir was already set by CLI (compare paths instead of
  checking existence)
2026-05-14 19:35:36 +08:00
..