mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-04-28 13:42:51 +08:00
## Compilation Fixes - Add deprecated compatibility methods to McpService: * get_servers() - filters servers by app * set_enabled() - delegates to toggle_app() * sync_enabled() - syncs enabled servers for specific app * import_from_claude/codex/gemini() - wraps mcp:: functions - Fix toml_edit type conversion in sync_single_server_to_codex(): * Add json_server_to_toml_table() helper function * Manually construct toml_edit::Table instead of invalid serde conversion - Fix get_codex_config_path() calls (returns PathBuf, not Result) - Update upsert_mcp_server_in_config() to work with unified structure: * Converts old per-app API to unified McpServer structure * Preserves existing server data when updating * Supports sync_other_side parameter for multi-app enable - Update delete_mcp_server_in_config() to ignore app parameter ## Backward Compatibility - All old v3.6.x commands continue to work with deprecation warnings - Frontend migration can be done incrementally - Old commands transparently use new unified backend ## Status ✅ Backend compiles successfully (cargo check passes) ⚠️ 16 warnings (8 deprecation + 8 unused functions - expected)