mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-05-04 01:52:00 +08:00
Add get_effective_current_provider() to validate local settings ID against database, with automatic cleanup and fallback to DB is_current. This fixes edge cases in multi-device cloud sync scenarios where local settings may contain stale provider IDs: - current(): now returns validated effective provider ID - update(): correctly syncs live config when local ID differs from DB - delete(): checks both local settings and DB to prevent deletion - switch(): backfill logic now targets valid provider - sync_current_to_live(): uses validated ID with auto-fallback - tray menu: displays correct checkmark on startup Also fixes test issues: - Add missing test setup calls (mutex, reset_test_fs, ensure_test_home) - Correct Gemini security settings path to ~/.gemini/settings.json