docs(release): add v4.0.18 release notes

This commit is contained in:
Jason committed 2026-10-21 23:57:09 +08:00
1 parent 4aec1aecaa
commit cb90a2440d
4 files changed
+249

No files matched your search

+72
View File
@@ -0,0 +1,72 @@
# CC Switch v4.0.18
This release adds support for Antigravity CLI (agy), the 11th app managed by CC Switch. You can add official sign-in cards and third-party API key cards for agy. **Note: an Antigravity provider only takes effect in agy started from "Open Terminal with This Provider" on a CC Switch card**; running `agy` directly in any other terminal does not use it. MCP, Skills and prompts sync to agy, sessions can be browsed and resumed, and usage is imported from session logs; the "Apps" page can install, upgrade and uninstall agy. On macOS, Accounts can also manage several Antigravity accounts: switch agy's sign-in in one click, see each account's quota, and bind an official card to an account. Also, in-app updates on Windows no longer restart the computer because a file is in use, and the MSI installer lets you skip creating a desktop shortcut; the header now shows the actual connection as a small badge next to the app name. Other fixes cover routing failing on macOS under many concurrent requests because file handles ran out, "Restart Codex daemon" failing with `env: node` when CC Switch is launched from Finder, Claude Code sessions staying under the old project after changing directory with `/cd`, the button on Windows spinning after opening a terminal until the terminal window was closed, Codex quota windows that were never used showing a countdown, and DeepSeek V4.1 Flash having no pricing. For everything new in 4.0, see the [v4.0 release notes](https://github.com/farion1231/cc-switch/blob/main/docs/release-notes/v4.0.4-en.md).
---
## New
### Antigravity CLI (agy)
Google's Antigravity CLI (the command is `agy`) is now a separate app with its own providers, MCP, Skills, prompts, sessions and usage, managed separately from Gemini CLI ([#8268](https://github.com/farion1231/cc-switch/pull/8268), [#2959](https://github.com/farion1231/cc-switch/issues/2959)).
> **⚠️ An Antigravity provider only takes effect when agy is started in a terminal from CC Switch.** Unlike other apps, CC Switch does not change agy's own settings files, so Antigravity cards have no "Switch" and no "In use". To use a card, click "Open Terminal with This Provider" on that card; only agy run in the terminal that opens uses that provider. Running `agy` directly in any other terminal still uses agy's own Google sign-in and settings. (Switching accounts in Accounts on macOS is the exception: it changes agy's global sign-in; see the next section.)
- **Two kinds of provider cards.** An official sign-in card uses agy's own Google sign-in and, when opening a terminal, starts agy with the model chosen on the card, for that session only; a third-party card takes the address and key of a Gemini API-compatible service, and leaving the address empty uses Google's default API. The key and address are given only to agy in that terminal and are not written to agy's config or to shell startup files (the temporary file used for launching is deleted automatically). The model list comes from agy's built-in model catalog, using the display names agy recognizes.
- **MCP, Skills, prompts.** Synced to `~/.gemini/config`, agy's global customization folder, which may be shared with Antigravity IDE on the same computer. agy started from a third-party card can use these MCP servers, Skills and prompts too.
- **Sessions.** You can browse agy and Antigravity IDE sessions; only what you typed is shown, not the context agy adds itself. Sessions started from a third-party card can be found too, and are resumed with the same card.
- **Usage.** Imported from session logs (including Antigravity IDE sessions) and recorded under the model chosen for each turn; cost is estimated from that model's API price in the pricing table.
- **Official quota.** After you turn on quota queries on an official card, it shows two groups, Gemini and Claude/GPT, each with a 5-hour and a weekly window; the card shows only the window with less left in each group, and the dropdown shows all four windows and their reset times.
- **Manage agy on the "Apps" page.** It is installed with the official install script, upgraded with `agy update` (Homebrew installs too), and can be uninstalled.
- Deep links can also import agy providers, MCP servers and prompts.
### Multiple Antigravity accounts in Accounts (macOS)
agy can only be signed in with one account at a time. Accounts now has an Antigravity group: click "Sign in with Google" or "Add account" to add an account in the browser, and the account agy is already signed in with is added automatically.
- **Switching.** Choose "Switch agy to this account" from the account's menu, and every agy opened afterwards uses that account. The account that was signed in is first collected into Accounts, so it is not lost when you switch away. If agy is running, you are warned: agy sessions already open keep using the previous account and may write it back, so it is best to quit them first.
- **Quota for each account.** Each row shows its own quota, without switching to it first. Checking quota only reads the quota and does not call any model. Accounts that cannot use Antigravity (for example, because of age restrictions) show the reason Google gives instead of a cryptic 403.
- **Binding an official card to an account.** The official card's form lets you pick an account: before opening a terminal, agy's sign-in is switched to that account, and nothing is written if it is already that account; the card also shows that account's quota. If none is picked, the card follows agy's current sign-in. After the card syncs to another computer, it works there only if that account has also been added on that computer; otherwise opening a terminal shows a prompt instead of starting agy with a different account.
- **Removing an account does not sign agy out.** CC Switch only deletes the copy it saved itself.
## Improvements
**In-app updates on Windows no longer restart the computer** ([#8628](https://github.com/farion1231/cc-switch/pull/8628), [#8534](https://github.com/farion1231/cc-switch/issues/8534)). In-app updates run the MSI installer without dialogs, and before, whenever a file in the install folder was still in use, Windows Installer restarted the computer without asking. The installer itself now forbids restarts, which also applies when updating from an older version to this one.
**The MSI installer can skip creating a desktop shortcut** ([#8601](https://github.com/farion1231/cc-switch/pull/8601), [#5667](https://github.com/farion1231/cc-switch/issues/5667)). The install-directory page has a new "Create a desktop shortcut" option, checked by default; silent installs can add `CREATEDESKTOPSHORTCUT=0` to skip it. Upgrades keep the current state: a shortcut you deleted is not created again. A Desktop folder that cannot be written to no longer makes the install fail.
**The header shows the actual connection** ([#8634](https://github.com/farion1231/cc-switch/pull/8634)). Where you are actually connected moves from beside the mode tabs to beside the app name, drawn as a small badge in the color of the current mode (Direct, Routing, Aggregation); it stays visible while you look at another mode tab, long names are truncated, and hovering shows the full name.
**Less explanatory text in the interface** ([#8633](https://github.com/farion1231/cc-switch/pull/8633)). In the provider form, OpenClaw, Daily Memory, sync and rectifier settings, descriptions that repeated the label or title next to them are removed, and additional explanations move into the existing help cards; notes that affect the outcome (cost, restarts, sync, deletion and so on) are still shown.
**The app filter on the Usage page lists only the apps shown on the "Apps" page.** As in Sessions: when Claude Desktop is shown, Claude Code stays too, and the currently selected app does not disappear even if it is hidden.
**Presets:** Added DIT.ai and hao.ai.
## Fixes
- **Routing failed on macOS under many concurrent requests** ([#8668](https://github.com/farion1231/cc-switch/issues/8668)). An app launched from Finder or as a login item can only have 256 files open at once. Each in-flight routing request takes one client connection and one upstream connection, so with enough concurrency the limit ran out: new requests could not be accepted, upstreams could not be reached, and even config files and the database could not be opened. The limit is now raised at startup to the value the system allows (up to 10240). Linux is handled the same way.
- **"Restart Codex daemon" failed with `env: node: No such file or directory` when CC Switch was launched from Finder** ([#8653](https://github.com/farion1231/cc-switch/issues/8653)). When launched from Finder, CC Switch only has the system folders on its PATH; a codex installed with npm needs node to run, and node could not be found when it was installed somewhere else. Commands like this now get the login shell's PATH added first, as when installing and upgrading tools. Fetching the model list for OpenCode had the same problem and is fixed too.
- **After changing directory with `/cd` in a Claude Code session, session management still grouped it under the old project** ([#8643](https://github.com/farion1231/cc-switch/pull/8643), [#6862](https://github.com/farion1231/cc-switch/issues/6862)). The copied resume command also ran `cd` into the old folder first, where `claude --resume` could not find the session. Sessions are now grouped by the last directory changed to, following Claude Code's own rule, including entering and leaving worktrees.
- **On Windows, after opening a terminal, the button kept spinning until that terminal window was closed** ([#6712](https://github.com/farion1231/cc-switch/issues/6712)). The wait now ends as soon as the terminal opens.
- **Codex quota windows that were never used still showed a reset countdown** ([#8631](https://github.com/farion1231/cc-switch/pull/8631)). For a window with 0 usage, Codex returns a reset time of "now plus one window length", so the countdown jumped back to the full window on every refresh (5 hours for the 5-hour window). Windows with 0 usage no longer show a reset time.
- **DeepSeek V4.1 Flash requests showed "Unpriced" and were counted as 0.** The OpenCode Go, OpenRouter and Hermes presets use the model name `deepseek-v4.1-flash`, which was missing from the pricing table. It is now priced at DeepSeek Flash's official prices; requests already recorded are not re-priced.
- **The manual's workaround for "Codex locks the send button after the official quota runs out" no longer worked and has been corrected** ([#7962](https://github.com/farion1231/cc-switch/issues/7962)). Since 4.0.16, Aggregation mode keeps the ChatGPT login, so making a third-party provider the aggregation default no longer gets around it. The workaround now is: switch to Direct, make sure "Keep official login for direct switches" under "Settings → App config → Codex" is turned off, switch to a third-party provider, then fully restart Codex; switch back to Aggregation after the quota resets.
## Upgrade Notes
**The database schema goes from 20 to 21**, adding Antigravity toggles for MCP and Skills. The database is backed up automatically before the upgrade; if you go back to an older version after upgrading, it reports that the database version is too new and cannot open it.
- An Antigravity provider only takes effect in agy started from "Open Terminal with This Provider" on a card; running `agy` directly in any other terminal does not use it.
- Antigravity is shown on the "Apps" page by default; if you don't use it, you can hide it there.
- Managing Antigravity accounts in Accounts is currently macOS only. Other platforms show no account picker, and official cards follow agy's own sign-in; bindings synced from a Mac are ignored.
---
## Thanks
Thanks to [@Owlbay](https://github.com/Owlbay), [@peterLwk888](https://github.com/peterLwk888), [@ajia1206](https://github.com/ajia1206) (Antigravity CLI support), [@YUZHEthefool](https://github.com/YUZHEthefool) (Windows updates no longer restarting, optional desktop shortcut), [@funkpopo](https://github.com/funkpopo) (optional desktop shortcut), [@SaladDay](https://github.com/SaladDay) (header connection badge, less explanatory text), [@Dopetaiga](https://github.com/Dopetaiga) (session grouping after `/cd`), [@cuiyf5516](https://github.com/cuiyf5516) (unused Codex quota windows), [@umutcankurt](https://github.com/umutcankurt) (opening a terminal on Windows waiting indefinitely) for their contributions.
Thanks to [@lm902](https://github.com/lm902), [@zhufeizzz](https://github.com/zhufeizzz), [@AisinGioroKiIoi](https://github.com/AisinGioroKiIoi), [@WzLYVg387U](https://github.com/WzLYVg387U), [@mvdorofeev](https://github.com/mvdorofeev), [@dw2286](https://github.com/dw2286), [@LeenixP](https://github.com/LeenixP) for reporting issues and providing reproduction details and fix ideas.
For the full technical details, see the [CHANGELOG](https://github.com/farion1231/cc-switch/blob/main/CHANGELOG.md).
+72
View File
@@ -0,0 +1,72 @@
# CC Switch v4.0.18
今回のリリースでは、Antigravity CLI(agy)に対応しました。CC Switch が管理する 11 番目のアプリです。agy には公式ログインのカードとサードパーティの API キーのカードを追加できます。**注意:Antigravity のプロバイダーは、CC Switch のカードの「このプロバイダーでターミナルを開く」から起動した agy でのみ有効です**。ほかのターミナルで直接 `agy` を実行した場合は使われません。MCP、Skills、プロンプトは agy に同期され、セッションは閲覧と再開ができ、使用量はセッションログから取り込みます。「アプリ」ページで agy のインストール、アップグレード、アンインストールもできます。macOS では、「アカウント」ページで複数の Antigravity アカウントも管理でき、agy のログインをワンクリックで切り替え、アカウントごとの利用枠を確認し、公式カードを特定のアカウントに紐付けられます。また、Windows のアプリ内更新で、ファイルが使用中のためにパソコンが再起動されることはなくなり、MSI のインストール時にデスクトップショートカットを作らないことも選べるようになりました。ページ上部では、実際の接続をアプリ名の横に小さなバッジで表示するようになりました。このほか、macOS で同時リクエストが多いとファイルハンドルを使い切ってルーティングが失敗する、Finder から起動したときに「Codex デーモンを再起動」が `env: node` を報告する、Claude Code のセッションで `/cd` でディレクトリを変えても元のプロジェクトに分類されたままになる、Windows でターミナルを開いた後、そのターミナルウィンドウを閉じるまで読み込み中のままになる、Codex の未使用の利用枠にカウントダウンが表示される、DeepSeek V4.1 Flash に料金が設定されていない、といった問題を修正しました。4.0 の更新内容の全体は [v4.0 リリースノート](https://github.com/farion1231/cc-switch/blob/main/docs/release-notes/v4.0.4-ja.md) をご覧ください。
---
## 新機能
### Antigravity CLI(agy)
Google の Antigravity CLI(コマンドは `agy`)が独立したアプリになりました。プロバイダー、MCP、Skills、プロンプト、セッション、使用量をそれぞれ持ち、Gemini CLI とは別に管理します([#8268](https://github.com/farion1231/cc-switch/pull/8268)、[#2959](https://github.com/farion1231/cc-switch/issues/2959))。
> **⚠️ Antigravity のプロバイダーは、CC Switch からターミナルで起動したときにだけ有効です。** ほかのアプリと違い、CC Switch は agy 自身の設定ファイルを変更しないため、Antigravity のカードには「切り替え」も「使用中」もありません。使いたいカードの「このプロバイダーでターミナルを開く」を押すと、開いたターミナルで実行した agy だけがそのプロバイダーを使います。ほかのターミナルで直接 `agy` を実行した場合は、agy 自身の Google ログインと設定のままです。(macOS の「アカウント」ページでのアカウント切り替えは例外で、agy 全体のログインを変更します。次の節を参照してください。)
- **2 種類のプロバイダーカード。** 公式ログインのカードは agy 自身の Google ログインを使い、ターミナルを開くときにカードで選んだモデルで agy を起動します。このモデルはそのセッションにだけ適用されます。サードパーティのカードには Gemini API 互換のエンドポイントとキーを入力します。エンドポイントを空欄にすると Google の標準 API を使います。キーとエンドポイントはこのターミナルの agy にだけ渡され、agy の設定やシェルの起動ファイルには書き込まれません(起動に使う一時ファイルは自動で削除されます)。モデル一覧は agy 内蔵のモデルカタログから取得し、agy が認識できる表示名が入ります。
- **MCP、Skills、プロンプト。** `~/.gemini/config` に同期します。これは agy のグローバルなカスタマイズ用ディレクトリで、同じパソコンの Antigravity IDE と共有されることがあります。サードパーティのカードで起動した agy でも、これらの MCP、Skills、プロンプトを使えます。
- **セッション。** agy と Antigravity IDE のセッションを閲覧できます。表示するのは入力した内容だけで、agy が自動で付け加えたコンテキストは表示しません。サードパーティのカードで起動したセッションも見つけられ、同じカードで再開できます。
- **使用量。** セッションログから取り込みます(Antigravity IDE のセッションを含む)。ターンごとに選ばれたモデルで記録し、費用は料金表の該当モデルの API 価格で見積もります。
- **公式の利用枠。** 公式カードで利用枠の照会を有効にすると、Gemini と Claude/GPT の 2 グループの利用枠を表示します。各グループには 5 時間と週の 2 つの枠があります。カードには各グループで残りの少ないほうの枠だけを表示し、ドロップダウンを開くと 4 つの枠すべてとそれぞれのリセット時刻を確認できます。
- **「アプリ」ページで agy を管理。** 公式のインストールスクリプトでインストールし、`agy update` でアップグレードします(Homebrew でインストールした場合も同じです)。アンインストールもできます。
- ディープリンクで agy のプロバイダー、MCP、プロンプトもインポートできます。
### 「アカウント」ページで複数の Antigravity アカウントを管理(macOS)
agy は同時に 1 つのアカウントにしかログインできません。「アカウント」ページに Antigravity のグループを追加しました。「Google でログイン」または「アカウントを追加」を押すとブラウザーでアカウントを追加でき、agy ですでにログインしているアカウントも自動で取り込まれます。
- **切り替え。** アカウントのメニューで「agy をこのアカウントに切り替え」を選ぶと、以降に起動する agy はすべてこのアカウントを使います。元のログインのアカウントは先に「アカウント」ページに取り込まれるため、切り替えても失われません。agy が実行中のときは通知が出ます。すでに開いている agy は元のアカウントのままで、元のアカウントを書き戻すこともあるため、先に終了することをおすすめします。
- **アカウントごとの利用枠。** 各行にそれぞれの利用枠を表示するので、切り替えなくても確認できます。利用枠の照会は利用枠を読み取るだけで、モデルは呼び出しません。Antigravity を使えないアカウント(年齢制限があるものなど)には、わかりにくい 403 ではなく、Google が示した理由を表示します。
- **公式カードをアカウントに紐付け。** 公式カードのフォームでアカウントを 1 つ選べます。ターミナルを開く前に agy のログインをそのアカウントに切り替え、すでにそのアカウントなら書き込みません。カードに表示する利用枠もこのアカウントのものです。選ばない場合は agy の現在のログインに従います。カードを別のパソコンに同期した場合は、そのパソコンでもこのアカウントを追加しないと使えません。追加していなければターミナルを開くときに通知が出て、別のアカウントで起動することはありません。
- **アカウントを削除しても agy はログアウトしません。** CC Switch は自分が保存したコピーだけを削除します。
## 改善
**Windows のアプリ内更新でパソコンが再起動されなくなりました**([#8628](https://github.com/farion1231/cc-switch/pull/8628)、[#8534](https://github.com/farion1231/cc-switch/issues/8534))。アプリ内更新はダイアログを出さない方式で MSI インストーラーを実行するため、これまではインストール先のファイルが 1 つでも使用中だと、Windows Installer が確認なしにパソコンを再起動していました。現在はインストーラー自体が再起動を禁止しており、旧バージョンからこのバージョンに更新するときにも有効です。
**MSI のインストール時にデスクトップショートカットを作らないことを選べるように**([#8601](https://github.com/farion1231/cc-switch/pull/8601)、[#5667](https://github.com/farion1231/cc-switch/issues/5667))。インストール先のページに「Create a desktop shortcut」オプションを追加しました。既定でオンです。サイレントインストールでは `CREATEDESKTOPSHORTCUT=0` を付けるとスキップできます。アップグレード時は現在の状態を保ち、削除したショートカットが再び作られることはありません。デスクトップのフォルダーに書き込めないときも、インストールが失敗しなくなりました。
**ページ上部に実際の接続を表示**([#8634](https://github.com/farion1231/cc-switch/pull/8634))。実際の接続先の表示をモードのタブの横からアプリ名の横に移し、現在のモード(直接接続、ルーティング、集約)の色の小さなバッジで示します。別のモードのタブを見ているときも常に表示され、名前が長いときは省略され、ポインターを重ねると全体を確認できます。
**画面の説明文を簡潔に**([#8633](https://github.com/farion1231/cc-switch/pull/8633))。プロバイダーのフォーム、OpenClaw、デイリーメモリー、同期、整流器の設定で、隣のラベルや見出しと重複する説明を削除し、補足の説明は既存のヘルプカードに移しました。結果に影響する注意(費用、再起動、同期、削除など)はこれまでどおり表示します。
**使用量ページのアプリの絞り込みには、「アプリ」ページで表示しているアプリだけを並べるように。** セッション管理と同じく、Claude Desktop を表示しているときは Claude Code も残し、現在選んでいるアプリは非表示にしても消えません。
**プリセット:** DIT.ai、hao.ai を追加しました。
## 修正
- **macOS で同時リクエストが多いとルーティングが失敗する問題**([#8668](https://github.com/farion1231/cc-switch/issues/8668))。Finder やログイン項目から起動したアプリは、同時に開けるファイル数が 256 個しかありません。ルーティングでは処理中のリクエストごとにクライアント側の接続とアップストリーム側の接続を 1 つずつ使うため、同時リクエストが多いと上限に達し、新しいリクエストを受け付けられず、アップストリームにも接続できず、設定ファイルやデータベースさえ開けなくなっていました。現在は起動時にこの上限をシステムが許す値(最大 10240)まで引き上げます。Linux でも同じように処理します。
- **Finder から起動したとき、「Codex デーモンを再起動」が `env: node: No such file or directory` を報告する問題**([#8653](https://github.com/farion1231/cc-switch/issues/8653))。Finder から起動すると CC Switch の PATH にはシステムのディレクトリしかなく、npm でインストールした codex は node で動くため、node が別のディレクトリにあると見つかりませんでした。現在はこの種のコマンドを実行するとき、ツールのインストールやアップグレードと同じく、先にログインシェルの PATH を加えます。OpenCode のモデル一覧の取得も同じ問題の影響を受けていたため、あわせて修正しました。
- **Claude Code のセッションで `/cd` を使ってディレクトリを変えても、セッション管理で元のプロジェクトに分類されたままになる問題**([#8643](https://github.com/farion1231/cc-switch/pull/8643)、[#6862](https://github.com/farion1231/cc-switch/issues/6862))。コピーした再開コマンドも先に元のディレクトリへ `cd` するため、そこで `claude --resume` を実行してもこのセッションが見つかりませんでした。現在は Claude Code 自身のルールと同じく、最後に移動したディレクトリで分類します。worktree に出入りした場合も同じです。
- **Windows でターミナルを開いた後、そのターミナルウィンドウを閉じるまでボタンが読み込み中のままになる問題**([#6712](https://github.com/farion1231/cc-switch/issues/6712))。現在はターミナルが開いた時点で待機を終えます。
- **Codex で使っていない利用枠にもリセットまでのカウントダウンが表示される問題**([#8631](https://github.com/farion1231/cc-switch/pull/8631))。使用量が 0 の枠について Codex が返すリセット時刻は「現在時刻に枠の長さを足したもの」のため、更新するたびにカウントダウンが枠の長さ全体に戻っていました(5 時間枠なら 5 時間)。現在は使用量が 0 の枠にはリセット時刻を表示しません。
- **DeepSeek V4.1 Flash のリクエストが「価格未設定」と表示され、0 として計算される問題。** OpenCode Go、OpenRouter、Hermes のプリセットはモデル名 `deepseek-v4.1-flash` を使っていますが、これまで料金表にありませんでした。現在は DeepSeek Flash の公式価格で計算します。記録済みのリクエストは再計算しません。
- **マニュアルの「公式の利用枠を使い切ると Codex が送信ボタンをロックする」問題の回避方法が使えなくなっていたため、訂正しました**([#7962](https://github.com/farion1231/cc-switch/issues/7962))。4.0.16 から集約モードでは ChatGPT のログインを保持するため、サードパーティを集約のデフォルトプロバイダーにしても回避できなくなりました。現在の方法は次のとおりです:直接接続に切り替え、「設定 → アプリ設定 → Codex」の「直接切替時に公式ログインを保持」がオフになっていることを確認し、サードパーティのプロバイダーに切り替えてから Codex を完全に再起動します。利用枠がリセットされたら集約に戻します。
## アップグレードに関する注意
**データベースのバージョンが 20 から 21 に上がります。** MCP と Skills に Antigravity のスイッチを追加するためです。アップグレード前にデータベースは自動でバックアップされます。アップグレード後に旧バージョンに戻すと、旧バージョンはデータベースのバージョンが新しすぎると表示し、開けません。
- Antigravity のプロバイダーは、カードの「このプロバイダーでターミナルを開く」から起動した agy でのみ有効で、ほかのターミナルで直接 `agy` を実行した場合は使われません。
- Antigravity はデフォルトで「アプリ」ページに表示されます。使わない場合はそこで非表示にできます。
- 「アカウント」ページでの Antigravity アカウントの管理は、現在 macOS のみ対応しています。ほかのプラットフォームではアカウントの選択は表示されず、公式カードは agy 自身のログインに従います。Mac から同期された紐付けは無視されます。
---
## 謝辞
[@Owlbay](https://github.com/Owlbay)、[@peterLwk888](https://github.com/peterLwk888)、[@ajia1206](https://github.com/ajia1206)(Antigravity CLI への対応)、[@YUZHEthefool](https://github.com/YUZHEthefool)(Windows の更新で再起動しない、デスクトップショートカットの選択)、[@funkpopo](https://github.com/funkpopo)(デスクトップショートカットの選択)、[@SaladDay](https://github.com/SaladDay)(ページ上部の接続バッジ、説明文の簡潔化)、[@Dopetaiga](https://github.com/Dopetaiga)(`/cd` 後のセッションの分類)、[@cuiyf5516](https://github.com/cuiyf5516)(Codex の未使用の利用枠)、[@umutcankurt](https://github.com/umutcankurt)(Windows でターミナルを開いたときに待ち続ける問題)の貢献に感謝します。
問題の報告、再現情報や修正のアイデアの提供に協力してくださった [@lm902](https://github.com/lm902)、[@zhufeizzz](https://github.com/zhufeizzz)、[@AisinGioroKiIoi](https://github.com/AisinGioroKiIoi)、[@WzLYVg387U](https://github.com/WzLYVg387U)、[@mvdorofeev](https://github.com/mvdorofeev)、[@dw2286](https://github.com/dw2286)、[@LeenixP](https://github.com/LeenixP) に感謝します。
技術的な詳細は [CHANGELOG](https://github.com/farion1231/cc-switch/blob/main/CHANGELOG.md) をご覧ください。
+72
View File
@@ -0,0 +1,72 @@
# CC Switch v4.0.18
本版本新增对 Antigravity CLI(agy)的支持,它是 CC Switch 管理的第 11 个应用。你可以为 agy 添加官方登录卡和第三方 API Key 卡。**注意:Antigravity 的供应商只在从 CC Switch 卡片「使用此供应商打开终端」启动的 agy 里生效**,在其他终端里直接运行 `agy` 不会用到它;MCP、Skills 和提示词同步给 agy,会话可以浏览和恢复,用量从会话日志导入;「应用」页可以安装、升级、卸载 agy。macOS 上,授权中心还能管理多个 Antigravity 账号:一键切换 agy 的登录,查看每个账号的额度,把官方卡绑定到某个账号。另外,Windows 上的应用内更新不会再因为文件被占用而重启电脑,MSI 安装时可以选择不创建桌面快捷方式;页头改为在应用名旁用小徽章显示实际的连接。还修复了 macOS 上并发请求多时路由因文件句柄耗尽而失败、从访达启动时「重启 Codex 守护进程」报 `env: node`、Claude Code 会话用 `/cd` 换目录后仍归在旧项目下、Windows 上打开终端后一直转圈直到关掉终端窗口、Codex 未使用的额度窗口显示倒计时、DeepSeek V4.1 Flash 没有计价等问题。4.0 完整的更新内容请见 [v4.0 发布说明](https://github.com/farion1231/cc-switch/blob/main/docs/release-notes/v4.0.4-zh.md)。
---
## 新增
### Antigravity CLI(agy)
Google 的 Antigravity CLI(命令是 `agy`)现在是一个独立的应用,有自己的供应商、MCP、Skills、提示词、会话和用量,和 Gemini CLI 分开管理([#8268](https://github.com/farion1231/cc-switch/pull/8268)、[#2959](https://github.com/farion1231/cc-switch/issues/2959))。
> **⚠️ Antigravity 的供应商必须从 CC Switch 以终端启动才生效。** 和其他应用不同,CC Switch 不改 agy 自己的设置文件,所以 Antigravity 的卡片没有「切换」,也没有「使用中」。要用哪张卡,就点那张卡上的「使用此供应商打开终端」,在弹出的终端里运行的 agy 才会用这家供应商;在其他终端里直接运行 `agy`,用的仍是 agy 自己的 Google 登录和设置。(macOS 上在授权中心切换账号是例外:它改的是 agy 的全局登录,见下一节。)
- **两种供应商卡。** 官方登录卡用 agy 自己的 Google 登录,打开终端时用卡上选的模型启动 agy,只对这次会话生效;第三方卡填兼容 Gemini API 的地址和 Key,地址留空用 Google 默认的 API,Key 和地址只交给这个终端里的 agy,不写进 agy 的配置和 shell 启动文件(启动用的临时文件会自动删除)。模型列表来自 agy 自带的模型目录,填的是 agy 认得的显示名称。
- **MCP、Skills、提示词。** 同步到 `~/.gemini/config`,这是 agy 的全局定制目录,可能和同一台电脑上的 Antigravity IDE 共用。第三方卡启动的 agy 同样能用这些 MCP、Skills 和提示词。
- **会话。** 可以浏览 agy 和 Antigravity IDE 的会话,只显示你输入的内容,不显示 agy 自己附加的上下文;第三方卡启动的会话也能找到,并用同一张卡恢复。
- **用量。** 从会话日志导入(包括 Antigravity IDE 的会话),按每轮选择的模型记账,费用按价格表里对应模型的 API 价格估算。
- **官方额度。** 在官方卡上开启额度查询后,显示 Gemini 和 Claude/GPT 两组额度,每组有 5 小时和每周两个窗口;卡片上每组只显示剩得少的那个窗口,点开下拉可以看全部四个窗口和各自的重置时间。
- **「应用」页管理 agy。** 用官方安装脚本安装,用 `agy update` 升级(Homebrew 安装的也一样),可以卸载。
- 深链接也可以导入 agy 的供应商、MCP 和提示词。
### 授权中心管理多个 Antigravity 账号(macOS)
agy 同时只能登录一个账号。现在授权中心多了 Antigravity 一组:点「用 Google 登录」或「添加账号」,在浏览器里添加账号,agy 里已经登录的账号也会自动收进来。
- **切换。** 在账号的菜单里选「切换 agy 到这个账号」,之后新开的 agy 都用这个号。原来登录的号会先收回授权中心,切走也不会丢。如果 agy 正在运行,会提醒你:已经打开的 agy 还用原来的号,而且可能把原来的号写回去,最好先退出。
- **每个账号的额度。** 每一行都显示自己的额度,不用切过去才能看。查额度只读额度,不调用模型。不能使用 Antigravity 的账号(比如有年龄限制的)会显示 Google 给出的原因,而不是一句看不懂的 403。
- **把官方卡绑定到账号。** 官方卡的表单里可以选一个账号:打开终端前会先把 agy 的登录切到这个号,已经是它就不再写入;卡片上显示的也是这个号的额度。不选就跟随 agy 当前的登录。卡片同步到另一台电脑后,那台电脑上也添加了这个号才能用,否则打开终端时会提示,不会用别的号启动。
- **删除账号不会让 agy 退出登录。** CC Switch 只删掉自己保存的那一份。
## 改进
**Windows 上的应用内更新不会再重启电脑**([#8628](https://github.com/farion1231/cc-switch/pull/8628)、[#8534](https://github.com/farion1231/cc-switch/issues/8534))。应用内更新以不弹对话框的方式运行 MSI 安装包,以前只要安装目录里有文件还被占用,Windows Installer 就会不提示直接重启电脑。现在安装包本身禁止重启,从旧版本更新到这一版时也生效。
**MSI 安装时可以不创建桌面快捷方式**([#8601](https://github.com/farion1231/cc-switch/pull/8601)、[#5667](https://github.com/farion1231/cc-switch/issues/5667))。安装目录页多了「Create a desktop shortcut」选项,默认勾上;静默安装可以加 `CREATEDESKTOPSHORTCUT=0` 跳过。升级时保留现在的状态:你删掉的快捷方式不会被重新创建。桌面目录写不进去时也不会再让安装失败。
**页头显示实际的连接**([#8634](https://github.com/farion1231/cc-switch/pull/8634))。实际连到哪里,从模式标签旁挪到应用名旁,用当前模式(直连、路由、聚合)的颜色画成一个小徽章;切到别的模式标签看时也一直显示,名称太长会截断,鼠标悬停可以看到全部。
**精简界面上的说明文字**([#8633](https://github.com/farion1231/cc-switch/pull/8633))。供应商表单、OpenClaw、每日记忆、同步和整流器设置里,和旁边标签、标题重复的说明去掉了,补充说明挪进已有的帮助卡片;会影响结果的提示(费用、重启、同步、删除等)照常显示。
**用量页的应用筛选只列「应用」页里显示的应用。** 和会话管理一样:显示 Claude Desktop 时 Claude Code 也保留,当前选中的应用即使被隐藏也不会消失。
**预设:** 新增 DIT.ai、hao.ai。
## 修复
- **macOS 上并发请求多时路由失败**([#8668](https://github.com/farion1231/cc-switch/issues/8668))。从访达或登录项启动的应用,同时能打开的文件数只有 256 个。路由每个进行中的请求要占一个客户端连接和一个上游连接,并发一多就用完了:接不了新请求、连不上上游,连配置文件和数据库都打不开。现在启动时把这个上限调高到系统允许的值(最多 10240)。Linux 同样处理。
- **从访达启动时,「重启 Codex 守护进程」报 `env: node: No such file or directory`**([#8653](https://github.com/farion1231/cc-switch/issues/8653))。从访达启动时 CC Switch 只有系统目录的 PATH,npm 安装的 codex 要靠 node 运行,node 装在别的目录时就找不到。现在运行这类命令时会先加上登录 shell 的 PATH,和安装、升级工具时一样。OpenCode 获取模型列表也受这个问题影响,一并修复。
- **Claude Code 会话里用 `/cd` 换了目录,会话管理里仍归在旧项目下**([#8643](https://github.com/farion1231/cc-switch/pull/8643)、[#6862](https://github.com/farion1231/cc-switch/issues/6862))。复制的恢复命令也会先 `cd` 到旧目录,在那里 `claude --resume` 找不到这个会话。现在和 Claude Code 自己的规则一样,按最后一次换到的目录归类,进出 worktree 也一样。
- **Windows 上打开终端后,按钮一直转圈,直到关掉那个终端窗口**([#6712](https://github.com/farion1231/cc-switch/issues/6712))。现在终端打开后就会结束等待。
- **Codex 没用过的额度窗口也显示重置倒计时**([#8631](https://github.com/farion1231/cc-switch/pull/8631))。用量为 0 的窗口,Codex 返回的重置时间是「现在加一个窗口长度」,所以每次刷新倒计时都会跳回整个窗口(5 小时窗口跳回 5 小时)。现在用量为 0 的窗口不显示重置时间。
- **DeepSeek V4.1 Flash 的请求显示「未定价」、按 0 元计。** OpenCode Go、OpenRouter 和 Hermes 预设用的模型名是 `deepseek-v4.1-flash`,以前价格表里没有。现在按 DeepSeek Flash 的官方价格计算;已经记录的请求不会重新计价。
- **手册里「官方额度用完后 Codex 锁住发送键」的绕开办法已失效,已更正**([#7962](https://github.com/farion1231/cc-switch/issues/7962))。4.0.16 起聚合模式会保留 ChatGPT 登录,把第三方设为聚合的默认供应商已经绕不开。现在的办法是:切到直连,确认「设置 → 应用配置 → Codex」里的「非接管切换时保留官方登录」是关闭的,切到一家第三方供应商后彻底重启 Codex;额度重置后再切回聚合。
## 升级说明
**数据库版本从 20 升到 21**,为 MCP 和 Skills 增加 Antigravity 的开关。升级前会自动备份数据库;升级后再退回旧版本,旧版本会提示数据库版本过新,打不开。
- Antigravity 的供应商只在从卡片「使用此供应商打开终端」启动的 agy 里生效,在其他终端里直接运行 `agy` 不会用到它。
- Antigravity 默认显示在「应用」页,不用的话可以在那里隐藏。
- 在授权中心管理 Antigravity 账号目前只支持 macOS。其他平台不显示账号选择,官方卡跟随 agy 自己的登录;从 Mac 同步过来的绑定会被忽略。
---
## 致谢
感谢 [@Owlbay](https://github.com/Owlbay)、[@peterLwk888](https://github.com/peterLwk888)、[@ajia1206](https://github.com/ajia1206)(Antigravity CLI 支持)、[@YUZHEthefool](https://github.com/YUZHEthefool)(Windows 更新不再重启、可选桌面快捷方式)、[@funkpopo](https://github.com/funkpopo)(可选桌面快捷方式)、[@SaladDay](https://github.com/SaladDay)(页头连接徽章、精简说明文字)、[@Dopetaiga](https://github.com/Dopetaiga)(`/cd` 后的会话归类)、[@cuiyf5516](https://github.com/cuiyf5516)(Codex 未使用的额度窗口)、[@umutcankurt](https://github.com/umutcankurt)(Windows 打开终端一直等待)的贡献。
感谢 [@lm902](https://github.com/lm902)、[@zhufeizzz](https://github.com/zhufeizzz)、[@AisinGioroKiIoi](https://github.com/AisinGioroKiIoi)、[@WzLYVg387U](https://github.com/WzLYVg387U)、[@mvdorofeev](https://github.com/mvdorofeev)、[@dw2286](https://github.com/dw2286)、[@LeenixP](https://github.com/LeenixP) 报告问题、提供复现信息和修复思路。
完整的技术细节请见 [CHANGELOG](https://github.com/farion1231/cc-switch/blob/main/CHANGELOG.md)。
+33
View File
@@ -0,0 +1,33 @@
{
"version": "4.0.18",
"items": [
{
"type": "new",
"zh": "支持 Antigravity CLI,供应商须从卡片打开终端才生效",
"zh-TW": "支援 Antigravity CLI,供應商須從卡片開啟終端機才生效",
"en": "Antigravity CLI support: a provider applies only when agy is started from its card's terminal",
"ja": "Antigravity CLI に対応。プロバイダーはカードからターミナルを開いたときだけ有効"
},
{
"type": "new",
"zh": "macOS 授权中心可管理多个 Antigravity 账号并切换",
"zh-TW": "macOS 授權中心可管理多個 Antigravity 帳號並切換",
"en": "On macOS, add and switch several Antigravity accounts in Accounts",
"ja": "macOS の「アカウント」で複数の Antigravity アカウントを管理・切り替え"
},
{
"type": "fix",
"zh": "Windows 应用内更新不再重启电脑,桌面快捷方式可选",
"zh-TW": "Windows 應用內更新不再重新啟動電腦,桌面捷徑可選",
"en": "Windows in-app updates no longer reboot the PC, and the desktop shortcut is optional",
"ja": "Windows のアプリ内更新で PC が再起動しなくなり、デスクトップのショートカットを選択可能に"
},
{
"type": "fix",
"zh": "修复 macOS 并发请求多时路由因文件句柄耗尽而失败",
"zh-TW": "修正 macOS 並發請求多時路由因檔案控制代碼耗盡而失敗",
"en": "Fixed routing failing on macOS when many parallel requests ran out of file handles",
"ja": "macOS で並行リクエストが多いとファイルハンドルが尽きてルーティングが失敗する問題を修正"
}
]
}