fix(mcp): migrate import functions to unified v3.7.0 structure

- Rewrite import_from_claude/codex/gemini to write directly to mcp.servers
- Implement skip-on-error strategy for fault tolerance (single invalid item no longer aborts entire batch)
- Smart merge logic: existing servers only enable corresponding app, preserve other configs
- Remove deprecated markers from service layer
- Export McpApps type for test usage
- Update mcp_commands tests to use unified structure

Fixes runtime import issue where data was written to legacy structure (mcp.claude/codex.servers)
but unified panel reads from new structure (mcp.servers), causing "imported but invisible" bug.
This commit is contained in:
Jason
2025-11-14 23:33:54 +08:00
parent 09f80d82bc
commit ea8f2095e2
4 changed files with 201 additions and 212 deletions

View File

@@ -18,7 +18,7 @@ mod settings;
mod store;
mod usage_script;
pub use app_config::{AppType, McpServer, MultiAppConfig};
pub use app_config::{AppType, McpApps, McpServer, MultiAppConfig};
pub use codex_config::{get_codex_auth_path, get_codex_config_path, write_codex_live_atomic};
pub use commands::*;
pub use config::{get_claude_mcp_path, get_claude_settings_path, read_json_file};