mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-06-16 13:34:04 +08:00
- Fix operation order: write live files first, then save config.json for consistency - Implement short-lock pattern: read state quickly, release lock before I/O operations - Add atomic Codex dual-file writes with rollback on failure - Simplify add_provider and update_provider logic with consistent structure - Remove unnecessary duplicate code and improve error handling reliability This ensures data consistency when operations fail and significantly improves concurrency by minimizing lock holding time during file I/O.