Logo
Explore Help
Register Sign In
admin/cc-switch
1
0
Fork 0
You've already forked cc-switch
Code Issues Pull Requests Actions Packages Projects Releases Wiki Activity
Files
7b1a68ee4e64d11f967d213e2693383534819100
cc-switch/src-tauri/src/services/mod.rs

4 lines
54 B
Rust
Raw Normal View History

refactor(backend): phase 4 - extract provider service layer Architecture improvements: - Extract ProviderService with switch/backfill/write methods - Reduce command layer from 160 to 13 lines via delegation - Separate business logic (services) from state management (commands) - Introduce precise error handling with structured validation Refactoring details: - Split Codex/Claude switching into symmetric private methods - Add multi-layer validation for Codex auth field (existence + type) - Extract import_config_from_path for command and test reuse - Expose export_config_to_file and ProviderService in public API Test coverage: - Add 10+ integration tests for Claude/Codex switching flows - Cover import/export success and failure scenarios (JSON parse, missing file) - Verify state consistency on error paths (current remains unchanged) - Test snapshot backfill for both old and new providers after switching
2025-10-28 10:47:48 +08:00
pub mod provider;
pub use provider::ProviderService;
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.2 Page: 40ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API