vibestats 1.4.6 → 1.4.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/README.md +12 -0
- package/dist/index.js +267 -6
- package/dist/web/404.html +1 -1
- package/dist/web/_next/static/chunks/app/_not-found/{page-91f35a114767b957.js → page-eb494efa9a20b86f.js} +1 -1
- package/dist/web/_next/static/chunks/app/{changelog/page-5d0587c1d5910e68.js → activity/page-08fe89950f57d6cd.js} +1 -1
- package/dist/web/_next/static/chunks/app/{compare/[slug]/page-5d0587c1d5910e68.js → changelog/page-08fe89950f57d6cd.js} +1 -1
- package/dist/web/_next/static/chunks/app/compare/{page-5d0587c1d5910e68.js → [slug]/page-08fe89950f57d6cd.js} +1 -1
- package/dist/web/_next/static/chunks/app/{activity/page-5d0587c1d5910e68.js → compare/page-08fe89950f57d6cd.js} +1 -1
- package/dist/web/_next/static/chunks/app/dashboard/activity/{page-160297e59ddc3e90.js → page-597da0061c40aff7.js} +1 -1
- package/dist/web/_next/static/chunks/app/dashboard/page-bb38b9b3268267b0.js +1 -0
- package/dist/web/_next/static/chunks/app/dashboard/usage/{page-1dc2f581c9259a42.js → page-29910d99bd414ff6.js} +1 -1
- package/dist/web/_next/static/chunks/app/dashboard/wrapped/{page-9474fad21b940fd3.js → page-7da52e4debfc621e.js} +1 -1
- package/dist/web/_next/static/chunks/app/docs/commands/page-08fe89950f57d6cd.js +1 -0
- package/dist/web/_next/static/chunks/app/docs/page-08fe89950f57d6cd.js +1 -0
- package/dist/web/_next/static/chunks/app/features/[slug]/page-08fe89950f57d6cd.js +1 -0
- package/dist/web/_next/static/chunks/app/features/page-08fe89950f57d6cd.js +1 -0
- package/dist/web/_next/static/chunks/app/guides/[slug]/page-08fe89950f57d6cd.js +1 -0
- package/dist/web/_next/static/chunks/app/guides/page-08fe89950f57d6cd.js +1 -0
- package/dist/web/_next/static/chunks/app/layout-c7aeab43f7457d3e.js +1 -0
- package/dist/web/_next/static/chunks/app/page-b2258b57bd62febe.js +1 -0
- package/dist/web/_next/static/chunks/app/use-cases/[slug]/page-08fe89950f57d6cd.js +1 -0
- package/dist/web/_next/static/chunks/app/use-cases/page-08fe89950f57d6cd.js +1 -0
- package/dist/web/_next/static/chunks/app/wrapped/page-72228fb75ef67e72.js +1 -0
- package/dist/web/_next/static/chunks/{main-app-6619364ab1f13fb7.js → main-app-f5021d739a517f33.js} +1 -1
- package/dist/web/activity.html +1 -1
- package/dist/web/activity.txt +16 -17
- package/dist/web/changelog.html +1 -1
- package/dist/web/changelog.txt +66 -62
- package/dist/web/compare/claude-code-vs-codex-cli-tracking.html +1 -1
- package/dist/web/compare/claude-code-vs-codex-cli-tracking.txt +22 -23
- package/dist/web/compare/daily-vs-monthly-ai-usage-reports.html +1 -1
- package/dist/web/compare/daily-vs-monthly-ai-usage-reports.txt +21 -22
- package/dist/web/compare/local-vs-cloud-ai-analytics.html +1 -1
- package/dist/web/compare/local-vs-cloud-ai-analytics.txt +22 -23
- package/dist/web/compare/manual-tracking-vs-vibestats.html +1 -1
- package/dist/web/compare/manual-tracking-vs-vibestats.txt +21 -22
- package/dist/web/compare/querystring-shares-vs-stored-share-pages.html +1 -1
- package/dist/web/compare/querystring-shares-vs-stored-share-pages.txt +22 -23
- package/dist/web/compare/session-breakdown-vs-model-breakdown.html +1 -1
- package/dist/web/compare/session-breakdown-vs-model-breakdown.txt +22 -23
- package/dist/web/compare/single-source-vs-combined-tracking.html +1 -1
- package/dist/web/compare/single-source-vs-combined-tracking.txt +22 -23
- package/dist/web/compare/terminal-table-vs-json-output.html +1 -1
- package/dist/web/compare/terminal-table-vs-json-output.txt +21 -22
- package/dist/web/compare/token-volume-vs-cost-estimation.html +1 -1
- package/dist/web/compare/token-volume-vs-cost-estimation.txt +21 -22
- package/dist/web/compare/wrapped-vs-activity-heatmap.html +1 -1
- package/dist/web/compare/wrapped-vs-activity-heatmap.txt +22 -23
- package/dist/web/compare.html +1 -1
- package/dist/web/compare.txt +29 -30
- package/dist/web/dashboard/activity.html +1 -1
- package/dist/web/dashboard/activity.txt +17 -18
- package/dist/web/dashboard/usage.html +1 -1
- package/dist/web/dashboard/usage.txt +17 -18
- package/dist/web/dashboard/wrapped.html +1 -1
- package/dist/web/dashboard/wrapped.txt +17 -18
- package/dist/web/dashboard.html +1 -1
- package/dist/web/dashboard.txt +17 -18
- package/dist/web/docs/commands.html +1 -1
- package/dist/web/docs/commands.txt +25 -31
- package/dist/web/docs.html +1 -1
- package/dist/web/docs.txt +19 -23
- package/dist/web/features/ai-coding-activity-heatmap.html +1 -1
- package/dist/web/features/ai-coding-activity-heatmap.txt +22 -23
- package/dist/web/features/ai-coding-wrapped.html +1 -1
- package/dist/web/features/ai-coding-wrapped.txt +21 -22
- package/dist/web/features/claude-code-stats.html +1 -1
- package/dist/web/features/claude-code-stats.txt +21 -22
- package/dist/web/features/claude-diagnostics.html +1 -1
- package/dist/web/features/claude-diagnostics.txt +21 -22
- package/dist/web/features/codex-cli-stats.html +1 -1
- package/dist/web/features/codex-cli-stats.txt +21 -22
- package/dist/web/features/combined-ai-coding-stats.html +1 -1
- package/dist/web/features/combined-ai-coding-stats.txt +22 -23
- package/dist/web/features/json-and-automation-exports.html +1 -1
- package/dist/web/features/json-and-automation-exports.txt +22 -23
- package/dist/web/features/model-breakdown.html +1 -1
- package/dist/web/features/model-breakdown.txt +21 -22
- package/dist/web/features/privacy-first-analytics.html +1 -1
- package/dist/web/features/privacy-first-analytics.txt +22 -23
- package/dist/web/features/session-breakdown.html +1 -1
- package/dist/web/features/session-breakdown.txt +21 -22
- package/dist/web/features/share-pages.html +1 -1
- package/dist/web/features/share-pages.txt +21 -22
- package/dist/web/features/token-and-cost-tracking.html +1 -1
- package/dist/web/features/token-and-cost-tracking.txt +21 -22
- package/dist/web/features.html +1 -1
- package/dist/web/features.txt +30 -31
- package/dist/web/guides/how-to-build-ai-activity-heatmap.html +1 -1
- package/dist/web/guides/how-to-build-ai-activity-heatmap.txt +21 -22
- package/dist/web/guides/how-to-compare-model-usage.html +1 -1
- package/dist/web/guides/how-to-compare-model-usage.txt +21 -22
- package/dist/web/guides/how-to-create-ai-coding-wrapped.html +1 -1
- package/dist/web/guides/how-to-create-ai-coding-wrapped.txt +21 -22
- package/dist/web/guides/how-to-measure-ai-token-costs.html +1 -1
- package/dist/web/guides/how-to-measure-ai-token-costs.txt +21 -22
- package/dist/web/guides/how-to-read-claude-diagnostics.html +1 -1
- package/dist/web/guides/how-to-read-claude-diagnostics.txt +21 -22
- package/dist/web/guides/how-to-share-ai-coding-stats.html +1 -1
- package/dist/web/guides/how-to-share-ai-coding-stats.txt +21 -22
- package/dist/web/guides/how-to-track-claude-code-usage.html +1 -1
- package/dist/web/guides/how-to-track-claude-code-usage.txt +21 -22
- package/dist/web/guides/how-to-track-codex-cli-usage.html +1 -1
- package/dist/web/guides/how-to-track-codex-cli-usage.txt +21 -22
- package/dist/web/guides.html +1 -1
- package/dist/web/guides.txt +24 -25
- package/dist/web/index.html +1 -1
- package/dist/web/index.txt +20 -21
- package/dist/web/sitemap.xml +46 -46
- package/dist/web/use-cases/ai-agencies.html +1 -1
- package/dist/web/use-cases/ai-agencies.txt +20 -21
- package/dist/web/use-cases/consultants.html +1 -1
- package/dist/web/use-cases/consultants.txt +20 -21
- package/dist/web/use-cases/engineering-managers.html +1 -1
- package/dist/web/use-cases/engineering-managers.txt +21 -22
- package/dist/web/use-cases/freelancers.html +1 -1
- package/dist/web/use-cases/freelancers.txt +20 -21
- package/dist/web/use-cases/indie-hackers.html +1 -1
- package/dist/web/use-cases/indie-hackers.txt +20 -21
- package/dist/web/use-cases/monthly-reporting.html +1 -1
- package/dist/web/use-cases/monthly-reporting.txt +20 -21
- package/dist/web/use-cases/open-source-maintainers.html +1 -1
- package/dist/web/use-cases/open-source-maintainers.txt +21 -22
- package/dist/web/use-cases/personal-retrospectives.html +1 -1
- package/dist/web/use-cases/personal-retrospectives.txt +21 -22
- package/dist/web/use-cases/researchers.html +1 -1
- package/dist/web/use-cases/researchers.txt +20 -21
- package/dist/web/use-cases/weekly-reviews.html +1 -1
- package/dist/web/use-cases/weekly-reviews.txt +20 -21
- package/dist/web/use-cases.html +1 -1
- package/dist/web/use-cases.txt +28 -29
- package/dist/web/wrapped.html +1 -1
- package/dist/web/wrapped.txt +17 -18
- package/package.json +1 -1
- package/dist/web/_next/static/chunks/app/dashboard/page-4834f263664e8663.js +0 -1
- package/dist/web/_next/static/chunks/app/docs/commands/page-5d0587c1d5910e68.js +0 -1
- package/dist/web/_next/static/chunks/app/docs/page-5d0587c1d5910e68.js +0 -1
- package/dist/web/_next/static/chunks/app/features/[slug]/page-5d0587c1d5910e68.js +0 -1
- package/dist/web/_next/static/chunks/app/features/page-5d0587c1d5910e68.js +0 -1
- package/dist/web/_next/static/chunks/app/guides/[slug]/page-5d0587c1d5910e68.js +0 -1
- package/dist/web/_next/static/chunks/app/guides/page-5d0587c1d5910e68.js +0 -1
- package/dist/web/_next/static/chunks/app/layout-6ebd9b17af55ec02.js +0 -1
- package/dist/web/_next/static/chunks/app/page-dfb7bbdb5999dc75.js +0 -1
- package/dist/web/_next/static/chunks/app/use-cases/[slug]/page-5d0587c1d5910e68.js +0 -1
- package/dist/web/_next/static/chunks/app/use-cases/page-5d0587c1d5910e68.js +0 -1
- package/dist/web/_next/static/chunks/app/wrapped/page-66b00de7736097db.js +0 -1
- /package/dist/web/_next/static/{OTOSYSO_lYg8uryMGgC0P → O1feF7gPLeHeL0mJlyXjP}/_buildManifest.js +0 -0
- /package/dist/web/_next/static/{OTOSYSO_lYg8uryMGgC0P → O1feF7gPLeHeL0mJlyXjP}/_ssgManifest.js +0 -0
package/README.md
CHANGED
|
@@ -32,6 +32,10 @@ vibestats --wrapped # Annual wrapped summary
|
|
|
32
32
|
# Claude local diagnostics
|
|
33
33
|
vibestats --claude-system
|
|
34
34
|
vibestats --claude-limits
|
|
35
|
+
|
|
36
|
+
# Codex local diagnostics
|
|
37
|
+
vibestats codex-resets
|
|
38
|
+
vibestats codex resets
|
|
35
39
|
```
|
|
36
40
|
|
|
37
41
|
## CLI Flags
|
|
@@ -78,6 +82,14 @@ vibestats --claude-limits
|
|
|
78
82
|
| `--combined` | Claude + Codex combined |
|
|
79
83
|
| `vibestats usage codex --total` | Codex total usage table |
|
|
80
84
|
| `vibestats limits codex` | Codex local limit windows |
|
|
85
|
+
| `vibestats codex-resets` | Codex reset-credit status from the local Codex Desktop session |
|
|
86
|
+
| `vibestats codex resets` | Alias for `vibestats codex-resets` |
|
|
87
|
+
|
|
88
|
+
### Codex Reset-Credit Diagnostics
|
|
89
|
+
|
|
90
|
+
`vibestats codex-resets` reads `~/.codex/auth.json` from the locally authenticated Codex Desktop session and calls ChatGPT's reset-credit status endpoint with a short timeout. It prints available reset-credit count, status, local grant/expiry times, and title.
|
|
91
|
+
|
|
92
|
+
This endpoint is unofficial/internal and may change. The command is intended for personal local diagnostics only; it never prints auth tokens, account IDs, or raw authorization headers. Credit IDs are hidden unless `--debug` is explicitly passed.
|
|
81
93
|
|
|
82
94
|
### Config
|
|
83
95
|
|
package/dist/index.js
CHANGED
|
@@ -4063,7 +4063,8 @@ async function runDashboard(args, config) {
|
|
|
4063
4063
|
}
|
|
4064
4064
|
|
|
4065
4065
|
// src/cli-intent.ts
|
|
4066
|
-
var
|
|
4066
|
+
var RESET_COMMANDS = /* @__PURE__ */ new Set(["codex-resets", "codex-reset-credits", "resets", "reset"]);
|
|
4067
|
+
var COMMANDS = /* @__PURE__ */ new Set(["usage", "limits", "limit", "pace", "monitor", ...RESET_COMMANDS]);
|
|
4067
4068
|
var SCOPES = /* @__PURE__ */ new Set(["claude", "codex", "all", "combined"]);
|
|
4068
4069
|
var USAGE_COMMAND_FLAGS = /* @__PURE__ */ new Set([
|
|
4069
4070
|
"activity",
|
|
@@ -4094,6 +4095,7 @@ var BOOLEAN_FLAGS = /* @__PURE__ */ new Set([
|
|
|
4094
4095
|
"compact",
|
|
4095
4096
|
"config",
|
|
4096
4097
|
"daily",
|
|
4098
|
+
"debug",
|
|
4097
4099
|
"init",
|
|
4098
4100
|
"json",
|
|
4099
4101
|
"kimi",
|
|
@@ -4197,6 +4199,15 @@ function resolveIntentError(positionals) {
|
|
|
4197
4199
|
if (!COMMANDS.has(first) && !SCOPES.has(first)) {
|
|
4198
4200
|
return { message: `Unknown command: ${positionals[0]}` };
|
|
4199
4201
|
}
|
|
4202
|
+
if (positionals.some((token) => RESET_COMMANDS.has(token.toLowerCase()))) {
|
|
4203
|
+
for (const token of positionals) {
|
|
4204
|
+
const lower = token.toLowerCase();
|
|
4205
|
+
if (RESET_COMMANDS.has(lower)) continue;
|
|
4206
|
+
if (lower === "codex") continue;
|
|
4207
|
+
return { message: `Unknown argument for ${first}: ${token}` };
|
|
4208
|
+
}
|
|
4209
|
+
return void 0;
|
|
4210
|
+
}
|
|
4200
4211
|
for (let index = 0; index < positionals.length; index++) {
|
|
4201
4212
|
const token = positionals[index];
|
|
4202
4213
|
const lower = token.toLowerCase();
|
|
@@ -4213,7 +4224,8 @@ function resolveCliIntent(argv) {
|
|
|
4213
4224
|
const positionals = collectPositionals(argv);
|
|
4214
4225
|
const first = positionals[0]?.toLowerCase();
|
|
4215
4226
|
const parsedFlags = parseRawFlags(argv);
|
|
4216
|
-
|
|
4227
|
+
const hasResetCommand = positionals.some((token) => RESET_COMMANDS.has(token.toLowerCase()));
|
|
4228
|
+
let command = first === "monitor" ? "monitor" : hasResetCommand ? "codex-resets" : first === "limits" || first === "limit" || first === "pace" ? "limits" : "usage";
|
|
4217
4229
|
const error = resolveIntentError(positionals);
|
|
4218
4230
|
const scopeToken = positionals.find((token, index) => {
|
|
4219
4231
|
const lower = token.toLowerCase();
|
|
@@ -4240,6 +4252,10 @@ function resolveCliIntent(argv) {
|
|
|
4240
4252
|
if (command === "limits") {
|
|
4241
4253
|
normalizedArgs.limits = true;
|
|
4242
4254
|
}
|
|
4255
|
+
if (command === "codex-resets") {
|
|
4256
|
+
normalizedArgs.codex = true;
|
|
4257
|
+
normalizedArgs.combined = false;
|
|
4258
|
+
}
|
|
4243
4259
|
return { command, sourceScope, normalizedArgs, error };
|
|
4244
4260
|
}
|
|
4245
4261
|
function applyCliIntent(args, intent) {
|
|
@@ -4249,6 +4265,216 @@ function applyCliIntent(args, intent) {
|
|
|
4249
4265
|
};
|
|
4250
4266
|
}
|
|
4251
4267
|
|
|
4268
|
+
// src/codex-resets.ts
|
|
4269
|
+
import { promises as fs5 } from "fs";
|
|
4270
|
+
import { homedir as homedir5 } from "os";
|
|
4271
|
+
import { join as join7 } from "path";
|
|
4272
|
+
var CODEX_RESET_CREDITS_URL = "https://chatgpt.com/backend-api/wham/rate-limit-reset-credits";
|
|
4273
|
+
var CodexResetCreditsError = class extends Error {
|
|
4274
|
+
constructor(message, code) {
|
|
4275
|
+
super(message);
|
|
4276
|
+
this.code = code;
|
|
4277
|
+
this.name = "CodexResetCreditsError";
|
|
4278
|
+
}
|
|
4279
|
+
};
|
|
4280
|
+
function defaultAuthPath() {
|
|
4281
|
+
return join7(homedir5(), ".codex", "auth.json");
|
|
4282
|
+
}
|
|
4283
|
+
function asObject(value) {
|
|
4284
|
+
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
4285
|
+
}
|
|
4286
|
+
async function readAuth(authPath) {
|
|
4287
|
+
let raw;
|
|
4288
|
+
try {
|
|
4289
|
+
raw = await fs5.readFile(authPath, "utf-8");
|
|
4290
|
+
} catch (error) {
|
|
4291
|
+
const code = error.code;
|
|
4292
|
+
if (code === "ENOENT") {
|
|
4293
|
+
throw new CodexResetCreditsError(`Missing Codex auth file at ${authPath}`, "missing-auth");
|
|
4294
|
+
}
|
|
4295
|
+
throw new CodexResetCreditsError(`Could not read Codex auth file at ${authPath}: ${error.message}`, "invalid-auth");
|
|
4296
|
+
}
|
|
4297
|
+
let auth;
|
|
4298
|
+
try {
|
|
4299
|
+
auth = JSON.parse(raw);
|
|
4300
|
+
} catch {
|
|
4301
|
+
throw new CodexResetCreditsError(`Codex auth file at ${authPath} is not valid JSON`, "invalid-auth");
|
|
4302
|
+
}
|
|
4303
|
+
const tokens = asObject(auth.tokens);
|
|
4304
|
+
const accessToken = tokens?.access_token;
|
|
4305
|
+
const accountId = tokens?.account_id;
|
|
4306
|
+
if (typeof accessToken !== "string" || accessToken.length === 0) {
|
|
4307
|
+
throw new CodexResetCreditsError("Codex auth file is missing tokens.access_token", "missing-token");
|
|
4308
|
+
}
|
|
4309
|
+
if (typeof accountId !== "string" || accountId.length === 0) {
|
|
4310
|
+
throw new CodexResetCreditsError("Codex auth file is missing tokens.account_id", "missing-token");
|
|
4311
|
+
}
|
|
4312
|
+
return { accessToken, accountId };
|
|
4313
|
+
}
|
|
4314
|
+
function parseCount(value, field) {
|
|
4315
|
+
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
4316
|
+
throw new CodexResetCreditsError(`Unexpected reset-credit response: ${field} must be a number`, "bad-response");
|
|
4317
|
+
}
|
|
4318
|
+
return value;
|
|
4319
|
+
}
|
|
4320
|
+
function parseString(value, field) {
|
|
4321
|
+
if (typeof value !== "string" || value.length === 0) {
|
|
4322
|
+
throw new CodexResetCreditsError(`Unexpected reset-credit response: ${field} must be a string`, "bad-response");
|
|
4323
|
+
}
|
|
4324
|
+
return value;
|
|
4325
|
+
}
|
|
4326
|
+
function parseOptionalString(value) {
|
|
4327
|
+
return typeof value === "string" && value.length > 0 ? value : void 0;
|
|
4328
|
+
}
|
|
4329
|
+
function parseCreditsResponse(value) {
|
|
4330
|
+
const payload = asObject(value);
|
|
4331
|
+
if (!payload) {
|
|
4332
|
+
throw new CodexResetCreditsError("Unexpected reset-credit response: expected an object", "bad-response");
|
|
4333
|
+
}
|
|
4334
|
+
const raw = payload;
|
|
4335
|
+
if (!Array.isArray(raw.credits)) {
|
|
4336
|
+
throw new CodexResetCreditsError("Unexpected reset-credit response: credits must be an array", "bad-response");
|
|
4337
|
+
}
|
|
4338
|
+
return {
|
|
4339
|
+
availableCount: parseCount(raw.available_count, "available_count"),
|
|
4340
|
+
totalEarnedCount: parseCount(raw.total_earned_count, "total_earned_count"),
|
|
4341
|
+
credits: raw.credits.map((item, index) => {
|
|
4342
|
+
const credit = asObject(item);
|
|
4343
|
+
if (!credit) {
|
|
4344
|
+
throw new CodexResetCreditsError(`Unexpected reset-credit response: credits[${index}] must be an object`, "bad-response");
|
|
4345
|
+
}
|
|
4346
|
+
return {
|
|
4347
|
+
resetType: parseOptionalString(credit.reset_type),
|
|
4348
|
+
status: parseString(credit.status, `credits[${index}].status`),
|
|
4349
|
+
grantedAt: parseString(credit.granted_at, `credits[${index}].granted_at`),
|
|
4350
|
+
expiresAt: parseString(credit.expires_at, `credits[${index}].expires_at`),
|
|
4351
|
+
title: parseString(credit.title, `credits[${index}].title`),
|
|
4352
|
+
id: parseOptionalString(credit.id),
|
|
4353
|
+
creditId: parseOptionalString(credit.credit_id)
|
|
4354
|
+
};
|
|
4355
|
+
})
|
|
4356
|
+
};
|
|
4357
|
+
}
|
|
4358
|
+
async function fetchWithTimeout(fetchImpl, accessToken, accountId, timeoutMs) {
|
|
4359
|
+
const controller = new AbortController();
|
|
4360
|
+
const timer = setTimeout(() => controller.abort(), timeoutMs);
|
|
4361
|
+
try {
|
|
4362
|
+
const response = await fetchImpl(CODEX_RESET_CREDITS_URL, {
|
|
4363
|
+
method: "GET",
|
|
4364
|
+
headers: {
|
|
4365
|
+
Authorization: `Bearer ${accessToken}`,
|
|
4366
|
+
"ChatGPT-Account-ID": accountId,
|
|
4367
|
+
"OpenAI-Beta": "codex-1",
|
|
4368
|
+
originator: "Codex Desktop"
|
|
4369
|
+
},
|
|
4370
|
+
signal: controller.signal
|
|
4371
|
+
});
|
|
4372
|
+
if (response.status === 401 || response.status === 403) {
|
|
4373
|
+
throw new CodexResetCreditsError("Codex reset-credit request was rejected. Re-authenticate in Codex Desktop and try again.", "auth-failed");
|
|
4374
|
+
}
|
|
4375
|
+
if (!response.ok) {
|
|
4376
|
+
throw new CodexResetCreditsError(`Codex reset-credit request failed with HTTP ${response.status}`, "network");
|
|
4377
|
+
}
|
|
4378
|
+
try {
|
|
4379
|
+
return await response.json();
|
|
4380
|
+
} catch {
|
|
4381
|
+
throw new CodexResetCreditsError("Codex reset-credit response was not valid JSON", "bad-response");
|
|
4382
|
+
}
|
|
4383
|
+
} catch (error) {
|
|
4384
|
+
if (error instanceof CodexResetCreditsError) throw error;
|
|
4385
|
+
if (error.name === "AbortError") {
|
|
4386
|
+
throw new CodexResetCreditsError(`Codex reset-credit request timed out after ${timeoutMs}ms`, "timeout");
|
|
4387
|
+
}
|
|
4388
|
+
throw new CodexResetCreditsError(`Codex reset-credit request failed: ${error.message}`, "network");
|
|
4389
|
+
} finally {
|
|
4390
|
+
clearTimeout(timer);
|
|
4391
|
+
}
|
|
4392
|
+
}
|
|
4393
|
+
async function fetchCodexResetCredits(options = {}) {
|
|
4394
|
+
const authPath = options.authPath || defaultAuthPath();
|
|
4395
|
+
const timeoutMs = options.timeoutMs ?? 2e4;
|
|
4396
|
+
const fetchImpl = options.fetchImpl || globalThis.fetch;
|
|
4397
|
+
if (typeof fetchImpl !== "function") {
|
|
4398
|
+
throw new CodexResetCreditsError("This Node.js runtime does not provide fetch; use Node.js 18 or newer.", "network");
|
|
4399
|
+
}
|
|
4400
|
+
const { accessToken, accountId } = await readAuth(authPath);
|
|
4401
|
+
const json = await fetchWithTimeout(fetchImpl, accessToken, accountId, timeoutMs);
|
|
4402
|
+
return parseCreditsResponse(json);
|
|
4403
|
+
}
|
|
4404
|
+
function formatDateTimeParts(date, timeZone) {
|
|
4405
|
+
if (Number.isNaN(date.getTime())) return null;
|
|
4406
|
+
const formatter = new Intl.DateTimeFormat("en-CA", {
|
|
4407
|
+
timeZone,
|
|
4408
|
+
year: "numeric",
|
|
4409
|
+
month: "2-digit",
|
|
4410
|
+
day: "2-digit",
|
|
4411
|
+
hour: "2-digit",
|
|
4412
|
+
minute: "2-digit",
|
|
4413
|
+
second: "2-digit",
|
|
4414
|
+
hour12: false,
|
|
4415
|
+
timeZoneName: "short"
|
|
4416
|
+
});
|
|
4417
|
+
const parts = Object.fromEntries(formatter.formatToParts(date).map((part) => [part.type, part.value]));
|
|
4418
|
+
return `${parts.year}-${parts.month}-${parts.day} ${parts.hour}:${parts.minute}:${parts.second} ${parts.timeZoneName || ""}`.trim();
|
|
4419
|
+
}
|
|
4420
|
+
function formatLocalDateTime(value, timeZone) {
|
|
4421
|
+
return formatDateTimeParts(new Date(value), timeZone) || "invalid date";
|
|
4422
|
+
}
|
|
4423
|
+
function pad(value, width) {
|
|
4424
|
+
return value.length >= width ? value : `${value}${" ".repeat(width - value.length)}`;
|
|
4425
|
+
}
|
|
4426
|
+
function formatCodexResetCreditsTable(resetCredits, options = {}) {
|
|
4427
|
+
const rows = resetCredits.credits.map((credit, index) => {
|
|
4428
|
+
const row = {
|
|
4429
|
+
"#": String(index + 1),
|
|
4430
|
+
Status: credit.status,
|
|
4431
|
+
Granted: formatLocalDateTime(credit.grantedAt, options.timeZone),
|
|
4432
|
+
Expires: formatLocalDateTime(credit.expiresAt, options.timeZone),
|
|
4433
|
+
Title: credit.title
|
|
4434
|
+
};
|
|
4435
|
+
if (options.debug) {
|
|
4436
|
+
row.ID = credit.id || credit.creditId || "";
|
|
4437
|
+
}
|
|
4438
|
+
return row;
|
|
4439
|
+
});
|
|
4440
|
+
const headers = options.debug ? ["#", "Status", "Granted", "Expires", "Title", "ID"] : ["#", "Status", "Granted", "Expires", "Title"];
|
|
4441
|
+
const widths = Object.fromEntries(headers.map((header) => [
|
|
4442
|
+
header,
|
|
4443
|
+
Math.max(header.length, ...rows.map((row) => row[header]?.length ?? 0))
|
|
4444
|
+
]));
|
|
4445
|
+
const lines = [
|
|
4446
|
+
"Codex Reset Credits",
|
|
4447
|
+
`Available: ${resetCredits.availableCount}`,
|
|
4448
|
+
`Total earned: ${resetCredits.totalEarnedCount}`,
|
|
4449
|
+
""
|
|
4450
|
+
];
|
|
4451
|
+
if (rows.length === 0) {
|
|
4452
|
+
lines.push("No reset credits returned.");
|
|
4453
|
+
return lines.join("\n");
|
|
4454
|
+
}
|
|
4455
|
+
lines.push(headers.map((header) => pad(header, widths[header])).join(" "));
|
|
4456
|
+
lines.push(headers.map((header) => "-".repeat(widths[header])).join(" "));
|
|
4457
|
+
for (const row of rows) {
|
|
4458
|
+
lines.push(headers.map((header) => pad(row[header] || "", widths[header])).join(" "));
|
|
4459
|
+
}
|
|
4460
|
+
return lines.join("\n");
|
|
4461
|
+
}
|
|
4462
|
+
function toSafeCodexResetCreditsJson(resetCredits, options = {}) {
|
|
4463
|
+
return {
|
|
4464
|
+
availableCount: resetCredits.availableCount,
|
|
4465
|
+
totalEarnedCount: resetCredits.totalEarnedCount,
|
|
4466
|
+
credits: resetCredits.credits.map((credit, index) => ({
|
|
4467
|
+
resetNumber: index + 1,
|
|
4468
|
+
resetType: credit.resetType,
|
|
4469
|
+
status: credit.status,
|
|
4470
|
+
grantedAt: credit.grantedAt,
|
|
4471
|
+
expiresAt: credit.expiresAt,
|
|
4472
|
+
title: credit.title,
|
|
4473
|
+
...options.debug ? { id: credit.id, creditId: credit.creditId } : {}
|
|
4474
|
+
}))
|
|
4475
|
+
};
|
|
4476
|
+
}
|
|
4477
|
+
|
|
4252
4478
|
// src/limits/claude.ts
|
|
4253
4479
|
import { execFile as execFile2 } from "child_process";
|
|
4254
4480
|
import { randomUUID } from "crypto";
|
|
@@ -5153,9 +5379,9 @@ function displayUsageLimits(limits, options = {}) {
|
|
|
5153
5379
|
|
|
5154
5380
|
// src/config.ts
|
|
5155
5381
|
import { readFileSync, existsSync as existsSync3, writeFileSync } from "fs";
|
|
5156
|
-
import { homedir as
|
|
5157
|
-
import { join as
|
|
5158
|
-
var CONFIG_PATH =
|
|
5382
|
+
import { homedir as homedir6 } from "os";
|
|
5383
|
+
import { join as join8 } from "path";
|
|
5384
|
+
var CONFIG_PATH = join8(homedir6(), ".vibestats.json");
|
|
5159
5385
|
var DEFAULT_CONFIG = {
|
|
5160
5386
|
baseUrl: "https://vibestats.wolfai.dev",
|
|
5161
5387
|
outputFormat: "normal",
|
|
@@ -5232,6 +5458,8 @@ function printCommandHelp(error) {
|
|
|
5232
5458
|
console.error(" vibestats usage all");
|
|
5233
5459
|
console.error(" vibestats usage --combined --daily");
|
|
5234
5460
|
console.error(" vibestats usage codex --total");
|
|
5461
|
+
console.error(" vibestats codex-resets");
|
|
5462
|
+
console.error(" vibestats codex resets");
|
|
5235
5463
|
console.error(" vibestats wrapped");
|
|
5236
5464
|
console.error(" vibestats monitor --json");
|
|
5237
5465
|
console.error("");
|
|
@@ -5379,7 +5607,7 @@ async function publishArtifactWithFallback(artifact, baseUrl, fallbackUrl, prefe
|
|
|
5379
5607
|
var main = defineCommand({
|
|
5380
5608
|
meta: {
|
|
5381
5609
|
name: "vibestats",
|
|
5382
|
-
version: "1.4.
|
|
5610
|
+
version: "1.4.7",
|
|
5383
5611
|
description: "AI coding stats - usage tracking and annual wrapped for Claude Code & Codex"
|
|
5384
5612
|
},
|
|
5385
5613
|
args: {
|
|
@@ -5413,6 +5641,11 @@ var main = defineCommand({
|
|
|
5413
5641
|
description: "Output raw JSON stats",
|
|
5414
5642
|
default: false
|
|
5415
5643
|
},
|
|
5644
|
+
debug: {
|
|
5645
|
+
type: "boolean",
|
|
5646
|
+
description: "Include extra diagnostic fields where available (never prints auth tokens or account IDs)",
|
|
5647
|
+
default: false
|
|
5648
|
+
},
|
|
5416
5649
|
quiet: {
|
|
5417
5650
|
type: "boolean",
|
|
5418
5651
|
alias: "q",
|
|
@@ -5561,6 +5794,10 @@ var main = defineCommand({
|
|
|
5561
5794
|
await runLiveLimits(normalizedArgs, config);
|
|
5562
5795
|
return;
|
|
5563
5796
|
}
|
|
5797
|
+
if (intent.command === "codex-resets") {
|
|
5798
|
+
await runCodexResets(normalizedArgs);
|
|
5799
|
+
return;
|
|
5800
|
+
}
|
|
5564
5801
|
if (intent.command === "monitor") {
|
|
5565
5802
|
await runMonitor(normalizedArgs);
|
|
5566
5803
|
return;
|
|
@@ -5760,6 +5997,30 @@ async function runLiveLimits(args, config) {
|
|
|
5760
5997
|
showColors: config.theme?.enabled !== false
|
|
5761
5998
|
});
|
|
5762
5999
|
}
|
|
6000
|
+
async function runCodexResets(args) {
|
|
6001
|
+
try {
|
|
6002
|
+
const resetCredits = await fetchCodexResetCredits();
|
|
6003
|
+
if (args.json) {
|
|
6004
|
+
console.log(JSON.stringify(toSafeCodexResetCreditsJson(resetCredits, { debug: Boolean(args.debug) }), null, 2));
|
|
6005
|
+
return;
|
|
6006
|
+
}
|
|
6007
|
+
console.log(formatCodexResetCreditsTable(resetCredits, { debug: Boolean(args.debug) }));
|
|
6008
|
+
} catch (error) {
|
|
6009
|
+
if (error instanceof CodexResetCreditsError) {
|
|
6010
|
+
console.error(`Error: ${error.message}`);
|
|
6011
|
+
if (error.code === "missing-auth") {
|
|
6012
|
+
console.error("Open Codex Desktop and sign in, then try again.");
|
|
6013
|
+
} else if (error.code === "missing-token") {
|
|
6014
|
+
console.error("Open Codex Desktop and refresh your local session, then try again.");
|
|
6015
|
+
} else if (error.code === "bad-response") {
|
|
6016
|
+
console.error("The internal reset-credit endpoint may have changed.");
|
|
6017
|
+
}
|
|
6018
|
+
process.exit(1);
|
|
6019
|
+
}
|
|
6020
|
+
console.error(`Error: ${error.message}`);
|
|
6021
|
+
process.exit(1);
|
|
6022
|
+
}
|
|
6023
|
+
}
|
|
5763
6024
|
async function runWrapped(args, config) {
|
|
5764
6025
|
const options = resolveOptions(args, config);
|
|
5765
6026
|
const families = getSelectedModelFamilies(args);
|
package/dist/web/404.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><!--OTOSYSO_lYg8uryMGgC0P--><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/335de1248158d380.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-175b2f5685d7557b.js"/><script src="/_next/static/chunks/c476d598-9099ed8b975ae1d6.js" async=""></script><script src="/_next/static/chunks/498-74a3a367cb8442f0.js" async=""></script><script src="/_next/static/chunks/main-app-6619364ab1f13fb7.js" async=""></script><script src="/_next/static/chunks/app/layout-6ebd9b17af55ec02.js" async=""></script><link rel="preload" href="https://analytics.wolfai.dev/wolf-analytics.min.js" as="script"/><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><title>vibestats</title><meta name="description" content="Track Claude Code and OpenAI Codex CLI usage locally. Generate token, cost, wrapped, activity, and share reports without uploading prompts or responses."/><meta name="application-name" content="vibestats"/><meta name="keywords" content="vibestats,Claude Code stats,Codex CLI stats,AI coding stats,AI coding analytics,Claude Code wrapped,Codex usage tracker,developer analytics"/><meta name="robots" content="index, follow"/><link rel="canonical" href="https://vibestats.wolfai.dev"/><meta property="og:title" content="vibestats"/><meta property="og:description" content="Track Claude Code and OpenAI Codex CLI usage locally. Generate token, cost, wrapped, activity, and share reports without uploading prompts or responses."/><meta property="og:url" content="https://vibestats.wolfai.dev"/><meta property="og:site_name" content="vibestats"/><meta property="og:locale" content="en_US"/><meta property="og:type" content="website"/><meta name="twitter:card" content="summary"/><meta name="twitter:title" content="vibestats"/><meta name="twitter:description" content="Track Claude Code and OpenAI Codex CLI usage locally. Generate token, cost, wrapped, activity, and share reports without uploading prompts or responses."/><script>(self.__next_s=self.__next_s||[]).push([0,{"children":"window.WOLF_ANALYTICS_CONFIG = {\"apiUrl\":\"https://analapi.wolfai.dev\",\"projectApiKey\":\"wa_rMSm5mgj44W_9LzMsKCwwAipAtxPynp1tn4PbxN_Oa8\",\"mode\":\"intl\",\"sourceApp\":\"vibestats\"};","id":"wolf-analytics-config"}])</script><script>(self.__next_s=self.__next_s||[]).push(["https://analytics.wolfai.dev/wolf-analytics.min.js",{"id":"wolf-analytics-script"}])</script><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="antialiased min-h-screen bg-background text-foreground"><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/webpack-175b2f5685d7557b.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[7437,[\"177\",\"static/chunks/app/layout-6ebd9b17af55ec02.js\"],\"\"]\n3:I[5965,[],\"\"]\n4:I[3609,[],\"\"]\n5:I[496,[],\"OutletBoundary\"]\n7:I[3737,[],\"AsyncMetadataOutlet\"]\n9:I[496,[],\"ViewportBoundary\"]\nb:I[496,[],\"MetadataBoundary\"]\nc:\"$Sreact.suspense\"\ne:I[2207,[],\"\"]\n:HL[\"/_next/static/css/335de1248158d380.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"OTOSYSO_lYg8uryMGgC0P\",\"p\":\"\",\"c\":[\"\",\"_not-found\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/335de1248158d380.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"$L2\",null,{\"id\":\"wolf-analytics-config\",\"strategy\":\"beforeInteractive\",\"children\":\"window.WOLF_ANALYTICS_CONFIG = {\\\"apiUrl\\\":\\\"https://analapi.wolfai.dev\\\",\\\"projectApiKey\\\":\\\"wa_rMSm5mgj44W_9LzMsKCwwAipAtxPynp1tn4PbxN_Oa8\\\",\\\"mode\\\":\\\"intl\\\",\\\"sourceApp\\\":\\\"vibestats\\\"};\"}],[\"$\",\"$L2\",null,{\"id\":\"wolf-analytics-script\",\"src\":\"https://analytics.wolfai.dev/wolf-analytics.min.js\",\"strategy\":\"beforeInteractive\"}]]}],[\"$\",\"body\",null,{\"className\":\"antialiased min-h-screen bg-background text-foreground\",\"children\":[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]]}]]}],{\"children\":[\"/_not-found\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L5\",null,{\"children\":[\"$L6\",[\"$\",\"$L7\",null,{\"promise\":\"$@8\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[[\"$\",\"$L9\",null,{\"children\":\"$La\"}],null],[\"$\",\"$Lb\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$c\",null,{\"fallback\":null,\"children\":\"$Ld\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$e\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"a:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n6:null\n"])</script><script>self.__next_f.push([1,"8:{\"metadata\":[[\"$\",\"title\",\"0\",{\"children\":\"vibestats\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Track Claude Code and OpenAI Codex CLI usage locally. Generate token, cost, wrapped, activity, and share reports without uploading prompts or responses.\"}],[\"$\",\"meta\",\"2\",{\"name\":\"application-name\",\"content\":\"vibestats\"}],[\"$\",\"meta\",\"3\",{\"name\":\"keywords\",\"content\":\"vibestats,Claude Code stats,Codex CLI stats,AI coding stats,AI coding analytics,Claude Code wrapped,Codex usage tracker,developer analytics\"}],[\"$\",\"meta\",\"4\",{\"name\":\"robots\",\"content\":\"index, follow\"}],[\"$\",\"link\",\"5\",{\"rel\":\"canonical\",\"href\":\"https://vibestats.wolfai.dev\"}],[\"$\",\"meta\",\"6\",{\"property\":\"og:title\",\"content\":\"vibestats\"}],[\"$\",\"meta\",\"7\",{\"property\":\"og:description\",\"content\":\"Track Claude Code and OpenAI Codex CLI usage locally. Generate token, cost, wrapped, activity, and share reports without uploading prompts or responses.\"}],[\"$\",\"meta\",\"8\",{\"property\":\"og:url\",\"content\":\"https://vibestats.wolfai.dev\"}],[\"$\",\"meta\",\"9\",{\"property\":\"og:site_name\",\"content\":\"vibestats\"}],[\"$\",\"meta\",\"10\",{\"property\":\"og:locale\",\"content\":\"en_US\"}],[\"$\",\"meta\",\"11\",{\"property\":\"og:type\",\"content\":\"website\"}],[\"$\",\"meta\",\"12\",{\"name\":\"twitter:card\",\"content\":\"summary\"}],[\"$\",\"meta\",\"13\",{\"name\":\"twitter:title\",\"content\":\"vibestats\"}],[\"$\",\"meta\",\"14\",{\"name\":\"twitter:description\",\"content\":\"Track Claude Code and OpenAI Codex CLI usage locally. Generate token, cost, wrapped, activity, and share reports without uploading prompts or responses.\"}]],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"d:\"$8:metadata\"\n"])</script></body></html>
|
|
1
|
+
<!DOCTYPE html><!--O1feF7gPLeHeL0mJlyXjP--><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/335de1248158d380.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-175b2f5685d7557b.js"/><script src="/_next/static/chunks/c476d598-9099ed8b975ae1d6.js" async=""></script><script src="/_next/static/chunks/498-74a3a367cb8442f0.js" async=""></script><script src="/_next/static/chunks/main-app-f5021d739a517f33.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><title>vibestats</title><meta name="description" content="Track Claude Code and OpenAI Codex CLI usage locally. Generate token, cost, wrapped, activity, and share reports without uploading prompts or responses."/><meta name="application-name" content="vibestats"/><meta name="keywords" content="vibestats,Claude Code stats,Codex CLI stats,AI coding stats,AI coding analytics,Claude Code wrapped,Codex usage tracker,developer analytics"/><meta name="robots" content="index, follow"/><link rel="canonical" href="https://vibestats.wolfai.dev"/><meta property="og:title" content="vibestats"/><meta property="og:description" content="Track Claude Code and OpenAI Codex CLI usage locally. Generate token, cost, wrapped, activity, and share reports without uploading prompts or responses."/><meta property="og:url" content="https://vibestats.wolfai.dev"/><meta property="og:site_name" content="vibestats"/><meta property="og:locale" content="en_US"/><meta property="og:type" content="website"/><meta name="twitter:card" content="summary"/><meta name="twitter:title" content="vibestats"/><meta name="twitter:description" content="Track Claude Code and OpenAI Codex CLI usage locally. Generate token, cost, wrapped, activity, and share reports without uploading prompts or responses."/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="antialiased min-h-screen bg-background text-foreground"><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/webpack-175b2f5685d7557b.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[5965,[],\"\"]\n3:I[3609,[],\"\"]\n4:I[496,[],\"OutletBoundary\"]\n6:I[3737,[],\"AsyncMetadataOutlet\"]\n8:I[496,[],\"ViewportBoundary\"]\na:I[496,[],\"MetadataBoundary\"]\nb:\"$Sreact.suspense\"\nd:I[2207,[],\"\"]\n:HL[\"/_next/static/css/335de1248158d380.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"O1feF7gPLeHeL0mJlyXjP\",\"p\":\"\",\"c\":[\"\",\"_not-found\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/335de1248158d380.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[[\"$\",\"head\",null,{\"children\":null}],[\"$\",\"body\",null,{\"className\":\"antialiased min-h-screen bg-background text-foreground\",\"children\":[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]]}]]}],{\"children\":[\"/_not-found\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L4\",null,{\"children\":[\"$L5\",[\"$\",\"$L6\",null,{\"promise\":\"$@7\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],null],[\"$\",\"$La\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$b\",null,{\"fallback\":null,\"children\":\"$Lc\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$d\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n5:null\n"])</script><script>self.__next_f.push([1,"7:{\"metadata\":[[\"$\",\"title\",\"0\",{\"children\":\"vibestats\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Track Claude Code and OpenAI Codex CLI usage locally. Generate token, cost, wrapped, activity, and share reports without uploading prompts or responses.\"}],[\"$\",\"meta\",\"2\",{\"name\":\"application-name\",\"content\":\"vibestats\"}],[\"$\",\"meta\",\"3\",{\"name\":\"keywords\",\"content\":\"vibestats,Claude Code stats,Codex CLI stats,AI coding stats,AI coding analytics,Claude Code wrapped,Codex usage tracker,developer analytics\"}],[\"$\",\"meta\",\"4\",{\"name\":\"robots\",\"content\":\"index, follow\"}],[\"$\",\"link\",\"5\",{\"rel\":\"canonical\",\"href\":\"https://vibestats.wolfai.dev\"}],[\"$\",\"meta\",\"6\",{\"property\":\"og:title\",\"content\":\"vibestats\"}],[\"$\",\"meta\",\"7\",{\"property\":\"og:description\",\"content\":\"Track Claude Code and OpenAI Codex CLI usage locally. Generate token, cost, wrapped, activity, and share reports without uploading prompts or responses.\"}],[\"$\",\"meta\",\"8\",{\"property\":\"og:url\",\"content\":\"https://vibestats.wolfai.dev\"}],[\"$\",\"meta\",\"9\",{\"property\":\"og:site_name\",\"content\":\"vibestats\"}],[\"$\",\"meta\",\"10\",{\"property\":\"og:locale\",\"content\":\"en_US\"}],[\"$\",\"meta\",\"11\",{\"property\":\"og:type\",\"content\":\"website\"}],[\"$\",\"meta\",\"12\",{\"name\":\"twitter:card\",\"content\":\"summary\"}],[\"$\",\"meta\",\"13\",{\"name\":\"twitter:title\",\"content\":\"vibestats\"}],[\"$\",\"meta\",\"14\",{\"name\":\"twitter:description\",\"content\":\"Track Claude Code and OpenAI Codex CLI usage locally. Generate token, cost, wrapped, activity, and share reports without uploading prompts or responses.\"}]],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"c:\"$7:metadata\"\n"])</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[492],{5288:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"styles",{enumerable:!0,get:function(){return l}});let l={error:{fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},desc:{display:"inline-block"},h1:{display:"inline-block",margin:"0 20px 0 0",padding:"0 23px 0 0",fontSize:24,fontWeight:500,verticalAlign:"top",lineHeight:"49px"},h2:{fontSize:14,fontWeight:400,lineHeight:"49px",margin:0}};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7593:(e,t,l)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o}});let r=l(8481),n=l(9945),o=function(){return(0,r.jsx)("html",{children:(0,r.jsx)("body",{children:(0,r.jsx)(n.HTTPAccessErrorFallback,{status:404,message:"This page could not be found."})})})};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[492],{5288:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"styles",{enumerable:!0,get:function(){return l}});let l={error:{fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},desc:{display:"inline-block"},h1:{display:"inline-block",margin:"0 20px 0 0",padding:"0 23px 0 0",fontSize:24,fontWeight:500,verticalAlign:"top",lineHeight:"49px"},h2:{fontSize:14,fontWeight:400,lineHeight:"49px",margin:0}};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7593:(e,t,l)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o}});let r=l(8481),n=l(9945),o=function(){return(0,r.jsx)("html",{children:(0,r.jsx)("body",{children:(0,r.jsx)(n.HTTPAccessErrorFallback,{status:404,message:"This page could not be found."})})})};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8065:(e,t,l)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/_not-found/page",function(){return l(7593)}])},9945:(e,t,l)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"HTTPAccessErrorFallback",{enumerable:!0,get:function(){return o}});let r=l(8481),n=l(5288);function o(e){let{status:t,message:l}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("title",{children:t+": "+l}),(0,r.jsx)("div",{style:n.styles.error,children:(0,r.jsxs)("div",{children:[(0,r.jsx)("style",{dangerouslySetInnerHTML:{__html:"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}),(0,r.jsx)("h1",{className:"next-error-h1",style:n.styles.h1,children:t}),(0,r.jsx)("div",{style:n.styles.desc,children:(0,r.jsx)("h2",{style:n.styles.h2,children:l})})]})})]})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}},e=>{e.O(0,[59,498,358],()=>e(e.s=8065)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6,40,54,74,180,402,546,679,683,866,874,944],{
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6,40,54,74,180,402,546,679,683,866,874,944],{7066:(e,s,_)=>{Promise.resolve().then(_.t.bind(_,4816,23))}},e=>{e.O(0,[816,59,498,358],()=>e(e.s=7066)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6,40,54,74,180,402,546,679,683,866,874,944],{
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6,40,54,74,180,402,546,679,683,866,874,944],{7066:(e,s,_)=>{Promise.resolve().then(_.t.bind(_,4816,23))}},e=>{e.O(0,[816,59,498,358],()=>e(e.s=7066)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6,40,54,74,180,402,546,679,683,866,874,944],{
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6,40,54,74,180,402,546,679,683,866,874,944],{7066:(e,s,_)=>{Promise.resolve().then(_.t.bind(_,4816,23))}},e=>{e.O(0,[816,59,498,358],()=>e(e.s=7066)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6,40,54,74,180,402,546,679,683,866,874,944],{
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6,40,54,74,180,402,546,679,683,866,874,944],{7066:(e,s,_)=>{Promise.resolve().then(_.t.bind(_,4816,23))}},e=>{e.O(0,[816,59,498,358],()=>e(e.s=7066)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[199],{539:(e,t,a)=>{"use strict";a.d(t,{Xv:()=>l,b6:()=>i,zP:()=>d}),a(5603);var s=a(471).Buffer;function n(e){let t=Number.parseFloat(e);return e.endsWith("B")?1e9*t:e.endsWith("M")?1e6*t:e.endsWith("K")?1e3*t:t}function c(e){let t=e.trim().toLowerCase(),a=(e,a)=>{let s=a.replace(/\./g,"[\\s._-]*"),n=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),c="(?:^|[^a-z0-9])",o="(?:[^a-z0-9]|$)";return new RegExp("".concat(c).concat(n,"(?:[^a-z0-9]+)?").concat(s).concat(o)).test(t)||new RegExp("".concat(c).concat(s,"(?:[^a-z0-9]+)?").concat(n).concat(o)).test(t)};return t.includes("accounts/fireworks/routers/kimi-k2p5-turbo")||t.includes("accounts/fireworks/models/kimi-k2p5-turbo")||t.includes("custom:kimi-k2.5-turbo")||t.includes("custom:kimi-k2p5-turbo")||t.includes("kimi")&&(t.includes("k2.5")||t.includes("k2p5"))&&t.includes("turbo")?"Kimi K2.5 Turbo":t.includes("custom:minimax-m2.7")||t.includes("custom:minimax-m2-7")||t.includes("minimax-m2.7")||t.includes("minimax-m2-7")?"MiniMax-M2.7":t.includes("fable")?"Claude Fable":a("opus","4.8")?"Opus 4.8":a("opus","4.7")?"Opus 4.7":a("opus","4.6")?"Opus 4.6":a("opus","4.5")?"Opus 4.5":a("opus","4.1")?"Opus 4.1":t.includes("opus")?"Opus 4.8":a("sonnet","4.6")?"Sonnet 4.6":a("sonnet","4.5")?"Sonnet 4.5":a("sonnet","3.5")?"Sonnet 3.5":t.includes("sonnet")?"Sonnet":a("haiku","4.5")?"Haiku 4.5":a("haiku","3.5")?"Haiku 3.5":t.includes("haiku")?"Haiku":e}function o(e){var t;if(e.startsWith("raw_"))try{return c(decodeURIComponent(e.slice(4)))}catch(t){return c(e.slice(4))}return c(null!=(t=({fable:"Claude Fable",o48:"Opus 4.8",o47:"Opus 4.7",o46:"Opus 4.6",o45:"Opus 4.5",o41:"Opus 4.1",opus:"Opus 4.8",s46:"Sonnet 4.6",s45:"Sonnet 4.5",s35:"Sonnet 3.5",sonnet:"Sonnet",h45:"Haiku 4.5",h35:"Haiku 3.5",haiku:"Haiku",g54:"GPT-5.4",g53s:"GPT-5.3 Codex Spark",g53c:"GPT-5.3 Codex",g53:"GPT-5.3",g52c:"GPT-5.2 Codex",g52:"GPT-5.2",g51cm:"GPT-5.1 Codex Max",g51m:"GPT-5.1 Max",g51cn:"GPT-5.1 Codex Mini",g51n:"GPT-5.1 Mini",g51c:"GPT-5.1 Codex",g51:"GPT-5.1",g5:"GPT-5",g5n:"GPT-5 Mini",g4o:"GPT-4o",g4om:"GPT-4o Mini"})[e])?t:e)}function r(e){if(e)try{if(void 0!==s)return JSON.parse(s.from(e,"base64url").toString("utf-8"));let t=e.replace(/-/g,"+").replace(/_/g,"/");return JSON.parse(atob(t))}catch(e){return}}function l(e){var t;let a=e.get("s");if(!a)return null;let s=e.get("src"),c=(e.get("mb")||"").split(",").map(e=>{let[t,a]=e.split(":");return t?{model:o(t),percentage:Number.parseInt(null!=a?a:"0",10)||0}:null}).filter(e=>!!e);return{sessions:Number.parseInt(a,10),messages:0,totalTokens:n(e.get("t")||"0"),totalCost:Number.parseFloat(e.get("c")||"0"),daysActive:Number.parseInt(e.get("d")||"0",10),longestStreak:Number.parseInt(e.get("ls")||"0",10),currentStreak:Number.parseInt(e.get("cs")||"0",10),peakHour:Number.parseInt(e.get("ph")||"12",10),peakDay:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][Number.parseInt(e.get("pd")||"0",10)]||"Monday",busiestMonth:"",favoriteModel:o(e.get("fm")||""),modelBreakdown:c,wordsGenerated:n(e.get("wg")||"0"),firstSessionDate:e.get("fad")||"",topProject:e.get("tp")||void 0,projectCount:e.get("pc")?Number.parseInt(e.get("pc"),10):void 0,topTools:(null==(t=e.get("tt"))?void 0:t.split(","))||void 0,source:"codex"===s?"codex":"combined"===s?"combined":"claude",activity:r(e.get("act"))}}function i(e){if(!(e.get("tot")||e.get("agg")))return null;let t=e.get("src"),a=e.get("agg")||"d",s="m"===a?"monthly":"mo"===a?"model":"t"===a?"total":"daily",[c,r]=(e.get("dr")||"").split("-"),l=(e.get("rows")||"").split("|").filter(Boolean).map(e=>{let t=e.split(":"),a=t[0]||"";return{key:"daily"===s&&4===a.length?"".concat(new Date().getFullYear(),"-").concat(a.slice(0,2),"-").concat(a.slice(2,4)):a,inputTokens:n(t[1]||"0"),outputTokens:n(t[2]||"0"),cacheWriteTokens:n(t[3]||"0"),cacheReadTokens:n(t[4]||"0"),totalTokens:n(t[5]||"0"),cost:Number.parseFloat(t[6]||"0")}}),i=(e.get("tot")||"").split(":"),d=(e.get("mb")||"").split(",").filter(Boolean).map(e=>{let[t,a,s]=e.split(":");return{model:o(t||""),tokens:0,cost:Number.parseFloat(s||"0"),percentage:Number.parseInt(a||"0",10)||0}});return{rows:l,totals:{inputTokens:n(i[0]||"0"),outputTokens:n(i[1]||"0"),cacheWriteTokens:n(i[2]||"0"),cacheReadTokens:n(i[3]||"0"),totalTokens:n(i[4]||"0"),cost:Number.parseFloat(i[5]||"0")},source:"codex"===t?"codex":"combined"===t?"combined":"claude",aggregation:s,dateRange:{start:c?"".concat(c.slice(0,4),"-").concat(c.slice(4,6),"-").concat(c.slice(6,8)):"",end:r?"".concat(r.slice(0,4),"-").concat(r.slice(4,6),"-").concat(r.slice(6,8)):""},modelBreakdown:d}}function d(e){return r(e.get("activity"))||null}},6427:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>x});var s=a(8481),n=a(8526),c=a(3973);let o=["bg-[#fff1df] border-[#fde2bd]","bg-[#ffd9a6] border-[#f8cb90]","bg-[#f7bc70] border-[#e9a95d]","bg-[#ef9339] border-[#df842d]","bg-[#bb5d0d] border-[#a44f07]"];function r(e){let{graph:t,compact:a=!1}=e;return(0,s.jsxs)("div",{className:"border border-[#f2d9b2] bg-white/95 shadow-[0_35px_80px_rgba(186,101,18,0.12)] ".concat(a?"rounded-[1.3rem] p-4 md:p-5":"rounded-[2rem] p-6 md:p-8"),children:[(0,s.jsxs)("div",{className:"".concat(a?"mb-3":"mb-5"," flex flex-wrap items-end justify-between gap-4"),children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"".concat(a?"text-[0.64rem]":"text-[0.7rem]"," font-semibold uppercase tracking-[0.28em] text-slate-500"),children:"Activity Graph"}),(0,s.jsxs)("h3",{className:"font-[family-name:var(--font-display)] text-slate-900 ".concat(a?"text-[1.55rem] md:text-[2rem]":"text-3xl md:text-4xl"),children:["Last ",t.weeks.length," weeks"]})]}),(0,s.jsxs)("div",{className:"".concat(a?"text-[0.74rem]":"text-sm"," text-right text-slate-500"),children:[(0,s.jsx)("div",{children:t.startDate}),(0,s.jsx)("div",{children:t.endDate})]})]}),(0,s.jsx)("div",{className:"".concat(a?"mb-2 gap-2 pl-9 text-[11px]":"mb-4 gap-3 pl-12 text-xs"," flex font-medium text-slate-500"),children:t.monthLabels.map(e=>(0,s.jsx)("div",{style:{marginLeft:0===e.weekIndex?0:void 0},children:e.label},"".concat(e.label,"-").concat(e.weekIndex)))}),(0,s.jsxs)("div",{className:"".concat(a?"gap-2":"gap-3"," flex overflow-x-auto"),children:[(0,s.jsx)("div",{className:"".concat(a?"mt-0.5 gap-1.5 pr-0.5 text-[10px]":"mt-1 gap-2 pr-1 text-xs"," grid grid-rows-7 font-medium text-slate-500"),children:t.weekdayLabels.map((e,t)=>(0,s.jsx)("div",{className:"flex ".concat(a?"h-3":"h-4"," items-center"),children:e},"".concat(e,"-").concat(t)))}),(0,s.jsx)("div",{className:"grid auto-cols-max grid-flow-col ".concat(a?"gap-1.5":"gap-2"),children:t.weeks.map((e,n)=>{var c;return(0,s.jsx)("div",{className:"grid grid-rows-7 ".concat(a?"gap-1.5":"gap-2"),children:e.map(e=>{var n;return(0,s.jsx)("div",{className:"group relative z-0 border ".concat(a?"h-3.5 w-3.5 rounded-[4px]":"h-4 w-4 rounded-[5px]"," hover:z-30 ").concat(o[e.intensity]),children:(0,s.jsxs)("div",{className:"pointer-events-none absolute left-1/2 top-full z-40 hidden -translate-x-1/2 bg-slate-950 text-white shadow-xl group-hover:block ".concat(a?"mt-1.5 w-36 rounded-lg px-2.5 py-1.5 text-[10px]":"mt-2 w-44 rounded-xl px-3 py-2 text-[11px]"),children:[(0,s.jsx)("div",{className:"font-semibold",children:e.date}),(0,s.jsx)("div",{className:"mt-1 text-slate-300",children:"sessions"===(n=t.metric)?"".concat(e.sessionCount," sessions"):"messages"===n?"".concat(e.messageCount," messages"):e.totalTokens>=1e9?"".concat((e.totalTokens/1e9).toFixed(2),"B tokens"):e.totalTokens>=1e6?"".concat((e.totalTokens/1e6).toFixed(1),"M tokens"):e.totalTokens>=1e3?"".concat((e.totalTokens/1e3).toFixed(1),"K tokens"):"".concat(e.totalTokens," tokens")})]})},e.date)})},"".concat(n,"-").concat((null==(c=e[0])?void 0:c.date)||"empty"))})})]}),(0,s.jsxs)("div",{className:"".concat(a?"mt-3 gap-2 text-[10px]":"mt-6 gap-3 text-xs"," flex items-center justify-end uppercase tracking-[0.16em] text-slate-400"),children:[(0,s.jsx)("span",{children:"Less"}),(0,s.jsx)("div",{className:"flex ".concat(a?"gap-1":"gap-1.5"),children:t.legend.map(e=>(0,s.jsx)("span",{className:"".concat(a?"h-3 w-3 rounded-[4px]":"h-4 w-4 rounded-[5px]"," border ").concat(o[e.intensity]),title:"".concat(e.label,": ").concat(e.min,"-").concat(e.max)},e.intensity))}),(0,s.jsx)("span",{children:"More"})]})]})}function l(e){return e>=1e9?"".concat((e/1e9).toFixed(2),"B"):e>=1e6?"".concat((e/1e6).toFixed(1),"M"):e>=1e3?"".concat((e/1e3).toFixed(1),"K"):e.toLocaleString("en-US")}function i(e){let{label:t,value:a,tone:n="default",compact:c=!1}=e;return(0,s.jsxs)("div",{className:"".concat(c?"h-full rounded-[1rem] p-3.5":"rounded-[1.6rem] p-5"," border ").concat("accent"===n?"border-[#f3c788] bg-[#fff5e8] shadow-[0_24px_55px_rgba(201,113,28,0.14)]":"border-slate-200 bg-white/95 shadow-[0_20px_40px_rgba(15,23,42,0.06)]"),children:[(0,s.jsx)("div",{className:"".concat(c?"text-[0.62rem]":"text-[0.72rem]"," font-semibold uppercase tracking-[0.22em] text-slate-500"),children:t}),(0,s.jsx)("div",{className:"".concat(c?"mt-2 text-[1.6rem] leading-[1.1]":"mt-3 text-4xl"," font-[family-name:var(--font-display)] text-slate-900"),children:a})]})}function d(e){let{eyebrow:t,title:a,subtitle:n,compact:c=!1,children:o}=e;return(0,s.jsx)("main",{className:"min-h-screen bg-[radial-gradient(circle_at_top_left,_rgba(253,186,116,0.22),_transparent_35%),linear-gradient(180deg,#fff9f1_0%,#fff1de_100%)] text-slate-900 ".concat(c?"px-3 py-5 md:px-6 md:py-8":"px-4 py-8 md:px-8 md:py-12"),children:(0,s.jsxs)("div",{className:"mx-auto max-w-7xl",children:[(0,s.jsxs)("header",{className:"border border-white/70 bg-white/80 shadow-[0_30px_80px_rgba(191,104,24,0.12)] backdrop-blur ".concat(c?"mb-6 rounded-[1.35rem] px-5 py-5 md:px-6 md:py-6":"mb-10 rounded-[2rem] px-6 py-8 md:px-10"),children:[(0,s.jsx)("p",{className:"text-[0.72rem] font-semibold uppercase tracking-[0.28em] text-slate-500",children:t}),(0,s.jsx)("h1",{className:"max-w-4xl font-[family-name:var(--font-display)] leading-none text-slate-950 ".concat(c?"mt-3 text-[2rem] md:text-[3.4rem]":"mt-4 text-5xl md:text-7xl"),children:a}),(0,s.jsx)("p",{className:"".concat(c?"mt-3 text-sm leading-6 md:text-base":"mt-5 text-base leading-7 md:text-lg"," max-w-3xl text-slate-600"),children:n})]}),o]})})}function m(e){let{share:t,payload:a}=e;return(0,s.jsx)(d,{eyebrow:"Vibestats Activity",title:a.title,subtitle:"A GitHub-style year view of your coding activity, tuned for elegant sharing on the web and as an image.",compact:!0,children:(0,s.jsxs)("section",{className:"grid gap-4 lg:grid-cols-[minmax(0,1.55fr)_minmax(0,0.85fr)]",children:[(0,s.jsx)("div",{className:"min-w-0",children:(0,s.jsx)(r,{graph:a.activity,compact:!0})}),(0,s.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2 lg:h-full lg:auto-rows-fr lg:grid-cols-2",children:[(0,s.jsx)(i,{label:"Input Tokens",value:l(a.activity.summary.inputTokens),compact:!0}),(0,s.jsx)(i,{label:"Output Tokens",value:l(a.activity.summary.outputTokens),compact:!0}),(0,s.jsx)(i,{label:"Longest Streak",value:"".concat(a.activity.summary.longestStreak,"d"),compact:!0}),(0,s.jsx)(i,{label:"Current Streak",value:"".concat(a.activity.summary.currentStreak,"d"),tone:"accent",compact:!0}),(0,s.jsx)(i,{label:"Recent 30 Days",value:l(a.activity.summary.recent30DayTotal),compact:!0}),(0,s.jsx)(i,{label:"Top Model",value:a.activity.summary.favoriteModel,compact:!0}),(0,s.jsx)(i,{label:"Active Days",value:"".concat(a.activity.summary.activeDays),compact:!0}),(0,s.jsx)(i,{label:"Share",value:t.slug,compact:!0})]})]})})}var u=a(539);function p(){let e=(0,c.useSearchParams)(),[t,a]=(0,n.useState)(null),[o,r]=(0,n.useState)(null);return((0,n.useEffect)(()=>{let t=e.get("a");if(!t)return void r("no activity payload in URL");if(t.startsWith("json:")){let e=t.slice(5);fetch("/data/".concat(e,".json")).then(e=>e.ok?e.json():Promise.reject(Error("fetch failed"))).then(e=>a(e)).catch(e=>r(e.message));return}let s=new URLSearchParams(t),n=(0,u.zP)(s);n?a(n):r("could not decode activity payload")},[e]),o)?(0,s.jsxs)("main",{className:"p-8 text-red-400",children:["Error: ",o]}):t?(0,s.jsx)(m,{share:{slug:"local",kind:"local",targetPath:"/dashboard/activity",url:"",legacyQuery:""},payload:t}):(0,s.jsx)("main",{className:"p-8 text-stone-400",children:"Loading…"})}function x(){return(0,s.jsx)(n.Suspense,{fallback:(0,s.jsx)("main",{className:"p-8 text-stone-400",children:"Loading…"}),children:(0,s.jsx)(p,{})})}},8082:(e,t,a)=>{Promise.resolve().then(a.bind(a,6427))}},e=>{e.O(0,[971,59,498,358],()=>e(e.s=8082)),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[199],{539:(e,t,a)=>{"use strict";a.d(t,{Xv:()=>l,b6:()=>i,zP:()=>d}),a(5603);var s=a(471).Buffer;function n(e){let t=Number.parseFloat(e);return e.endsWith("B")?1e9*t:e.endsWith("M")?1e6*t:e.endsWith("K")?1e3*t:t}function c(e){let t=e.trim().toLowerCase(),a=(e,a)=>{let s=a.replace(/\./g,"[\\s._-]*"),n=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),c="(?:^|[^a-z0-9])",o="(?:[^a-z0-9]|$)";return new RegExp("".concat(c).concat(n,"(?:[^a-z0-9]+)?").concat(s).concat(o)).test(t)||new RegExp("".concat(c).concat(s,"(?:[^a-z0-9]+)?").concat(n).concat(o)).test(t)};return t.includes("accounts/fireworks/routers/kimi-k2p5-turbo")||t.includes("accounts/fireworks/models/kimi-k2p5-turbo")||t.includes("custom:kimi-k2.5-turbo")||t.includes("custom:kimi-k2p5-turbo")||t.includes("kimi")&&(t.includes("k2.5")||t.includes("k2p5"))&&t.includes("turbo")?"Kimi K2.5 Turbo":t.includes("custom:minimax-m2.7")||t.includes("custom:minimax-m2-7")||t.includes("minimax-m2.7")||t.includes("minimax-m2-7")?"MiniMax-M2.7":t.includes("fable")?"Claude Fable":a("opus","4.8")?"Opus 4.8":a("opus","4.7")?"Opus 4.7":a("opus","4.6")?"Opus 4.6":a("opus","4.5")?"Opus 4.5":a("opus","4.1")?"Opus 4.1":t.includes("opus")?"Opus 4.8":a("sonnet","4.6")?"Sonnet 4.6":a("sonnet","4.5")?"Sonnet 4.5":a("sonnet","3.5")?"Sonnet 3.5":t.includes("sonnet")?"Sonnet":a("haiku","4.5")?"Haiku 4.5":a("haiku","3.5")?"Haiku 3.5":t.includes("haiku")?"Haiku":e}function o(e){var t;if(e.startsWith("raw_"))try{return c(decodeURIComponent(e.slice(4)))}catch(t){return c(e.slice(4))}return c(null!=(t=({fable:"Claude Fable",o48:"Opus 4.8",o47:"Opus 4.7",o46:"Opus 4.6",o45:"Opus 4.5",o41:"Opus 4.1",opus:"Opus 4.8",s46:"Sonnet 4.6",s45:"Sonnet 4.5",s35:"Sonnet 3.5",sonnet:"Sonnet",h45:"Haiku 4.5",h35:"Haiku 3.5",haiku:"Haiku",g54:"GPT-5.4",g53s:"GPT-5.3 Codex Spark",g53c:"GPT-5.3 Codex",g53:"GPT-5.3",g52c:"GPT-5.2 Codex",g52:"GPT-5.2",g51cm:"GPT-5.1 Codex Max",g51m:"GPT-5.1 Max",g51cn:"GPT-5.1 Codex Mini",g51n:"GPT-5.1 Mini",g51c:"GPT-5.1 Codex",g51:"GPT-5.1",g5:"GPT-5",g5n:"GPT-5 Mini",g4o:"GPT-4o",g4om:"GPT-4o Mini"})[e])?t:e)}function r(e){if(e)try{if(void 0!==s)return JSON.parse(s.from(e,"base64url").toString("utf-8"));let t=e.replace(/-/g,"+").replace(/_/g,"/");return JSON.parse(atob(t))}catch(e){return}}function l(e){var t;let a=e.get("s");if(!a)return null;let s=e.get("src"),c=(e.get("mb")||"").split(",").map(e=>{let[t,a]=e.split(":");return t?{model:o(t),percentage:Number.parseInt(null!=a?a:"0",10)||0}:null}).filter(e=>!!e);return{sessions:Number.parseInt(a,10),messages:0,totalTokens:n(e.get("t")||"0"),totalCost:Number.parseFloat(e.get("c")||"0"),daysActive:Number.parseInt(e.get("d")||"0",10),longestStreak:Number.parseInt(e.get("ls")||"0",10),currentStreak:Number.parseInt(e.get("cs")||"0",10),peakHour:Number.parseInt(e.get("ph")||"12",10),peakDay:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][Number.parseInt(e.get("pd")||"0",10)]||"Monday",busiestMonth:"",favoriteModel:o(e.get("fm")||""),modelBreakdown:c,wordsGenerated:n(e.get("wg")||"0"),firstSessionDate:e.get("fad")||"",topProject:e.get("tp")||void 0,projectCount:e.get("pc")?Number.parseInt(e.get("pc"),10):void 0,topTools:(null==(t=e.get("tt"))?void 0:t.split(","))||void 0,source:"codex"===s?"codex":"combined"===s?"combined":"claude",activity:r(e.get("act"))}}function i(e){if(!(e.get("tot")||e.get("agg")))return null;let t=e.get("src"),a=e.get("agg")||"d",s="m"===a?"monthly":"mo"===a?"model":"t"===a?"total":"daily",[c,r]=(e.get("dr")||"").split("-"),l=(e.get("rows")||"").split("|").filter(Boolean).map(e=>{let t=e.split(":"),a=t[0]||"";return{key:"daily"===s&&4===a.length?"".concat(new Date().getFullYear(),"-").concat(a.slice(0,2),"-").concat(a.slice(2,4)):a,inputTokens:n(t[1]||"0"),outputTokens:n(t[2]||"0"),cacheWriteTokens:n(t[3]||"0"),cacheReadTokens:n(t[4]||"0"),totalTokens:n(t[5]||"0"),cost:Number.parseFloat(t[6]||"0")}}),i=(e.get("tot")||"").split(":"),d=(e.get("mb")||"").split(",").filter(Boolean).map(e=>{let[t,a,s]=e.split(":");return{model:o(t||""),tokens:0,cost:Number.parseFloat(s||"0"),percentage:Number.parseInt(a||"0",10)||0}});return{rows:l,totals:{inputTokens:n(i[0]||"0"),outputTokens:n(i[1]||"0"),cacheWriteTokens:n(i[2]||"0"),cacheReadTokens:n(i[3]||"0"),totalTokens:n(i[4]||"0"),cost:Number.parseFloat(i[5]||"0")},source:"codex"===t?"codex":"combined"===t?"combined":"claude",aggregation:s,dateRange:{start:c?"".concat(c.slice(0,4),"-").concat(c.slice(4,6),"-").concat(c.slice(6,8)):"",end:r?"".concat(r.slice(0,4),"-").concat(r.slice(4,6),"-").concat(r.slice(6,8)):""},modelBreakdown:d}}function d(e){return r(e.get("activity"))||null}},6427:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>x});var s=a(8481),n=a(8526),c=a(3973);let o=["bg-[#fff1df] border-[#fde2bd]","bg-[#ffd9a6] border-[#f8cb90]","bg-[#f7bc70] border-[#e9a95d]","bg-[#ef9339] border-[#df842d]","bg-[#bb5d0d] border-[#a44f07]"];function r(e){let{graph:t,compact:a=!1}=e;return(0,s.jsxs)("div",{className:"border border-[#f2d9b2] bg-white/95 shadow-[0_35px_80px_rgba(186,101,18,0.12)] ".concat(a?"rounded-[1.3rem] p-4 md:p-5":"rounded-[2rem] p-6 md:p-8"),children:[(0,s.jsxs)("div",{className:"".concat(a?"mb-3":"mb-5"," flex flex-wrap items-end justify-between gap-4"),children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"".concat(a?"text-[0.64rem]":"text-[0.7rem]"," font-semibold uppercase tracking-[0.28em] text-slate-500"),children:"Activity Graph"}),(0,s.jsxs)("h3",{className:"font-[family-name:var(--font-display)] text-slate-900 ".concat(a?"text-[1.55rem] md:text-[2rem]":"text-3xl md:text-4xl"),children:["Last ",t.weeks.length," weeks"]})]}),(0,s.jsxs)("div",{className:"".concat(a?"text-[0.74rem]":"text-sm"," text-right text-slate-500"),children:[(0,s.jsx)("div",{children:t.startDate}),(0,s.jsx)("div",{children:t.endDate})]})]}),(0,s.jsx)("div",{className:"".concat(a?"mb-2 gap-2 pl-9 text-[11px]":"mb-4 gap-3 pl-12 text-xs"," flex font-medium text-slate-500"),children:t.monthLabels.map(e=>(0,s.jsx)("div",{style:{marginLeft:0===e.weekIndex?0:void 0},children:e.label},"".concat(e.label,"-").concat(e.weekIndex)))}),(0,s.jsxs)("div",{className:"".concat(a?"gap-2":"gap-3"," flex overflow-x-auto"),children:[(0,s.jsx)("div",{className:"".concat(a?"mt-0.5 gap-1.5 pr-0.5 text-[10px]":"mt-1 gap-2 pr-1 text-xs"," grid grid-rows-7 font-medium text-slate-500"),children:t.weekdayLabels.map((e,t)=>(0,s.jsx)("div",{className:"flex ".concat(a?"h-3":"h-4"," items-center"),children:e},"".concat(e,"-").concat(t)))}),(0,s.jsx)("div",{className:"grid auto-cols-max grid-flow-col ".concat(a?"gap-1.5":"gap-2"),children:t.weeks.map((e,n)=>{var c;return(0,s.jsx)("div",{className:"grid grid-rows-7 ".concat(a?"gap-1.5":"gap-2"),children:e.map(e=>{var n;return(0,s.jsx)("div",{className:"group relative z-0 border ".concat(a?"h-3.5 w-3.5 rounded-[4px]":"h-4 w-4 rounded-[5px]"," hover:z-30 ").concat(o[e.intensity]),children:(0,s.jsxs)("div",{className:"pointer-events-none absolute left-1/2 top-full z-40 hidden -translate-x-1/2 bg-slate-950 text-white shadow-xl group-hover:block ".concat(a?"mt-1.5 w-36 rounded-lg px-2.5 py-1.5 text-[10px]":"mt-2 w-44 rounded-xl px-3 py-2 text-[11px]"),children:[(0,s.jsx)("div",{className:"font-semibold",children:e.date}),(0,s.jsx)("div",{className:"mt-1 text-slate-300",children:"sessions"===(n=t.metric)?"".concat(e.sessionCount," sessions"):"messages"===n?"".concat(e.messageCount," messages"):e.totalTokens>=1e9?"".concat((e.totalTokens/1e9).toFixed(2),"B tokens"):e.totalTokens>=1e6?"".concat((e.totalTokens/1e6).toFixed(1),"M tokens"):e.totalTokens>=1e3?"".concat((e.totalTokens/1e3).toFixed(1),"K tokens"):"".concat(e.totalTokens," tokens")})]})},e.date)})},"".concat(n,"-").concat((null==(c=e[0])?void 0:c.date)||"empty"))})})]}),(0,s.jsxs)("div",{className:"".concat(a?"mt-3 gap-2 text-[10px]":"mt-6 gap-3 text-xs"," flex items-center justify-end uppercase tracking-[0.16em] text-slate-400"),children:[(0,s.jsx)("span",{children:"Less"}),(0,s.jsx)("div",{className:"flex ".concat(a?"gap-1":"gap-1.5"),children:t.legend.map(e=>(0,s.jsx)("span",{className:"".concat(a?"h-3 w-3 rounded-[4px]":"h-4 w-4 rounded-[5px]"," border ").concat(o[e.intensity]),title:"".concat(e.label,": ").concat(e.min,"-").concat(e.max)},e.intensity))}),(0,s.jsx)("span",{children:"More"})]})]})}function l(e){return e>=1e9?"".concat((e/1e9).toFixed(2),"B"):e>=1e6?"".concat((e/1e6).toFixed(1),"M"):e>=1e3?"".concat((e/1e3).toFixed(1),"K"):e.toLocaleString("en-US")}function i(e){let{label:t,value:a,tone:n="default",compact:c=!1}=e;return(0,s.jsxs)("div",{className:"".concat(c?"h-full rounded-[1rem] p-3.5":"rounded-[1.6rem] p-5"," border ").concat("accent"===n?"border-[#f3c788] bg-[#fff5e8] shadow-[0_24px_55px_rgba(201,113,28,0.14)]":"border-slate-200 bg-white/95 shadow-[0_20px_40px_rgba(15,23,42,0.06)]"),children:[(0,s.jsx)("div",{className:"".concat(c?"text-[0.62rem]":"text-[0.72rem]"," font-semibold uppercase tracking-[0.22em] text-slate-500"),children:t}),(0,s.jsx)("div",{className:"".concat(c?"mt-2 text-[1.6rem] leading-[1.1]":"mt-3 text-4xl"," font-[family-name:var(--font-display)] text-slate-900"),children:a})]})}function d(e){let{eyebrow:t,title:a,subtitle:n,compact:c=!1,children:o}=e;return(0,s.jsx)("main",{className:"min-h-screen bg-[radial-gradient(circle_at_top_left,_rgba(253,186,116,0.22),_transparent_35%),linear-gradient(180deg,#fff9f1_0%,#fff1de_100%)] text-slate-900 ".concat(c?"px-3 py-5 md:px-6 md:py-8":"px-4 py-8 md:px-8 md:py-12"),children:(0,s.jsxs)("div",{className:"mx-auto max-w-7xl",children:[(0,s.jsxs)("header",{className:"border border-white/70 bg-white/80 shadow-[0_30px_80px_rgba(191,104,24,0.12)] backdrop-blur ".concat(c?"mb-6 rounded-[1.35rem] px-5 py-5 md:px-6 md:py-6":"mb-10 rounded-[2rem] px-6 py-8 md:px-10"),children:[(0,s.jsx)("p",{className:"text-[0.72rem] font-semibold uppercase tracking-[0.28em] text-slate-500",children:t}),(0,s.jsx)("h1",{className:"max-w-4xl font-[family-name:var(--font-display)] leading-none text-slate-950 ".concat(c?"mt-3 text-[2rem] md:text-[3.4rem]":"mt-4 text-5xl md:text-7xl"),children:a}),(0,s.jsx)("p",{className:"".concat(c?"mt-3 text-sm leading-6 md:text-base":"mt-5 text-base leading-7 md:text-lg"," max-w-3xl text-slate-600"),children:n})]}),o]})})}function m(e){let{share:t,payload:a}=e;return(0,s.jsx)(d,{eyebrow:"Vibestats Activity",title:a.title,subtitle:"A GitHub-style year view of your coding activity, tuned for elegant sharing on the web and as an image.",compact:!0,children:(0,s.jsxs)("section",{className:"grid gap-4 lg:grid-cols-[minmax(0,1.55fr)_minmax(0,0.85fr)]",children:[(0,s.jsx)("div",{className:"min-w-0",children:(0,s.jsx)(r,{graph:a.activity,compact:!0})}),(0,s.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2 lg:h-full lg:auto-rows-fr lg:grid-cols-2",children:[(0,s.jsx)(i,{label:"Input Tokens",value:l(a.activity.summary.inputTokens),compact:!0}),(0,s.jsx)(i,{label:"Output Tokens",value:l(a.activity.summary.outputTokens),compact:!0}),(0,s.jsx)(i,{label:"Longest Streak",value:"".concat(a.activity.summary.longestStreak,"d"),compact:!0}),(0,s.jsx)(i,{label:"Current Streak",value:"".concat(a.activity.summary.currentStreak,"d"),tone:"accent",compact:!0}),(0,s.jsx)(i,{label:"Recent 30 Days",value:l(a.activity.summary.recent30DayTotal),compact:!0}),(0,s.jsx)(i,{label:"Top Model",value:a.activity.summary.favoriteModel,compact:!0}),(0,s.jsx)(i,{label:"Active Days",value:"".concat(a.activity.summary.activeDays),compact:!0}),(0,s.jsx)(i,{label:"Share",value:t.slug,compact:!0})]})]})})}var u=a(539);function p(){let e=(0,c.useSearchParams)(),[t,a]=(0,n.useState)(null),[o,r]=(0,n.useState)(null);return((0,n.useEffect)(()=>{let t=e.get("a");if(!t)return void r("no activity payload in URL");if(t.startsWith("json:")){let e=t.slice(5);fetch("/data/".concat(e,".json")).then(e=>e.ok?e.json():Promise.reject(Error("fetch failed"))).then(e=>a(e)).catch(e=>r(e.message));return}let s=new URLSearchParams(t),n=(0,u.zP)(s);n?a(n):r("could not decode activity payload")},[e]),o)?(0,s.jsxs)("main",{className:"p-8 text-red-400",children:["Error: ",o]}):t?(0,s.jsx)(m,{share:{slug:"local",kind:"local",targetPath:"/dashboard/activity",url:"",legacyQuery:""},payload:t}):(0,s.jsx)("main",{className:"p-8 text-stone-400",children:"Loading…"})}function x(){return(0,s.jsx)(n.Suspense,{fallback:(0,s.jsx)("main",{className:"p-8 text-stone-400",children:"Loading…"}),children:(0,s.jsx)(p,{})})}},7877:(e,t,a)=>{Promise.resolve().then(a.bind(a,6427))}},e=>{e.O(0,[971,59,498,358],()=>e(e.s=7877)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[105],{529:(e,a,t)=>{Promise.resolve().then(t.bind(t,2480))},2480:(e,a,t)=>{"use strict";t.r(a),t.d(a,{default:()=>i});var s=t(8481),n=t(8526),r=t(4816),d=t.n(r),o=t(3973);function l(){let e=(0,o.useSearchParams)(),a=e.get("u"),t=e.get("w"),n=e.get("a"),r=[{href:a?"/dashboard/usage?u=".concat(encodeURIComponent(a)):"/dashboard/usage",title:"Usage",subtitle:"Daily & monthly totals, model breakdown, cost",enabled:!!a},{href:n?"/dashboard/activity?a=".concat(encodeURIComponent(n)):"/dashboard/activity",title:"Activity",subtitle:"GitHub-style heatmap + streaks",enabled:!!n},{href:t?"/dashboard/wrapped?w=".concat(encodeURIComponent(t)):"/dashboard/wrapped",title:"Wrapped",subtitle:"Annual recap + highlights",enabled:!!t}];return(0,s.jsxs)("main",{className:"mx-auto max-w-5xl px-6 py-16",children:[(0,s.jsx)("h1",{className:"text-4xl font-semibold tracking-tight",children:"vibestats"}),(0,s.jsx)("p",{className:"mt-2 text-stone-400",children:"Local dashboard — running offline from your JSONL data."}),(0,s.jsx)("div",{className:"mt-10 grid gap-4 md:grid-cols-3",children:r.map(e=>(0,s.jsxs)(d(),{href:e.enabled?e.href:"#","aria-disabled":!e.enabled,className:"rounded-2xl border p-6 transition ".concat(e.enabled?"border-stone-800 hover:border-orange-500 hover:bg-stone-900":"border-stone-900 text-stone-600 cursor-not-allowed"),children:[(0,s.jsx)("div",{className:"text-xl font-medium",children:e.title}),(0,s.jsx)("div",{className:"mt-2 text-sm text-stone-400",children:e.subtitle}),!e.enabled&&(0,s.jsx)("div",{className:"mt-3 text-xs text-stone-600",children:"no data"})]},e.title))})]})}function i(){return(0,s.jsx)(n.Suspense,{fallback:(0,s.jsx)("main",{className:"p-8 text-stone-400",children:"Loading…"}),children:(0,s.jsx)(l,{})})}},3973:(e,a,t)=>{"use strict";var s=t(6145);t.o(s,"useSearchParams")&&t.d(a,{useSearchParams:function(){return s.useSearchParams}})}},e=>{e.O(0,[816,59,498,358],()=>e(e.s=529)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[713],{539:(e,t,n)=>{"use strict";n.d(t,{Xv:()=>u,b6:()=>i,zP:()=>l}),n(5603);var s=n(471).Buffer;function o(e){let t=Number.parseFloat(e);return e.endsWith("B")?1e9*t:e.endsWith("M")?1e6*t:e.endsWith("K")?1e3*t:t}function a(e){let t=e.trim().toLowerCase(),n=(e,n)=>{let s=n.replace(/\./g,"[\\s._-]*"),o=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),a="(?:^|[^a-z0-9])",c="(?:[^a-z0-9]|$)";return new RegExp("".concat(a).concat(o,"(?:[^a-z0-9]+)?").concat(s).concat(c)).test(t)||new RegExp("".concat(a).concat(s,"(?:[^a-z0-9]+)?").concat(o).concat(c)).test(t)};return t.includes("accounts/fireworks/routers/kimi-k2p5-turbo")||t.includes("accounts/fireworks/models/kimi-k2p5-turbo")||t.includes("custom:kimi-k2.5-turbo")||t.includes("custom:kimi-k2p5-turbo")||t.includes("kimi")&&(t.includes("k2.5")||t.includes("k2p5"))&&t.includes("turbo")?"Kimi K2.5 Turbo":t.includes("custom:minimax-m2.7")||t.includes("custom:minimax-m2-7")||t.includes("minimax-m2.7")||t.includes("minimax-m2-7")?"MiniMax-M2.7":t.includes("fable")?"Claude Fable":n("opus","4.8")?"Opus 4.8":n("opus","4.7")?"Opus 4.7":n("opus","4.6")?"Opus 4.6":n("opus","4.5")?"Opus 4.5":n("opus","4.1")?"Opus 4.1":t.includes("opus")?"Opus 4.8":n("sonnet","4.6")?"Sonnet 4.6":n("sonnet","4.5")?"Sonnet 4.5":n("sonnet","3.5")?"Sonnet 3.5":t.includes("sonnet")?"Sonnet":n("haiku","4.5")?"Haiku 4.5":n("haiku","3.5")?"Haiku 3.5":t.includes("haiku")?"Haiku":e}function c(e){var t;if(e.startsWith("raw_"))try{return a(decodeURIComponent(e.slice(4)))}catch(t){return a(e.slice(4))}return a(null!=(t=({fable:"Claude Fable",o48:"Opus 4.8",o47:"Opus 4.7",o46:"Opus 4.6",o45:"Opus 4.5",o41:"Opus 4.1",opus:"Opus 4.8",s46:"Sonnet 4.6",s45:"Sonnet 4.5",s35:"Sonnet 3.5",sonnet:"Sonnet",h45:"Haiku 4.5",h35:"Haiku 3.5",haiku:"Haiku",g54:"GPT-5.4",g53s:"GPT-5.3 Codex Spark",g53c:"GPT-5.3 Codex",g53:"GPT-5.3",g52c:"GPT-5.2 Codex",g52:"GPT-5.2",g51cm:"GPT-5.1 Codex Max",g51m:"GPT-5.1 Max",g51cn:"GPT-5.1 Codex Mini",g51n:"GPT-5.1 Mini",g51c:"GPT-5.1 Codex",g51:"GPT-5.1",g5:"GPT-5",g5n:"GPT-5 Mini",g4o:"GPT-4o",g4om:"GPT-4o Mini"})[e])?t:e)}function r(e){if(e)try{if(void 0!==s)return JSON.parse(s.from(e,"base64url").toString("utf-8"));let t=e.replace(/-/g,"+").replace(/_/g,"/");return JSON.parse(atob(t))}catch(e){return}}function u(e){var t;let n=e.get("s");if(!n)return null;let s=e.get("src"),a=(e.get("mb")||"").split(",").map(e=>{let[t,n]=e.split(":");return t?{model:c(t),percentage:Number.parseInt(null!=n?n:"0",10)||0}:null}).filter(e=>!!e);return{sessions:Number.parseInt(n,10),messages:0,totalTokens:o(e.get("t")||"0"),totalCost:Number.parseFloat(e.get("c")||"0"),daysActive:Number.parseInt(e.get("d")||"0",10),longestStreak:Number.parseInt(e.get("ls")||"0",10),currentStreak:Number.parseInt(e.get("cs")||"0",10),peakHour:Number.parseInt(e.get("ph")||"12",10),peakDay:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][Number.parseInt(e.get("pd")||"0",10)]||"Monday",busiestMonth:"",favoriteModel:c(e.get("fm")||""),modelBreakdown:a,wordsGenerated:o(e.get("wg")||"0"),firstSessionDate:e.get("fad")||"",topProject:e.get("tp")||void 0,projectCount:e.get("pc")?Number.parseInt(e.get("pc"),10):void 0,topTools:(null==(t=e.get("tt"))?void 0:t.split(","))||void 0,source:"codex"===s?"codex":"combined"===s?"combined":"claude",activity:r(e.get("act"))}}function i(e){if(!(e.get("tot")||e.get("agg")))return null;let t=e.get("src"),n=e.get("agg")||"d",s="m"===n?"monthly":"mo"===n?"model":"t"===n?"total":"daily",[a,r]=(e.get("dr")||"").split("-"),u=(e.get("rows")||"").split("|").filter(Boolean).map(e=>{let t=e.split(":"),n=t[0]||"";return{key:"daily"===s&&4===n.length?"".concat(new Date().getFullYear(),"-").concat(n.slice(0,2),"-").concat(n.slice(2,4)):n,inputTokens:o(t[1]||"0"),outputTokens:o(t[2]||"0"),cacheWriteTokens:o(t[3]||"0"),cacheReadTokens:o(t[4]||"0"),totalTokens:o(t[5]||"0"),cost:Number.parseFloat(t[6]||"0")}}),i=(e.get("tot")||"").split(":"),l=(e.get("mb")||"").split(",").filter(Boolean).map(e=>{let[t,n,s]=e.split(":");return{model:c(t||""),tokens:0,cost:Number.parseFloat(s||"0"),percentage:Number.parseInt(n||"0",10)||0}});return{rows:u,totals:{inputTokens:o(i[0]||"0"),outputTokens:o(i[1]||"0"),cacheWriteTokens:o(i[2]||"0"),cacheReadTokens:o(i[3]||"0"),totalTokens:o(i[4]||"0"),cost:Number.parseFloat(i[5]||"0")},source:"codex"===t?"codex":"combined"===t?"combined":"claude",aggregation:s,dateRange:{start:a?"".concat(a.slice(0,4),"-").concat(a.slice(4,6),"-").concat(a.slice(6,8)):"",end:r?"".concat(r.slice(0,4),"-").concat(r.slice(4,6),"-").concat(r.slice(6,8)):""},modelBreakdown:l}}function l(e){return r(e.get("activity"))||null}},2160:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var s=n(8481),o=n(8526),a=n(3973),c=n(5832),r=n(539);function u(){let e=(0,a.useSearchParams)(),[t,n]=(0,o.useState)(null),[u,i]=(0,o.useState)(null);return((0,o.useEffect)(()=>{let t=e.get("u");if(!t)return void i("no usage payload in URL");if(t.startsWith("json:")){let e=t.slice(5);fetch("/data/".concat(e,".json")).then(e=>e.ok?e.json():Promise.reject(Error("fetch failed"))).then(e=>n(e)).catch(e=>i(e.message));return}let s=new URLSearchParams(t),o=(0,r.b6)(s);o?n(o):i("could not decode usage payload")},[e]),u)?(0,s.jsxs)("main",{className:"p-8 text-red-400",children:["Error: ",u]}):t?(0,s.jsx)(c.UsageLegacyPage,{payload:t}):(0,s.jsx)("main",{className:"p-8 text-stone-400",children:"Loading…"})}function i(){return(0,s.jsx)(o.Suspense,{fallback:(0,s.jsx)("main",{className:"p-8 text-stone-400",children:"Loading…"}),children:(0,s.jsx)(u,{})})}},
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[713],{539:(e,t,n)=>{"use strict";n.d(t,{Xv:()=>u,b6:()=>i,zP:()=>l}),n(5603);var s=n(471).Buffer;function o(e){let t=Number.parseFloat(e);return e.endsWith("B")?1e9*t:e.endsWith("M")?1e6*t:e.endsWith("K")?1e3*t:t}function a(e){let t=e.trim().toLowerCase(),n=(e,n)=>{let s=n.replace(/\./g,"[\\s._-]*"),o=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),a="(?:^|[^a-z0-9])",c="(?:[^a-z0-9]|$)";return new RegExp("".concat(a).concat(o,"(?:[^a-z0-9]+)?").concat(s).concat(c)).test(t)||new RegExp("".concat(a).concat(s,"(?:[^a-z0-9]+)?").concat(o).concat(c)).test(t)};return t.includes("accounts/fireworks/routers/kimi-k2p5-turbo")||t.includes("accounts/fireworks/models/kimi-k2p5-turbo")||t.includes("custom:kimi-k2.5-turbo")||t.includes("custom:kimi-k2p5-turbo")||t.includes("kimi")&&(t.includes("k2.5")||t.includes("k2p5"))&&t.includes("turbo")?"Kimi K2.5 Turbo":t.includes("custom:minimax-m2.7")||t.includes("custom:minimax-m2-7")||t.includes("minimax-m2.7")||t.includes("minimax-m2-7")?"MiniMax-M2.7":t.includes("fable")?"Claude Fable":n("opus","4.8")?"Opus 4.8":n("opus","4.7")?"Opus 4.7":n("opus","4.6")?"Opus 4.6":n("opus","4.5")?"Opus 4.5":n("opus","4.1")?"Opus 4.1":t.includes("opus")?"Opus 4.8":n("sonnet","4.6")?"Sonnet 4.6":n("sonnet","4.5")?"Sonnet 4.5":n("sonnet","3.5")?"Sonnet 3.5":t.includes("sonnet")?"Sonnet":n("haiku","4.5")?"Haiku 4.5":n("haiku","3.5")?"Haiku 3.5":t.includes("haiku")?"Haiku":e}function c(e){var t;if(e.startsWith("raw_"))try{return a(decodeURIComponent(e.slice(4)))}catch(t){return a(e.slice(4))}return a(null!=(t=({fable:"Claude Fable",o48:"Opus 4.8",o47:"Opus 4.7",o46:"Opus 4.6",o45:"Opus 4.5",o41:"Opus 4.1",opus:"Opus 4.8",s46:"Sonnet 4.6",s45:"Sonnet 4.5",s35:"Sonnet 3.5",sonnet:"Sonnet",h45:"Haiku 4.5",h35:"Haiku 3.5",haiku:"Haiku",g54:"GPT-5.4",g53s:"GPT-5.3 Codex Spark",g53c:"GPT-5.3 Codex",g53:"GPT-5.3",g52c:"GPT-5.2 Codex",g52:"GPT-5.2",g51cm:"GPT-5.1 Codex Max",g51m:"GPT-5.1 Max",g51cn:"GPT-5.1 Codex Mini",g51n:"GPT-5.1 Mini",g51c:"GPT-5.1 Codex",g51:"GPT-5.1",g5:"GPT-5",g5n:"GPT-5 Mini",g4o:"GPT-4o",g4om:"GPT-4o Mini"})[e])?t:e)}function r(e){if(e)try{if(void 0!==s)return JSON.parse(s.from(e,"base64url").toString("utf-8"));let t=e.replace(/-/g,"+").replace(/_/g,"/");return JSON.parse(atob(t))}catch(e){return}}function u(e){var t;let n=e.get("s");if(!n)return null;let s=e.get("src"),a=(e.get("mb")||"").split(",").map(e=>{let[t,n]=e.split(":");return t?{model:c(t),percentage:Number.parseInt(null!=n?n:"0",10)||0}:null}).filter(e=>!!e);return{sessions:Number.parseInt(n,10),messages:0,totalTokens:o(e.get("t")||"0"),totalCost:Number.parseFloat(e.get("c")||"0"),daysActive:Number.parseInt(e.get("d")||"0",10),longestStreak:Number.parseInt(e.get("ls")||"0",10),currentStreak:Number.parseInt(e.get("cs")||"0",10),peakHour:Number.parseInt(e.get("ph")||"12",10),peakDay:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][Number.parseInt(e.get("pd")||"0",10)]||"Monday",busiestMonth:"",favoriteModel:c(e.get("fm")||""),modelBreakdown:a,wordsGenerated:o(e.get("wg")||"0"),firstSessionDate:e.get("fad")||"",topProject:e.get("tp")||void 0,projectCount:e.get("pc")?Number.parseInt(e.get("pc"),10):void 0,topTools:(null==(t=e.get("tt"))?void 0:t.split(","))||void 0,source:"codex"===s?"codex":"combined"===s?"combined":"claude",activity:r(e.get("act"))}}function i(e){if(!(e.get("tot")||e.get("agg")))return null;let t=e.get("src"),n=e.get("agg")||"d",s="m"===n?"monthly":"mo"===n?"model":"t"===n?"total":"daily",[a,r]=(e.get("dr")||"").split("-"),u=(e.get("rows")||"").split("|").filter(Boolean).map(e=>{let t=e.split(":"),n=t[0]||"";return{key:"daily"===s&&4===n.length?"".concat(new Date().getFullYear(),"-").concat(n.slice(0,2),"-").concat(n.slice(2,4)):n,inputTokens:o(t[1]||"0"),outputTokens:o(t[2]||"0"),cacheWriteTokens:o(t[3]||"0"),cacheReadTokens:o(t[4]||"0"),totalTokens:o(t[5]||"0"),cost:Number.parseFloat(t[6]||"0")}}),i=(e.get("tot")||"").split(":"),l=(e.get("mb")||"").split(",").filter(Boolean).map(e=>{let[t,n,s]=e.split(":");return{model:c(t||""),tokens:0,cost:Number.parseFloat(s||"0"),percentage:Number.parseInt(n||"0",10)||0}});return{rows:u,totals:{inputTokens:o(i[0]||"0"),outputTokens:o(i[1]||"0"),cacheWriteTokens:o(i[2]||"0"),cacheReadTokens:o(i[3]||"0"),totalTokens:o(i[4]||"0"),cost:Number.parseFloat(i[5]||"0")},source:"codex"===t?"codex":"combined"===t?"combined":"claude",aggregation:s,dateRange:{start:a?"".concat(a.slice(0,4),"-").concat(a.slice(4,6),"-").concat(a.slice(6,8)):"",end:r?"".concat(r.slice(0,4),"-").concat(r.slice(4,6),"-").concat(r.slice(6,8)):""},modelBreakdown:l}}function l(e){return r(e.get("activity"))||null}},2160:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var s=n(8481),o=n(8526),a=n(3973),c=n(5832),r=n(539);function u(){let e=(0,a.useSearchParams)(),[t,n]=(0,o.useState)(null),[u,i]=(0,o.useState)(null);return((0,o.useEffect)(()=>{let t=e.get("u");if(!t)return void i("no usage payload in URL");if(t.startsWith("json:")){let e=t.slice(5);fetch("/data/".concat(e,".json")).then(e=>e.ok?e.json():Promise.reject(Error("fetch failed"))).then(e=>n(e)).catch(e=>i(e.message));return}let s=new URLSearchParams(t),o=(0,r.b6)(s);o?n(o):i("could not decode usage payload")},[e]),u)?(0,s.jsxs)("main",{className:"p-8 text-red-400",children:["Error: ",u]}):t?(0,s.jsx)(c.UsageLegacyPage,{payload:t}):(0,s.jsx)("main",{className:"p-8 text-stone-400",children:"Loading…"})}function i(){return(0,s.jsx)(o.Suspense,{fallback:(0,s.jsx)("main",{className:"p-8 text-stone-400",children:"Loading…"}),children:(0,s.jsx)(u,{})})}},6559:(e,t,n)=>{Promise.resolve().then(n.bind(n,2160))}},e=>{e.O(0,[971,832,59,498,358],()=>e(e.s=6559)),_N_E=e.O()}]);
|