docs: add v3.7.1 release documentation
Add release notes for v3.7.1 maintenance release, with v3.7.1 updates at top and complete v3.7.0 documentation below. **v3.7.1 Updates**: - Bug Fixes: Skills installation, Gemini config persistence, dialog overlay protection - New Features: Gemini config directory support, ArchLinux installation - Improvements: Skills error i18n enhancement (28+ keys), code formatting **v3.7.0 Complete Documentation**: - Six major features (Gemini CLI, MCP v3.7.0, Skills, Prompts, Deep Link, Conflict Detection) - Technical statistics (152 files, +18,104 / -3,732 lines) - Strategic positioning shift: Provider Switcher → AI CLI Management Platform Files: - docs/release-note-v3.7.1-zh.md (Chinese) - docs/release-note-v3.7.1-en.md (English)
This commit is contained in:
481
docs/release-note-v3.7.1-en.md
Normal file
481
docs/release-note-v3.7.1-en.md
Normal file
@@ -0,0 +1,481 @@
|
||||
# CC Switch v3.7.1
|
||||
|
||||
> Stability Enhancements and User Experience Improvements
|
||||
|
||||
**[中文更新说明 Chinese Documentation →](release-note-v3.7.1-zh.md)**
|
||||
|
||||
---
|
||||
|
||||
## v3.7.1 Updates
|
||||
|
||||
**Release Date**: 2025-11-22
|
||||
**Code Changes**: 17 files, +524 / -81 lines
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **Fix Third-Party Skills Installation Failure** (#268)
|
||||
Fixed installation issues for skills repositories with custom subdirectories, now supports repos like `ComposioHQ/awesome-claude-skills` with subdirectories
|
||||
|
||||
- **Fix Gemini Configuration Persistence Issue**
|
||||
Resolved the issue where settings.json edits in Gemini form were lost when switching providers
|
||||
|
||||
- **Prevent Dialogs from Closing on Overlay Click**
|
||||
Added protection against clicking overlay/backdrop, preventing accidental form data loss across all 11 dialog components
|
||||
|
||||
### New Features
|
||||
|
||||
- **Gemini Configuration Directory Support** (#255)
|
||||
Added Gemini configuration directory option in settings, supports customizing `~/.gemini/` path
|
||||
|
||||
- **ArchLinux Installation Support** (#259)
|
||||
Added AUR installation method: `paru -S cc-switch-bin`
|
||||
|
||||
### Improvements
|
||||
|
||||
- **Skills Error Message i18n Enhancement**
|
||||
Added 28+ detailed error messages (English & Chinese) with specific resolution suggestions, extended download timeout from 15s to 60s
|
||||
|
||||
- **Code Formatting**
|
||||
Applied unified Rust and TypeScript code formatting standards
|
||||
|
||||
### Download
|
||||
|
||||
Visit [Releases](https://github.com/farion1231/cc-switch/releases/latest) to download the latest version
|
||||
|
||||
---
|
||||
|
||||
## v3.7.0 Complete Release Notes
|
||||
|
||||
> From Provider Switcher to All-in-One AI CLI Management Platform
|
||||
|
||||
**Release Date**: 2025-11-19
|
||||
**Commits**: 85 from v3.6.0
|
||||
**Code Changes**: 152 files, +18,104 / -3,732 lines
|
||||
|
||||
---
|
||||
|
||||
## New Features
|
||||
|
||||
### Gemini CLI Integration
|
||||
|
||||
Complete support for Google Gemini CLI, becoming the third supported application (Claude Code, Codex, Gemini).
|
||||
|
||||
**Core Capabilities**:
|
||||
|
||||
- **Dual-file configuration** - Support for both `.env` and `settings.json` formats
|
||||
- **Auto-detection** - Automatically detect `GOOGLE_GEMINI_BASE_URL`, `GEMINI_MODEL`, etc.
|
||||
- **Full MCP support** - Complete MCP server management for Gemini
|
||||
- **Deep link integration** - Import via `ccswitch://` protocol
|
||||
- **System tray** - Quick-switch from tray menu
|
||||
|
||||
**Provider Presets**:
|
||||
|
||||
- **Google Official** - OAuth authentication support
|
||||
- **PackyCode** - Partner integration
|
||||
- **Custom** - Full customization support
|
||||
|
||||
**Technical Implementation**:
|
||||
|
||||
- New backend modules: `gemini_config.rs` (20KB), `gemini_mcp.rs`
|
||||
- Form synchronization with environment editor
|
||||
- Dual-file atomic writes
|
||||
|
||||
---
|
||||
|
||||
### MCP v3.7.0 Unified Architecture
|
||||
|
||||
Complete refactoring of MCP management system for cross-application unification.
|
||||
|
||||
**Architecture Improvements**:
|
||||
|
||||
- **Unified panel** - Single interface for Claude/Codex/Gemini MCP servers
|
||||
- **SSE transport** - New Server-Sent Events support
|
||||
- **Smart parser** - Fault-tolerant JSON parsing
|
||||
- **Format correction** - Auto-fix Codex `[mcp_servers]` format
|
||||
- **Extended fields** - Preserve custom TOML fields
|
||||
|
||||
**User Experience**:
|
||||
|
||||
- Default app selection in forms
|
||||
- JSON formatter for validation
|
||||
- Improved visual hierarchy
|
||||
- Better error messages
|
||||
|
||||
**Import/Export**:
|
||||
|
||||
- Unified import from all three apps
|
||||
- Bidirectional synchronization
|
||||
- State preservation
|
||||
|
||||
---
|
||||
|
||||
### Claude Skills Management System
|
||||
|
||||
**Approximately 2,000 lines of code** - A complete skill ecosystem platform.
|
||||
|
||||
**GitHub Integration**:
|
||||
|
||||
- Auto-scan skills from GitHub repositories
|
||||
- Pre-configured repos:
|
||||
- `ComposioHQ/awesome-claude-skills` - Curated collection
|
||||
- `anthropics/skills` - Official Anthropic skills
|
||||
- `cexll/myclaude` - Community contributions
|
||||
- Add custom repositories
|
||||
- Subdirectory scanning support (`skillsPath`)
|
||||
|
||||
**Lifecycle Management**:
|
||||
|
||||
- **Discover** - Auto-detect `SKILL.md` files
|
||||
- **Install** - One-click to `~/.claude/skills/`
|
||||
- **Uninstall** - Safe removal with tracking
|
||||
- **Update** - Check for updates (infrastructure ready)
|
||||
|
||||
**Technical Architecture**:
|
||||
|
||||
- **Backend**: `SkillService` (526 lines) with GitHub API integration
|
||||
- **Frontend**: SkillsPage, SkillCard, RepoManager
|
||||
- **UI Components**: Badge, Card, Table (shadcn/ui)
|
||||
- **State**: Persistent storage in `config.json`
|
||||
- **i18n**: 47+ translation keys
|
||||
|
||||
---
|
||||
|
||||
### Prompts Management System
|
||||
|
||||
**Approximately 1,300 lines of code** - Complete system prompt management.
|
||||
|
||||
**Multi-Preset Management**:
|
||||
|
||||
- Create unlimited prompt presets
|
||||
- Quick switch between presets
|
||||
- One active prompt at a time
|
||||
- Delete protection for active prompts
|
||||
|
||||
**Cross-App Support**:
|
||||
|
||||
- **Claude**: `~/.claude/CLAUDE.md`
|
||||
- **Codex**: `~/.codex/AGENTS.md`
|
||||
- **Gemini**: `~/.gemini/GEMINI.md`
|
||||
|
||||
**Markdown Editor**:
|
||||
|
||||
- Full-featured CodeMirror 6 integration
|
||||
- Syntax highlighting
|
||||
- Dark theme (One Dark)
|
||||
- Real-time preview
|
||||
|
||||
**Smart Synchronization**:
|
||||
|
||||
- **Auto-write** - Immediately write to live files
|
||||
- **Backfill protection** - Save current content before switching
|
||||
- **Auto-import** - Import from live files on first launch
|
||||
- **Modification protection** - Preserve manual modifications
|
||||
|
||||
**Technical Implementation**:
|
||||
|
||||
- **Backend**: `PromptService` (213 lines)
|
||||
- **Frontend**: PromptPanel (177), PromptFormModal (160), MarkdownEditor (159)
|
||||
- **Hooks**: usePromptActions (152 lines)
|
||||
- **i18n**: 41+ translation keys
|
||||
|
||||
---
|
||||
|
||||
### Deep Link Protocol (ccswitch://)
|
||||
|
||||
One-click provider configuration import via URL scheme.
|
||||
|
||||
**Features**:
|
||||
|
||||
- Protocol registration on all platforms
|
||||
- Import from shared links
|
||||
- Lifecycle integration
|
||||
- Security validation
|
||||
|
||||
---
|
||||
|
||||
### Environment Variable Conflict Detection
|
||||
|
||||
Intelligent detection and management of configuration conflicts.
|
||||
|
||||
**Detection Scope**:
|
||||
|
||||
- **Claude & Codex** - Cross-app conflicts
|
||||
- **Gemini** - Auto-discovery
|
||||
- **MCP** - Server configuration conflicts
|
||||
|
||||
**Management Features**:
|
||||
|
||||
- Visual conflict indicators
|
||||
- Resolution suggestions
|
||||
- Override warnings
|
||||
- Backup before changes
|
||||
|
||||
---
|
||||
|
||||
## Improvements
|
||||
|
||||
### Provider Management
|
||||
|
||||
**New Presets**:
|
||||
|
||||
- **DouBaoSeed** - ByteDance's DouBao
|
||||
- **Kimi For Coding** - Moonshot AI
|
||||
- **BaiLing** - BaiLing AI
|
||||
- **Removed AnyRouter** - To avoid confusion
|
||||
|
||||
**Enhancements**:
|
||||
|
||||
- Model name configuration for Codex and Gemini
|
||||
- Provider notes field for organization
|
||||
- Enhanced preset metadata
|
||||
|
||||
### Configuration Management
|
||||
|
||||
- **Common config migration** - From localStorage to `config.json`
|
||||
- **Unified persistence** - Shared across all apps
|
||||
- **Auto-import** - First launch configuration import
|
||||
- **Backfill priority** - Correct handling of live files
|
||||
|
||||
### UI/UX Improvements
|
||||
|
||||
**Design System**:
|
||||
|
||||
- **macOS native** - System-aligned color scheme
|
||||
- **Window centering** - Default centered position
|
||||
- **Visual polish** - Improved spacing and hierarchy
|
||||
|
||||
**Interactions**:
|
||||
|
||||
- **Password input** - Fixed Edge/IE reveal buttons
|
||||
- **URL overflow** - Fixed card overflow
|
||||
- **Error copying** - Copy-to-clipboard errors
|
||||
- **Tray sync** - Real-time drag-and-drop sync
|
||||
|
||||
---
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
### Critical Fixes
|
||||
|
||||
- **Usage script validation** - Boundary checks
|
||||
- **Gemini validation** - Relaxed constraints
|
||||
- **TOML parsing** - CJK quote handling
|
||||
- **MCP fields** - Custom field preservation
|
||||
- **White screen** - FormLabel crash fix
|
||||
|
||||
### Stability
|
||||
|
||||
- **Tray safety** - Pattern matching instead of unwrap
|
||||
- **Error isolation** - Tray failures don't block operations
|
||||
- **Import classification** - Correct category assignment
|
||||
|
||||
### UI Fixes
|
||||
|
||||
- **Model placeholders** - Removed misleading hints
|
||||
- **Base URL** - Auto-fill for third-party providers
|
||||
- **Drag sort** - Tray menu synchronization
|
||||
|
||||
---
|
||||
|
||||
## Technical Improvements
|
||||
|
||||
### Architecture
|
||||
|
||||
**MCP v3.7.0**:
|
||||
|
||||
- Removed legacy code (~1,000 lines)
|
||||
- Unified initialization structure
|
||||
- Backward compatibility maintained
|
||||
- Comprehensive code formatting
|
||||
|
||||
**Platform Compatibility**:
|
||||
|
||||
- Windows winreg API fix (v0.52)
|
||||
- Safe pattern matching (no `unwrap()`)
|
||||
- Cross-platform tray handling
|
||||
|
||||
### Configuration
|
||||
|
||||
**Synchronization**:
|
||||
|
||||
- MCP sync across all apps
|
||||
- Gemini form-editor sync
|
||||
- Dual-file reading (.env + settings.json)
|
||||
|
||||
**Validation**:
|
||||
|
||||
- Input boundary checks
|
||||
- TOML quote normalization (CJK)
|
||||
- Custom field preservation
|
||||
- Enhanced error messages
|
||||
|
||||
### Code Quality
|
||||
|
||||
**Type Safety**:
|
||||
|
||||
- Complete TypeScript coverage
|
||||
- Rust type refinements
|
||||
- API contract validation
|
||||
|
||||
**Testing**:
|
||||
|
||||
- Simplified assertions
|
||||
- Better test coverage
|
||||
- Integration test updates
|
||||
|
||||
**Dependencies**:
|
||||
|
||||
- Tauri 2.8.x
|
||||
- Rust: `anyhow`, `zip`, `serde_yaml`, `tempfile`
|
||||
- Frontend: CodeMirror 6 packages
|
||||
- winreg 0.52 (Windows)
|
||||
|
||||
---
|
||||
|
||||
## Technical Statistics
|
||||
|
||||
```
|
||||
Total Changes:
|
||||
- Commits: 85
|
||||
- Files: 152 changed
|
||||
- Additions: +18,104 lines
|
||||
- Deletions: -3,732 lines
|
||||
|
||||
New Modules:
|
||||
- Skills Management: 2,034 lines (21 files)
|
||||
- Prompts Management: 1,302 lines (20 files)
|
||||
- Gemini Integration: ~1,000 lines
|
||||
- MCP Refactor: ~3,000 lines refactored
|
||||
|
||||
Code Distribution:
|
||||
- Backend (Rust): ~4,500 lines new
|
||||
- Frontend (React): ~3,000 lines new
|
||||
- Configuration: ~1,500 lines refactored
|
||||
- Tests: ~500 lines
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Strategic Positioning
|
||||
|
||||
### From Tool to Platform
|
||||
|
||||
v3.7.0 represents a shift in CC Switch's positioning:
|
||||
|
||||
| Aspect | v3.6 | v3.7.0 |
|
||||
| ----------------- | ------------------------ | ---------------------------- |
|
||||
| **Identity** | Provider Switcher | AI CLI Management Platform |
|
||||
| **Scope** | Configuration Management | Ecosystem Management |
|
||||
| **Applications** | Claude + Codex | Claude + Codex + Gemini |
|
||||
| **Capabilities** | Switch configs | Extend capabilities (Skills) |
|
||||
| **Customization** | Manual editing | Visual management (Prompts) |
|
||||
| **Integration** | Isolated apps | Unified management (MCP) |
|
||||
|
||||
### Six Pillars of AI CLI Management
|
||||
|
||||
1. **Configuration Management** - Provider switching and management
|
||||
2. **Capability Extension** - Skills installation and lifecycle
|
||||
3. **Behavior Customization** - System prompt presets
|
||||
4. **Ecosystem Integration** - Deep links and sharing
|
||||
5. **Multi-AI Support** - Claude/Codex/Gemini
|
||||
6. **Intelligent Detection** - Conflict prevention
|
||||
|
||||
---
|
||||
|
||||
## Download & Installation
|
||||
|
||||
### System Requirements
|
||||
|
||||
- **Windows**: Windows 10+
|
||||
- **macOS**: macOS 10.15 (Catalina)+
|
||||
- **Linux**: Ubuntu 22.04+ / Debian 11+ / Fedora 34+ / ArchLinux
|
||||
|
||||
### Download Links
|
||||
|
||||
Visit [Releases](https://github.com/farion1231/cc-switch/releases/latest) to download:
|
||||
|
||||
- **Windows**: `CC-Switch-Windows.msi` or `-Portable.zip`
|
||||
- **macOS**: `CC-Switch-macOS.tar.gz` or `.zip`
|
||||
- **Linux**: `CC-Switch-Linux.AppImage` or `.deb`
|
||||
- **ArchLinux**: `paru -S cc-switch-bin`
|
||||
|
||||
### Homebrew (macOS)
|
||||
|
||||
```bash
|
||||
brew tap farion1231/ccswitch
|
||||
brew install --cask cc-switch
|
||||
```
|
||||
|
||||
Update:
|
||||
|
||||
```bash
|
||||
brew upgrade --cask cc-switch
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Migration Notes
|
||||
|
||||
### From v3.6.x
|
||||
|
||||
**Automatic migration** - No action required, configs are fully compatible
|
||||
|
||||
### From v3.1.x or Earlier
|
||||
|
||||
**Two-step migration required**:
|
||||
|
||||
1. First upgrade to v3.2.x (performs one-time migration)
|
||||
2. Then upgrade to v3.7.0
|
||||
|
||||
### New Features
|
||||
|
||||
- **Skills**: No migration needed, start fresh
|
||||
- **Prompts**: Auto-import from live files on first launch
|
||||
- **Gemini**: Install Gemini CLI separately if needed
|
||||
- **MCP v3.7.0**: Backward compatible with previous configs
|
||||
|
||||
---
|
||||
|
||||
## Acknowledgments
|
||||
|
||||
### Contributors
|
||||
|
||||
Thanks to all contributors who made this release possible:
|
||||
|
||||
- [@YoVinchen](https://github.com/YoVinchen) - Skills & Prompts & Gemini integration implementation
|
||||
- [@farion1231](https://github.com/farion1231) - From developer to issue responder
|
||||
- Community members for testing and feedback
|
||||
|
||||
### Sponsors
|
||||
|
||||
**Z.ai** - GLM CODING PLAN sponsor
|
||||
[Get 10% OFF with this link](https://z.ai/subscribe?ic=8JVLJQFSKB)
|
||||
|
||||
**PackyCode** - API relay service partner
|
||||
[Register with "cc-switch" code for 10% discount](https://www.packyapi.com/register?aff=cc-switch)
|
||||
|
||||
**ShanDianShuo** - Local-first AI voice input
|
||||
[Free download](https://shandianshuo.cn) for Mac/Win
|
||||
|
||||
---
|
||||
|
||||
## Feedback & Support
|
||||
|
||||
- **Issues**: [GitHub Issues](https://github.com/farion1231/cc-switch/issues)
|
||||
- **Discussions**: [GitHub Discussions](https://github.com/farion1231/cc-switch/discussions)
|
||||
- **Documentation**: [README](../README.md)
|
||||
- **Changelog**: [CHANGELOG.md](../CHANGELOG.md)
|
||||
|
||||
---
|
||||
|
||||
## What's Next
|
||||
|
||||
**v3.8.0 Preview** (Tentative):
|
||||
|
||||
- Local proxy functionality
|
||||
|
||||
Stay tuned for more updates!
|
||||
|
||||
---
|
||||
|
||||
**Happy Coding!**
|
||||
481
docs/release-note-v3.7.1-zh.md
Normal file
481
docs/release-note-v3.7.1-zh.md
Normal file
@@ -0,0 +1,481 @@
|
||||
# CC Switch v3.7.1
|
||||
|
||||
> 稳定性增强与用户体验改进
|
||||
|
||||
**[English Version →](release-note-v3.7.1-en.md)**
|
||||
|
||||
---
|
||||
|
||||
## v3.7.1 更新内容
|
||||
|
||||
**发布日期**:2025-11-22
|
||||
**代码变更**:17 个文件,+524 / -81 行
|
||||
|
||||
### Bug 修复
|
||||
|
||||
- **修复 Skills 第三方仓库安装失败** (#268)
|
||||
修复使用自定义子目录的 skills 仓库无法安装的问题,支持类似 `ComposioHQ/awesome-claude-skills` 这样带子目录的仓库
|
||||
|
||||
- **修复 Gemini 配置持久化问题**
|
||||
解决在 Gemini 表单中编辑 settings.json 后,切换供应商时修改丢失的问题
|
||||
|
||||
- **防止对话框意外关闭**
|
||||
添加点击遮罩时的保护,避免误操作导致表单数据丢失,影响所有 11 个对话框组件
|
||||
|
||||
### 新增功能
|
||||
|
||||
- **Gemini 配置目录支持** (#255)
|
||||
在设置中添加 Gemini 配置目录选项,支持自定义 `~/.gemini/` 路径
|
||||
|
||||
- **ArchLinux 安装支持** (#259)
|
||||
添加 AUR 安装方式:`paru -S cc-switch-bin`
|
||||
|
||||
### 改进
|
||||
|
||||
- **Skills 错误消息国际化增强**
|
||||
新增 28+ 条详细错误消息(中英文),提供具体的解决建议,下载超时从 15 秒延长到 60 秒
|
||||
|
||||
- **代码格式化**
|
||||
应用统一的 Rust 和 TypeScript 代码格式化标准
|
||||
|
||||
### 下载
|
||||
|
||||
访问 [Releases](https://github.com/farion1231/cc-switch/releases/latest) 下载最新版本
|
||||
|
||||
---
|
||||
|
||||
## v3.7.0 完整更新说明
|
||||
|
||||
> 从供应商切换器到 AI CLI 一体化管理平台
|
||||
|
||||
**发布日期**:2025-11-19
|
||||
**提交数量**:从 v3.6.0 开始 85 个提交
|
||||
**代码变更**:152 个文件,+18,104 / -3,732 行
|
||||
|
||||
---
|
||||
|
||||
## 新增功能
|
||||
|
||||
### Gemini CLI 集成
|
||||
|
||||
完整支持 Google Gemini CLI,成为第三个支持的应用(Claude Code、Codex、Gemini)。
|
||||
|
||||
**核心能力**:
|
||||
|
||||
- **双文件配置** - 同时支持 `.env` 和 `settings.json` 格式
|
||||
- **自动检测** - 自动检测 `GOOGLE_GEMINI_BASE_URL`、`GEMINI_MODEL` 等环境变量
|
||||
- **完整 MCP 支持** - 为 Gemini 提供完整的 MCP 服务器管理
|
||||
- **深度链接集成** - 通过 `ccswitch://` 协议导入配置
|
||||
- **系统托盘** - 从托盘菜单快速切换
|
||||
|
||||
**供应商预设**:
|
||||
|
||||
- **Google Official** - 支持 OAuth 认证
|
||||
- **PackyCode** - 合作伙伴集成
|
||||
- **自定义** - 完全自定义支持
|
||||
|
||||
**技术实现**:
|
||||
|
||||
- 新增后端模块:`gemini_config.rs`(20KB)、`gemini_mcp.rs`
|
||||
- 表单与环境编辑器同步
|
||||
- 双文件原子写入
|
||||
|
||||
---
|
||||
|
||||
### MCP v3.7.0 统一架构
|
||||
|
||||
MCP 管理系统完整重构,实现跨应用统一管理。
|
||||
|
||||
**架构改进**:
|
||||
|
||||
- **统一管理面板** - 单一界面管理 Claude/Codex/Gemini MCP 服务器
|
||||
- **SSE 传输类型** - 新增 Server-Sent Events 支持
|
||||
- **智能解析器** - 容错性 JSON 解析
|
||||
- **格式修正** - 自动修复 Codex `[mcp_servers]` 格式
|
||||
- **扩展字段** - 保留自定义 TOML 字段
|
||||
|
||||
**用户体验**:
|
||||
|
||||
- 表单中的默认应用选择
|
||||
- JSON 格式化器用于验证
|
||||
- 改进的视觉层次
|
||||
- 更好的错误消息
|
||||
|
||||
**导入/导出**:
|
||||
|
||||
- 统一从三个应用导入
|
||||
- 双向同步
|
||||
- 状态保持
|
||||
|
||||
---
|
||||
|
||||
### Claude Skills 管理系统
|
||||
|
||||
**约 2,000 行代码** - 完整的技能生态平台。
|
||||
|
||||
**GitHub 集成**:
|
||||
|
||||
- 从 GitHub 仓库自动扫描技能
|
||||
- 预配置仓库:
|
||||
- `ComposioHQ/awesome-claude-skills` - 精选集合
|
||||
- `anthropics/skills` - Anthropic 官方技能
|
||||
- `cexll/myclaude` - 社区贡献
|
||||
- 添加自定义仓库
|
||||
- 子目录扫描支持(`skillsPath`)
|
||||
|
||||
**生命周期管理**:
|
||||
|
||||
- **发现** - 自动检测 `SKILL.md` 文件
|
||||
- **安装** - 一键安装到 `~/.claude/skills/`
|
||||
- **卸载** - 安全移除并跟踪状态
|
||||
- **更新** - 检查更新(基础设施已就绪)
|
||||
|
||||
**技术架构**:
|
||||
|
||||
- **后端**:`SkillService`(526 行)集成 GitHub API
|
||||
- **前端**:SkillsPage、SkillCard、RepoManager
|
||||
- **UI 组件**:Badge、Card、Table(shadcn/ui)
|
||||
- **状态**:持久化存储在 `config.json`
|
||||
- **国际化**:47+ 个翻译键
|
||||
|
||||
---
|
||||
|
||||
### Prompts 管理系统
|
||||
|
||||
**约 1,300 行代码** - 完整的系统提示词管理。
|
||||
|
||||
**多预设管理**:
|
||||
|
||||
- 创建无限数量的提示词预设
|
||||
- 快速在预设间切换
|
||||
- 同时只能激活一个提示词
|
||||
- 活动提示词删除保护
|
||||
|
||||
**跨应用支持**:
|
||||
|
||||
- **Claude**:`~/.claude/CLAUDE.md`
|
||||
- **Codex**:`~/.codex/AGENTS.md`
|
||||
- **Gemini**:`~/.gemini/GEMINI.md`
|
||||
|
||||
**Markdown 编辑器**:
|
||||
|
||||
- 完整的 CodeMirror 6 集成
|
||||
- 语法高亮
|
||||
- 暗色主题(One Dark)
|
||||
- 实时预览
|
||||
|
||||
**智能同步**:
|
||||
|
||||
- **自动写入** - 立即写入 live 文件
|
||||
- **回填保护** - 切换前保存当前内容
|
||||
- **自动导入** - 首次启动从 live 文件导入
|
||||
- **修改保护** - 保留手动修改
|
||||
|
||||
**技术实现**:
|
||||
|
||||
- **后端**:`PromptService`(213 行)
|
||||
- **前端**:PromptPanel(177)、PromptFormModal(160)、MarkdownEditor(159)
|
||||
- **Hooks**:usePromptActions(152 行)
|
||||
- **国际化**:41+ 个翻译键
|
||||
|
||||
---
|
||||
|
||||
### 深度链接协议(ccswitch://)
|
||||
|
||||
通过 URL 方案一键导入供应商配置。
|
||||
|
||||
**功能特性**:
|
||||
|
||||
- 所有平台的协议注册
|
||||
- 从共享链接导入
|
||||
- 生命周期集成
|
||||
- 安全验证
|
||||
|
||||
---
|
||||
|
||||
### 环境变量冲突检测
|
||||
|
||||
智能检测和管理配置冲突。
|
||||
|
||||
**检测范围**:
|
||||
|
||||
- **Claude & Codex** - 跨应用冲突
|
||||
- **Gemini** - 自动发现
|
||||
- **MCP** - 服务器配置冲突
|
||||
|
||||
**管理功能**:
|
||||
|
||||
- 可视化冲突指示器
|
||||
- 解决建议
|
||||
- 覆盖警告
|
||||
- 更改前备份
|
||||
|
||||
---
|
||||
|
||||
## 改进优化
|
||||
|
||||
### 供应商管理
|
||||
|
||||
**新增预设**:
|
||||
|
||||
- **DouBaoSeed** - 字节跳动的豆包
|
||||
- **Kimi For Coding** - 月之暗面
|
||||
- **BaiLing** - 百灵 AI
|
||||
- **移除 AnyRouter** - 避免误导
|
||||
|
||||
**增强功能**:
|
||||
|
||||
- Codex 和 Gemini 的模型名称配置
|
||||
- 供应商备注字段用于组织
|
||||
- 增强的预设元数据
|
||||
|
||||
### 配置管理
|
||||
|
||||
- **通用配置迁移** - 从 localStorage 迁移到 `config.json`
|
||||
- **统一持久化** - 跨所有应用共享
|
||||
- **自动导入** - 首次启动配置导入
|
||||
- **回填优先级** - 正确处理 live 文件
|
||||
|
||||
### UI/UX 改进
|
||||
|
||||
**设计系统**:
|
||||
|
||||
- **macOS 原生** - 与系统对齐的配色方案
|
||||
- **窗口居中** - 默认居中位置
|
||||
- **视觉优化** - 改进的间距和层次
|
||||
|
||||
**交互优化**:
|
||||
|
||||
- **密码输入** - 修复 Edge/IE 显示按钮
|
||||
- **URL 溢出** - 修复卡片溢出
|
||||
- **错误复制** - 可复制到剪贴板的错误
|
||||
- **托盘同步** - 实时拖放同步
|
||||
|
||||
---
|
||||
|
||||
## Bug 修复
|
||||
|
||||
### 关键修复
|
||||
|
||||
- **用量脚本验证** - 边界检查
|
||||
- **Gemini 验证** - 放宽约束
|
||||
- **TOML 解析** - CJK 引号处理
|
||||
- **MCP 字段** - 自定义字段保留
|
||||
- **白屏** - FormLabel 崩溃修复
|
||||
|
||||
### 稳定性
|
||||
|
||||
- **托盘安全** - 模式匹配替代 unwrap
|
||||
- **错误隔离** - 托盘失败不阻塞操作
|
||||
- **导入分类** - 正确的类别分配
|
||||
|
||||
### UI 修复
|
||||
|
||||
- **模型占位符** - 移除误导性提示
|
||||
- **Base URL** - 第三方供应商自动填充
|
||||
- **拖拽排序** - 托盘菜单同步
|
||||
|
||||
---
|
||||
|
||||
## 技术改进
|
||||
|
||||
### 架构
|
||||
|
||||
**MCP v3.7.0**:
|
||||
|
||||
- 移除遗留代码(约 1,000 行)
|
||||
- 统一初始化结构
|
||||
- 保持向后兼容性
|
||||
- 全面的代码格式化
|
||||
|
||||
**平台兼容性**:
|
||||
|
||||
- Windows winreg API 修复(v0.52)
|
||||
- 安全模式匹配(无 `unwrap()`)
|
||||
- 跨平台托盘处理
|
||||
|
||||
### 配置
|
||||
|
||||
**同步机制**:
|
||||
|
||||
- 跨所有应用的 MCP 同步
|
||||
- Gemini 表单-编辑器同步
|
||||
- 双文件读取(.env + settings.json)
|
||||
|
||||
**验证增强**:
|
||||
|
||||
- 输入边界检查
|
||||
- TOML 引号规范化(CJK)
|
||||
- 自定义字段保留
|
||||
- 增强的错误消息
|
||||
|
||||
### 代码质量
|
||||
|
||||
**类型安全**:
|
||||
|
||||
- 完整的 TypeScript 覆盖
|
||||
- Rust 类型改进
|
||||
- API 契约验证
|
||||
|
||||
**测试**:
|
||||
|
||||
- 简化的断言
|
||||
- 更好的测试覆盖
|
||||
- 集成测试更新
|
||||
|
||||
**依赖项**:
|
||||
|
||||
- Tauri 2.8.x
|
||||
- Rust:`anyhow`、`zip`、`serde_yaml`、`tempfile`
|
||||
- 前端:CodeMirror 6 包
|
||||
- winreg 0.52(Windows)
|
||||
|
||||
---
|
||||
|
||||
## 技术统计
|
||||
|
||||
```
|
||||
总体变更:
|
||||
- 提交数:85
|
||||
- 文件数:152 个文件变更
|
||||
- 新增:+18,104 行
|
||||
- 删除:-3,732 行
|
||||
|
||||
新增模块:
|
||||
- Skills 管理:2,034 行(21 个文件)
|
||||
- Prompts 管理:1,302 行(20 个文件)
|
||||
- Gemini 集成:约 1,000 行
|
||||
- MCP 重构:约 3,000 行重构
|
||||
|
||||
代码分布:
|
||||
- 后端(Rust):约 4,500 行新增
|
||||
- 前端(React):约 3,000 行新增
|
||||
- 配置:约 1,500 行重构
|
||||
- 测试:约 500 行
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 战略定位
|
||||
|
||||
### 从工具到平台
|
||||
|
||||
v3.7.0 代表了 CC Switch 定位的转变:
|
||||
|
||||
| 方面 | v3.6 | v3.7.0 |
|
||||
| -------- | -------------- | ----------------------- |
|
||||
| **身份** | 供应商切换器 | AI CLI 管理平台 |
|
||||
| **范围** | 配置管理 | 生态系统管理 |
|
||||
| **应用** | Claude + Codex | Claude + Codex + Gemini |
|
||||
| **能力** | 切换配置 | 扩展能力(Skills) |
|
||||
| **定制** | 手动编辑 | 可视化管理(Prompts) |
|
||||
| **集成** | 孤立应用 | 统一管理(MCP) |
|
||||
|
||||
### AI CLI 管理六大支柱
|
||||
|
||||
1. **配置管理** - 供应商切换和管理
|
||||
2. **能力扩展** - Skills 安装和生命周期
|
||||
3. **行为定制** - 系统提示词预设
|
||||
4. **生态集成** - 深度链接和共享
|
||||
5. **多 AI 支持** - Claude/Codex/Gemini
|
||||
6. **智能检测** - 冲突预防
|
||||
|
||||
---
|
||||
|
||||
## 下载与安装
|
||||
|
||||
### 系统要求
|
||||
|
||||
- **Windows**:Windows 10+
|
||||
- **macOS**:macOS 10.15(Catalina)+
|
||||
- **Linux**:Ubuntu 22.04+ / Debian 11+ / Fedora 34+ / ArchLinux
|
||||
|
||||
### 下载链接
|
||||
|
||||
访问 [Releases](https://github.com/farion1231/cc-switch/releases/latest) 下载:
|
||||
|
||||
- **Windows**:`CC-Switch-Windows.msi` 或 `-Portable.zip`
|
||||
- **macOS**:`CC-Switch-macOS.tar.gz` 或 `.zip`
|
||||
- **Linux**:`CC-Switch-Linux.AppImage` 或 `.deb`
|
||||
- **ArchLinux**:`paru -S cc-switch-bin`
|
||||
|
||||
### Homebrew(macOS)
|
||||
|
||||
```bash
|
||||
brew tap farion1231/ccswitch
|
||||
brew install --cask cc-switch
|
||||
```
|
||||
|
||||
更新:
|
||||
|
||||
```bash
|
||||
brew upgrade --cask cc-switch
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 迁移说明
|
||||
|
||||
### 从 v3.6.x 升级
|
||||
|
||||
**自动迁移** - 无需任何操作,配置完全兼容
|
||||
|
||||
### 从 v3.1.x 或更早版本升级
|
||||
|
||||
**需要两步迁移**:
|
||||
|
||||
1. 首先升级到 v3.2.x(执行一次性迁移)
|
||||
2. 然后升级到 v3.7.0
|
||||
|
||||
### 新功能
|
||||
|
||||
- **Skills**:无需迁移,全新开始
|
||||
- **Prompts**:首次启动时从 live 文件自动导入
|
||||
- **Gemini**:需要单独安装 Gemini CLI
|
||||
- **MCP v3.7.0**:与之前的配置向后兼容
|
||||
|
||||
---
|
||||
|
||||
## 致谢
|
||||
|
||||
### 贡献者
|
||||
|
||||
感谢所有让这个版本成为可能的贡献者:
|
||||
|
||||
- [@YoVinchen](https://github.com/YoVinchen) - Skills & Prompts & Gemini 集成实现
|
||||
- [@farion1231](https://github.com/farion1231) - 从开发沦为 issue 回复机
|
||||
- 社区成员的测试和反馈
|
||||
|
||||
### 赞助商
|
||||
|
||||
**智谱AI** - GLM CODING PLAN 赞助商
|
||||
[使用此链接购买可享九折优惠](https://www.bigmodel.cn/claude-code?ic=RRVJPB5SII)
|
||||
|
||||
**PackyCode** - API 中转服务合作伙伴
|
||||
[使用 "cc-switch" 优惠码注册享 9 折优惠](https://www.packyapi.com/register?aff=cc-switch)
|
||||
|
||||
**闪电说** - 本地优先的 AI 语音输入法
|
||||
[免费下载](https://shandianshuo.cn) Mac/Win 双平台
|
||||
|
||||
---
|
||||
|
||||
## 反馈与支持
|
||||
|
||||
- **问题反馈**:[GitHub Issues](https://github.com/farion1231/cc-switch/issues)
|
||||
- **讨论**:[GitHub Discussions](https://github.com/farion1231/cc-switch/discussions)
|
||||
- **文档**:[README](../README_ZH.md)
|
||||
- **更新日志**:[CHANGELOG.md](../CHANGELOG.md)
|
||||
|
||||
---
|
||||
|
||||
## 未来展望
|
||||
|
||||
**v3.8.0 预览**(暂定):
|
||||
|
||||
- 本地代理功能
|
||||
|
||||
敬请期待更多更新!
|
||||
|
||||
---
|
||||
|
||||
**Happy Coding!**
|
||||
Reference in New Issue
Block a user