chore(release): v4.0.6

This commit is contained in:
Jason committed 2026-10-09 22:15:02 +08:00
1 parent ee50c12b81
commit 314968b65d
5 files changed
+47 -4

No files matched your search

+43
View File
@@ -5,6 +5,49 @@ 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).
## [4.0.6] - 2026-10-09
The second patch release on the 4.0 stable line. The provider page gains a search button that also matches API addresses, Skills can be updated all at once from the check button, quota numbers are colored again with a 20% warning threshold, and Codex aggregation gets an opt-in classic sub-agent tools toggle for cross-provider sub-agents. Fixes cover the last reply of Claude Code being dropped on Chat-converted routes, Codex aggregation compaction failing on `web_search` history, official models hidden from the aggregation picker by an old CLI on PATH, dangling account bindings after removing a managed ChatGPT account, `claude update` under npm 12, and tray quota rows missing the 5-hour tier.
**Stats**: 21 commits | 79 files changed | +3712 insertions | -723 deletions
### Added
- **Provider Search Button**: Provider search could only be opened with Cmd/Ctrl+F. A search button next to "Add provider" now toggles the existing panel, which closes when switching apps or leaving the provider page. Matching covers the API address as well as name, notes and website (the address is read from every app's `settingsConfig` shape by a shared `extractProviderBaseUrl`, which `ProviderCard` now also uses). The list is only filtered while the panel is open; closing it with Esc used to leave the list silently filtered. The panel is portaled to `document.body` so it no longer pushes the cards down by 1rem. A device-local "Show provider search" setting (on by default) hides the button; the shortcut keeps working.
- **Update All Skills From the Check Button**: Once updates are known, "Check updates" turns into "Update all (N)" and a check that finds updates opens the confirm dialog directly; re-checking moves to the "..." menu and the duplicate "Update all" in the filter row is gone. The confirm dialog lists each Skill with a clickable source repo (`V7ConfirmDialog` gains a `details` slot), closes immediately on confirm, and the toolbar shows "Updating 1/2..." while the batch runs.
- **Colored Quota Numbers and a 20% Warning**: The v3 green / orange / red is back, applied to the number only ("88%", "¥82.10", "$2500", the reset count) so tier names and "left" stay gray; lines with no number (used up, expired, query failed) are colored as a whole. A tier now warns below 20% left (was 10%), in the card and in the tray's "almost out". The "used $X" line has no total and stays uncolored; expanded bars and the Accounts page keep neutral numbers while normal.
- **Classic Sub-agent Tools for Codex Aggregation**: Codex multi-agent v2 has the main agent's backend encrypt the task handed to a sub-agent, so in aggregation mode a sub-agent on a different provider cannot read it. A device-level setting (off by default) stamps `multi_agent_version = "v1"` on every row of the aggregated catalog, official rows included, so tasks travel as plain text at the cost of v2-only tools such as `followup_task` and `interrupt_agent`. Toggling rewrites the catalog immediately in aggregation mode and rolls the setting back if the write fails; when `config.toml` forces `[features] multi_agent_v2` the settings row says the toggle has no effect. With the toggle off, the opaque-state rectifier no longer replaces the current (trailing) encrypted task with a placeholder, which used to hand the sub-agent an empty task; native Responses passthrough requests ending in an encrypted task hold the stream until the first non-lifecycle event (first-byte timeout, at most 10s) so an in-stream rejection reaches the rectifier, and when nothing else can be cleared CC Switch returns a 400 `unreadable_encrypted_agent_task` naming the toggle instead of letting Codex retry.
- **Cached-account Restart Notice Outside Aggregation** (#8006, refs #7700): Replacing `auth.json` does not always reload the running Codex app-server's auth cache, but the restart notice only fired on aggregation catalog changes. CC Switch now tracks a digest of the file-stored login's workspace/user identity (no tokens) and shows a separate "may still use the previous account" notice in direct, routing and aggregation modes; same-account token refreshes and first observations do not count. The daemon restarts only after confirmation, and desktop/editor users are told to quit and reopen.
- **Green CC Switch Update Dot**: The CC Switch update dot on "Settings" and the About row now uses the success green, and clicking "Settings" while an update is available opens About directly (Cmd+, still opens General). Tool update dots on "Apps" keep the neutral tone.
### Fixed
- **Last Claude Code Reply Dropped on Chat-converted Routes** (#7986, fixes #7984): The OpenAI Chat → Anthropic streaming conversion only closed content blocks on type switches and on the `finish_reason` path. At `[DONE]` or natural stream end it emitted `message_delta` / `message_stop` without closing blocks still open, so upstreams that omit `finish_reason` (or send content after it) left the last text or tool block unclosed and clients dropped it. Open non-tool and tool blocks are now closed right before the terminal events; the no-finish truncation path still emits no terminal events.
- **Codex Aggregation Compaction Failed on Tool History** (#7991, fixes #7976): The remote compaction summary turn for native Responses third-party upstreams removed `tools`, while replayed `web_search_call` / `function_call` items still referenced them, and some upstreams rejected the turn with 502. `tools` are now kept with `tool_choice: "none"` forced (added even when the request had none); requests without tools keep clearing stale call fields, and `text.format` is still removed.
- **Official Models Hidden From the Codex Aggregation Picker** (fixes #8014): With the official account as aggregation default, the official list was fetched with the version of the `codex` on PATH, and the server returns only hidden entries for 0.140 or older, which desktop-only users often keep on PATH. The version is now the newest Codex in use: the PATH CLI or the `cli_version` on the 20 most recently created threads in Codex's state DB (covering the desktop app and editor extensions). A list with no `visibility = "list"` row is not used; CC Switch falls back to the bundled list and shows a notice asking to update Codex.
- **Third-party Codex Catalog Entries Followed the Cached Official Template**: ProxyChat and Copilot catalogs cloned gpt-5.5 from Codex's `models_cache.json` (then `codex debug models --bundled`), so every change OpenAI made to that entry leaked into third-party models (the hidden flag behind #7924/#7954; newer entries carry `tool_mode: code_mode_only`, v2 sub-agents and experimental tools the Chat converter does not handle), and the cache announces GPT-5.5's retirement on 2026-10-14, after which every switch would spawn the Codex CLI. They now always use the bundled template, refreshed to Codex 0.162's gpt-5.5 entry (`shell_type: unified_exec`, skills / plugin usage instructions); the loader is renamed `load_codex_classic_tool_template`.
- **Removing a Managed ChatGPT Account Left Codex Providers Bound to It** (fixes #7055, refs #6969): Remove and logout now detach the affected Codex providers in one SQLite transaction (drop the binding, store an empty auth like a manual unbind, backfill `category=official` for legacy cards, keep unknown meta keys), so the card follows the native Codex login. Only this device's account IDs are unbound, since provider rows sync across devices; the command reports "account removed but unbinding failed" separately, and any row still dangling keeps going through the #7395 recovery path. The frontend invalidates the Codex provider list after remove/logout, including on partial failure. Thanks @SaladDay for the report and the first fix in #7060.
- **`claude update` Left a Placeholder Binary Under npm 12** (#7099): npm 12 blocks install scripts and still exits 0, so the primary `claude update` for an npm-installed Claude reported success with a broken binary and the npm fallback never ran. The primary update now runs with `npm_config_allow_scripts`, `npm_config_ignore_scripts=false` and `npm_config_include=optional` whenever the real target lives in the `@anthropic-ai/claude-code` npm package, which also covers npm prefixes classified as system (Intel Homebrew node, nodejs.org pkg, `~/.npm-global`, distro node). Windows anchored updates and the WSL static path are not covered.
- **Skills Import Dialog Could Not Be Closed** (fixes #7994): The import mutation's `onSettled` awaited every refresh including the discover list, which downloads each repository from GitHub, so the dialog stayed pending until discover finished. Only the installed and unmanaged refreshes are awaited now; repos and discover still invalidate in the background.
- **Tray Dropped the 5-hour Quota Tier** (fixes #8011): The app row title kept only the two tiers with the least left, which almost always dropped the 5-hour window of three-tier plans (Volcengine Agent/Coding Plan, Zhipu, MiniMax). All tiers are written in their original order as in 3.x; the "almost out" suffix still follows the lowest tier.
- **Apps Page Visibility Switches Were Hard to Read** (fixes #8010): The neutral tone drew a dark-gray checked track next to a medium-gray unchecked one in light mode. The neutral tone is removed and those switches use the action color.
### Docs
- A Chinese aggregation mode guide, and the three-language manuals now distinguish model fetching, models.dev metadata completion and manual entry.
- The Linux window-controls setting path in the three-language FAQ is updated for v4 (#7983).
### Internal
- Codex Copilot cards no longer store a representative `meta.apiFormat`; the form reads `codexCopilotApiFormat` directly and old cards drop the field on the next save (#7972).
- The release workflow fails fast when a Linux deb or rpm package is missing (#7985).
- DMXAPI logo updated.
### Upgrade notes
- **No database schema change** (still 20).
- Existing Codex sessions on ProxyChat (Chat-converted third-party) or Copilot providers lose the cached `comp_hash` and are compacted once on resume.
## [4.0.5] - 2026-10-08
The first patch release on the 4.0 stable line. Codex can use a GitHub Copilot account, and the all-time usage heatmap reaches back to the first recorded day. Fixes cover Claude Code sub-agents routed through Responses being forced into worktrees, GLM models hidden from the Codex aggregation picker, Linux deb/rpm auto-updates, Wayland title-bar buttons, blank Windows taskbar pins after an MSI upgrade, and Claude Code npm installs under npm 12.
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "cc-switch",
"version": "4.0.5",
"version": "4.0.6",
"description": "All-in-One Assistant for Claude Code, Codex & Gemini CLI",
"type": "module",
"scripts": {
+1 -1
View File
@@ -758,7 +758,7 @@ dependencies = [
[[package]]
name = "cc-switch"
version = "4.0.5"
version = "4.0.6"
dependencies = [
"anyhow",
"arboard",
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "cc-switch"
version = "4.0.5"
version = "4.0.6"
description = "All-in-One Assistant for Claude Code, Codex & Gemini CLI"
authors = ["Jason Young"]
license = "MIT"
+1 -1
View File
@@ -1,7 +1,7 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "CC Switch",
"version": "4.0.5",
"version": "4.0.6",
"identifier": "com.ccswitch.desktop",
"build": {
"frontendDist": "../dist",