2025-08-27 11:15:29 +08:00
# Changelog
All notable changes to CC Switch will be documented in this file.
The format is based on [Keep a Changelog ](https://keepachangelog.com/en/1.0.0/ ),
and this project adheres to [Semantic Versioning ](https://semver.org/spec/v2.0.0.html ).
2025-10-12 22:27:02 +08:00
## [3.5.0] - 2025-01-15
2025-10-30 14:59:15 +08:00
### ⚠ Breaking Changes
- Tauri 命令仅接受参数 `app` (取值:`claude` /`codex` );移除对 `app_type` /`appType` 的兼容。
- 前端类型命名统一为 `AppId` (移除 `AppType` 导出),变量命名统一为 `appId` 。
2025-10-12 22:27:02 +08:00
### ✨ New Features
- **MCP (Model Context Protocol) Management** - Complete MCP server configuration management system
- Add, edit, delete, and toggle MCP servers in `~/.claude.json`
- Support for stdio and http server types with command validation
- Built-in templates for popular MCP servers (mcp-fetch, etc.)
- Real-time enable/disable toggle for MCP servers
- Atomic file writing to prevent configuration corruption
- **Configuration Import/Export** - Backup and restore your provider configurations
- Export all configurations to JSON file with one click
- Import configurations with validation and automatic backup
- Automatic backup rotation (keeps 10 most recent backups)
- Progress modal with detailed status feedback
- **Endpoint Speed Testing** - Test API endpoint response times
- Measure latency to different provider endpoints
- Visual indicators for connection quality
- Help users choose the fastest provider
### 🔧 Improvements
- Complete internationalization (i18n) coverage for all UI components
- Enhanced error handling and user feedback throughout the application
- Improved configuration file management with better validation
- Added new provider presets: Longcat, kat-coder
- Updated GLM provider configurations with latest models
- Refined UI/UX with better spacing, icons, and visual feedback
- Enhanced tray menu functionality and responsiveness
2025-10-12 23:17:05 +08:00
- **Standardized release artifact naming** - All platform releases now use consistent version-tagged filenames:
- macOS: `CC-Switch-v{version}-macOS.tar.gz` / `.zip`
- Windows: `CC-Switch-v{version}-Windows.msi` / `-Portable.zip`
- Linux: `CC-Switch-v{version}-Linux.AppImage` / `.deb`
2025-10-12 22:27:02 +08:00
### 🐛 Bug Fixes
- Fixed layout shifts during provider switching
- Improved config file path handling across different platforms
- Better error messages for configuration validation failures
- Fixed various edge cases in configuration import/export
### 📦 Technical Details
- Enhanced `import_export.rs` module with backup management
- New `claude_mcp.rs` module for MCP configuration handling
- Improved state management and lock handling in Rust backend
- Better TypeScript type safety across the codebase
2025-10-02 09:59:38 +08:00
## [3.4.0] - 2025-10-01
### ✨ Features
2025-10-12 22:27:02 +08:00
2025-10-02 09:59:38 +08:00
- Enable internationalization via i18next with a Chinese default and English fallback, plus an in-app language switcher
2025-10-03 20:03:55 +08:00
- Add Claude plugin sync while retiring the legacy VS Code integration controls (Codex no longer requires settings.json edits)
2025-10-02 09:59:38 +08:00
- Extend provider presets with optional API key URLs and updated models, including DeepSeek-V3.1-Terminus and Qwen3-Max
- Support portable mode launches and enforce a single running instance to avoid conflicts
### 🔧 Improvements
2025-10-12 22:27:02 +08:00
2025-10-02 09:59:38 +08:00
- Allow minimizing the window to the system tray and add macOS Dock visibility management for tray workflows
- Refresh the Settings modal with a scrollable layout, save icon, and cleaner language section
- Smooth provider toggle states with consistent button widths/icons and prevent layout shifts when switching between Claude and Codex
- Adjust the Windows MSI installer to target per-user LocalAppData and improve component tracking reliability
### 🐛 Fixes
2025-10-12 22:27:02 +08:00
2025-10-02 09:59:38 +08:00
- Remove the unnecessary OpenAI auth requirement from third-party provider configurations
- Fix layout shifts while switching app types with Claude plugin sync enabled
2025-10-03 20:03:55 +08:00
- Align Enable/In Use button states to avoid visual jank across app views
2025-10-02 09:59:38 +08:00
2025-09-22 22:50:07 +08:00
## [3.3.0] - 2025-09-22
### ✨ Features
2025-10-12 22:27:02 +08:00
- Add “Apply to VS Code / Remove from VS Code” actions on provider cards, writing settings for Code/Insiders/VSCodium variants _ (Removed in 3.4.x) _
- Enable VS Code auto-sync by default with window broadcast and tray hooks so Codex switches sync silently _ (Removed in 3.4.x) _
2025-09-22 22:50:07 +08:00
- Extend the Codex provider wizard with display name, dedicated API key URL, and clearer guidance
- Introduce shared common config snippets with JSON/TOML reuse, validation, and consistent error surfaces
### 🔧 Improvements
2025-10-12 22:27:02 +08:00
2025-09-22 22:50:07 +08:00
- Keep the tray menu responsive when the window is hidden and standardize button styling and copy
- Disable modal backdrop blur on Linux (WebKitGTK/Wayland) to avoid freezes; restore the window when clicking the macOS Dock icon
- Support overriding config directories on WSL, refine placeholders/descriptions, and fix VS Code button wrapping on Windows
- Add a `created_at` timestamp to provider records for future sorting and analytics
### 🐛 Fixes
2025-10-12 22:27:02 +08:00
2025-09-22 22:50:07 +08:00
- Correct regex escapes and common snippet trimming in the Codex wizard to prevent validation issues
- Harden the VS Code sync flow with more reliable TOML/JSON parsing while reducing layout jank
- Bundle `@codemirror/lint` to reinstate live linting in config editors
2025-09-13 15:48:14 +08:00
## [3.2.0] - 2025-09-13
### ✨ New Features
2025-10-12 22:27:02 +08:00
2025-09-13 15:48:14 +08:00
- System tray provider switching with dynamic menu for Claude/Codex
- Frontend receives `provider-switched` events and refreshes active app
- Built-in update flow via Tauri Updater plugin with dismissible UpdateBadge
### 🔧 Improvements
2025-10-12 22:27:02 +08:00
2025-09-13 15:48:14 +08:00
- Single source of truth for provider configs; no duplicate copy files
- One-time migration imports existing copies into `config.json` and archives originals
- Duplicate provider de-duplication by name + API key at startup
- Atomic writes for Codex `auth.json` + `config.toml` with rollback on failure
- Logging standardized (Rust): use `log::{info,warn,error}` instead of stdout prints
- Tailwind v4 integration and refined dark mode handling
### 🐛 Fixes
2025-10-12 22:27:02 +08:00
2025-09-13 15:48:14 +08:00
- Remove/minimize debug console logs in production builds
- Fix CSS minifier warnings for scrollbar pseudo-elements
- Prettier formatting across codebase for consistent style
### 📦 Dependencies
2025-10-12 22:27:02 +08:00
2025-09-13 15:48:14 +08:00
- Tauri: 2.8.x (core, updater, process, opener, log plugins)
- React: 18.2.x · TypeScript: 5.3.x · Vite: 5.x
### 🔄 Notes
2025-10-12 22:27:02 +08:00
2025-09-13 15:48:14 +08:00
- `connect-src` CSP remains permissive for compatibility; can be tightened later as needed
2025-09-03 16:43:29 +08:00
## [3.1.1] - 2025-09-03
### 🐛 Bug Fixes
2025-10-12 22:27:02 +08:00
2025-09-03 16:43:29 +08:00
- Fixed the default codex config.toml to match the latest modifications
- Improved provider configuration UX with custom option
### 📝 Documentation
2025-10-12 22:27:02 +08:00
2025-09-03 16:43:29 +08:00
- Updated README with latest information
## [3.1.0] - 2025-09-01
### ✨ New Features
2025-10-12 22:27:02 +08:00
2025-09-03 16:43:29 +08:00
- **Added Codex application support** - Now supports both Claude Code and Codex configuration management
- Manage auth.json and config.toml for Codex
- Support for backup and restore operations
- Preset providers for Codex (Official, PackyCode)
- API Key auto-write to auth.json when using presets
- **New UI components**
- App switcher with segmented control design
- Dual editor form for Codex configuration
- Pills-style app switcher with consistent button widths
- **Enhanced configuration management**
- Multi-app config v2 structure (claude/codex)
- Automatic v1→v2 migration with backup
- OPENAI_API_KEY validation for non-official presets
- TOML syntax validation for config.toml
### 🔧 Technical Improvements
2025-10-12 22:27:02 +08:00
2025-09-03 16:43:29 +08:00
- Unified Tauri command API with app_type parameter
- Backward compatibility for app/appType parameters
- Added get_config_status/open_config_folder/open_external commands
- Improved error handling for empty config.toml
### 🐛 Bug Fixes
2025-10-12 22:27:02 +08:00
2025-09-03 16:43:29 +08:00
- Fixed config path reporting and folder opening for Codex
- Corrected default import behavior when main config is missing
- Fixed non_snake_case warnings in commands.rs
2025-08-27 11:15:29 +08:00
## [3.0.0] - 2025-08-27
### 🚀 Major Changes
2025-10-12 22:27:02 +08:00
2025-08-27 11:15:29 +08:00
- **Complete migration from Electron to Tauri 2.0** - The application has been completely rewritten using Tauri, resulting in:
- **90% reduction in bundle size** (from ~150MB to ~15MB)
- **Significantly improved startup performance**
- **Native system integration** without Chromium overhead
- **Enhanced security** with Rust backend
### ✨ New Features
2025-10-12 22:27:02 +08:00
2025-08-27 11:15:29 +08:00
- **Native window controls** with transparent title bar on macOS
- **Improved file system operations** using Rust for better performance
- **Enhanced security model** with explicit permission declarations
- **Better platform detection** using Tauri's native APIs
### 🔧 Technical Improvements
2025-10-12 22:27:02 +08:00
2025-08-27 11:15:29 +08:00
- Migrated from Electron IPC to Tauri command system
- Replaced Node.js file operations with Rust implementations
- Implemented proper CSP (Content Security Policy) for enhanced security
- Added TypeScript strict mode for better type safety
- Integrated Rust cargo fmt and clippy for code quality
### 🐛 Bug Fixes
2025-10-12 22:27:02 +08:00
2025-08-27 11:15:29 +08:00
- Fixed bundle identifier conflict on macOS (changed from .app to .desktop)
- Resolved platform detection issues
- Improved error handling in configuration management
### 📦 Dependencies
2025-10-12 22:27:02 +08:00
2025-08-27 11:15:29 +08:00
- **Tauri**: 2.8.2
- **React**: 18.2.0
- **TypeScript**: 5.3.0
- **Vite**: 5.0.0
### 🔄 Migration Notes
2025-10-12 22:27:02 +08:00
2025-08-27 11:15:29 +08:00
For users upgrading from v2.x (Electron version):
2025-10-12 22:27:02 +08:00
2025-08-27 11:15:29 +08:00
- Configuration files remain compatible - no action required
- The app will automatically migrate your existing provider configurations
- Window position and size preferences have been reset to defaults
2025-09-01 10:49:31 +08:00
#### Backup on v1→v2 Migration (cc-switch internal config)
2025-10-12 22:27:02 +08:00
2025-09-01 10:49:31 +08:00
- When the app detects an old v1 config structure at `~/.cc-switch/config.json` , it now creates a timestamped backup before writing the new v2 structure.
- Backup location: `~/.cc-switch/config.v1.backup.<timestamp>.json`
- This only concerns cc-switch's own metadata file; your actual provider files under `~/.claude/` and `~/.codex/` are untouched.
2025-08-27 11:15:29 +08:00
### 🛠️ Development
2025-10-12 22:27:02 +08:00
2025-08-27 11:15:29 +08:00
- Added `pnpm typecheck` command for TypeScript validation
- Added `pnpm format` and `pnpm format:check` for code formatting
- Rust code now uses cargo fmt for consistent formatting
## [2.0.0] - Previous Electron Release
### Features
2025-10-12 22:27:02 +08:00
2025-08-27 11:15:29 +08:00
- Multi-provider configuration management
- Quick provider switching
- Import/export configurations
- Preset provider templates
---
## [1.0.0] - Initial Release
### Features
2025-10-12 22:27:02 +08:00
2025-08-27 11:15:29 +08:00
- Basic provider management
- Claude Code integration
2025-09-01 10:49:31 +08:00
- Configuration file handling
2025-10-30 12:33:35 +08:00
## [Unreleased]
### ⚠️ Breaking Changes
2025-11-06 12:30:45 +08:00
- **Runtime auto-migration from v1 to v2 config format has been removed**
- `MultiAppConfig::load()` no longer automatically migrates v1 configs
- When a v1 config is detected, the app now returns a clear error with migration instructions
- **Migration path**: Install v3.2.x to perform one-time auto-migration, OR manually edit `~/.cc-switch/config.json` to v2 format
- **Rationale**: Separates concerns (load() should be read-only), fail-fast principle, simplifies maintenance
- Related: `app_config.rs` (v1 detection improved with structural analysis), `app_config_load.rs` (comprehensive test coverage added)
- **Legacy v1 copy file migration logic has been removed**
- Removed entire `migration.rs` module (435 lines) that handled one-time migration from v3.1.0 to v3.2.0
- No longer scans/merges legacy copy files (`settings-*.json` , `auth-*.json` , `config-*.toml` )
- No longer archives copy files or performs automatic deduplication
- **Migration path**: Users upgrading from v3.1.0 must first upgrade to v3.2.x to automatically migrate their configurations
- **Benefits**: Improved startup performance (no file scanning), reduced code complexity, cleaner codebase
- **Tauri commands now only accept `app` parameter**
- Removed legacy `app_type` /`appType` compatibility paths
- Explicit error with available values when unknown `app` is provided
2025-10-30 12:33:35 +08:00
### 🔧 Improvements
2025-11-06 12:30:45 +08:00
- Unified `AppType` parsing: centralized to `FromStr` implementation, command layer no longer implements separate `parse_app()` , reducing code duplication and drift
- Localized and user-friendly error messages: returns bilingual (Chinese/English) hints for unsupported `app` values with a list of available options
- Simplified startup logic: Only ensures config structure exists, no migration overhead
2025-10-30 12:33:35 +08:00
### 🧪 Tests
2025-11-06 12:30:45 +08:00
- Added unit tests covering `AppType::from_str` : case sensitivity, whitespace trimming, unknown value error messages
- Added comprehensive config loading tests:
- `load_v1_config_returns_error_and_does_not_write`
- `load_v1_with_extra_version_still_treated_as_v1`
- `load_invalid_json_returns_parse_error_and_does_not_write`
- `load_valid_v2_config_succeeds`