diff --git a/CHANGELOG.md b/CHANGELOG.md index 1291971ad..51769c98d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,50 @@ 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.14] - 2026-10-16 + +This release adds a wide range of customization options to the usage dashboard: a new Settings tab, amounts in a chosen currency with an editable exchange rate, a choice of what the sidebar Today label shows, selectable request log columns with new cache write, hit rate, total time and status code columns, and the last tab, range and chart metrics remembered. "Open Terminal" on a Claude card now explains what the folder is for and remembers recent folders. Fixes cover Codex through the local route to Gemini failing on the second tool-call turn, Codex retry and stream timeout keys dropped in routing mode, Skills repos over 128 MiB, custom pricing for model ids with capital letters, OpenCode speed estimates and deep-link imports, Hermes dev builds always showing an update, failover queue reordering, and Windows session groups split by path case. + +**Stats**: 30 commits | 100 files changed | +4242 insertions | -373 deletions + +### Added + +- **Usage Amounts in a Chosen Currency**: A Settings tab replaces the usage page's Pricing tab, with a Display section on top and the existing pricing configuration below. Amounts can be shown in USD (default), CNY, EUR, JPY, TWD or TRY with an editable rate (pre-filled with a reference value); untouched preset rates are not written, so later preset updates still reach those users. Costs stay stored in USD and are converted only for display (hover shows the USD value); chart data is converted before plotting so axis ticks stay round. Converted amounts show at most two decimals (yen two fewer), and an amount that would round to zero keeps two significant digits. Usage amounts now group thousands, and every usage amount goes through one money formatter. Pricing input, quota and balance footers and the Codex credit conversion keep their own currencies. Stored device-locally as `usageDisplay` in `~/.cc-switch/settings.json`. +- **Sidebar Today Label**: Pick up to two of cost (default), tokens, requests and cache hit rate, or show nothing (`sidebarTodayItems`, an empty list means hidden). Tokens use the same real-consumption total as the usage card; hit rate is left out before the first request of the day. The item name keeps its width and the trailing text wraps; with two values the row shows two numbers and the full text moves to the tooltip and accessible name. Amounts from 100 up drop decimals. +- **Request Log Columns**: The Display section picks which request log columns show. Four new columns, hidden by default: Cache Write ("—" with an explanation for Codex, Gemini and Grok, which do not report it), Hit Rate (per request, floored to one decimal so a near-full hit never reads 100%, #7298), Total Time (from `latency_ms`; estimates from session logs carry "≈") and Status Code (replaces the error badge next to the time when shown). The time column always stays. Only columns that differ from their default are saved (`usageDisplay.requestLogColumns`), and the table scrolls sideways instead of squeezing. +- **Usage Page Remembers the Last View**: Tab, preset range and trend/heatmap metrics are restored from localStorage. A custom date range does not replace the remembered preset, and app/provider/model filters are not kept. +- **Open Terminal Explains and Remembers the Folder**: "Open Terminal" on a Claude card opens a dialog that says a terminal will start Claude Code with this provider in the chosen folder, prefills the last folder that opened successfully and lists up to five recent folders (localStorage, this device only). Cards with their own base URL and key also note that the terminal is isolated from later switches; official login cards do not show the note. +- **Pricing Seed for Gemini 4 Argon** (#8356): Introductory Standard-tier prices (2.00 / 10.00 / cache read 0.10 per MTok, through 2026-11-30); existing installs pick it up through the startup insert, and zero-cost history is recomputed by the startup backfill. + +### Changed + +- **Claude Desktop Shows One Row per 1M Model**: Desktop listed every `supports1m` model twice, the plain entry and a "1M context window" variant. Every model entry now also writes `prefer1m` (Desktop 1.21459.0+), which keeps only the plain row and passes `[1m]` to the embedded CLI. Route and aggregation profiles pick it up on the next launch or mode switch; direct profiles on the next switch or save. +- **Direct Provider Delete Reason While Routing** (refs #8277): The card the direct pointer points at stays undeletable while routing or aggregating (leaving routing falls back to it), but its tooltip now says so and points to "Back to direct and use" on another provider, instead of "the provider in use can't be deleted". +- **Upstream Connection Errors Keep Their Cause** (refs #8416): Send, hyper fallback and body stream errors now include the `source()` chain (DNS, refused, TLS, reset) instead of only "error sending request"; URLs are stripped first so query-string keys never reach the log. Error prefixes and timeout / connect classification are unchanged. +- **Presets**: SiliconFlow CN presets for Claude Code, Claude Desktop, Hermes and OpenClaw move off the retired `Pro/MiniMaxAI/MiniMax-M2.5` to `deepseek-ai/DeepSeek-V4-Flash` with its 1M window declared, matching Codex and OpenCode. TokenFactory presets are no longer marked as a sponsor and show as 词元工厂 / 詞元工廠 in Chinese, with search aliases. Pi uses the three-color pi.dev mark. + +### Fixed + +- **Codex Through the Local Route to Gemini Failed on the Second Tool Turn** (refs #8336): Gemini's OpenAI-compatible Chat endpoint returns `tool_calls[].extra_content.google.thought_signature` and requires it back, but the Responses ↔ Chat bridge dropped it both ways. A non-empty `extra_content` is now carried onto the Responses call items (streaming and non-streaming), restored by call id from `CodexChatHistoryStore` and copied back onto the next request's tool calls. When a cached signature is lost (for example after a restart mid-turn), Gemini 3+ model ids get the documented `skip_thought_signature_validator` placeholder on the first function call of each model step in the current turn; real signatures and other upstreams are untouched. +- **Codex Retry and Stream Timeout Keys Dropped in Routing Mode** (refs #8265): The proxy contract table now keeps `request_max_retries`, `stream_max_retries` and `stream_idle_timeout_ms` from the routed provider's table, so a provider set to 50 stream retries no longer falls back to Codex's default of 5. +- **Skills Repos Over 128 MiB** (refs #8421): Repo ZIPs are streamed into an anonymous temp file instead of memory, the download cap is raised to the 512 MiB extraction budget, and a download over the cap reports its own `ARCHIVE_DOWNLOAD_TOO_LARGE` error instead of the extraction one. +- **Custom Pricing Ignored for Model Ids With Capital Letters** (#8414, fixes #8413): Exact pricing lookup uses `COLLATE NOCASE`, so a custom row such as `GLM-5.3-Flash-EXL3` matches the lowercased candidate for new requests and the history backfill; no migration needed. +- **OpenCode Speed Estimates Too Low on Tool-heavy Turns** (#8410, fixes #8402): Latency ends at `time.streamed` when present and later than `time.created`, falling back to `time.completed`, so tool execution time is no longer counted. +- **OpenCode Deep-link Imports** (#8382, fixes #8380; #8381, fixes #8379): After an OpenCode import the live provider and runtime model queries are refreshed, so the card's added state is current; providers with non-ASCII names get an ASCII slug with a UUID suffix so the V1 editor can save them, and an existing V1 id can be saved unchanged. +- **Hermes Dev Builds Always Showed an Update** (#8398, fixes #8394): Versions such as `0.22.1+238.g` keep their local segment and are treated as incomparable dev builds on both sides; ordinary semver build metadata is still ignored per spec. +- **WSL Probe Marked Broken Tools as Not Installed** (#8167): Only bash/zsh, dash and fish command-missing output (and exit 127) counts as not installed, so a tool failing with "module not found" shows as found but failing. +- **Codex Parent Rollouts With Malformed UTF-8** (#8360): Parent records are read as bytes and decoded separately, so invalid text is skipped like malformed JSON instead of deferring every child; real I/O and decompression errors still return as transient failures. +- **Failover Queue Reordering Did Nothing** (refs #8297): Moving a provider reassigned the members' existing `sortIndex` values, which could tie when members shared a value or a new provider fell back to its array index; reassigned slots are now strictly increasing. +- **Windows Session Groups Split by Path Case** (refs #8233): Sessions group by a normalized key (trailing separators dropped; Windows drive-letter and UNC paths case-folded with `/` unified to `\`); POSIX paths stay case-sensitive and the group shows its first session's original path. +- **OpenClaw User-Agent Switch Out of Sync With the JSON Editor** (refs #8256): Editing headers in the configuration JSON now updates the switch from the case-insensitive presence of a `User-Agent` header, without rewriting the JSON. + +### Upgrade notes + +- **No database schema change** (still 20). +- The usage page's Pricing tab is now under Settings. Display settings are device-local and not synced. +- Claude Desktop direct profiles keep the duplicate 1M rows until the provider is switched or saved again; route and aggregation profiles update on the next launch. +- The Gemini 4 Argon introductory price ends on 2026-11-30. + ## [4.0.13] - 2026-10-16 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. The Claude Code Haiku tier can declare a 1M window, presets whose models have a 1M window now pre-check it, and TokenFactory and Modelflare join as sponsor presets. 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. diff --git a/package.json b/package.json index 5c3d087ef..92057d728 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cc-switch", - "version": "4.0.13", + "version": "4.0.14", "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 8f4b6c495..5e850d2b8 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -758,7 +758,7 @@ dependencies = [ [[package]] name = "cc-switch" -version = "4.0.13" +version = "4.0.14" dependencies = [ "anyhow", "arboard", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index ba9f0dd23..4bd0ebfb2 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cc-switch" -version = "4.0.13" +version = "4.0.14" 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 feab582c5..da8ab1d39 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.13", + "version": "4.0.14", "identifier": "com.ccswitch.desktop", "build": { "frontendDist": "../dist",