usage

usage 0.22.6

工具與目錄
在這頁

修正 1 項

01

你的年度回顧與熱力圖不會因為對話紀錄被清掉而跟著縮水

年度回顧的各種總計與 52 週熱力圖,現在會自己記帳,不會再因為舊對話紀錄被砍掉而失憶了。以前它們每次都是從你電腦上現存的對話紀錄重算一次,所以只要紀錄被清掉,你的回顧就只剩下最近兩個月;現在系統每天會自己把當天的成績抄進一本專用的「帳本」裡保存下來。就算你把舊對話全砍了,帳本上的紀錄還是會保留著(最多保留 53 週,超過這個窗口的舊資料會被自動修剪掉)。就像以前老師算學期總成績是去數你抽屜裡還剩幾張考卷,現在老師會每天把分數登記在成績單上,就算考卷弄丟了分數也不會不見。

官方原文

**Annual Wrapped and the 52-week contribution heatmap no longer lose history when source logs are pruned**: the year view recomputed everything from whatever Claude Code / Codex session logs still existed on disk, so once those logs were rotated away it could only ever show the last ~2 months. usage now persists a daily ledger (~/.usage/year_ledger.json) that accumulates over time — each rebuild merges the currently-available days in (overwriting a stored day only when the fresh total is at least as large, so a partially-pruned day can't shrink the record) and trims entries beyond the 53-week window. The heatmap, streaks, active days, and Wrapped totals are all computed from the merged ledger, so coverage fills toward a full year from here on.