mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-05-06 19:26:48 +08:00
590be4e136
Add `resolve_app_type` helper to support both enum and string-based app type parameters across all provider commands. This change: - Eliminates implicit default to Claude (previously used `unwrap_or`) - Supports two parameter forms: `app_type` (enum, priority 1) and `app` (string, priority 2) - Provides explicit error handling when both parameters are missing - Updates all 14 provider command functions with consistent parameter validation - Fixes tray menu provider switching to pass the new `app` parameter This dual-parameter approach maintains backward compatibility while enabling future CLI tool integration and more flexible API usage patterns. Technical details: - Priority order: `app_type` enum > `app` string > error - Invalid `app` strings now return errors instead of defaulting - All existing tests pass (45/45)