Files
cc-switch/src-tauri
Jason 014a7c0e30 refactor(services): split monolithic provider.rs into modular structure
Split the 1446-line services/provider.rs into 5 focused modules:

- gemini_auth.rs (250 lines): Gemini authentication type detection
  - PackyCode, Google OAuth, and generic provider detection
  - Security flag management for different auth types

- live.rs (300 lines): Live configuration operations
  - LiveSnapshot backup/restore
  - Reading and writing live config files
  - Sync current provider to live config

- usage.rs (150 lines): Usage script execution
  - Query and test usage scripts
  - Format usage results
  - Validate usage script configuration

- endpoints.rs (80 lines): Custom endpoints management
  - CRUD operations for provider custom endpoints
  - Last-used timestamp tracking

- mod.rs (650 lines): Core provider CRUD and service facade
  - ProviderService struct with all public methods
  - Provider add/update/delete/switch operations
  - Claude model key normalization
  - Credential extraction and validation

All 107 tests pass. This improves maintainability by:
- Separating concerns into cohesive modules
- Making Gemini-specific logic easier to find and modify
- Reducing cognitive load when working on specific features
2025-11-25 12:19:26 +08:00
..
2025-11-22 19:18:35 +08:00
2025-11-24 11:00:45 +08:00
2025-11-24 11:00:45 +08:00
2025-11-22 19:18:35 +08:00