usage 0.30.24
新功能 3 項
HTML 報表新增派工帳本,清楚看懂跨工具額度消耗
當你讓 Claude 呼叫其他工具一起分工寫程式時,往往很難算清一項任務到底扣了哪一邊的用量。⟦像工程主管核對跨包商工單,以前只見到月底整筆總支出,現在能清清楚楚拆解出每個專案各自攤提了哪家廠商的工時。⟧現在 HTML 報表的最耗用對話清單新增了「約佔週額度」欄位,並加入「派工帳本(最近 7 天)」區塊。它會將對話中的 codex exec 與 agy -p 呼叫,對應回 Codex 與 Antigravity 的紀錄。消耗估算是以對話消耗的 token(AI 處理與計費的文字單位)佔比,乘以各平台已使用的週額度。計算時會自動排除快取(把查過的資料暫存起來直接用)讀取的份額。歸屬依序比對對話識別碼、負五至一百二十秒的時間窗與工作目錄;若仍無法確認,就保持未歸屬。全程只讀取本機檔案與既有快取,不發送額外網路請求,沒有派工時也不會顯示此區塊。
官方原文
**Dispatch ledger in the HTML report.** The top-conversations table gains an "Approx. weekly quota" column, and a new "Dispatch ledger (last 7 days)" section matches the codex exec / agy -p calls in a Claude conversation to the Codex and Antigravity conversations they started, estimating how much of each provider's weekly quota one task used: conversation tokens (excluding cache reads) ÷ the period's total tokens × that provider's weekly quota used. A dispatch is attributed by Claude's conversation UUID first, then by a -5 to +120 second time window, then by working directory; if it is still ambiguous it stays unattributed. It reads local files only — Antigravity's quota comes from the existing cache, with no new network call — and the section is omitted when there were no dispatches.
發行版本自動上傳套件庫,免存認證金鑰更安全
想要把維護好的工具打包發布,現在只要為專案建立版本標籤,流程就會透過受信任發布機制(Trusted Publishing,透過平台互信驗證身分的安全機制)自動將 usage-cli 送上 Python 套件庫 PyPI。⟦好比大樓改用身分認證自動辨識進出,以前必須在管理室押一把實體備用鑰匙,現在通過驗證就直接放行,櫃子裡不必保存任何密碼鑰匙。⟧整個自動化發布流程完全不需要在設定中存放任何 token(授權令牌),只要打上標籤發版就能安全完成發布,不必擔心金鑰外洩。
官方原文
Tagging a release now also publishes usage-cli to PyPI through Trusted Publishing, with no stored token.
面板底部按鈕不再被裁切,窄版介面完整顯示操作文字
當你在使用較窄的面板主題或是切換到文字較長的語言介面時,可能會發現底部的操作按鈕被切掉半截。⟦如同排版軟體依照實際縮放比例重新測量元件,以前視窗縮放後,邊界文字會被擠出畫面;現在文字可就地換行,按鈕高度也會自然調整,字樣不再被切掉。⟧這次修正解決了十款面板主題在顯示狀態列(顯示在終端機最底部的即時資訊列)設定按鈕時,底部標籤與按鈕溢出的問題。介面現在會依實際縮放比例精確測量內容,避免 WebKit 引擎縮放後的字體差異造成底部被截斷,同時保留各主題原本的外觀風格。
官方原文
Keep footer action labels and buttons visible in the ten affected panel themes when the status-line setup button is shown, including narrow panels and longer translations. Allow local wrapping and natural button height while preserving theme chrome. Measure content at the displayed zoom so WebKit font metrics and line wrapping cannot clip the footer after panel scaling ([#151](https://github.com/aqua5230/usage/pull/151)).