diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 7e65c4d7a..0e791acef 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -53,7 +53,11 @@ jobs:
wget \
file \
patchelf \
- libssl-dev
+ libssl-dev \
+ rpm \
+ flatpak \
+ flatpak-builder \
+ elfutils
# GTK/GLib stack for gdk-3.0, glib-2.0, gio-2.0
sudo apt-get install -y --no-install-recommends \
libgtk-3-dev \
@@ -153,7 +157,7 @@ jobs:
- name: Build Tauri App (Linux)
if: runner.os == 'Linux'
- run: pnpm tauri build
+ run: pnpm tauri build --bundles appimage,deb,rpm
- name: Prepare macOS Assets
if: runner.os == 'macOS'
@@ -271,6 +275,15 @@ jobs:
else
echo "No .deb found (optional)"
fi
+ # 额外上传 .rpm(用于 Fedora/RHEL/openSUSE 等,不参与 Updater)
+ RPM=$(find src-tauri/target/release/bundle -name "*.rpm" | head -1 || true)
+ if [ -n "$RPM" ]; then
+ NEW_RPM="CC-Switch-${VERSION}-Linux.rpm"
+ cp "$RPM" "release-assets/$NEW_RPM"
+ echo "RPM package copied: $NEW_RPM"
+ else
+ echo "No .rpm found (optional)"
+ fi
- name: List prepared assets
shell: bash
@@ -299,7 +312,7 @@ jobs:
- **macOS**: `CC-Switch-${{ github.ref_name }}-macOS.zip`(解压即用)或 `CC-Switch-${{ github.ref_name }}-macOS.tar.gz`(Homebrew)
- **Windows**: `CC-Switch-${{ github.ref_name }}-Windows.msi`(安装版)或 `CC-Switch-${{ github.ref_name }}-Windows-Portable.zip`(绿色版)
- - **Linux**: `CC-Switch-${{ github.ref_name }}-Linux.AppImage`(AppImage)或 `CC-Switch-${{ github.ref_name }}-Linux.deb`(Debian/Ubuntu)
+ - **Linux**: `CC-Switch-${{ github.ref_name }}-Linux.AppImage`(AppImage)或 `CC-Switch-${{ github.ref_name }}-Linux.deb`(Debian/Ubuntu)或 `CC-Switch-${{ github.ref_name }}-Linux.rpm`(Fedora/RHEL/openSUSE)
---
提示:macOS 如遇"已损坏"提示,可在终端执行:`xattr -cr "/Applications/CC Switch.app"`
diff --git a/.gitignore b/.gitignore
index 6ed52a498..49a8be783 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,3 +18,8 @@ GEMINI.md
/.vscode
vitest-report.json
nul
+
+# Flatpak build artifacts
+flatpak/cc-switch.deb
+flatpak-build/
+flatpak-repo/
diff --git a/.node-version b/.node-version
index adb070518..d135defb2 100644
--- a/.node-version
+++ b/.node-version
@@ -1 +1 @@
-v22.4.1
+22.12.0
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 843f64e67..af37f440b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,177 @@ 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).
+## [Unreleased]
+
+---
+
+## [3.9.1] - 2026-01-09
+
+### Bug Fix Release
+
+This release focuses on stability improvements and crash prevention.
+
+### Added
+
+- **Crash Logging** - Panic hook captures crash info to `~/.cc-switch/crash.log` with full stack traces (#562)
+- **Release Logging** - Enable logging for release builds with automatic rotation (keeps 2 most recent files)
+- **AIGoCode Icon** - Added colored icon for AIGoCode provider preset
+
+### Fixed
+
+- **Proxy Panic Prevention** - Graceful degradation when HTTP client initialization fails due to invalid proxy settings; falls back to no_proxy mode (#560)
+- **UTF-8 Safety** - Fix potential panic when masking API keys or truncating logs containing multi-byte characters (Chinese, emoji, etc.) (#560)
+- **Default Proxy Port** - Change default port from 5000 to 15721 to avoid conflict with macOS AirPlay Receiver (#560)
+- **Windows Title** - Display "CC Switch" instead of default "Tauri app" in window title
+- **Windows/Linux Spacing** - Remove extra 28px blank space below native titlebar introduced in v3.9.0
+- **Flatpak Tray Icon** - Bundle libayatana-appindicator for tray icon support on Flatpak (#556)
+- **Provider Preset** - Correct casing from "AiGoCode" to "AIGoCode" to match official branding
+
+---
+
+## [3.9.0] - 2026-01-07
+
+### Stable Release
+
+This stable release includes all changes from `3.9.0-1`, `3.9.0-2`, and `3.9.0-3`.
+
+### Added
+
+- **Local API Proxy** - High-performance local HTTP proxy for Claude Code, Codex, and Gemini CLI (Axum-based)
+- **Per-App Takeover** - Independently route each app through the proxy with automatic live-config backup/redirect
+- **Auto Failover** - Circuit breaker + smart failover with independent queues and health tracking per app
+- **Universal Provider** - Shared provider configurations that can sync to Claude/Codex/Gemini (ideal for API gateways like NewAPI)
+- **Provider Search Filter** - Quick filter to find providers by name (#435)
+- **Keyboard Shortcut** - Open settings with Command+comma / Ctrl+comma (#436)
+- **Deeplink Usage Config** - Import usage query config via deeplink (#400)
+- **Provider Icon Colors** - Customize provider icon colors (#385)
+- **Skills Multi-App Support** - Skills now support both Claude Code and Codex (#365)
+- **Closable Toasts** - Close button for switch toast and all success toasts (#350)
+- **Skip First-Run Confirmation** - Option to skip Claude Code first-run confirmation dialog
+- **MCP Import** - Import MCP servers from installed apps
+- **Common Config Snippet Extraction** - Extract reusable common config snippets from the current provider or editor content (Claude/Codex/Gemini)
+- **Usage Enhancements** - Model extraction, request logging improvements, cache hit/creation metrics, and auto-refresh (#455, #508)
+- **Error Request Logging** - Detailed logging for proxy requests (#401)
+- **Linux Packaging** - Added RPM and Flatpak packaging targets
+- **Provider Presets & Icons** - Added/updated partner presets and icons (e.g., MiMo, DMXAPI, Cubence)
+
+### Changed
+
+- **Usage Terminology** - Rename "Cache Read/Write" to "Cache Hit/Creation" across all languages (#508)
+- **Model Pricing Data** - Refresh built-in model pricing table (Claude full version IDs, GPT-5 series, Gemini ID formats, and Chinese models) (#508)
+- **Proxy Header Forwarding** - Switch to a blacklist approach and improve header passthrough compatibility (#508)
+- **Failover Behavior** - Bypass timeout/retry configs when failover is disabled; update default failover timeout and circuit breaker values (#508, #521)
+- **Provider Presets** - Update default model versions and change the default Qwen base URL (#517)
+- **Skills Management** - Unify Skills management architecture with SSOT + React Query; improve caching for discoverable skills
+- **Settings UX** - Reorder items in the Advanced tab for better discoverability
+- **Proxy Active Theme** - Apply emerald theme when proxy takeover is active
+
+### Fixed
+
+- **Security** - Security fixes for JavaScript executor and usage script (#151)
+- **Usage Timezone & Parsing** - Fix datetime picker timezone handling; improve token parsing/billing for Gemini and Codex formats (#508)
+- **Windows Compatibility** - Improve MCP export and version check behavior to avoid terminal popups
+- **Windows Startup** - Use system titlebar to prevent black screen on startup
+- **WebView Compatibility** - Add fallback for crypto.randomUUID() on older WebViews
+- **macOS Autostart** - Use `.app` bundle path to prevent terminal window popups
+- **Database** - Add missing schema migrations; show an error dialog on initialization failure with a retry option
+- **Import/Export** - Restrict SQL import to CC Switch exported backups only; refresh providers immediately after import
+- **Prompts** - Allow saving prompts with empty content
+- **MCP Sync** - Skip sync when the target CLI app is not installed
+- **Common Config (Codex)** - Preserve MCP server `base_url` during extraction and remove provider-specific `model_providers` blocks
+- **Proxy** - Improve takeover detection and stability; clean up model override env vars when switching providers in takeover mode (#508)
+- **Skills** - Skip hidden directories during discovery; fix wrong skill repo branch
+- **Settings Navigation** - Navigate to About tab when clicking update badge
+- **UI** - Fix dialogs not opening on first click and improve window dragging area in `FullScreenPanel`
+
+---
+
+## [3.9.0-3] - 2025-12-29
+
+### Beta Release
+
+Third beta release with important bug fixes for Windows compatibility, UI improvements, and new features.
+
+### Added
+
+- **Universal Provider** - Support for universal provider configurations (#348)
+- **Provider Search Filter** - Quick filter to find providers by name (#435)
+- **Keyboard Shortcut** - Open settings with Command+comma / Ctrl+comma (#436)
+- **Xiaomi MiMo Icon** - Added MiMo icon and Claude provider configuration (#470)
+- **Usage Model Extraction** - Extract model info from usage statistics (#455)
+- **Skip First-Run Confirmation** - Option to skip Claude Code first-run confirmation dialog
+- **Exit Animations** - Added exit animation to FullScreenPanel dialogs
+- **Fade Transitions** - Smooth fade transitions for app/view/panel switching
+
+### Fixed
+
+#### Windows
+- Wrap npx/npm commands with `cmd /c` for MCP export
+- Prevent terminal windows from appearing during version check
+
+#### macOS
+- Use .app bundle path for autostart to prevent terminal window popup
+
+#### UI
+- Resolve Dialog/Modal not opening on first click (#492)
+- Improve dark mode text contrast for form labels
+- Reduce header spacing and fix layout shift on view switch
+- Prevent header layout shift when switching views
+
+#### Database & Schema
+- Add missing base columns migration for proxy_config
+- Add backward compatibility check for proxy_config seed insert
+
+#### Other
+- Use local timezone and robust DST handling in usage stats (#500)
+- Remove deprecated `sync_enabled_to_codex` call
+- Gracefully handle invalid Codex config.toml during MCP sync
+- Add missing translations for reasoning model and OpenRouter compat mode
+
+### Improved
+
+- **macOS Tray** - Use macOS tray template icon
+- **Header Alignment** - Remove macOS titlebar tint, align custom header
+- **Shadow Removal** - Cleaner UI by removing shadow styles
+- **Code Inspector** - Added code-inspector-plugin for development
+- **i18n** - Complete internationalization for usage panel and settings
+- **Sponsor Logos** - Made sponsor logos clickable
+
+### Stats
+
+- 35 commits since v3.9.0-2
+- 5 files changed in test/lint fixes
+
+---
+
+## [3.9.0-2] - 2025-12-20
+
+### Beta Release
+
+Second beta release focusing on proxy stability, import safety, and provider preset polish.
+
+### Added
+
+- **DMXAPI Partner** - Added DMXAPI as an official partner provider preset
+- **Provider Icons** - Added provider icons for OpenRouter, LongCat, ModelScope, and AiHubMix
+
+### Changed
+
+- **Proxy (OpenRouter)** - Switched OpenRouter to passthrough mode for native Claude API
+
+### Fixed
+
+- **Import/Export** - Restrict SQL import to CC Switch exported backups only; refresh providers immediately after import
+- **Proxy** - Respect existing Claude token when syncing; add fallback recovery for orphaned takeover state; remove global auto-start flag
+- **Windows** - Add minimum window size to Windows platform config
+- **UI** - Improve About section UI (#419) and unify header toolbar styling
+
+### Stats
+
+- 13 commits since v3.9.0-1
+
+---
+
## [3.9.0-1] - 2025-12-18
### Beta Release
@@ -497,8 +668,8 @@ v3.7.0 represents a major evolution from "Provider Switcher" to **"All-in-One AI
### ⚠ Breaking Changes
-- Tauri 命令仅接受参数 `app`(取值:`claude`/`codex`);移除对 `app_type`/`appType` 的兼容。
-- 前端类型命名统一为 `AppId`(移除 `AppType` 导出),变量命名统一为 `appId`。
+- Tauri commands only accept the `app` parameter (`claude`/`codex`); removed `app_type`/`appType` compatibility.
+- Frontend types are standardized to `AppId` (removed `AppType` export); variable naming is standardized to `appId`.
### ✨ New Features
@@ -741,40 +912,3 @@ For users upgrading from v2.x (Electron version):
- Basic provider management
- Claude Code integration
- Configuration file handling
-
-## [Unreleased]
-
-### ⚠️ Breaking Changes
-
-- **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
-
-### 🔧 Improvements
-
-- 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
-
-### 🧪 Tests
-
-- 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`
diff --git a/README.md b/README.md
index 6bc7a1b08..28fa4dffb 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
# All-in-One Assistant for Claude Code, Codex & Gemini CLI
-[](https://github.com/farion1231/cc-switch/releases)
+[](https://github.com/farion1231/cc-switch/releases)
[](https://github.com/farion1231/cc-switch/releases)
[](https://tauri.app/)
[](https://github.com/farion1231/cc-switch/releases/latest)
@@ -15,7 +15,7 @@ English | [中文](README_ZH.md) | [日本語](README_JA.md) | [Changelog](CHANG
## ❤️Sponsor
-
+[](https://z.ai/subscribe?ic=8JVLJQFSKB)
This project is sponsored by Z.ai, supporting us with their GLM CODING PLAN.GLM CODING PLAN is a subscription service designed for AI coding, starting at just $3/month. It provides access to their flagship GLM-4.6 model across 10+ popular AI coding tools (Claude Code, Cline, Roo Code, etc.), offering developers top-tier, fast, and stable coding experiences.Get 10% OFF the GLM CODING PLAN with [this link](https://z.ai/subscribe?ic=8JVLJQFSKB)!
@@ -23,19 +23,23 @@ This project is sponsored by Z.ai, supporting us with their GLM CODING PLAN.GLM
-
+
Thanks to PackyCode for sponsoring this project! PackyCode is a reliable and efficient API relay service provider, offering relay services for Claude Code, Codex, Gemini, and more. PackyCode provides special discounts for our software users: register using this link and enter the "cc-switch" promo code during recharge to get 10% off.
-
-
Thanks to ShanDianShuo for sponsoring this project! ShanDianShuo is a local-first AI voice input: Millisecond latency, data stays on device, 4x faster than typing, AI-powered correction, Privacy-first, completely free. Doubles your coding efficiency with Claude Code! Free download for Mac/Win
+
+
Thanks to AIGoCode for sponsoring this project! AIGoCode is an all-in-one platform that integrates Claude Code, Codex, and the latest Gemini models, providing you with stable, efficient, and highly cost-effective AI coding services. The platform offers flexible subscription plans, zero risk of account suspension, direct access with no VPN required, and lightning-fast responses. AIGoCode has prepared a special benefit for CC Switch users: if you register via this link, you'll receive an extra 10% bonus credit on your first top-up!
-
-
Thanks to AIGoCode for sponsoring this project! AIGoCode is an all-in-one platform that integrates Claude Code, Codex, and the latest Gemini models, providing you with stable, efficient, and highly cost-effective AI coding services. The platform offers flexible subscription plans, zero risk of account suspension, direct access with no VPN required, and lightning-fast responses.AIGoCode has prepared a special benefit for CC Switch users: if you register via this link, you’ll receive an extra 10% bonus credit on your first top-up!
-
+
+
Thanks to DMXAPI for sponsoring this project! DMXAPI provides global large model API services to 200+ enterprise users. One API key for all global models. Features include: instant invoicing, unlimited concurrency, starting from $0.15, 24/7 technical support. GPT/Claude/Gemini all at 32% off, domestic models 20-50% off, Claude Code exclusive models at 66% off! Register here
+
+
+
+
+
Thanks to Cubence for sponsoring this project! Cubence is a reliable and efficient API relay service provider, offering relay services for Claude Code, Codex, Gemini, and more with flexible billing options including pay-as-you-go and monthly plans. Cubence provides special discounts for CC Switch users: register using this link and enter the "CCSWITCH" promo code during recharge to get 10% off every top-up!
@@ -48,7 +52,7 @@ This project is sponsored by Z.ai, supporting us with their GLM CODING PLAN.GLM
## Features
-### Current Version: v3.8.2 | [Full Changelog](CHANGELOG.md) | [Release Notes](docs/release-note-v3.8.0-en.md)
+### Current Version: v3.9.1 | [Full Changelog](CHANGELOG.md) | [Release Notes](docs/release-note-v3.9.0-en.md)
**v3.8.0 Major Update (2025-11-28)**
@@ -187,7 +191,19 @@ paru -S cc-switch-bin
### Linux Users
-Download the latest `CC-Switch-v{version}-Linux.deb` package or `CC-Switch-v{version}-Linux.AppImage` from the [Releases](../../releases) page.
+Download the latest Linux build from the [Releases](../../releases) page:
+
+- `CC-Switch-v{version}-Linux.deb` (Debian/Ubuntu)
+- `CC-Switch-v{version}-Linux.rpm` (Fedora/RHEL/openSUSE)
+- `CC-Switch-v{version}-Linux.AppImage` (Universal)
+- `CC-Switch-v{version}-Linux.flatpak` (Flatpak)
+
+Flatpak install & run:
+
+```bash
+flatpak install --user ./CC-Switch-v{version}-Linux.flatpak
+flatpak run com.ccswitch.desktop
+```
## Quick Start
diff --git a/README_JA.md b/README_JA.md
index 12853b309..063559cf6 100644
--- a/README_JA.md
+++ b/README_JA.md
@@ -2,20 +2,20 @@
# Claude Code / Codex / Gemini CLI オールインワン・アシスタント
-[](https://github.com/farion1231/cc-switch/releases)
+[](https://github.com/farion1231/cc-switch/releases)
[](https://github.com/farion1231/cc-switch/releases)
[](https://tauri.app/)
[](https://github.com/farion1231/cc-switch/releases/latest)
-[English](README.md) | [中文](README_ZH.md) | 日本語 | [Changelog](CHANGELOG.md) | [v3.8.0 リリースノート](docs/release-note-v3.8.0-en.md)
+[English](README.md) | [中文](README_ZH.md) | 日本語 | [Changelog](CHANGELOG.md) | [v3.9.0 リリースノート](docs/release-note-v3.9.0-ja.md)
## ❤️スポンサー
-
+[](https://z.ai/subscribe?ic=8JVLJQFSKB)
本プロジェクトは Z.ai の GLM CODING PLAN による支援を受けています。GLM CODING PLAN は AI コーディング向けのサブスクリプションで、月額わずか 3 ドルから。Claude Code、Cline、Roo Code など 10 以上の人気 AI コーディングツールでフラッグシップモデル GLM-4.6 を利用でき、速く安定した開発体験を提供します。[このリンク](https://z.ai/subscribe?ic=8JVLJQFSKB) から申し込むと 10% オフになります!
@@ -23,20 +23,23 @@
-
+
PackyCode のご支援に感謝します!PackyCode は Claude Code、Codex、Gemini などのリレーサービスを提供する信頼性の高い API 中継プラットフォームです。本ソフト利用者向けに特別割引があります:このリンクで登録し、チャージ時に「cc-switch」クーポンを入力すると 10% オフになります。