tokentracker-cli 0.87.5 → 0.87.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.de.md +32 -32
- package/README.ja.md +31 -31
- package/README.ko.md +31 -31
- package/README.md +34 -34
- package/README.zh-CN.md +31 -31
- package/dashboard/dist/assets/{AchievementBadge-_BbqyV4s.js → AchievementBadge-4SSFyzNE.js} +1 -1
- package/dashboard/dist/assets/{AchievementsPage-DlXdQMuk.js → AchievementsPage-4ASCXja2.js} +2 -2
- package/dashboard/dist/assets/{AchievementsSection-BAL23Qum.js → AchievementsSection-CyaMYMol.js} +1 -1
- package/dashboard/dist/assets/{BadgeDetailModal-D5VYBn1e.js → BadgeDetailModal-CUWTCEru.js} +1 -1
- package/dashboard/dist/assets/{Card-BCAAH2Tv.js → Card-C79yXijL.js} +1 -1
- package/dashboard/dist/assets/{ClawdAnimated-BaeJ4goq.js → ClawdAnimated-Cw6J-x_d.js} +1 -1
- package/dashboard/dist/assets/{CommandPalette-DaBo0N_t.js → CommandPalette-C1RQ58De.js} +1 -1
- package/dashboard/dist/assets/{CommunityStatsModal-DtnbqllK.js → CommunityStatsModal-CycaCGsd.js} +1 -1
- package/dashboard/dist/assets/{ConfirmModal-BdIbatZd.js → ConfirmModal-hPuA2aup.js} +1 -1
- package/dashboard/dist/assets/{Controls-CtlnwG2h.js → Controls-DjunxsRS.js} +1 -1
- package/dashboard/dist/assets/{DashboardPage-B7YSxJXW.js → DashboardPage-C5H5_EZN.js} +1 -1
- package/dashboard/dist/assets/{DevicePage-Y1QufKqx.js → DevicePage-a1TT-0Bd.js} +1 -1
- package/dashboard/dist/assets/{DialogClose-BA6Fr6X7.js → DialogClose-CCRfnIbO.js} +1 -1
- package/dashboard/dist/assets/DialogDescription-C99d5K4r.js +1 -0
- package/dashboard/dist/assets/{DialogTitle-CQlYwz-I.js → DialogTitle-2Qa5pApU.js} +1 -1
- package/dashboard/dist/assets/{FadeIn-C7oxsfI-.js → FadeIn-C3mpVy83.js} +1 -1
- package/dashboard/dist/assets/HeaderGithubStar-Dn_F7ByX.js +1 -0
- package/dashboard/dist/assets/{HoverTooltip-Tf9XsZ6G.js → HoverTooltip-DaywO0Zz.js} +1 -1
- package/dashboard/dist/assets/{IpCheckPage-DEK7d2P9.js → IpCheckPage-oqGfnWb7.js} +1 -1
- package/dashboard/dist/assets/{LandingPage-Cev8vQ3V.js → LandingPage-CX7dYsEX.js} +2 -2
- package/dashboard/dist/assets/{LeaderboardAvatar-BP8r8s_o.js → LeaderboardAvatar-Bl-OMQ2x.js} +1 -1
- package/dashboard/dist/assets/{LeaderboardPage-CFinKL9O.js → LeaderboardPage-yeWcgiVo.js} +2 -2
- package/dashboard/dist/assets/{LeaderboardProfileModal-DKSPH2_U.js → LeaderboardProfileModal-CDmZtQ_m.js} +4 -4
- package/dashboard/dist/assets/{LeaderboardProfilePage-DNSIoOdU.js → LeaderboardProfilePage-BqJYxoN1.js} +2 -2
- package/dashboard/dist/assets/LimitsPage-D8NFgXbZ.js +4 -0
- package/dashboard/dist/assets/LocalOnlyNotice-DjdhDEiq.js +1 -0
- package/dashboard/dist/assets/{LoginCard-Dq5-__UO.js → LoginCard-jQXAmSQb.js} +1 -1
- package/dashboard/dist/assets/{LoginModal-BWuDhVTL.js → LoginModal-q4G6EN7b.js} +1 -1
- package/dashboard/dist/assets/{LoginPage-Dwb39YqH.js → LoginPage-BklWSXzs.js} +1 -1
- package/dashboard/dist/assets/{PetPage-BcvAOVH2.js → PetPage-DyWuMUTA.js} +1 -1
- package/dashboard/dist/assets/{PopoverPopup-CnywL4jN.js → PopoverPopup-Dbxed_FL.js} +1 -1
- package/dashboard/dist/assets/{ProviderIcon-DAn58wfZ.js → ProviderIcon-ChYuSSfj.js} +1 -1
- package/dashboard/dist/assets/{ResetPasswordPage-B-iZ9m8Z.js → ResetPasswordPage-DJww1dxo.js} +1 -1
- package/dashboard/dist/assets/{SegmentedControl-DUlvUP02.js → SegmentedControl-Dr73_QVm.js} +1 -1
- package/dashboard/dist/assets/{Select-BbVO0yyC.js → Select-BMCy_8oY.js} +1 -1
- package/dashboard/dist/assets/{SelectItemText-BCo4iRHj.js → SelectItemText-BRU7mlBI.js} +1 -1
- package/dashboard/dist/assets/{ServiceStatusPage-Bf65rMHS.js → ServiceStatusPage-DDao-oTH.js} +1 -1
- package/dashboard/dist/assets/{SessionsPage-D2QWuLy9.js → SessionsPage-BjngkrsY.js} +1 -1
- package/dashboard/dist/assets/{SettingsPage-BtlZ7v0t.js → SettingsPage-Dsftjg5j.js} +1 -1
- package/dashboard/dist/assets/{SkillsPage-D7CXkuxF.js → SkillsPage-igML0DOZ.js} +1 -1
- package/dashboard/dist/assets/{TokenGalaxy-B1VqfzOB.js → TokenGalaxy-BBETSYe7.js} +1 -1
- package/dashboard/dist/assets/{ToolbarRootContext-DlRA_RFX.js → ToolbarRootContext-CzEAxfqj.js} +1 -1
- package/dashboard/dist/assets/{TrendMonitor-D945Vzv_.js → TrendMonitor-JV6lkw-s.js} +1 -1
- package/dashboard/dist/assets/{WidgetsPage-CZLhBVQL.js → WidgetsPage-GpUmv0hI.js} +1 -1
- package/dashboard/dist/assets/{WrappedPage-Gf15Ax3y.js → WrappedPage-SP2r4wf1.js} +1 -1
- package/dashboard/dist/assets/{__vite-browser-external-_-wIz90P.js → __vite-browser-external-AQgdBxou.js} +14 -13
- package/dashboard/dist/assets/{agent-logos-Ccd-gCmY.js → agent-logos-DxwSc05k.js} +1 -1
- package/dashboard/dist/assets/{arrow-up-right-DksoZ7Fm.js → arrow-up-right-CDW5zn0Q.js} +1 -1
- package/dashboard/dist/assets/{check-CFyujViz.js → check-CQfDkdqM.js} +1 -1
- package/dashboard/dist/assets/{chevron-right-D2Y9ycoK.js → chevron-right-DDFSY4w-.js} +1 -1
- package/dashboard/dist/assets/{copy-CvzVu4Jv.js → copy-hxnyMdBa.js} +1 -1
- package/dashboard/dist/assets/{download-M9hdGe0X.js → download-DOUBKxcf.js} +1 -1
- package/dashboard/dist/assets/{external-link-BrvgYr3H.js → external-link-CVipCZOa.js} +1 -1
- package/dashboard/dist/assets/{flame-CanCCWfM.js → flame-C-QU6mPf.js} +1 -1
- package/dashboard/dist/assets/{format-tokens-D-x5NM5s.js → format-tokens-DRX15id1.js} +1 -1
- package/dashboard/dist/assets/{icons-iDxUXUbD.js → icons-ajxtn_0O.js} +1 -1
- package/dashboard/dist/assets/{index-CDK-qlvv.js → index-Bq5VZMkS.js} +1 -1
- package/dashboard/dist/assets/{index-BPe3pmGu.js → index-DnVXRsqb.js} +1 -1
- package/dashboard/dist/assets/{index-DhgQVkQR.js → index-OJC-yROZ.js} +1 -1
- package/dashboard/dist/assets/{info-CS19GYkG.js → info-eITfPd17.js} +1 -1
- package/dashboard/dist/assets/{limits-providers-Cep8gK1J.js → limits-providers-TMq74bRy.js} +1 -1
- package/dashboard/dist/assets/{link-2-_GqbzcZy.js → link-2-D778MOmL.js} +1 -1
- package/dashboard/dist/assets/{loader-circle-DQlJKeCp.js → loader-circle-uN5rBNIF.js} +1 -1
- package/dashboard/dist/assets/{maximize-2-AaA61WoH.js → maximize-2-C4FBbMpN.js} +1 -1
- package/dashboard/dist/assets/{modifiers.esm-DgAD_X3C.js → modifiers.esm-DLeiQDTT.js} +1 -1
- package/dashboard/dist/assets/{monitor-smartphone-C-KIKlP-.js → monitor-smartphone-C-obu2-u.js} +1 -1
- package/dashboard/dist/assets/{provider-display-BWK3HqpN.js → provider-display-Bjl8tmYu.js} +1 -1
- package/dashboard/dist/assets/{react-BGB0fHad.js → react-Diah7uAT.js} +1 -1
- package/dashboard/dist/assets/{search-BhQx4B4T.js → search-B0bPOquo.js} +1 -1
- package/dashboard/dist/assets/{skills-api-BtsImOWQ.js → skills-api-6otf2Sdl.js} +1 -1
- package/dashboard/dist/assets/{sortable.esm-ew4S8Y1L.js → sortable.esm-DcrJaOfF.js} +1 -1
- package/dashboard/dist/assets/{store-OBiS6gfr.js → store-DOs4omJM.js} +1 -1
- package/dashboard/dist/assets/{terminal-GvWRPCY9.js → terminal-CpMZjaGk.js} +1 -1
- package/dashboard/dist/assets/{trash-2-COv_kp05.js → trash-2-BQYnn3zf.js} +1 -1
- package/dashboard/dist/assets/{use-community-stats-COxOg9PE.js → use-community-stats-CdL4zXXV.js} +1 -1
- package/dashboard/dist/assets/{use-limits-display-prefs-wf8pf1cF.js → use-limits-display-prefs-DUh4f8f4.js} +1 -1
- package/dashboard/dist/assets/{use-ordered-list-Dw-kLFB1.js → use-ordered-list-DVs0Ik3O.js} +1 -1
- package/dashboard/dist/assets/use-reduced-motion--_Yc7AWk.js +1 -0
- package/dashboard/dist/assets/{use-session-efficiency-pref-D9X2CzAz.js → use-session-efficiency-pref-CGggPI6Y.js} +1 -1
- package/dashboard/dist/assets/{use-transform-BgfBM2dC.js → use-transform-DMj91FEL.js} +1 -1
- package/dashboard/dist/assets/{use-usage-limits-CrHu9ZJi.js → use-usage-limits-xJOXzuZG.js} +1 -1
- package/dashboard/dist/assets/{useCurrency-CmI0tWeH.js → useCurrency-BQRBx-KO.js} +1 -1
- package/dashboard/dist/assets/{useScrollLock-BtUfInbu.js → useScrollLock-DuTPOBl8.js} +1 -1
- package/dashboard/dist/assets/{useTokenFormat-DAHyFBMr.js → useTokenFormat-Dd95ph6d.js} +1 -1
- package/dashboard/dist/assets/{zap-C9NzWrn0.js → zap-DJMdRI6y.js} +1 -1
- package/dashboard/dist/index.html +7 -7
- package/dashboard/dist/ip-check.html +1 -1
- package/dashboard/dist/leaderboard.html +1 -1
- package/dashboard/dist/llms.txt +4 -4
- package/dashboard/dist/share.html +2 -2
- package/package.json +3 -3
- package/src/commands/sync.js +1 -0
- package/src/lib/grok-hook.js +11 -2
- package/src/lib/opencode-go-limits.js +59 -30
- package/src/lib/pricing/seed-snapshot.json +1 -1
- package/src/lib/rollout.js +283 -68
- package/src/lib/star-cta.js +1 -1
- package/src/lib/usage-limits.js +3 -3
- package/dashboard/dist/assets/DialogDescription-JjVfYyrp.js +0 -1
- package/dashboard/dist/assets/HeaderGithubStar-5eKhC60J.js +0 -1
- package/dashboard/dist/assets/LimitsPage-DDljQnW7.js +0 -4
- package/dashboard/dist/assets/LocalOnlyNotice-BuNHRmPw.js +0 -1
- package/dashboard/dist/assets/use-reduced-motion-B3wPPJY8.js +0 -1
package/README.md
CHANGED
|
@@ -10,14 +10,14 @@ An accurate, local-first token usage and cost dashboard for **29 AI coding tools
|
|
|
10
10
|
|
|
11
11
|
[](https://www.npmjs.com/package/tokentracker-cli)
|
|
12
12
|
[](https://www.npmjs.com/package/tokentracker-cli)
|
|
13
|
-
[](https://github.com/xiufengsun/homebrew-tokentracker)
|
|
14
14
|
[](https://opensource.org/licenses/MIT)
|
|
15
15
|
[](https://www.npmjs.com/package/tokentracker-cli)
|
|
16
|
-
[](https://github.com/
|
|
17
|
-
[](https://github.com/
|
|
18
|
-
[](https://github.com/xiufengsun/TokenTracker/releases/latest)
|
|
17
|
+
[](https://github.com/xiufengsun/TokenTracker/releases/latest)
|
|
18
|
+
[](https://github.com/xiufengsun/TokenTracker/stargazers)
|
|
19
19
|
[](https://github.com/ruanyf/weekly/blob/master/docs/issue-393.md)
|
|
20
|
-
[](https://github.com/
|
|
20
|
+
[](https://github.com/xiufengsun/TokenTracker)
|
|
21
21
|
|
|
22
22
|
<br/>
|
|
23
23
|
|
|
@@ -25,7 +25,7 @@ An accurate, local-first token usage and cost dashboard for **29 AI coding tools
|
|
|
25
25
|
|
|
26
26
|
<br/><br/>
|
|
27
27
|
|
|
28
|
-
<video src="https://github.com/user-attachments/assets/3275979d-bbed-4639-83e2-8b7d83bed6af" controls muted playsinline poster="https://raw.githubusercontent.com/
|
|
28
|
+
<video src="https://github.com/user-attachments/assets/3275979d-bbed-4639-83e2-8b7d83bed6af" controls muted playsinline poster="https://raw.githubusercontent.com/xiufengsun/tokentracker/main/docs/screenshots/dashboard-light.png" width="820"></video>
|
|
29
29
|
|
|
30
30
|
<br/><br/>
|
|
31
31
|
|
|
@@ -56,13 +56,13 @@ An accurate, local-first token usage and cost dashboard for **29 AI coding tools
|
|
|
56
56
|
|
|
57
57
|
<br/><br/>
|
|
58
58
|
|
|
59
|
-
<video src="https://github.com/user-attachments/assets/5e709422-5af8-4e4c-8109-f5bb711eb3f8" controls muted playsinline poster="https://raw.githubusercontent.com/
|
|
60
|
-
<img src="https://raw.githubusercontent.com/
|
|
59
|
+
<video src="https://github.com/user-attachments/assets/5e709422-5af8-4e4c-8109-f5bb711eb3f8" controls muted playsinline poster="https://raw.githubusercontent.com/xiufengsun/tokentracker/main/docs/screenshots/dashboard-dark.png" width="820">
|
|
60
|
+
<img src="https://raw.githubusercontent.com/xiufengsun/tokentracker/main/docs/screenshots/dashboard-dark.png" alt="Token Tracker Dashboard" width="820" />
|
|
61
61
|
</video>
|
|
62
62
|
|
|
63
63
|
<br/><br/>
|
|
64
64
|
|
|
65
|
-
⭐ **If TokenTracker saves you time, please [star it on GitHub](https://github.com/
|
|
65
|
+
⭐ **If TokenTracker saves you time, please [star it on GitHub](https://github.com/xiufengsun/TokenTracker) — it helps other developers find it.**
|
|
66
66
|
|
|
67
67
|
<br/>
|
|
68
68
|
|
|
@@ -89,8 +89,8 @@ That's it. First run installs hooks, syncs your data, and opens the dashboard at
|
|
|
89
89
|
- 🧩 *Optional:* a Skills tab that browses 250+ public skills and syncs them across Claude · Codex · Grok · Antigravity · Gemini · OpenCode · Hermes
|
|
90
90
|
|
|
91
91
|
> **Want a native desktop app?**
|
|
92
|
-
> - **macOS** — [Download `TokenTrackerBar.dmg`](https://github.com/
|
|
93
|
-
> - **Windows** — [Download `TokenTracker-Setup.exe`](https://github.com/
|
|
92
|
+
> - **macOS** — [Download `TokenTrackerBar.dmg`](https://github.com/xiufengsun/TokenTracker/releases/latest/download/TokenTrackerBar.dmg) → drag to Applications. Menu bar status icon, desktop widgets, and the dashboard in a WKWebView.
|
|
93
|
+
> - **Windows** — [Download `TokenTracker-Setup.exe`](https://github.com/xiufengsun/TokenTracker/releases/latest/download/TokenTracker-Setup.exe) → run the per-user installer (no admin needed). System-tray app with the dashboard in WebView2. Portable zip also on the [releases page](https://github.com/xiufengsun/TokenTracker/releases/latest).
|
|
94
94
|
|
|
95
95
|
Install globally for shorter commands:
|
|
96
96
|
|
|
@@ -111,13 +111,13 @@ Prefer `brew`? Install directly — no extra tap step needed:
|
|
|
111
111
|
|
|
112
112
|
```bash
|
|
113
113
|
# macOS menu bar app (DMG)
|
|
114
|
-
brew install --cask
|
|
114
|
+
brew install --cask xiufengsun/tokentracker/tokentracker
|
|
115
115
|
|
|
116
116
|
# CLI only
|
|
117
|
-
brew install
|
|
117
|
+
brew install xiufengsun/tokentracker/tokentracker
|
|
118
118
|
```
|
|
119
119
|
|
|
120
|
-
Upgrade with `brew upgrade --cask
|
|
120
|
+
Upgrade with `brew upgrade --cask xiufengsun/tokentracker/tokentracker`. The tap auto-bumps within an hour of every new release.
|
|
121
121
|
|
|
122
122
|
---
|
|
123
123
|
|
|
@@ -150,14 +150,14 @@ Upgrade with `brew upgrade --cask mm7894215/tokentracker/tokentracker`. The tap
|
|
|
150
150
|
|
|
151
151
|
**Dashboard** — usage trends, model breakdown, cost analysis
|
|
152
152
|
|
|
153
|
-
<img src="https://raw.githubusercontent.com/
|
|
153
|
+
<img src="https://raw.githubusercontent.com/xiufengsun/tokentracker/main/docs/screenshots/dashboard-light.png" alt="Dashboard" />
|
|
154
154
|
|
|
155
155
|
</td>
|
|
156
156
|
<td width="50%">
|
|
157
157
|
|
|
158
158
|
**Desktop Widgets** — pin usage to your desktop
|
|
159
159
|
|
|
160
|
-
<img src="https://raw.githubusercontent.com/
|
|
160
|
+
<img src="https://raw.githubusercontent.com/xiufengsun/tokentracker/main/docs/screenshots/widgets-overview.png" alt="Desktop Widgets" />
|
|
161
161
|
|
|
162
162
|
</td>
|
|
163
163
|
</tr>
|
|
@@ -166,14 +166,14 @@ Upgrade with `brew upgrade --cask mm7894215/tokentracker/tokentracker`. The tap
|
|
|
166
166
|
|
|
167
167
|
**Menu Bar App** — animated Clawd companion + native panels
|
|
168
168
|
|
|
169
|
-
<img src="https://raw.githubusercontent.com/
|
|
169
|
+
<img src="https://raw.githubusercontent.com/xiufengsun/tokentracker/main/docs/screenshots/menubar.gif" alt="Menu Bar App" />
|
|
170
170
|
|
|
171
171
|
</td>
|
|
172
172
|
<td width="50%">
|
|
173
173
|
|
|
174
174
|
**Global Leaderboard** — compare with developers worldwide
|
|
175
175
|
|
|
176
|
-
<img src="https://raw.githubusercontent.com/
|
|
176
|
+
<img src="https://raw.githubusercontent.com/xiufengsun/tokentracker/main/docs/screenshots/leaderboard.png" alt="Leaderboard" />
|
|
177
177
|
|
|
178
178
|
</td>
|
|
179
179
|
</tr>
|
|
@@ -182,7 +182,7 @@ Upgrade with `brew upgrade --cask mm7894215/tokentracker/tokentracker`. The tap
|
|
|
182
182
|
|
|
183
183
|
**Skills Manager** — browse 250+ public skills from GitHub & `skills.sh`, install once, sync to Claude / Codex / Grok / Antigravity / Gemini / OpenCode / Hermes. Per-target toggles, one-click Undo, no manual file copying.
|
|
184
184
|
|
|
185
|
-
<img src="https://raw.githubusercontent.com/
|
|
185
|
+
<img src="https://raw.githubusercontent.com/xiufengsun/tokentracker/main/docs/screenshots/skills.png" alt="Skills Manager" />
|
|
186
186
|
|
|
187
187
|
</td>
|
|
188
188
|
</tr>
|
|
@@ -191,7 +191,7 @@ Upgrade with `brew upgrade --cask mm7894215/tokentracker/tokentracker`. The tap
|
|
|
191
191
|
|
|
192
192
|
**Desktop Pet** — a pixel companion that floats on your desktop and reacts to your real token burn: it codes when you code, celebrates streaks, and sleeps when you rest. Import community pets from [codex-pets.net](https://codex-pets.net) with a link or a `.codex-pet.zip` — V2 pets even turn their head to follow your cursor in 16 directions. macOS, Windows, and web.
|
|
193
193
|
|
|
194
|
-
<img src="https://raw.githubusercontent.com/
|
|
194
|
+
<img src="https://raw.githubusercontent.com/xiufengsun/tokentracker/main/docs/screenshots/pet.png" alt="Desktop Pet" />
|
|
195
195
|
|
|
196
196
|
</td>
|
|
197
197
|
</tr>
|
|
@@ -200,7 +200,7 @@ Upgrade with `brew upgrade --cask mm7894215/tokentracker/tokentracker`. The tap
|
|
|
200
200
|
|
|
201
201
|
**Achievements** — 15 tracks turn usage milestones, streaks, tools, and models into collectible badges — with progress visible before each unlock.
|
|
202
202
|
|
|
203
|
-
<img src="https://raw.githubusercontent.com/
|
|
203
|
+
<img src="https://raw.githubusercontent.com/xiufengsun/tokentracker/main/docs/screenshots/achievements.png" alt="TokenTracker Achievements" />
|
|
204
204
|
|
|
205
205
|
</td>
|
|
206
206
|
</tr>
|
|
@@ -253,7 +253,7 @@ Upgrade with `brew upgrade --cask mm7894215/tokentracker/tokentracker`. The tap
|
|
|
253
253
|
>
|
|
254
254
|
> Deeper dives: [OpenClaw integration & troubleshooting](docs/openclaw-integration.md).
|
|
255
255
|
|
|
256
|
-
Missing your tool? [Open an issue](https://github.com/
|
|
256
|
+
Missing your tool? [Open an issue](https://github.com/xiufengsun/TokenTracker/issues/new) — adding new providers is usually one parser file away.
|
|
257
257
|
|
|
258
258
|
---
|
|
259
259
|
|
|
@@ -352,7 +352,7 @@ Supported providers for WSL auto-discovery and aggregation:
|
|
|
352
352
|
## 🛠️ Development
|
|
353
353
|
|
|
354
354
|
```bash
|
|
355
|
-
git clone https://github.com/
|
|
355
|
+
git clone https://github.com/xiufengsun/TokenTracker.git
|
|
356
356
|
cd TokenTracker
|
|
357
357
|
npm install
|
|
358
358
|
|
|
@@ -437,7 +437,7 @@ Then run the doctor for a deeper health check:
|
|
|
437
437
|
tokentracker doctor
|
|
438
438
|
```
|
|
439
439
|
|
|
440
|
-
If a provider shows as not configured even though you use it, try `tokentracker activate-if-needed` to re-run hook detection. If still missing, [open an issue](https://github.com/
|
|
440
|
+
If a provider shows as not configured even though you use it, try `tokentracker activate-if-needed` to re-run hook detection. If still missing, [open an issue](https://github.com/xiufengsun/TokenTracker/issues/new) with the `doctor` output attached.
|
|
441
441
|
|
|
442
442
|
</details>
|
|
443
443
|
|
|
@@ -515,9 +515,9 @@ To get `YOUR_USER_ID`:
|
|
|
515
515
|
Then drop one of these in:
|
|
516
516
|
|
|
517
517
|
```markdown
|
|
518
|
-
[](https://github.com/
|
|
519
|
-
[](https://github.com/
|
|
520
|
-
[](https://github.com/
|
|
518
|
+
[](https://github.com/xiufengsun/TokenTracker)
|
|
519
|
+
[](https://github.com/xiufengsun/TokenTracker)
|
|
520
|
+
[](https://github.com/xiufengsun/TokenTracker)
|
|
521
521
|
```
|
|
522
522
|
|
|
523
523
|
> The link target defaults to the TokenTracker repo so every click helps other developers discover the tool. Swap it for your leaderboard profile, personal site, or `https://www.tokentracker.cc` if you'd rather route clicks elsewhere.
|
|
@@ -538,11 +538,11 @@ Renders shields.io-compatible badges with your current totals (60s cache):
|
|
|
538
538
|
|
|
539
539
|
## ⭐ Star History
|
|
540
540
|
|
|
541
|
-
<a href="https://www.star-history.com/?type=date&
|
|
541
|
+
<a href="https://www.star-history.com/?repos=xiufengsun%2FTokenTracker&type=date&legend=top-left">
|
|
542
542
|
<picture>
|
|
543
|
-
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/chart?repos=
|
|
544
|
-
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/chart?repos=
|
|
545
|
-
<img alt="Star History Chart" src="https://api.star-history.com/chart?repos=
|
|
543
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/chart?repos=xiufengsun/TokenTracker&type=date&theme=dark&legend=top-left&sealed_token=Vr7qbPNqOTtzQEdtkxS2yArAReX2QkBZKNJgs3n32Q5oJa1iXddLlrT201teNSnt7QnsXtDcHy_T387xvXJ_HXHrPtvH2QQ1xqQZ67N_HV45ulWrt3j6hziDW5eshRCmu8CAT_W31PY0-WVZpFv7NQD-acv1stVK8ndribTokIp9ukSYAedx3icuUrOu" />
|
|
544
|
+
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/chart?repos=xiufengsun/TokenTracker&type=date&legend=top-left&sealed_token=Vr7qbPNqOTtzQEdtkxS2yArAReX2QkBZKNJgs3n32Q5oJa1iXddLlrT201teNSnt7QnsXtDcHy_T387xvXJ_HXHrPtvH2QQ1xqQZ67N_HV45ulWrt3j6hziDW5eshRCmu8CAT_W31PY0-WVZpFv7NQD-acv1stVK8ndribTokIp9ukSYAedx3icuUrOu" />
|
|
545
|
+
<img alt="Star History Chart" src="https://api.star-history.com/chart?repos=xiufengsun/TokenTracker&type=date&legend=top-left&sealed_token=Vr7qbPNqOTtzQEdtkxS2yArAReX2QkBZKNJgs3n32Q5oJa1iXddLlrT201teNSnt7QnsXtDcHy_T387xvXJ_HXHrPtvH2QQ1xqQZ67N_HV45ulWrt3j6hziDW5eshRCmu8CAT_W31PY0-WVZpFv7NQD-acv1stVK8ndribTokIp9ukSYAedx3icuUrOu" />
|
|
546
546
|
</picture>
|
|
547
547
|
</a>
|
|
548
548
|
|
|
@@ -550,10 +550,10 @@ Renders shields.io-compatible badges with your current totals (60s cache):
|
|
|
550
550
|
|
|
551
551
|
## 🤝 Contributing & Support
|
|
552
552
|
|
|
553
|
-
- **Bugs / feature requests**: [open an issue](https://github.com/
|
|
553
|
+
- **Bugs / feature requests**: [open an issue](https://github.com/xiufengsun/TokenTracker/issues/new)
|
|
554
554
|
- **Security**: see [SECURITY.md](SECURITY.md) — please don't open public issues for security reports
|
|
555
555
|
- **Pull requests**: see [CONTRIBUTING.md](CONTRIBUTING.md) for setup, tests, and how to add a new AI tool integration
|
|
556
|
-
- **Questions / showcase**: [GitHub Discussions](https://github.com/
|
|
556
|
+
- **Questions / showcase**: [GitHub Discussions](https://github.com/xiufengsun/TokenTracker/discussions)
|
|
557
557
|
|
|
558
558
|
## 🙏 Credits
|
|
559
559
|
|
|
@@ -573,6 +573,6 @@ The Clawd character design belongs to Anthropic. This is a community project wit
|
|
|
573
573
|
|
|
574
574
|
**Token Tracker** — Quantify your AI output.
|
|
575
575
|
|
|
576
|
-
<a href="https://www.tokentracker.cc">tokentracker.cc</a> · <a href="https://www.npmjs.com/package/tokentracker-cli">npm</a> · <a href="https://github.com/
|
|
576
|
+
<a href="https://www.tokentracker.cc">tokentracker.cc</a> · <a href="https://www.npmjs.com/package/tokentracker-cli">npm</a> · <a href="https://github.com/xiufengsun/TokenTracker">GitHub</a>
|
|
577
577
|
|
|
578
578
|
</div>
|
package/README.zh-CN.md
CHANGED
|
@@ -10,24 +10,24 @@
|
|
|
10
10
|
|
|
11
11
|
[](https://www.npmjs.com/package/tokentracker-cli)
|
|
12
12
|
[](https://www.npmjs.com/package/tokentracker-cli)
|
|
13
|
-
[](https://github.com/xiufengsun/homebrew-tokentracker)
|
|
14
14
|
[](https://opensource.org/licenses/MIT)
|
|
15
15
|
[](https://www.apple.com/macos/)
|
|
16
|
-
[](https://github.com/xiufengsun/TokenTracker/stargazers)
|
|
17
17
|
[](https://github.com/ruanyf/weekly/blob/master/docs/issue-393.md)
|
|
18
|
-
[](https://github.com/
|
|
18
|
+
[](https://github.com/xiufengsun/TokenTracker)
|
|
19
19
|
|
|
20
20
|
<br/>
|
|
21
21
|
|
|
22
|
-
<video src="https://github.com/user-attachments/assets/5e709422-5af8-4e4c-8109-f5bb711eb3f8" controls muted playsinline poster="https://raw.githubusercontent.com/
|
|
23
|
-
<img src="https://raw.githubusercontent.com/
|
|
22
|
+
<video src="https://github.com/user-attachments/assets/5e709422-5af8-4e4c-8109-f5bb711eb3f8" controls muted playsinline poster="https://raw.githubusercontent.com/xiufengsun/tokentracker/main/docs/screenshots/dashboard-dark.png" width="820">
|
|
23
|
+
<img src="https://raw.githubusercontent.com/xiufengsun/tokentracker/main/docs/screenshots/dashboard-dark.png" alt="Token Tracker Dashboard" width="820" />
|
|
24
24
|
</video>
|
|
25
25
|
|
|
26
|
-
<video src="https://github.com/user-attachments/assets/3275979d-bbed-4639-83e2-8b7d83bed6af" controls muted playsinline poster="https://raw.githubusercontent.com/
|
|
26
|
+
<video src="https://github.com/user-attachments/assets/3275979d-bbed-4639-83e2-8b7d83bed6af" controls muted playsinline poster="https://raw.githubusercontent.com/xiufengsun/tokentracker/main/docs/screenshots/dashboard-light.png" width="820"></video>
|
|
27
27
|
|
|
28
28
|
<br/><br/>
|
|
29
29
|
|
|
30
|
-
⭐ **如果 TokenTracker 帮你省了时间,欢迎 [在 GitHub 上 Star](https://github.com/
|
|
30
|
+
⭐ **如果 TokenTracker 帮你省了时间,欢迎 [在 GitHub 上 Star](https://github.com/xiufengsun/TokenTracker) —— 可以让更多开发者发现它。**
|
|
31
31
|
|
|
32
32
|
<br/>
|
|
33
33
|
|
|
@@ -54,8 +54,8 @@ npx tokentracker-cli
|
|
|
54
54
|
- 🧩 *可选:* Skills 面板——浏览 250+ 公开 skill,并在 Claude · Codex · Grok · Antigravity · Gemini · OpenCode · Hermes 之间同步
|
|
55
55
|
|
|
56
56
|
> **想要原生桌面 App?**
|
|
57
|
-
> - **macOS** —— [下载 `TokenTrackerBar.dmg`](https://github.com/
|
|
58
|
-
> - **Windows** —— [下载 `TokenTracker-Setup.exe`](https://github.com/
|
|
57
|
+
> - **macOS** —— [下载 `TokenTrackerBar.dmg`](https://github.com/xiufengsun/TokenTracker/releases/latest/download/TokenTrackerBar.dmg) → 拖入「应用程序」即可。包含桌面小组件、菜单栏状态图标,以及同一套 Dashboard(跑在 WKWebView 里)。
|
|
58
|
+
> - **Windows** —— [下载 `TokenTracker-Setup.exe`](https://github.com/xiufengsun/TokenTracker/releases/latest/download/TokenTracker-Setup.exe) → 运行免管理员的单用户安装包即可。系统托盘 App,Dashboard 跑在 WebView2 里。便携版 zip 见[发布页](https://github.com/xiufengsun/TokenTracker/releases/latest)。
|
|
59
59
|
|
|
60
60
|
全局安装可以少敲字:
|
|
61
61
|
|
|
@@ -76,13 +76,13 @@ tokentracker doctor # 健康检查
|
|
|
76
76
|
|
|
77
77
|
```bash
|
|
78
78
|
# macOS 菜单栏 App(DMG)
|
|
79
|
-
brew install --cask
|
|
79
|
+
brew install --cask xiufengsun/tokentracker/tokentracker
|
|
80
80
|
|
|
81
81
|
# 只装 CLI
|
|
82
|
-
brew install
|
|
82
|
+
brew install xiufengsun/tokentracker/tokentracker
|
|
83
83
|
```
|
|
84
84
|
|
|
85
|
-
升级:`brew upgrade --cask
|
|
85
|
+
升级:`brew upgrade --cask xiufengsun/tokentracker/tokentracker`。每次新版本发布后,tap 会在一小时内自动跟上。
|
|
86
86
|
|
|
87
87
|
---
|
|
88
88
|
|
|
@@ -113,14 +113,14 @@ brew install mm7894215/tokentracker/tokentracker
|
|
|
113
113
|
|
|
114
114
|
**Dashboard** —— 用量趋势、模型分布、成本分析
|
|
115
115
|
|
|
116
|
-
<img src="https://raw.githubusercontent.com/
|
|
116
|
+
<img src="https://raw.githubusercontent.com/xiufengsun/tokentracker/main/docs/screenshots/dashboard-light.png" alt="Dashboard" />
|
|
117
117
|
|
|
118
118
|
</td>
|
|
119
119
|
<td width="50%">
|
|
120
120
|
|
|
121
121
|
**桌面小组件** —— 把用量钉在桌面
|
|
122
122
|
|
|
123
|
-
<img src="https://raw.githubusercontent.com/
|
|
123
|
+
<img src="https://raw.githubusercontent.com/xiufengsun/tokentracker/main/docs/screenshots/widgets-overview.png" alt="Desktop Widgets" />
|
|
124
124
|
|
|
125
125
|
</td>
|
|
126
126
|
</tr>
|
|
@@ -129,14 +129,14 @@ brew install mm7894215/tokentracker/tokentracker
|
|
|
129
129
|
|
|
130
130
|
**菜单栏 App** —— 带动画的 Clawd 小伙伴 + 原生面板
|
|
131
131
|
|
|
132
|
-
<img src="https://raw.githubusercontent.com/
|
|
132
|
+
<img src="https://raw.githubusercontent.com/xiufengsun/tokentracker/main/docs/screenshots/menubar.gif" alt="Menu Bar App" />
|
|
133
133
|
|
|
134
134
|
</td>
|
|
135
135
|
<td width="50%">
|
|
136
136
|
|
|
137
137
|
**全球排行榜** —— 和世界各地开发者比一比
|
|
138
138
|
|
|
139
|
-
<img src="https://raw.githubusercontent.com/
|
|
139
|
+
<img src="https://raw.githubusercontent.com/xiufengsun/tokentracker/main/docs/screenshots/leaderboard.png" alt="Leaderboard" />
|
|
140
140
|
|
|
141
141
|
</td>
|
|
142
142
|
</tr>
|
|
@@ -145,7 +145,7 @@ brew install mm7894215/tokentracker/tokentracker
|
|
|
145
145
|
|
|
146
146
|
**Skills 管理器** —— 浏览 250+ 公开 skill(GitHub 仓库 & `skills.sh`),一次安装,同步到 Claude / Codex / Grok / Antigravity / Gemini / OpenCode / Hermes。每个 Agent 单独开关,一键撤销,再也不用手动复制文件夹。
|
|
147
147
|
|
|
148
|
-
<img src="https://raw.githubusercontent.com/
|
|
148
|
+
<img src="https://raw.githubusercontent.com/xiufengsun/tokentracker/main/docs/screenshots/skills.png" alt="Skills Manager" />
|
|
149
149
|
|
|
150
150
|
</td>
|
|
151
151
|
</tr>
|
|
@@ -154,7 +154,7 @@ brew install mm7894215/tokentracker/tokentracker
|
|
|
154
154
|
|
|
155
155
|
**桌面宠物** —— 悬浮在桌面上的像素小伙伴,实时响应你的 token 消耗:你写代码它也写,连击时庆祝,休息时打盹。粘贴 [codex-pets.net](https://codex-pets.net) 链接或 `.codex-pet.zip` 即可导入社区宠物,V2 宠物还能 16 方向转头追随你的鼠标。macOS / Windows / Web 三端支持。
|
|
156
156
|
|
|
157
|
-
<img src="https://raw.githubusercontent.com/
|
|
157
|
+
<img src="https://raw.githubusercontent.com/xiufengsun/tokentracker/main/docs/screenshots/pet.png" alt="Desktop Pet" />
|
|
158
158
|
|
|
159
159
|
</td>
|
|
160
160
|
</tr>
|
|
@@ -207,7 +207,7 @@ brew install mm7894215/tokentracker/tokentracker
|
|
|
207
207
|
>
|
|
208
208
|
> 更深入的资料:[OpenClaw 集成与排障](docs/openclaw-integration.md)。
|
|
209
209
|
|
|
210
|
-
工具没在列表里?[提个 Issue](https://github.com/
|
|
210
|
+
工具没在列表里?[提个 Issue](https://github.com/xiufengsun/TokenTracker/issues/new) —— 加一个新 provider 通常只是加一个 parser 文件的事。
|
|
211
211
|
|
|
212
212
|
---
|
|
213
213
|
|
|
@@ -279,7 +279,7 @@ flowchart LR
|
|
|
279
279
|
## 🛠️ 本地开发
|
|
280
280
|
|
|
281
281
|
```bash
|
|
282
|
-
git clone https://github.com/
|
|
282
|
+
git clone https://github.com/xiufengsun/TokenTracker.git
|
|
283
283
|
cd TokenTracker
|
|
284
284
|
npm install
|
|
285
285
|
|
|
@@ -364,7 +364,7 @@ tokentracker status
|
|
|
364
364
|
tokentracker doctor
|
|
365
365
|
```
|
|
366
366
|
|
|
367
|
-
如果你明明在用某个工具却显示未配置,跑一下 `tokentracker activate-if-needed` 重新探测。还不行的话 [提个 Issue](https://github.com/
|
|
367
|
+
如果你明明在用某个工具却显示未配置,跑一下 `tokentracker activate-if-needed` 重新探测。还不行的话 [提个 Issue](https://github.com/xiufengsun/TokenTracker/issues/new),把 `doctor` 的输出贴上。
|
|
368
368
|
|
|
369
369
|
</details>
|
|
370
370
|
|
|
@@ -442,9 +442,9 @@ xattr -cr /Applications/TokenTracker.app
|
|
|
442
442
|
然后贴一段:
|
|
443
443
|
|
|
444
444
|
```markdown
|
|
445
|
-
[](https://github.com/
|
|
446
|
-
[](https://github.com/
|
|
447
|
-
[](https://github.com/
|
|
445
|
+
[](https://github.com/xiufengsun/TokenTracker)
|
|
446
|
+
[](https://github.com/xiufengsun/TokenTracker)
|
|
447
|
+
[](https://github.com/xiufengsun/TokenTracker)
|
|
448
448
|
```
|
|
449
449
|
|
|
450
450
|
> 链接默认指向 TokenTracker 仓库,每次点击都能帮其他开发者发现 TokenTracker。如果你想让点击跳到你自己的 leaderboard profile、个人主页或 `https://www.tokentracker.cc`,改 URL 即可。
|
|
@@ -465,11 +465,11 @@ xattr -cr /Applications/TokenTracker.app
|
|
|
465
465
|
|
|
466
466
|
## ⭐ Star 历史
|
|
467
467
|
|
|
468
|
-
<a href="https://www.star-history.com/?type=date&
|
|
468
|
+
<a href="https://www.star-history.com/?repos=xiufengsun%2FTokenTracker&type=date&legend=top-left">
|
|
469
469
|
<picture>
|
|
470
|
-
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/chart?repos=
|
|
471
|
-
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/chart?repos=
|
|
472
|
-
<img alt="Star History Chart" src="https://api.star-history.com/chart?repos=
|
|
470
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/chart?repos=xiufengsun/TokenTracker&type=date&theme=dark&legend=top-left&sealed_token=Vr7qbPNqOTtzQEdtkxS2yArAReX2QkBZKNJgs3n32Q5oJa1iXddLlrT201teNSnt7QnsXtDcHy_T387xvXJ_HXHrPtvH2QQ1xqQZ67N_HV45ulWrt3j6hziDW5eshRCmu8CAT_W31PY0-WVZpFv7NQD-acv1stVK8ndribTokIp9ukSYAedx3icuUrOu" />
|
|
471
|
+
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/chart?repos=xiufengsun/TokenTracker&type=date&legend=top-left&sealed_token=Vr7qbPNqOTtzQEdtkxS2yArAReX2QkBZKNJgs3n32Q5oJa1iXddLlrT201teNSnt7QnsXtDcHy_T387xvXJ_HXHrPtvH2QQ1xqQZ67N_HV45ulWrt3j6hziDW5eshRCmu8CAT_W31PY0-WVZpFv7NQD-acv1stVK8ndribTokIp9ukSYAedx3icuUrOu" />
|
|
472
|
+
<img alt="Star History Chart" src="https://api.star-history.com/chart?repos=xiufengsun/TokenTracker&type=date&legend=top-left&sealed_token=Vr7qbPNqOTtzQEdtkxS2yArAReX2QkBZKNJgs3n32Q5oJa1iXddLlrT201teNSnt7QnsXtDcHy_T387xvXJ_HXHrPtvH2QQ1xqQZ67N_HV45ulWrt3j6hziDW5eshRCmu8CAT_W31PY0-WVZpFv7NQD-acv1stVK8ndribTokIp9ukSYAedx3icuUrOu" />
|
|
473
473
|
</picture>
|
|
474
474
|
</a>
|
|
475
475
|
|
|
@@ -477,10 +477,10 @@ xattr -cr /Applications/TokenTracker.app
|
|
|
477
477
|
|
|
478
478
|
## 🤝 贡献与支持
|
|
479
479
|
|
|
480
|
-
- **Bug / 功能建议**:[提个 Issue](https://github.com/
|
|
480
|
+
- **Bug / 功能建议**:[提个 Issue](https://github.com/xiufengsun/TokenTracker/issues/new)
|
|
481
481
|
- **安全问题**:见 [SECURITY.md](SECURITY.md) —— 请不要在公开 Issue 里提交安全报告
|
|
482
482
|
- **Pull Request**:见 [CONTRIBUTING.md](CONTRIBUTING.md),里面有开发环境搭建、测试流程和新增 AI 工具集成的指南
|
|
483
|
-
- **提问 / 展示作品**:[GitHub Discussions](https://github.com/
|
|
483
|
+
- **提问 / 展示作品**:[GitHub Discussions](https://github.com/xiufengsun/TokenTracker/discussions)
|
|
484
484
|
|
|
485
485
|
## 🙏 致谢
|
|
486
486
|
|
|
@@ -500,6 +500,6 @@ Clawd 角色设计归属 Anthropic。本项目是社区项目,和 Anthropic
|
|
|
500
500
|
|
|
501
501
|
**Token Tracker** —— 把你的 AI 产出量化。
|
|
502
502
|
|
|
503
|
-
<a href="https://www.tokentracker.cc">tokentracker.cc</a> · <a href="https://www.npmjs.com/package/tokentracker-cli">npm</a> · <a href="https://github.com/
|
|
503
|
+
<a href="https://www.tokentracker.cc">tokentracker.cc</a> · <a href="https://www.npmjs.com/package/tokentracker-cli">npm</a> · <a href="https://github.com/xiufengsun/TokenTracker">GitHub</a>
|
|
504
504
|
|
|
505
505
|
</div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as o,d as N,j as r}from"./__vite-browser-external-
|
|
1
|
+
import{m as o,d as N,j as r}from"./__vite-browser-external-AQgdBxou.js";import{Z as $}from"./zap-DJMdRI6y.js";import{F as A}from"./flame-C-QU6mPf.js";const j=[["path",{d:"M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2",key:"1ah6g2"}],["rect",{x:"14",y:"2",width:"8",height:"8",rx:"1",key:"88lufb"}]],E=o("blocks",j);const L=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],C=o("brain",L);const T=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]],z=o("calendar-days",T);const q=[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]],B=o("crown",q);const H=[["path",{d:"M14.086 18.412A2 2 0 0112.67 19H5v-7.672a2 2 0 01.586-1.414L11.75 3.75a6 6 0 118.49 8.49z",key:"1nq9jb"}],["path",{d:"M16 8 2 22",key:"vp34q"}],["path",{d:"M17.488 15H9",key:"16yirz"}]],R=o("feather",H);const D=[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]],F=o("folder-git-2",D);const I=[["path",{d:"M4 16v-2.38C4 11.5 2.97 10.5 3 8c.03-2.72 1.49-6 4.5-6C9.37 2 10 3.8 10 5.5c0 3.11-2 5.66-2 8.68V16a2 2 0 1 1-4 0Z",key:"1dudjm"}],["path",{d:"M20 20v-2.38c0-2.12 1.03-3.12 1-5.62-.03-2.72-1.49-6-4.5-6C14.63 6 14 7.8 14 9.5c0 3.11 2 5.66 2 8.68V20a2 2 0 1 0 4 0Z",key:"l2t8xc"}],["path",{d:"M16 17h4",key:"1dejxt"}],["path",{d:"M4 13h4",key:"1bwh8b"}]],G=o("footprints",I);const S=[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]],V=o("heart",S);const Z=[["path",{d:"M7.21 15 2.66 7.14a2 2 0 0 1 .13-2.2L4.4 2.8A2 2 0 0 1 6 2h12a2 2 0 0 1 1.6.8l1.6 2.14a2 2 0 0 1 .14 2.2L16.79 15",key:"143lza"}],["path",{d:"M11 12 5.12 2.2",key:"qhuxz6"}],["path",{d:"m13 12 5.88-9.8",key:"hbye0f"}],["path",{d:"M8 7h8",key:"i86dvs"}],["circle",{cx:"12",cy:"17",r:"5",key:"qbz8iq"}],["path",{d:"M12 18v-2h-.5",key:"fawc4q"}]],O=o("medal",Z);const P=[["path",{d:"M18 5h4",key:"1lhgn2"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],X=o("moon-star",P);const K=[["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}],["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09",key:"u4xsad"}],["path",{d:"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z",key:"676m9"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05",key:"92ym6u"}]],U=o("rocket",K);const W=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Y=o("shield-check",W);const J=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],Q=o("trending-up",J),k=[{id:"token_titan",scope:"cloud",icon:B,format:"tokens",art:"/achievements/token-titan.png"},{id:"big_day",scope:"cloud",icon:$,format:"tokens",art:"/achievements/big-day.png"},{id:"wordsmith",scope:"cloud",icon:R,format:"tokens",art:"/achievements/wordsmith.png"},{id:"marathoner",scope:"cloud",icon:G,format:"days",art:"/achievements/marathoner.png"},{id:"streak",scope:"cloud",icon:A,format:"days",art:"/achievements/streak.png"},{id:"weekend_warrior",scope:"cloud",icon:z,format:"days",art:"/achievements/weekend-warrior.png"},{id:"momentum",scope:"cloud",icon:Q,format:"multiplier",art:"/achievements/momentum.png"},{id:"polyglot",scope:"cloud",icon:C,format:"count",art:"/achievements/polyglot.png"},{id:"trendsetter",scope:"cloud",icon:U,format:"count",art:"/achievements/trendsetter.png"},{id:"multitool",scope:"cloud",icon:E,format:"count",art:"/achievements/multitool.png"},{id:"podium",scope:"cloud",icon:O,format:"rank",art:"/achievements/podium.png"},{id:"veteran",scope:"cloud",icon:Y,format:"days",art:"/achievements/veteran.png"},{id:"project_hopper",scope:"local",icon:F,format:"count",art:"/achievements/project-hopper.png"},{id:"project_devotion",scope:"local",icon:V,format:"tokens",art:"/achievements/project-devotion.png"},{id:"night_owl",scope:"local",icon:X,format:"count",art:"/achievements/night-owl.png"}],u=new Map(k.map(e=>[e.id,e])),m=new Map(k.map((e,a)=>[e.id,a]));function de(e,a){return`achievements.badge.${e}.${a}`}function ee(e){return[...e||[]].sort((a,t)=>{const c=(t?.tier||0)-(a?.tier||0);return c!==0?c:(m.get(a?.id)??99)-(m.get(t?.id)??99)})}function re(e){const a=(e||[]).filter(t=>t&&(t.tier||0)>=1&&u.has(t.id));return a.length===0?null:ee(a)[0]}const v={1:"bronze",2:"silver",3:"gold",4:"diamond"},ie=["bronze","silver","gold","diamond"],ae={bronze:{rim:["#a06a44","#5c3a22"],face:["#d29a6c","#96602f"],glyph:"#3f2817",ring:"#e8c3a0",sheen:"rgba(255, 236, 220, 0.45)",label:"#a06a44"},silver:{rim:["#aab3bb","#67707b"],face:["#dde2e7","#9ba5ae"],glyph:"#39424b",ring:"#f2f5f7",sheen:"rgba(255, 255, 255, 0.55)",label:"#8b959f"},gold:{rim:["#c9971c","#8a6508"],face:["#f2ca52","#cf9c26"],glyph:"#5c430e",ring:"#ffe9a8",sheen:"rgba(255, 248, 214, 0.55)",label:"#b8860b"},diamond:{rim:["#62b1e0","#7c6fd9"],face:["#c8ecf6","#84b4ea"],glyph:"#27496d",ring:"#eafcff",sheen:"rgba(255, 255, 255, 0.65)",label:"#5a9bd8"}},y={rim:["#a8ada9","#7c817d"],face:["#cdd2ce","#a3a8a4"],glyph:"#6a706c",ring:"#dde1de",sheen:"rgba(255, 255, 255, 0.25)",label:"#8b908c"};function te(e,a=!1){return a||!e||e<1?y:ae[v[Math.min(e,4)]]||y}function se(e){return v[e]||null}const g={xs:18,sm:24,md:44,xl:88,lg:108},f={xs:.75,sm:1,md:1.5,xl:2,lg:2};function le({badgeId:e,tier:a=0,size:t="md",locked:c=!1,label:i,className:M=""}){const s=u.get(e),h=c||!a||a<1,n=te(a,h),d=t==="fill",l=d?"100%":g[t]||g.md,b=d?4:f[t]||f.md,[_,x]=N.useState(!1),p=s?.icon||null,w=!!s?.art&&!_;return r.jsx("span",{role:i?"img":void 0,"aria-label":i||void 0,"aria-hidden":i?void 0:!0,className:`inline-flex shrink-0 rounded-full ${M}`,style:{width:l,height:l,padding:b,background:`linear-gradient(135deg, ${n.rim[0]} 0%, ${n.ring} 42%, ${n.rim[1]} 100%)`,boxShadow:d||t==="md"||t==="xl"||t==="lg"?"0 0 0 1px rgba(10, 15, 12, 0.06), 0 1px 2px rgba(10, 15, 12, 0.08)":void 0},children:w?r.jsx("img",{src:s.art,alt:"",draggable:!1,loading:"lazy",onError:()=>x(!0),className:"h-full w-full rounded-full object-cover",style:h?{filter:"grayscale(1)",opacity:.55}:void 0}):r.jsx("span",{className:"flex h-full w-full items-center justify-center rounded-full",style:{background:`linear-gradient(145deg, ${n.face[0]}, ${n.face[1]})`},children:p?r.jsx(p,{size:d?64:Math.round(l*.5),color:n.glyph,strokeWidth:2}):null})})}export{le as A,k as B,V as H,Q as T,ae as a,de as b,u as c,ie as d,re as h,te as p,ee as s,se as t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/BadgeDetailModal-
|
|
2
|
-
import{r as l,G as
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/BadgeDetailModal-CUWTCEru.js","assets/__vite-browser-external-AQgdBxou.js","assets/__vite-browser-external-CRYifSM4.css","assets/react-Diah7uAT.js","assets/AchievementBadge-4SSFyzNE.js","assets/zap-DJMdRI6y.js","assets/flame-C-QU6mPf.js","assets/use-transform-DMj91FEL.js","assets/use-reduced-motion--_Yc7AWk.js","assets/AchievementsSection-CyaMYMol.js","assets/format-tokens-DRX15id1.js","assets/DialogTitle-2Qa5pApU.js","assets/useScrollLock-DuTPOBl8.js","assets/store-DOs4omJM.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as l,G as h,H as f,I as v,j as e,c,L as p,d as g,a as y,J as b,K as k,_ as j}from"./__vite-browser-external-AQgdBxou.js";import{A as w}from"./AchievementsSection-CyaMYMol.js";import{B as x}from"./AchievementBadge-4SSFyzNE.js";import"./react-Diah7uAT.js";import"./format-tokens-DRX15id1.js";import"./use-reduced-motion--_Yc7AWk.js";import"./zap-DJMdRI6y.js";import"./flame-C-QU6mPf.js";function N({enabled:a=!0}={}){const[n,t]=l.useState({status:"loading",achievements:[],error:null}),s=l.useMemo(()=>h(),[]);return l.useEffect(()=>{if(!a){t({status:"disabled",achievements:[],error:null});return}let i=!1;return t(r=>({...r,status:"loading"})),f({timeZone:s,tzOffsetMinutes:v()}).then(r=>{i||t({status:"ready",achievements:Array.isArray(r?.achievements)?r.achievements:[],error:null})}).catch(r=>{i||t({status:"error",achievements:[],error:r})}),()=>{i=!0}},[a,s]),n}const A=g.lazy(()=>j(()=>import("./BadgeDetailModal-CUWTCEru.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13])));function I({authLoading:a,authEnabled:n,authUserId:t,mockEnabled:s}){if(s)return{authLoading:!1,signedIn:!0,userId:"mock-user"};const i=!!(n&&t);return{authLoading:!!a,signedIn:i,userId:i?t:null}}function B(){const a=y(),[n,t]=l.useState({status:"loading",achievements:[],userId:null}),s=b(),{authLoading:i,signedIn:r,userId:o}=I({authLoading:a?.loading,authEnabled:a?.enabled,authUserId:a?.user?.id,mockEnabled:s});return l.useEffect(()=>{if(i){t({status:"loading",achievements:[],userId:null});return}if(!r){t({status:"signed-out",achievements:[],userId:null});return}let d=!1;return t({status:"loading",achievements:[],userId:o}),(async()=>{try{const u=s?null:await a.getAccessToken?.(),m=await k({accessToken:u,userId:o});if(d)return;t({status:"ready",achievements:Array.isArray(m?.badges)?m.badges:[],userId:o})}catch{d||t({status:"error",achievements:[],userId:o})}})(),()=>{d=!0}},[i,s,r,o]),{...n,signedIn:r,settled:_({authLoading:i,signedIn:r,userId:o,state:n})}}function _({authLoading:a,signedIn:n,userId:t,state:s}){return a?!1:n?s.userId===t&&(s.status==="ready"||s.status==="error"):s.status==="signed-out"}function S(){return e.jsx("div",{className:"mx-0 grid animate-pulse grid-cols-[repeat(3,max-content)] justify-between gap-y-7 sm:-mx-2 sm:grid-cols-[repeat(4,max-content)] lg:grid-cols-[repeat(5,max-content)]","aria-hidden":!0,children:Array.from({length:x.length}).map((a,n)=>e.jsxs("div",{className:"flex w-[6.75rem] flex-col items-center px-0 pb-3 pt-4 sm:w-[7.75rem]",children:[e.jsx("div",{className:"h-[108px] w-[108px] rounded-full bg-oai-gray-200 dark:bg-oai-gray-800"}),e.jsx("div",{className:"mt-3 h-3 w-16 rounded bg-oai-gray-200 dark:bg-oai-gray-800"}),e.jsx("div",{className:"mt-2 h-2 w-10 rounded bg-oai-gray-100 dark:bg-oai-gray-800/60"})]},n))})}function D(){const a=N(),n=B(),[t,s]=l.useState(null),i=a.status==="loading"||!n.settled,r=l.useMemo(()=>[...n.achievements||[],...a.achievements||[]],[n.achievements,a.achievements]),o=l.useMemo(()=>r.filter(u=>(u?.tier||0)>=1).length,[r]),d=x.length;return e.jsxs("div",{className:"flex flex-1 flex-col font-oai text-oai-black antialiased dark:text-oai-white",children:[e.jsx("main",{className:"flex-1 pb-12 pt-8 sm:pb-16 sm:pt-10",children:e.jsxs("div",{className:"mx-auto max-w-4xl px-4 sm:px-6",children:[e.jsxs("div",{className:"mb-7 flex items-baseline justify-between gap-4",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("h1",{className:"text-3xl font-semibold tracking-tight text-oai-black dark:text-white sm:text-4xl",children:c("achievements.page.title")}),e.jsx("p",{className:"mt-1.5 text-sm text-oai-gray-500 dark:text-oai-gray-400",children:c("achievements.page.local_note")})]}),!i&&e.jsxs("div",{className:"shrink-0 text-right",children:[e.jsxs("div",{className:"font-mono text-2xl font-semibold leading-none tabular-nums text-oai-black dark:text-white",children:[o,e.jsxs("span",{className:"text-oai-gray-400 dark:text-oai-gray-600",children:["/",d]})]}),e.jsx("div",{className:"mt-2 h-1 w-24 overflow-hidden rounded-full bg-oai-gray-200 dark:bg-oai-gray-800",children:e.jsx("div",{className:"h-full rounded-full bg-oai-brand-600 transition-[width] duration-500",style:{width:`${Math.round(o/d*100)}%`}})})]})]}),!n.signedIn&&!i&&e.jsxs("div",{className:"mb-6 flex flex-wrap items-center justify-between gap-x-4 gap-y-2 rounded-xl border border-oai-gray-200 bg-oai-gray-50 px-4 py-3 dark:border-oai-gray-800 dark:bg-oai-gray-900/60",children:[e.jsx("p",{className:"text-sm text-oai-gray-600 dark:text-oai-gray-300",children:c("achievements.signin.prompt")}),e.jsx(p,{to:"/login",className:"shrink-0 rounded-lg bg-oai-brand-600 px-3 py-1.5 text-sm font-medium text-white transition-colors duration-200 hover:bg-oai-brand-700 active:scale-[0.98]",children:c("achievements.signin.action")})]}),i?e.jsx(S,{}):e.jsxs(e.Fragment,{children:[e.jsx(w,{achievements:r,isOwn:!0,columns:"wide",size:"lg",animateIn:!0,onSelect:s}),e.jsxs("p",{className:"mt-10 text-center text-xs text-oai-gray-400 dark:text-oai-gray-500",children:[c("achievements.page.suggest")," ",e.jsx("a",{href:"https://github.com/xiufengsun/TokenTracker/issues",target:"_blank",rel:"noopener noreferrer",className:"underline decoration-oai-gray-300 underline-offset-2 transition-colors hover:text-oai-gray-700 hover:decoration-oai-gray-500 dark:decoration-oai-gray-600 dark:hover:text-oai-gray-300",children:c("achievements.page.suggest_link")})]})]})]})}),t&&e.jsx(g.Suspense,{fallback:null,children:e.jsx(A,{badge:t,onClose:()=>s(null)})})]})}export{_ as cloudBadgesSettled,D as default,I as resolveCloudBadgeIdentity};
|
package/dashboard/dist/assets/{AchievementsSection-BAL23Qum.js → AchievementsSection-CyaMYMol.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as _,j as s,c as l}from"./__vite-browser-external-
|
|
1
|
+
import{m as _,j as s,c as l}from"./__vite-browser-external-AQgdBxou.js";import{m as $}from"./react-Diah7uAT.js";import{B as x,s as b,b as C,t as T,A as B,a as E}from"./AchievementBadge-4SSFyzNE.js";import{f as L}from"./format-tokens-DRX15id1.js";import{u as I}from"./use-reduced-motion--_Yc7AWk.js";const D=[["path",{d:"M10 16h.01",key:"1bzywj"}],["path",{d:"M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"18tbho"}],["path",{d:"M21.946 12.013H2.054",key:"zqlbp7"}],["path",{d:"M6 16h.01",key:"1pmjb7"}]],F=_("hard-drive",D);function V(r,i){const t=Number(i)||0;switch(r){case"tokens":return L(t);case"rank":return`#${Math.round(t)}`;case"multiplier":return`${(Math.round(t*10)/10).toString()}×`;default:return Math.round(t).toLocaleString()}}function H(r){if(!r)return 0;const i=Number(r.next_threshold),t=Number(r.metric_value??r.value);if(!Number.isFinite(i)||i<=0)return r.tier>=4?1:0;if(!Number.isFinite(t)||t<=0)return 0;const o=r.lower_is_better?i/t:t/i;return Math.max(0,Math.min(1,o))}function q(r){const i=r?.achieved||{},t=Object.values(i).map(o=>o?Date.parse(o):NaN).filter(o=>Number.isFinite(o));return t.length>0?Math.max(...t):null}function K({achievements:r,isOwn:i=!1,scope:t,onSelect:o,size:m="xl",columns:v="default",animateIn:y=!1,className:N=""}){const k=I(),u=y&&!k,p=new Map;for(const e of Array.isArray(r)?r:[])e&&e.id&&p.set(e.id,e);const g=t?x.filter(e=>e.scope===t):x;let c;if(i){const e=g.map(a=>({entry:a,record:p.get(a.id)||{id:a.id,tier:0}})),n=b(e.filter(a=>(a.record.tier||0)>=1).map(a=>({...a,id:a.entry.id,tier:a.record.tier}))),h=e.filter(a=>(a.record.tier||0)<1);c=[...n,...h]}else c=b(g.map(e=>({entry:e,record:p.get(e.id)})).filter(e=>e.record&&(e.record.tier||0)>=1).map(e=>({...e,id:e.entry.id,tier:e.record.tier}))).map(({entry:e,record:n})=>({entry:e,record:n}));if(c.length===0)return null;const j=v==="wide"?"grid-cols-[repeat(3,max-content)] sm:grid-cols-[repeat(4,max-content)] lg:grid-cols-[repeat(5,max-content)]":"grid-cols-[repeat(3,max-content)] sm:grid-cols-[repeat(4,max-content)]",w=m==="lg"?"mx-0 sm:-mx-2":"-mx-2 sm:-mx-4",M=m==="lg"?"px-0":"px-1";return s.jsx("div",{className:`${w} grid justify-between gap-y-7 ${j} ${N}`,children:c.map(({entry:e,record:n},h)=>{const a=(n.tier||0)>=1,f=l(C(e.id,"name")),d=a?T(n.tier):null,A=H(n);return s.jsxs($.button,{type:"button",initial:u?{opacity:0,y:16,scale:.9}:!1,animate:u?{opacity:1,y:0,scale:1}:void 0,whileTap:u?{scale:.97}:void 0,transition:{delay:.05+h*.035,duration:.45,ease:[.16,1,.3,1]},onClick:o?()=>o({...n,id:e.id}):void 0,className:`group flex w-[6.75rem] flex-col items-center rounded-xl ${M} pb-3 pt-4 text-center transition-[background-color,transform] duration-200 ease-out hover:bg-oai-gray-50 active:scale-[0.97] dark:hover:bg-oai-gray-900/70 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand/60 sm:w-[7.75rem]`,"aria-label":l("achievements.badge.aria",{name:f,tier:d?l(`achievements.tier.${d}`):l("achievements.modal.locked")}),children:[s.jsx(B,{badgeId:e.id,tier:n.tier,locked:!a,size:m,className:"transition-transform duration-200 ease-out group-hover:-translate-y-0.5 group-hover:scale-105"}),s.jsxs("span",{className:"mt-2.5 flex w-full items-center justify-center gap-1",children:[s.jsx("span",{title:f,className:"min-w-0 truncate text-xs font-medium leading-tight text-oai-gray-800 dark:text-oai-gray-200",children:f}),e.scope==="local"&&s.jsx("span",{title:l("achievements.page.local_note"),"aria-label":l("achievements.scope.local"),className:"inline-flex shrink-0 text-oai-gray-400 dark:text-oai-gray-500",children:s.jsx(F,{size:11,strokeWidth:2,"aria-hidden":!0})})]}),s.jsx("span",{className:"mt-1 flex h-4 w-full items-center justify-center",children:a?s.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-[0.08em]",style:{color:E[d]?.label},children:l(`achievements.tier.${d}`)}):i?s.jsx("span",{className:"h-[3px] w-14 overflow-hidden rounded-full bg-oai-gray-200 dark:bg-oai-gray-800",children:s.jsx("span",{className:"block h-full rounded-full bg-oai-brand/70",style:{width:`${Math.round(A*100)}%`}})}):null})]},e.id)})})}export{K as A,H as b,V as f,q as l};
|