diff --git a/CHANGELOG.md b/CHANGELOG.md index 9484d2a82..654978cea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,52 @@ 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.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. + +**Stats**: 49 commits | 87 files changed | +13812 insertions | -749 deletions + +### Added + +- **Choose Which Installation to Uninstall**: `prepare_tool_uninstall` returns every detected installation with its own plan or the reason it must be removed manually. The dialog lists source, path, version and the default marker; a single plannable install is preselected, two or more are not, and unplannable ones are disabled with their reason. Execution finds the confirmed path in a fresh enumeration and re-derives its plan, rejecting any difference from the preview. Grok 0.2.112+ (`~/.grok/bin/grok-` linked from `grok`) is recognized and its whole installer set is removed (files only; `config.toml` and sessions kept). Native uninstall also removes launcher symlinks in the search directories that resolve to the same binary, and the Grok npm copy is flagged as reinstalled by the updater when a native install exists and `[cli] installer = "npm"` is set. +- **Node Version Check Before npm Updates**: When a newer version exists, its `engines.node` is read from the registry and compared with the node the update would use (next to the default installation, else the login shell's PATH). An unsatisfied range reports `update_blocked_by_node`: the row explains why, hides the update button and is skipped by "Update All", and the lifecycle command checks again before running. Unknown range syntax, lookup failures and installations that do not run on node (native binaries, Homebrew, Bun, MiniMax Code, WSL) are never blocked. Motivated by OpenClaw 2026.9.3+ requiring Node `>=24.16.0 <25 || >=26.1.0`. +- **Local Preset Group and Local Inference Presets**: A new `local` category maps to a "Local" group after Cloud providers. Ollama (`localhost:11434`), LM Studio (`localhost:1234`), llama.cpp (`127.0.0.1:9931`, with `:8080` as an endpoint candidate) and vLLM (`localhost:8000`) presets cover Claude Code and Codex (native Anthropic Messages / Responses with the NativeResponses tool profile), Claude Desktop (proxy mode) and, where the client has no built-in provider, OpenCode, OpenClaw, Hermes and Pi; keys use the placeholders the servers document. +- **Loopback Requests Bypass the Proxy**: reqwest never bypasses loopback on its own (an explicit global proxy applies to every target, and the system-proxy path only honours `NO_PROXY`). `http_client::is_loopback_url` (localhost, `*.localhost`, `127.0.0.0/8`, `::1`) plus a proxy-free client route loopback targets directly in the forwarder (reqwest and hyper paths), endpoint speed test, stream check and model fetching. Request bodies and headers are untouched. +- **Turkish Interface and Tray** (#8208, fixes #8207): Turkish is a community translation that falls back to English for missing strings; the full-catalog parity check is dropped for `tr`, and the Turkish tray texts start from English and override translated items. The option is shown as plain "Türkçe". +- **New Provider Presets**: Ollama Cloud, Baseten, Meta Model API, DeepInfra, Vercel AI Gateway, Nebius Token Factory, Groq, SambaNova, DigitalOcean, Hugging Face, Microsoft Foundry, Fireworks AI, Mistral AI (Claude Code, Claude Desktop and Codex presets hidden pending a real-key test) and Cloudflare AI Gateway; SiliconFlow CN and international for OpenCode (#4878, fixes #4500); StreamLake for Codex, with every StreamLake preset moved to the public `kat-coder-pro-v2.5` endpoint. No OpenCode preset is added for providers OpenCode ships built in. Icons added for the new providers. + +### Changed + +- **Session Log Scanning Follows the Usage Page** (#8301): The background scan drops from every 60 seconds to every 10 minutes as a safety net. While the usage page is visible it scans immediately, again when the window becomes visible, and then at the selected interval (5/10/30/60 s, default 60 s). The setting is renamed "Session log scan interval", the "Off" option is removed (a saved 0 falls back to 60 s), and it is hidden when automatic scanning is off. Statistics no longer poll; imports refresh them through `usage-log-recorded`, and time-relative ranges re-run once a minute. +- **Provider Search Sits at the End of the First List Row** (#8151, fixes #8100): The search panel no longer floats over the first card's actions or pushes the list down. Claude Code, Codex, Gemini CLI and Grok Build portal a compact field into the mode row; other apps share the first section title row ("Added · N"). The scope and Esc hints move into the input tooltip. +- **Apps Page Layout**: Uninstall moves into a per-row "..." menu. Header and rows share one grid template (#8293), and the actions column reserves the width of invisible Install and Update buttons so it no longer grows as versions load or updates appear; the check-for-updates button keeps its width while checking. The hide-app help now says hiding only affects display. +- **Unsupported System Languages Default to English**: On first launch the UI and tray use English instead of Simplified Chinese for system languages the app does not ship. An empty locale still defaults to Simplified Chinese, and a saved language is never overridden. +- **Uninstall Feedback** (#8262): The dialog shows "Checking the installation…" while planning; native Windows Hermes uninstall warns about Python file locks; a successful uninstall followed by a failed or empty diagnostic is reported as a warning instead of a failure. + +### Fixed + +- **Skills Restore Failed Permanently After a Leftover `skills.bak`** (#8155, fixes #8153): The incoming tree is copied completely into a unique directory beside the Skills SSOT and swapped in by same-filesystem renames; `skills.bak` and earlier recovery directories are never removed or reused. If installation and rollback both fail, the original tree is kept and both errors are reported with its path. +- **Stream Error After a Terminal Responses Event** (#8138): The Responses-to-Anthropic streaming converter appended an Anthropic `error` event when the upstream body reported a transport error after `response.completed` or `response.incomplete`; late transport errors are now ignored once terminated. +- **Unsaved-Changes Guard Cleared by Re-clicking the Current Page** (#7900): On the MCP, Prompts and pricing editors, `openPage` returns early when the target is the current view, so it neither prompts nor clears the unsaved registration. +- **Empty Upstream Error Bodies** (#6910, refs #6895): An empty or whitespace-only upstream error body is rendered as "上游未返回错误内容" instead of ending with a dangling colon. +- **Pi Session Speed Estimates** (#8278): Pi session imports estimate request duration from each assistant message's request-start and write timestamps instead of writing latency 0. Earlier rows are not backfilled. +- **Pi on a WSL Config Directory** (#8249, fixes #8245): `commit_staged` skips `ReplaceFileW` (unsupported on WSL UNC) and goes straight to the rename fallback, and Auto skill sync resolves to Copy on WSL targets; an explicit Symlink choice keeps its error. Non-WSL behavior is unchanged. +- **Windows CLI PATH After an MSI Restart** (#8262): `run_detected_tool_command_with_timeout` uses the effective PATH, so `opencode models` and the Codex client catalog find their CLI; `%VAR%` references in PATH expand from the process, `HKCU\Environment` and system environment (nested, with cycle protection); the process PATH is read with `var_os` so one invalid UTF-16 unit no longer drops it; captured output reuses the Windows command builder so `\\?\`-prefixed `.cmd` / `.bat` paths run. +- **Preset IDs Shifted After a Hidden Preset**: Preset ids now keep the original array index and hidden entries are filtered afterwards, since `AddProviderDialog` and `useProviderCategory` resolve presets by that index. Codex and Claude Desktop presets gain the `hidden` flag. + +### Internal + +- Windows `windows_npm_path_fallback_uses_batch_compatible_path` test timeout widened from 10 s to 30 s (#8295, fixes #8294). + +### Upgrade notes + +- **No database schema change** (still 20). +- Background session log scanning is now every 10 minutes; non-routed usage can take up to 10 minutes to appear unless the usage page is open. A saved "Off" interval becomes 60 s. +- Pi speed estimates only apply to rows imported after upgrading. +- New and changed presets (including StreamLake's public endpoint) only affect newly added providers. +- Claude Desktop clears the key when a local preset is selected; type the placeholder by hand (`ollama`, `lmstudio`, `no-key` or `dummy`). + ## [4.0.11] - 2026-10-13 This release adds uninstall to the Apps page, so coding clients can now be installed, updated and uninstalled from CC Switch. The Apps page removes a detected client installation after showing the exact path and command, and lists manual uninstall commands for every install method. Coding-plan quota queries are enabled by default for every app, both when adding a provider and when importing a link. Codex usage import no longer rereads deferred fork rollouts every minute and now resolves fork parents across paginated Codex Desktop rollouts. Fixes cover install and update commands losing the user PATH after an MSI auto-restart on Windows, full-screen panels flickering, and bulk Skills and MCP toggles reporting success when writes failed. New presets: StreamLake China, AIComing, SoruxGPT Coding Plan and GrooRoute Pro. diff --git a/package.json b/package.json index 91f3b1d65..e26d0ad27 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cc-switch", - "version": "4.0.11", + "version": "4.0.12", "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 64343da93..a1c414246 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -758,7 +758,7 @@ dependencies = [ [[package]] name = "cc-switch" -version = "4.0.11" +version = "4.0.12" dependencies = [ "anyhow", "arboard", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index ee0461f56..e31afa473 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cc-switch" -version = "4.0.11" +version = "4.0.12" 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 0e50bb617..d4044c77f 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.11", + "version": "4.0.12", "identifier": "com.ccswitch.desktop", "build": { "frontendDist": "../dist",