From a043b1f86356b5eb2e5fe401b5468ee05565134a Mon Sep 17 00:00:00 2001 From: Jason Date: Fri, 23 Oct 2026 20:13:26 +0800 Subject: [PATCH] chore(release): v4.0.19 --- CHANGELOG.md | 48 +++++++++++++++++++++++++++++++++++++++ package.json | 2 +- src-tauri/Cargo.lock | 2 +- src-tauri/Cargo.toml | 2 +- src-tauri/tauri.conf.json | 2 +- 5 files changed, 52 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index abd7cf152..a3870b7f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,54 @@ 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.19] - 2026-10-23 + +This release adds Kimi Code as the twelfth managed app (the CLI and the desktop app share one configuration, so both are covered): providers coexist in `~/.kimi-code/config.toml` with add/remove/set-default actions, MCP, Skills, prompts, sessions and session-log usage are supported, and official Kimi subscriptions can be signed in to (several accounts in the Auth Center, each with its own credential slot, provider, nickname and quota). The usage page is reorganized around one scope bar, a selectable metric strip driving the trend chart and heatmap, and a tabbed detail panel with a rows-per-page choice. Other fixes cover Codex `unsupported call: exec` after switching between third-party GPT and direct models in aggregation, Settings → About freezing when launched from a terminal on Linux/WSL, Codex image input turned off by model-metadata fill, the "Unsupported content type: redacted_thinking" message in Claude Code's VS Code extension on Responses upstreams, macOS Claude subscription quota reading the wrong keychain item, Antigravity quota missing the Gemini group and Windows console windows, the Hermes dashboard on WSL, and Escape closing every stacked panel. + +**Stats**: 45 commits | 206 files changed | +15661 insertions | -2347 deletions + +### Added + +- **Kimi Code Support** (#8687): Kimi Code (command `kimi`) is a new additive app reading `~/.kimi-code/config.toml` (or `KIMI_CODE_HOME`). The Kimi Code CLI and desktop app share this directory, so everything below applies to both. Providers and their models are written as native `[providers]`/`[models]` entries without touching other nodes, environment variables or OAuth references; presets come from the Pi catalog grouped like the other apps. MCP (stdio, HTTP, SSE), Skills with native-directory protection, the global prompt, session browsing/resume and session-log usage import (input, output, cache, first-token time and duration) are supported. The Apps page installs, upgrades and uninstalls Kimi Code with the official installer. Local routing and aggregation do not apply. Database schema 21 → 22 adds `enabled_kimi` columns. +- **Kimi Provider Cards** (d6a232419, 1c52fa918): Available cards get "Add", which writes the provider and its models into `config.toml` without changing `default_model`; added cards get "Remove", and "Set as default" lives in the more menu. The provider owning `default_model` (or the subagent model) is marked as default and cannot be removed; a refused removal rereads `config.toml` and explains why in all four locales. Native nodes already in `config.toml` are never overwritten from the stored copy. +- **Kimi Provider Form** (b61e2767c, 0f7682900, 8969264b9, b96ff6182): "Fetch models" and the per-row picker fill context window, thinking and image input from the matching preset or models.dev; models are one row each with a display name column (`display_name`, shown in Kimi's `/model`); "Always thinking" and "Load tools on demand" have help tips; request headers move under "Advanced options". +- **Kimi Official Accounts** (#8710, #8726, cdd2190df, c49c2be94, 44e0fc963): Sign in with Kimi (mainland or global, device code in the browser) from the Auth Center; the "Kimi Code official login" preset links there. Official cards are managed only in the Auth Center. The first login uses Kimi's own `managed:kimi-code` slot; further accounts get their own credential file, provider node and model aliases (`kimi-code-ccs-`), and their provider key is "Kimi 订阅 " so Kimi's model picker shows a readable name. Each row and official card shows the account's nickname and quota; tokens close to expiry are refreshed under Kimi's own lock (`.lock`, read-only on Windows). Re-login updates the same slot and keeps custom fields; removing a separate account deletes its node, models, credential and card (refused while in use); Kimi's own login is only hidden, never logged out. OAuth hosts are pinned per region and connection errors name the host and cause. + +### Changed + +- **Usage Page Layout** (#8711): One sync button showing the last sync time next to a settings sheet (data sources, display, pricing as a sub-page); a scope bar with date first, app chips and a cascading provider/model menu; a selectable metric strip drives the trend chart and heatmap, with the four token parts in an expandable row; the detail panel has tabs with counts, natural-width tables that scroll sideways with pinned time/app columns, and a rows-per-page menu (10/20/50) for request logs; the old Settings tab is gone and request log columns are chosen from a menu beside the status filter. Empty values show an em dash. Trend and heatmap keep their previous colors (c6f85464e), and request log columns are tighter so the first-token column fits (e53ca7e82). +- **Additive Default Provider** (e12415b5b, 7cc3141ca): OpenCode and OpenClaw move "Set as default" from the star icon into the card's more menu (with a model submenu for multi-model providers); the default provider in OpenCode, OpenClaw, Hermes and Kimi is shown in the same blue as an in-use card. +- **Pi Provider Key** (1e2559ef9, 03707c400): The key is always shown, prefilled for presets, and a key already used by another Pi card is flagged and blocks saving. +- **MCP Display Names** (#8692): Servers with a custom display name show it as the title, with the id beside it, also in the delete confirmation. +- **Session Group Headers** (#8709): The whole project group header row toggles the group. +- **Presets**: Add BuyToken and V-API (with backup endpoints) sponsor presets; DIT.ai links point at the referral URL; FluxA TokenPlan and Shengsuanyun swap positions. + +### Fixed + +- **Codex `unsupported call: exec` After Switching Models in Aggregation** (fixes #8676): Every third-party aggregation row shared one `comp_hash`, so switching from a third-party GPT row (`code_mode_only`, shell calls recorded as `exec`) to a direct model skipped compaction and the direct model copied `exec` calls. Rows are now grouped by tool protocol (`cc-switch-`; direct rows keep `cc-switch`), so cross-protocol switches compact first. +- **Settings → About Froze When Launched from a Terminal on Linux/WSL** (fixes #3241): The `$SHELL -lic` version probe kept the controlling tty and was stopped by SIGTTIN. It now runs with stdin null, its own session and the 10 s deadline. +- **Codex Image Input Turned Off by Model Metadata Fill** (refs #8682): Picking a fetched model the lookup reported as text-only wrote `inputModalities: ["text"]`, which Codex treats as no images, with no control to undo it. Modalities are only filled when the metadata includes image. +- **Relay Models Borrowed Another Vendor's Hosted Entry** (refs #8765, #8682): When no same-name entry resolved, the metadata fallback took any entry listed under a vendor-like provider, so `deepseek-v4.1-flash-1017` picked thinkingmachines' text-only LoRA entry (262144 window). Entries whose `canonical_model_id` names another vendor are now skipped and the fields stay empty. +- **"Unsupported content type: redacted_thinking" in Claude Code's VS Code Extension** (refs #8691): Encrypted-only reasoning from OpenAI Responses upstreams is emitted as an empty `thinking` block carrying the signature instead of `redacted_thinking`; replay is byte-identical. Summary text that only arrives in `output_item.done` is recovered. +- **macOS Claude Subscription Quota Read the Wrong Keychain Item** (#8764, fixes #8762): Lookup now queries `-a $USER` first, keeps the service-only query for compatibility, and skips entries without a Claude OAuth token so the credentials-file fallback runs. +- **Antigravity Quota Missing Gemini on macOS**: Google returns the Gemini group only to `antigravity/cli/` from 1.2.0, so the User-Agent is now `cc-switch/ (antigravity/cli/)` from the local `agy --version` (fallback 1.4.6). +- **Black Console Windows When Refreshing Antigravity Quota on Windows** (refs #8700): `agy --print /usage` and `agy models` run with `CREATE_NO_WINDOW`. +- **Hermes Dashboard Started on Windows When Hermes Lives in WSL** (refs #8689): With a `\\wsl$` / `\\wsl.localhost` config directory, "launch dashboard" runs `hermes dashboard` inside the distribution through the login shell. +- **Codex Session Header Aliases** (#8718): `session-id` and `thread-id` headers are recognized after `session_id` and `x-session-id`. +- **Bailian / Qianwen Token Plan Model List** (#8755): `/apps/anthropic` base URLs also try `{root}/compatible-mode/v1/models`. +- **OpenCode Zen / Go Addresses Not Matched to models.dev**: The old `/zen/...` addresses map to the moved `/inference/...` entries, so models such as `deepseek-v4.1-flash` fill again. +- **Escape Closed Every Stacked Panel**: Only the topmost full-screen panel reacts. +- **A Finished Deep-Link Import Closed a Newer Link's Confirmation** (refs #8696). +- **Usage 7/14/30-Day Presets Shifted a Day Across DST** (refs #8719): The start is computed from calendar days. +- **Empty Request Log After the Total Shrank on a Later Page**: The page index is clamped back. +- **Redundant "not installed or not executable" Line on the Apps Page**. +- **Advanced Options Toggles Jumped When Pressed** in the Claude, Codex and Kimi Code forms. + +### Upgrade notes + +- **Database schema 21 → 22** (adds `enabled_kimi` to `mcp_servers` and `skills`); the database is backed up before upgrading. Older versions refuse a version-22 database. +- Kimi Code is shown in the sidebar by default; turn it off on the Apps page. + ## [4.0.18] - 2026-10-21 This release adds Antigravity CLI (`agy`) as the eleventh managed app. Official-login and third-party API-key cards each open a terminal running agy with that provider; a provider only applies to agy started from its card's Open Terminal, never to a plain `agy` in another terminal. MCP servers, Skills and prompts sync to agy's shared customization folder, sessions can be browsed and resumed, usage is imported from session logs, and the Apps page installs, updates and uninstalls the CLI. On macOS the Auth Center manages several Antigravity accounts: switch agy's sign-in, see each account's quota and bind official cards to an account. Windows in-app updates no longer reboot the machine when a file is in use, the MSI installer makes the desktop shortcut optional, and the header shows the actual connection as a compact mode-colored badge. Fixes cover the router exhausting file descriptors under bursts on macOS, "Restart Codex daemon" failing with `env: node` when launched from Finder, Claude Code sessions staying under their old project after `/cd`, Windows Open Terminal spinning until the console is closed, countdowns on unused Codex quota windows, and unpriced DeepSeek V4.1 Flash requests. diff --git a/package.json b/package.json index 1c540c995..bae1fbe70 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cc-switch", - "version": "4.0.18", + "version": "4.0.19", "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 94ac0f321..9e8cb1d97 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -758,7 +758,7 @@ dependencies = [ [[package]] name = "cc-switch" -version = "4.0.18" +version = "4.0.19" dependencies = [ "anyhow", "arboard", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 891d518dc..4917543f2 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cc-switch" -version = "4.0.18" +version = "4.0.19" 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 5a3b39ce4..d00e37439 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.18", + "version": "4.0.19", "identifier": "com.ccswitch.desktop", "build": { "frontendDist": "../dist",