mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-25 13:45:03 +08:00
refactor(settings): move device-level settings to local file storage
Separate device-level settings from database to support cloud sync scenarios where multiple devices share the same database but need independent settings. Changes: - Remove database storage logic (bind_db, save_to_db, load_from_db) - Remove legacy custom_endpoints_claude/codex fields (actual data in provider.meta) - Add current_provider_claude/codex/gemini fields for device-level provider selection - Add get_current_provider() and set_current_provider() helper functions - Settings now stored only in ~/.cc-switch/settings.json This ensures that when database is synced across devices, each device maintains its own current provider selection independently.
This commit is contained in:
@@ -580,7 +580,6 @@ pub fn run() {
|
||||
}
|
||||
}
|
||||
|
||||
crate::settings::bind_db(db.clone());
|
||||
let app_state = AppState::new(db);
|
||||
|
||||
// 检查是否需要首次导入(数据库为空)
|
||||
|
||||
Reference in New Issue
Block a user