繁體中文

問題修復

中文、日文、韓文的用量估算不再少算四倍

你拿中文、日文或韓文檔案檢查浪費的用量時,以前看到的數字其實少算了四倍。診斷工具把所有文字都當成四個字元才算一個 token(AI 處理文字量的單位),這套演算法適合 ASCII 文字,卻不適合 CJK 文字:一個中日韓字大約就是一個 token。現在它會把中日韓字逐一計算,其餘文字仍以四個字元估算,所以浪費的 token 與由此算出的費用不會再縮成四分之一。這像秤蔬菜時把每四顆番茄才當一顆,秤重結果當然偏低;秤法改正後,數字才接近實際重量。工具仍在離線運作,沒有為了追求細微的取整誤差加入特定模型的 tokenizer。

新功能

壞掉的快取先隔離,留下查問題的線索

某次用量數字看起來不對時,壞掉的快取(把查過結果暫存起來直接用的資料)現在不會立刻被刪光。Antigravity、Codex 與 history 三種快取遇到讀不懂的檔案,仍會重新計算以便繼續使用,但會先把原檔移到 ~/.usage/quarantine/,讓你日後還能檢查出了什麼問題。每個檔名帶毫秒時間戳,第二次故障不會蓋掉第一次;隔離區最多留十個檔案,每個最多 5 MB。這像醫院把破損的檢體先放進證物袋,再重新採樣,而不是直接丟進垃圾桶。只有過期的 schema_version 不會被隔離,因為那是正常升級;每個快取有 32 個分片,一次升版若全送進隔離區,反而會擠掉真正的故障證據。

問題修復

`--doctor` 會分清楚「缺檔」與「根本用不到」

跑 --doctor 檢查安裝狀態時,看到 forwarder script: [missing] 不必再先以為出錯。以前報告把十四項檢查攤成一張清單,即使你目前的模式根本不用 forwarder script(負責轉送資料的腳本),它也照樣標成 missing。現在結果分成 [core]、[hook] 與 [optional] 三組;不需要轉送腳本的模式會直接寫 [not needed in <state> mode]。這像健康檢查把必做檢驗、加選檢驗和不適用項目分欄,而不是把所有未做項目都標紅。檢查的判斷規則沒有改,改的是報告把情境講清楚的方式;真正缺少目前模式會用到的檔案,仍會顯示為問題。

新功能

Windows 的系統匣測試會寫入真實偏好設定

Windows 開發者跑系統匣(Windows 工作列角落放背景程式圖示的區域)測試後,自己的面板偏好曾被悄悄改掉。兩個測試都會呼叫 switch_panel() 切換面板;這個動作接著透過 _save_active_panel_id() 寫入偏好檔,但測試沒有把 prefs.PREFERENCES_FILE 改指向暫存位置,於是實際碰到的是 ~/.claude/usage-preferences.json。換句話說,測試本來該在模型屋裡搬家具,卻走進你的家改了客廳。

新功能

四種 README 翻譯都有人守,不再只盯繁中

英文 README 多加一節時,簡體中文、日文和韓文版現在也會被檢查有沒有跟上。原本 check_doc_parity.py 只比對英文與繁中 README,其他三份翻譯沒有自動守門員,只能靠 CLAUDE.md 裡的手動提醒。現在每一種翻譯各自和英文比較,若落後,錯誤訊息會直接點出是哪個檔案。它比的是 ## 標題的數量,不是標題文字本身:譯者仍可用自然的語言改寫標題,不必逐字照翻。這像展覽入口只數每個語言版有沒有同樣多扇展廳門,而不強迫門牌翻成同一串字;少了一扇門才提醒你回頭補。

新功能

本機安裝有了腳本,選單列不再默默跑舊版

你剛做完本機 build(編譯完成、可執行的程式版本),標上 release tag 並不會自動換掉 /Applications 裡正在跑的 App。過去這一步只寫在檢查清單,曾讓選單列連續六個版本仍開著舊 build。現在要在本機安裝時,直接執行 scripts/install_local.sh:它先確認 build 存在,印出新舊兩個版本,等待正在執行的 App 結束,再替換檔案,最後核對已安裝版本是否相同。這像買了新燈泡卻只把盒子放在門口;打上標籤不等於已裝進燈座。腳本把拆舊燈、裝新燈和開燈確認串起來,讓本機副本跟著更新。

English

BUGFIX

Usage estimates no longer count CJK text at one quarter of its size

If you use Chinese, Japanese, or Korean files to diagnose waste, the old figures were four times too small. The diagnostic treated every four characters as one token (the unit an AI uses to measure text). That works for ASCII text, but a CJK character is roughly one token. It now counts each CJK codepoint as one token and keeps the four-characters-per-token estimate for everything else, so reported waste and the cost based on it no longer shrink to a quarter of their real estimate. It was like weighing tomatoes but recording only one for every four on the scale. The tool remains offline; it does not add a model-specific tokenizer just to chase tiny rounding differences.

FEATURE

A damaged cache is quarantined instead of erased

When a usage number looks wrong, a damaged cache (stored results reused instead of recomputed) will no longer vanish immediately. Antigravity, Codex, and history caches still recover by recomputing an unreadable file, but first move the original into ~/.usage/quarantine/ so there is something to inspect later. Names include a millisecond timestamp, so a second failure cannot replace the first; the folder holds at most ten files, up to 5 MB each. It is like bagging a damaged lab sample before taking a new one instead of throwing away the only clue. An old schema_version is excluded because it is a normal upgrade. With 32 shards per cache, quarantining an entire version bump would crowd out the evidence from a real failure.

