mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-05-04 01:52:00 +08:00
When users set a custom Claude configuration directory, the MCP config file (.claude.json) is now placed alongside the overridden directory instead of the default ~/.claude.json location. Changes: - Add path derivation logic to generate MCP path from override directory (e.g., /custom/.claude → /custom/.claude.json) - Implement automatic migration from legacy path on first access - Add comprehensive unit tests covering 4 edge cases - Update UI descriptions to clarify MCP file placement - Fix documentation: correct MCP config path from ~/.claude/mcp.json to ~/.claude.json Technical details: - New function: derive_mcp_path_from_override() extracts directory name and creates sibling .json file - Migration copies ~/.claude.json to new location if override is set - All MCP operations (read/write/sync) now use the derived path via user_config_path() unified entry point Breaking changes: None (backward compatible with default behavior)