diff --git a/CHANGELOG.md b/CHANGELOG.md index 654978cea..5a6e4e271 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,48 @@ 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.13] - 2026-10-15 + +This release brings Claude Desktop into the same device-level mode as the routing apps: direct, routing and aggregation. Existing mapping cards are migrated to routing on startup. Codex gains an "Auto Review model" choice, so automatic approvals no longer go to a hidden model most relays do not serve, and aggregation can pick its own sub-agent model and reasoning effort. Going back to direct now asks for confirmation. GPT context windows in presets and model metadata are capped at the 272K subscription window. Portable Windows builds download the matching zip from the update button. Fixes cover Codex quoted provider tables, Codex remote compaction under routing, Chat stream tails after `[DONE]`, OpenCode speed estimates, forked Codex thread usage, slow mode switches with many fnm shells, and a Windows window hang. + +**Stats**: 24 commits | 92 files changed | +6171 insertions | -1300 deletions + +### Added + +- **Claude Desktop Direct / Routing / Aggregation Modes**: Desktop now follows the device-local mode in `live-state.json` like Claude Code, Codex, Gemini CLI and Grok Build, instead of the per-card `meta.claudeDesktopMode`. `AppType::has_route_mode()` (frontend `MODE_APP_IDS`) covers the routing apps plus Desktop; `supports_local_proxy()` still gates `proxy_config`, so Desktop has no failover queue or route settings. Direct mode writes the direct card and refuses mapping / managed-OAuth cards ("needs routing"). Routing writes a gateway profile pointing at `/claude-desktop` with the routed card's model table; the contract hashes that profile, so switching the route rewrites the file only when the model list changes. Aggregation publishes members' mapped models as `claude-fable-ccs-<6 digits>` (FNV-1a of key and upstream model, so Desktop's vendor filter and date stripping leave them intact) after the default provider's mapping, labelled "Provider / model", capped at 200, with `modelDiscoveryEnabled=false`; stacked requests skip the mapping table and misses return the Anthropic error envelope without falling back to the route. On colliding ids the listed provider wins. Desktop uses the shared mode panel and sidebar tags, the mapping service start/stop and Desktop-only tray mode are removed, and every mode change reminds that Desktop must be restarted. Desktop is not detached when CC Switch quits, because it only reads its config at launch. On startup a Desktop on a mapping card is migrated to routing as attached, with the card as the route and the device-local direct pointer moved to the official card (the mode is committed first, so a route that fails to start falls back to a working direct config). +- **Codex Auto Review Model**: Codex's automatic approval sends sandbox escalations to a reviewer model on the conversation's provider; third-party cards asked for the hidden `codex-auto-review` (404 on most relays) or had the main model review itself (#8015, #5903, #3855). Direct and routing cards get an "Auto Review model" field (`modelCatalog.autoReviewModel`) limited to the card's model list and written as `auto_review_model_override` on every catalog row; hidden for official cards, disabled without a model list. In aggregation a device setting (`codexStackAutoReviewModel`) picks any published `ccs-` model and is checked against the merged catalog on every rewrite. Changing it needs a Codex restart. Radix Select no longer clears a saved pick in forms when the value and options arrive in the same render. +- **Aggregation Sub-agent Model and Effort** (#8286): Aggregation used to strip `[agents] default_subagent_model`. The "Switch to Aggregation" dialog and a new Aggregation settings sheet pick a sub-agent model and reasoning effort, stored as a device setting and dropped from the written config while the model is not published (sub-agents then follow the main model). New conversations pick up a change without restarting Codex. +- **Portable Build Downloads the Matching Zip**: "Update to vX" on Windows portable builds opens the `Portable.zip` for the running architecture (x64 / ARM64) instead of the releases page, falling back to the release page for an unexpected version string. The About panel says extracting over `cc-switch.exe` is enough, since data lives in `~/.cc-switch`. In-place self-replacement is deliberately not done (Refs #8300). + +### Changed + +- **Confirm Before Going Back to Direct**: "Back to direct", "Back to direct and use this one" and the service-down notice open a confirmation that names the provider and the client file being rewritten; leaving routing notes that the target, failover queue and settings are kept, and leaving aggregation says which models leave `/model`. Errors show in the dialog; the Undo toast is removed. Desktop gets its own notes (applies after restart, routing target kept). +- **Classic Sub-agent Tools On by Default in Aggregation**: With the newer tools the main provider encrypts the task and a sub-agent on another provider receives nothing (#8253). The toggle moves into the Aggregation settings sheet under a new key `codexStackClassicTools`, default on; the old `codexStackClassicSubagents` key is no longer read. +- **GPT Context Windows Capped at 272K**: models.dev lists the API window (1.05M for GPT-5.6 / GPT-6), but relays serving ChatGPT subscriptions are limited to 272K and an overstated window delays compaction until the upstream rejects the prompt. `resolveModelMetadata` caps every GPT window at 272K, the Hermes, OpenClaw, OpenCode, Pi and Codex presets are lowered to match (guarded by a test), and the Claude Code "Codex" (ChatGPT subscription) preset's context and auto-compact windows move from 372K to 272K. Smaller windows are untouched. + +### Fixed + +- **Duplicate Codex Provider Table on Save** (#8276, fixes #8271): Writing `base_url` did not recognise a quoted header such as `[model_providers."custom"]` and appended a second table, so saving failed with `duplicate key custom`. Table headers are compared in canonical dotted-key form, and ids that need quoting map to a quoted header. +- **Codex Remote Compaction Lost Under Routing / Aggregation** (#8339, fixes #8338): The proxy contract rebuilt the provider as `name = "custom"` without `capabilities.remote_compaction`, so Codex fell back to local summarization and sessions with search history could fail with `response protection is unavailable`. The routed provider's OpenAI-name compaction switch and explicit `remote_compaction` value are kept; switching to a provider without them clears them. +- **Chat Stream Converters Kept Reading After `[DONE]`** (#8281): Both Chat Completions converters now return right after their `[DONE]` finalization, so a later connection reset no longer appends an Anthropic `error` or Responses `response.failed`, and a repeated `[DONE]` no longer emits a second `message_stop`. +- **OpenCode Speed Column Empty** (#8309, fixes #6326): OpenCode session imports wrote latency 0; they now use `time.completed - time.created`, recording 0 when `created` is missing or the clock went backwards. Earlier rows are not backfilled. +- **Usage Lost on Paginated Pages of Forked Codex Threads** (#8290, fixes #8161): A forked thread's continuation page (`rollout-…-_.jsonl`) keeps its parent's `forked_from_id` but is stamped at pagination time, so it was deferred forever. Same-thread leading ids or a `history_base` pointing at the thread itself now mark it as the thread's own continuation. +- **Slow Mode Switching With Many fnm Shells** (#8322, refs #8313): CLI search path deduplication was quadratic; an `IndexSet` keeps the same order and exact-path semantics. +- **Windows Window Hang in WebView2 Drag Regions** (#8327, refs #8321, #8324): Native CSS drag regions are limited to macOS; Windows moves and maximizes the window through Tauri's existing mouse handling. +- **Mode Preview Counted 0 Models for the Old Default**: The default provider publishes no models in Codex aggregation, so picking another default previewed it as contributing none; members now report how many models they publish as a plain member. + +### Internal + +- Test fixes for Rust 1.95 clippy (`cloned_ref_to_slice_refs`), a slow Apps page remount, and the WSL2 nightly (Codex parse-cache counts where files have no identity, npm lifecycle test outside the UNC temp dir). + +### Upgrade notes + +- **No database schema change** (still 20). +- Claude Desktop users on a mapping card are moved to routing on first launch; restart Desktop after changing its mode or route. +- Classic sub-agent tools are on by default in Codex aggregation; a previously saved off value is not carried over. +- The 272K GPT cap only affects newly added providers and newly fetched model metadata; existing cards keep their windows. +- Codex needs a restart after changing the Auto Review model. + ## [4.0.12] - 2026-10-14 This release rounds out the Apps page: coding clients can be installed, updated and uninstalled there, and conflicting installations found by "Diagnose installs" can now be resolved by uninstalling whichever copy you pick. Updates check the Node version the new release requires before they are offered, and the current Grok Build install layout can be uninstalled. A new Local preset group connects to Ollama, LM Studio, llama.cpp and vLLM on this computer, with loopback requests bypassing the configured proxy, and 14 cloud platforms get presets. Session log scanning drops to every 10 minutes in the background and follows the selected interval while the usage page is open. Turkish joins as a community translation, and unsupported system languages now default to English. diff --git a/package.json b/package.json index e26d0ad27..5c3d087ef 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cc-switch", - "version": "4.0.12", + "version": "4.0.13", "description": "All-in-One Assistant for Claude Code, Codex & Gemini CLI", "type": "module", "scripts": { diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index a1c414246..8f4b6c495 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -758,7 +758,7 @@ dependencies = [ [[package]] name = "cc-switch" -version = "4.0.12" +version = "4.0.13" dependencies = [ "anyhow", "arboard", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index e31afa473..ba9f0dd23 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cc-switch" -version = "4.0.12" +version = "4.0.13" description = "All-in-One Assistant for Claude Code, Codex & Gemini CLI" authors = ["Jason Young"] license = "MIT" diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index d4044c77f..feab582c5 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "https://schema.tauri.app/config/2", "productName": "CC Switch", - "version": "4.0.12", + "version": "4.0.13", "identifier": "com.ccswitch.desktop", "build": { "frontendDist": "../dist",