Skip to content

v1.6.4 — renamed to cc-token + scoring & daily-detail fixes

Choose a tag to compare

@jayson-jia-dev jayson-jia-dev released this 09 Jun 08:44

⚠️ Existing users must reinstall (one command)

This release renames the project to cc-token (repo, plugin file, config dir all unified). Because the plugin filename changed, your existing install's auto-update can no longer find itself and will silently stop updating. Run this once to upgrade cleanly:

curl -fsSL https://raw.githubusercontent.com/jayson-jia-dev/cc-token/main/install.sh | bash

Your config and history are migrated automatically (old ~/.config/cc-token-stats~/.config/cc-token), and the old menu-bar plugin is removed so you won't get a duplicate icon. Nothing is lost.


What changed

Rename → cc-token

Unified the previously split naming (cc-token-status brand vs cc-token-stats files/config) into a single canonical cc-token. The menu-bar title is unchanged. A migration shim moves your config + iCloud sync data on first run.

Fixed: "Usage depth" score never moved

The level score's usage depth dimension was computed from the median session length, which is robust to outliers by design — so your deep marathon sessions (the very thing depth should reward) were ignored, and a pile of quick lookups pinned the score near zero. Replaced with three facets that actually capture depth and resist short-session dilution: p90 deep-session depth (8) + count of substantial ≥50-msg sessions (8) + activity density (4).

Fixed: Daily Details didn't reconcile

On busy days the per-session rows summed to a tiny fraction of the day total, and the most expensive sessions were missing entirely. Two root causes fixed:

  • Sessions are now attributed per-day (a session spanning midnight/multiple days splits correctly), so the detail rows sum exactly to the day total.
  • The per-day list now keeps the top 30 by cost (was: first 30 by scan order, which dropped the expensive long sessions), plus a "+N more sessions ($X)" reconciliation row.

Hardening (multi-agent audit)

  • No more duplicate menu-bar icon / doubled API polling after upgrade — cleanup now reaps legacy plugin filenames on every refresh; install/uninstall updated too.
  • A corrupt byte in any session log no longer blanks the whole dashboard (UTF-8 decode is now tolerant).
  • Multi-machine "Today" total no longer inflated by stale remotes (date-gated).
  • Atomic writes for scan/sync caches; shared_usage.json now 0o600; deterministic session attribution; dashboard project-name escaping.
  • Menu bar now surfaces a near-limit weekly quota (labeled, e.g. CC 12% · 周85%) instead of showing nothing when the 5-hour window is idle.

Full diff: v1.5.20...v1.6.4