BUGFIX

`--doctor` separates a missing file from one you do not need

When you run --doctor to check an installation, forwarder script: [missing] no longer automatically means trouble. The report used to flatten fourteen checks into one list, so it showed a missing forwarder script even in a mode that never uses one. A forwarder script is simply a script that passes data along. Results are now separated into [core], [hook], and [optional]; a mode that does not need the script says [not needed in <state> mode]. It is like a health report separating required tests, elective tests, and tests that do not apply instead of marking every absent test red. The checking logic itself did not change; a file required by the current mode is still reported as missing.

FEATURE

Windows tray tests write to your real preferences

After a Windows developer ran tray tests, their own panel preference changed in silence. The tray is the corner of the Windows taskbar where background-app icons live. Two tests call switch_panel(), which then writes preferences through _save_active_panel_id(). But the tests did not redirect prefs.PREFERENCES_FILE to a temporary location, so they wrote to the real ~/.claude/usage-preferences.json. The tests were meant to rearrange furniture in a model home, yet walked into your living room instead.

FEATURE

Documentation checks now watch all four README translations

When the English README gains a section, the Simplified Chinese, Japanese, and Korean versions are now checked for keeping up too. check_doc_parity.py used to compare English only with Traditional Chinese, leaving the other three translations guarded only by a hand-written reminder in CLAUDE.md. Each translation is now compared with English on its own, and a failure names the file that drifted. The check counts ## headings rather than matching their wording, so translators can still write natural headings instead of copying English word for word. It is like checking that every language edition of an exhibition has the same number of gallery doors, without forcing all the signs to use identical words.

FEATURE

A local-install script keeps the menu bar from quietly running an old build

After you make a local build (a compiled, runnable version of the app), adding a release tag does not replace the copy already running from /Applications. That final step used to live only in a checklist, and the menu bar once kept running a build six versions old. For a local install, run scripts/install_local.sh. It confirms the build exists, prints both versions, waits for the running app to exit, swaps the files, and verifies that the installed version matches. Buying a new light bulb is not the same as putting it in the socket. The script links removing the old bulb, fitting the new one, and checking that the light turns on, so the local copy actually catches up.

原始 CHANGELOG

Original changelog中文、日文、韓文的用量估算不再少算四倍
**Token estimates no longer undercount CJK text by a factor of four.** Six places in the waste diagnosis converted characters to tokens with `chars // 4`, which is the ASCII ratio. A CJK character is roughly one token, not a quarter of one, so every figure the diagnosis reported for a Chinese, Japanese or Korean file — wasted tokens and the cost derived from them — came out at a quarter of the truth. This project reads its own `i18n.json`, `CLAUDE.md` and `README.zh-TW.md` often enough to hit this on itself. The estimate now counts CJK codepoints as one token each and everything else at four characters per token. No tokenizer dependency was added: this is an offline tool, and pulling in a model-specific tokenizer to chase rounding-level accuracy is not a trade worth making.
Original changelog壞掉的快取先隔離,留下查問題的線索
**A corrupt disk cache is preserved instead of being deleted outright.** All three caches — Antigravity, Codex and history — dealt with an unreadable file by removing it and recomputing. That is the right recovery, but it also destroys the only evidence of what went wrong, so a later report of "my numbers look off" has nothing left to inspect. A damaged file is now moved to `~/.usage/quarantine/` first, named with a millisecond timestamp so a second failure cannot overwrite the first, capped at ten files and 5 MB each. A stale `schema_version` is *not* quarantined: that is an ordinary upgrade, and with 32 shards per cache one version bump would flush the whole budget and push the real evidence out. The quarantine helper swallows every error it can hit — it is a side service and must never take the caller down with it.
Original changelog`--doctor` 會分清楚「缺檔」與「根本用不到」
**`--doctor` no longer reports a missing file that the current mode does not use.** The report listed fourteen checks as one flat list, so `forwarder script: [missing]` read as a fault even when the installed mode never needs that script. It is now grouped into `[core]`, `[hook]` and `[optional]`, and the forwarder line says `[not needed in <state> mode]` when that is the case. None of the check logic changed.
Original changelogWindows 的系統匣測試會寫入真實偏好設定
**Two Windows tray tests wrote into the real `~/.claude/usage-preferences.json`.** Both call `switch_panel()`, which persists through `_save_active_panel_id()`, and neither patched `prefs.PREFERENCES_FILE` — so running the suite silently changed the developer's own active panel.
Original changelog四種 README 翻譯都有人守,不再只盯繁中
**The documentation parity check covers Simplified Chinese, Japanese and Korean.** `check_doc_parity.py` only compared English against Traditional Chinese, leaving the other three README translations unwatched; `CLAUDE.md` had to carry a note to sync them by hand. Each translation is now compared on its own and the failure message names the file that drifted. The comparison is still a count of `##` headings rather than their text — matching text would force translators to mirror English headings word for word, which is what makes translated docs read badly.
Original changelog本機安裝有了腳本,選單列不再默默跑舊版
**`scripts/install_local.sh` replaces the hand-typed steps for installing a build locally.** Releasing does not touch `/Applications`: the tag drives CI, and the local copy keeps running whatever was already there. That last step lived only in a checklist, and the menu bar once ran a stale build for six versions before anyone noticed. The script checks the build exists, prints both versions, waits for the running app to exit, swaps it, and verifies the installed version matches.