Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Tags: sailesh/TokenTracker

Tags

v0.8.0

Toggle v0.8.0's commit message
feat(pi): add support for @mariozechner/pi-coding-agent sessions (mm7…

…894215#57); release v0.8.0

Adds a passive JSONL reader for the standard pi coding agent
(@mariozechner/pi-coding-agent) at ~/.pi/agent/sessions/**/*.jsonl,
distinct from the existing oh-my-pi reader at ~/.omp/agent/sessions/.

Both upstream tools document PI_CODING_AGENT_DIR as their agent dir
override, so the env var is routed by an install-signal disambiguator
(~/.pi present means pi owns it, otherwise omp keeps it for back-compat).
TOKENTRACKER_OMP_AGENT_DIR / TOKENTRACKER_PI_AGENT_DIR provide explicit
per-tool overrides for users who have both tools installed, and a
path-level collision check in sync skips the pi pass whenever its agent
dir resolves to the same path as omp's so sessions are never enqueued
twice under different source tags.

Wires the new provider into sync, init detection, status reporter, the
dashboard ProviderIcon (PI mono SVG), and copy.csv leaderboard column.

Closes mm7894215#56

Co-authored-by: Season <[email protected]>

v0.7.0

Toggle v0.7.0's commit message
feat(claude-mem): include observer sessions in totals and project usa…

…ge; release v0.7.0

- Reincude migration resets cursor offsets + claude message hashes for files under --claude-mem-observer-sessions/ so previously skipped assistant turns are re-parsed (and relabels any leftover source=claude-mem rows in queue.jsonl back to claude).
- Map observer cwd to a synthetic claude-mem/observer-sessions projectRef so entries surface in Project Usage instead of being filtered out by defaultPublicRepoResolver.
- Default local-api usage scope to "all" so account-level sources (Cursor) are visible without an explicit scope=all flag; personal scope remains opt-in.

v0.6.7

Toggle v0.6.7's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
docs: update dashboard heatmap screenshots (mm7894215#55)

v0.6.4

Toggle v0.6.4's commit message
fix(project-usage): attribute by git owner/repo and format with thous…

…ands separator

- defaultPublicRepoResolver now derives projectKey from git URL owner/repo and returns public_verified, so project.queue.jsonl is actually populated locally instead of always empty
- DataDetails project list coerces total_tokens to Number before toLocaleString (string toLocaleString is a no-op, so the panel showed raw integers without separators)
- vite dev mock prefers project.queue.jsonl when present so 5173 matches 7680 instead of synthesizing per-session-count ratios

Bump npm + DMG to 0.6.4 (CLI behavior change).

v0.6.2

Toggle v0.6.2's commit message
fix(locale): match only primary preferred language for "Default" mode (

…mm7894215#54)

Previously both `dashboard/src/lib/locale.ts` and
`TokenTrackerBar/Shared/NativeLocalization.swift` scanned the entire
preferredLanguages list and resolved to Chinese if any entry matched zh-*.
English-primary macOS users with zh-Hans-CN as a secondary language (very
common when Chinese input methods are configured) got mis-resolved to Chinese
even though their primary language was English.

Fix: read only `preferredLanguages[0]` (skipping empty/whitespace entries),
not any zh entry in the list. Same logic mirrored across both layers.

Adds locale.test.ts (6 cases) and an inline Swift end-to-end script (14 cases)
covering primary-zh, primary-en-with-zh-secondary, empty list, non-zh
languages, whitespace handling, and explicit non-system preferences.

Bumps to v0.6.2. Touches both dashboard and Swift, so package.json and
TokenTrackerBar/project.yml MARKETING_VERSION are bumped together.

v0.6.1

Toggle v0.6.1's commit message
fix(codex): refresh stale tokens, classify rate windows, graceful 4xx (

…mm7894215#52)

Fixes "Codex Limits Fetch failed" error reported by free-tier and inactive users.

Three issues addressed:

1. Stale access tokens (root cause for issue mm7894215#52). Codex CLI access_tokens
   expire after ~7-8 days. tokentracker had no refresh logic — users who
   logged in once and didn't run `codex` for >a week got wham 401, surfaced
   as a red "Fetch failed" error. Now mirroring steipete/CodexBar's
   CodexTokenRefresher: on getUsageLimits, if `last_refresh` is >8 days old,
   POST to https://auth.openai.com/oauth/token with the public Codex
   client_id, persist new tokens atomically back to ~/.codex/auth.json.

2. Rate-window mislabeling. Free-tier accounts get a single 7-day window in
   the `primary_window` slot (no 5h session window). The old position-based
   read mislabeled it as "5h". Now classifying by `limit_window_seconds`:
   18000 → session, 604800 → weekly, regardless of slot position.

3. Graceful 4xx fallback. wham returning 401/403/404 now produces an empty
   neutral state instead of a red error. Refresh-token-expired surfaces a
   specific "Run `codex` to re-authenticate" message via the new
   `auth_action_required: "reauth"` field.

Also adds `ChatGPT-Account-Id` header to wham requests (defensive — empirically
not required for team plans, but matches CodexBar's request shape).

19 new tests covering token staleness, refresh success/failure, atomic
persist, window classification, and end-to-end stale-token recovery.

Bumps to v0.6.1. CLI changes embedded in DMG via EmbeddedServer, so both
package.json and TokenTrackerBar/project.yml MARKETING_VERSION are bumped.

v0.6.0

Toggle v0.6.0's commit message
chore: release v0.6.0 (semver hygiene over v0.5.101)

v0.5.101 introduced the Craft Agents provider — semantically a MINOR bump
under semver (new feature, backward compatible), not a patch. This release
renames v0.5.101 to v0.6.0 with no code changes so subsequent releases can
return to a sane patch cadence.

No functional difference vs. v0.5.101.

v0.5.101

Toggle v0.5.101's commit message
chore: release v0.5.101 with Craft Agents provider

Bumps both package.json and TokenTrackerBar/project.yml MARKETING_VERSION
(both targets) so the embedded CLI runtime in the macOS app's EmbeddedServer/
matches the npm release. CLI / dashboard runtime changes always require both
artifacts because the menu bar app embeds the same src/ tree.

Triggers npm publish workflow on push; release DMG workflow needs to be
dispatched manually after this lands.

v0.5.99

Toggle v0.5.99's commit message
chore: release v0.5.99 to fix token usage source accounting

v0.5.98

Toggle v0.5.98's commit message
chore: release v0.5.98 with neutral heatmap inactive cells