usage-board 3.2.0 → 3.2.1
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/dist/index.mjs +1 -1
- package/dist/public/_nuxt/{DtbPvE6R.js → BL-DadsH.js} +1 -1
- package/dist/public/_nuxt/{DUoLvn3A.js → BO_d_Oyx.js} +1 -1
- package/dist/public/_nuxt/{CXLmM1yO.js → BtuXxixc.js} +1 -1
- package/dist/public/_nuxt/{COIbUy5w.js → CBu27bzx.js} +1 -1
- package/dist/public/_nuxt/{DFqWEFN4.js → CC4_0abj.js} +1 -1
- package/dist/public/_nuxt/{D_W11Quh.js → CGsjOcfM.js} +2 -2
- package/dist/public/_nuxt/{uHQwCIHg.js → CLHpvfq1.js} +1 -1
- package/dist/public/_nuxt/{CMWftE4h.js → COBlwcVj.js} +1 -1
- package/dist/public/_nuxt/{BvRyOET7.js → CjeAKHhp.js} +1 -1
- package/dist/public/_nuxt/{B6C9KBQ4.js → CvvesHM7.js} +1 -1
- package/dist/public/_nuxt/{DgKrPjze.js → IstswKJB.js} +2 -2
- package/dist/public/_nuxt/{Bv6agYS5.js → N8W_Dp-N.js} +1 -1
- package/dist/public/_nuxt/builds/latest.json +1 -1
- package/dist/public/_nuxt/builds/meta/be10c896-ee75-4f4f-911d-c3f0a8b4d417.json +1 -0
- package/dist/public/_nuxt/vkAmg0G5.js +1 -0
- package/dist/public/_nuxt/{DkxY2YMp.js → wUprbfrX.js} +1 -1
- package/dist/server/chunks/build/client.precomputed.mjs +1 -1
- package/dist/server/chunks/nitro/nitro.mjs +390 -161
- package/dist/server/package.json +1 -1
- package/package.json +1 -1
- package/dist/public/_nuxt/HiqUua3-.js +0 -1
- package/dist/public/_nuxt/builds/meta/ae3c6372-8821-43fb-aa55-bb47729a5660.json +0 -1
|
@@ -4267,7 +4267,7 @@ function _expandFromEnv(value) {
|
|
|
4267
4267
|
const _inlineRuntimeConfig = {
|
|
4268
4268
|
"app": {
|
|
4269
4269
|
"baseURL": "/",
|
|
4270
|
-
"buildId": "
|
|
4270
|
+
"buildId": "be10c896-ee75-4f4f-911d-c3f0a8b4d417",
|
|
4271
4271
|
"buildAssetsDir": "/_nuxt/",
|
|
4272
4272
|
"cdnURL": ""
|
|
4273
4273
|
},
|
|
@@ -4295,7 +4295,7 @@ const _inlineRuntimeConfig = {
|
|
|
4295
4295
|
}
|
|
4296
4296
|
},
|
|
4297
4297
|
"public": {
|
|
4298
|
-
"appVersion": "3.2.
|
|
4298
|
+
"appVersion": "3.2.1",
|
|
4299
4299
|
"home": "/Users/tangchenghui"
|
|
4300
4300
|
},
|
|
4301
4301
|
"icon": {
|
|
@@ -4783,7 +4783,7 @@ function normalizeProjectUsageDetail(detail) {
|
|
|
4783
4783
|
var __defProp$1 = Object.defineProperty;
|
|
4784
4784
|
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4785
4785
|
var __publicField$1 = (obj, key, value) => __defNormalProp$1(obj, key + "" , value);
|
|
4786
|
-
const CACHE_SCHEMA_VERSION =
|
|
4786
|
+
const CACHE_SCHEMA_VERSION = 3;
|
|
4787
4787
|
const ROW_KEY_SEPARATOR = "";
|
|
4788
4788
|
const CACHE_SCHEMA_SQL = `
|
|
4789
4789
|
CREATE TABLE IF NOT EXISTS cache_schema_meta (
|
|
@@ -5033,6 +5033,7 @@ const CACHE_SCHEMA_SQL = `
|
|
|
5033
5033
|
CREATE TABLE IF NOT EXISTS indexed_files (
|
|
5034
5034
|
path TEXT PRIMARY KEY,
|
|
5035
5035
|
platform TEXT NOT NULL,
|
|
5036
|
+
cache_signature TEXT NOT NULL DEFAULT '',
|
|
5036
5037
|
size INTEGER NOT NULL,
|
|
5037
5038
|
mtime_ms INTEGER NOT NULL,
|
|
5038
5039
|
updated_at TEXT NOT NULL
|
|
@@ -5191,7 +5192,7 @@ class UsageCacheRepository {
|
|
|
5191
5192
|
loadIndexedSourceFiles() {
|
|
5192
5193
|
var _a, _b, _c;
|
|
5193
5194
|
const files = this.database.prepare(`
|
|
5194
|
-
SELECT path, platform, size, mtime_ms, updated_at
|
|
5195
|
+
SELECT path, platform, cache_signature, size, mtime_ms, updated_at
|
|
5195
5196
|
FROM indexed_files
|
|
5196
5197
|
ORDER BY path ASC
|
|
5197
5198
|
`).all();
|
|
@@ -5262,6 +5263,7 @@ class UsageCacheRepository {
|
|
|
5262
5263
|
return files.map((file) => {
|
|
5263
5264
|
var _a2, _b2;
|
|
5264
5265
|
return {
|
|
5266
|
+
cacheSignature: file.cache_signature,
|
|
5265
5267
|
mtimeMs: file.mtime_ms,
|
|
5266
5268
|
path: file.path,
|
|
5267
5269
|
payload: (_a2 = fragmentsByPath.get(file.path)) != null ? _a2 : [],
|
|
@@ -5279,8 +5281,8 @@ class UsageCacheRepository {
|
|
|
5279
5281
|
}
|
|
5280
5282
|
const deleteFileStatement = this.database.prepare("DELETE FROM indexed_files WHERE path = ?");
|
|
5281
5283
|
const insertFileStatement = this.database.prepare(`
|
|
5282
|
-
INSERT INTO indexed_files (path, platform, size, mtime_ms, updated_at)
|
|
5283
|
-
VALUES (?, ?, ?, ?, ?)
|
|
5284
|
+
INSERT INTO indexed_files (path, platform, cache_signature, size, mtime_ms, updated_at)
|
|
5285
|
+
VALUES (?, ?, ?, ?, ?, ?)
|
|
5284
5286
|
`);
|
|
5285
5287
|
const insertProjectStatement = this.database.prepare(`
|
|
5286
5288
|
INSERT INTO indexed_file_projects (path, project_name, project_order)
|
|
@@ -5329,7 +5331,7 @@ class UsageCacheRepository {
|
|
|
5329
5331
|
try {
|
|
5330
5332
|
for (const file of files) {
|
|
5331
5333
|
deleteFileStatement.run(file.path);
|
|
5332
|
-
insertFileStatement.run(file.path, file.platform, file.size, file.mtimeMs, file.updatedAt);
|
|
5334
|
+
insertFileStatement.run(file.path, file.platform, file.cacheSignature, file.size, file.mtimeMs, file.updatedAt);
|
|
5333
5335
|
for (const [projectOrder, projectName] of file.projectNames.entries()) {
|
|
5334
5336
|
insertProjectStatement.run(file.path, projectName, projectOrder);
|
|
5335
5337
|
}
|
|
@@ -5439,7 +5441,9 @@ class UsageCacheRepository {
|
|
|
5439
5441
|
}
|
|
5440
5442
|
initializeSchema() {
|
|
5441
5443
|
this.database.exec(CACHE_SCHEMA_SQL);
|
|
5442
|
-
|
|
5444
|
+
this.ensureIndexedFilesCacheSignatureColumn();
|
|
5445
|
+
const currentSchemaVersion = this.getCurrentSchemaVersion();
|
|
5446
|
+
if (currentSchemaVersion >= CACHE_SCHEMA_VERSION) {
|
|
5443
5447
|
return;
|
|
5444
5448
|
}
|
|
5445
5449
|
this.migrateLegacyDataIfNeeded();
|
|
@@ -5462,13 +5466,13 @@ class UsageCacheRepository {
|
|
|
5462
5466
|
`).run(version);
|
|
5463
5467
|
}
|
|
5464
5468
|
migrateLegacyDataIfNeeded() {
|
|
5465
|
-
|
|
5466
|
-
const hasLegacyProjectSnapshots = this.hasTable("project_snapshots");
|
|
5467
|
-
const hasLegacyIndexedFiles = this.hasTable("indexed_source_files");
|
|
5468
|
-
if (!hasLegacySnapshots && !hasLegacyProjectSnapshots && !hasLegacyIndexedFiles) {
|
|
5469
|
+
if (!this.hasLegacyData()) {
|
|
5469
5470
|
return;
|
|
5470
5471
|
}
|
|
5471
5472
|
this.clearNormalizedTables();
|
|
5473
|
+
const hasLegacySnapshots = this.hasTable("cache_snapshots");
|
|
5474
|
+
const hasLegacyProjectSnapshots = this.hasTable("project_snapshots");
|
|
5475
|
+
const hasLegacyIndexedFiles = this.hasTable("indexed_source_files");
|
|
5472
5476
|
if (hasLegacySnapshots) {
|
|
5473
5477
|
const bootstrap = this.loadLegacyBootstrap();
|
|
5474
5478
|
const projectCatalog = this.loadLegacyProjectCatalog();
|
|
@@ -5494,6 +5498,19 @@ class UsageCacheRepository {
|
|
|
5494
5498
|
}
|
|
5495
5499
|
this.dropLegacyTables();
|
|
5496
5500
|
}
|
|
5501
|
+
hasLegacyData() {
|
|
5502
|
+
return this.hasTable("cache_snapshots") || this.hasTable("project_snapshots") || this.hasTable("indexed_source_files");
|
|
5503
|
+
}
|
|
5504
|
+
ensureIndexedFilesCacheSignatureColumn() {
|
|
5505
|
+
if (!this.hasTable("indexed_files")) {
|
|
5506
|
+
return;
|
|
5507
|
+
}
|
|
5508
|
+
const columns = this.database.prepare("PRAGMA table_info(indexed_files)").all();
|
|
5509
|
+
if (columns.some((column) => column.name === "cache_signature")) {
|
|
5510
|
+
return;
|
|
5511
|
+
}
|
|
5512
|
+
this.database.exec("ALTER TABLE indexed_files ADD COLUMN cache_signature TEXT NOT NULL DEFAULT ''");
|
|
5513
|
+
}
|
|
5497
5514
|
clearNormalizedTables() {
|
|
5498
5515
|
this.database.exec("BEGIN");
|
|
5499
5516
|
try {
|
|
@@ -6202,6 +6219,7 @@ class UsageCacheRepository {
|
|
|
6202
6219
|
ORDER BY path ASC
|
|
6203
6220
|
`).all();
|
|
6204
6221
|
return rows.map((row) => ({
|
|
6222
|
+
cacheSignature: "",
|
|
6205
6223
|
mtimeMs: row.mtime_ms,
|
|
6206
6224
|
path: row.path,
|
|
6207
6225
|
payload: JSON.parse(row.payload),
|
|
@@ -6896,22 +6914,26 @@ function buildMonthlyModelUsage(events, options = {}) {
|
|
|
6896
6914
|
})).sort((a, b) => a.month.localeCompare(b.month) || a.model.localeCompare(b.model));
|
|
6897
6915
|
}
|
|
6898
6916
|
function buildSessionRows(sessions, options = {}) {
|
|
6899
|
-
return [...sessions].sort((a, b) => getSessionSortTimestamp(b) - getSessionSortTimestamp(a)).map((session) =>
|
|
6900
|
-
|
|
6901
|
-
|
|
6902
|
-
|
|
6903
|
-
|
|
6904
|
-
|
|
6905
|
-
|
|
6906
|
-
|
|
6907
|
-
|
|
6908
|
-
|
|
6909
|
-
|
|
6910
|
-
|
|
6911
|
-
|
|
6912
|
-
|
|
6917
|
+
return [...sessions].sort((a, b) => getSessionSortTimestamp(b) - getSessionSortTimestamp(a)).map((session) => {
|
|
6918
|
+
var _a;
|
|
6919
|
+
return {
|
|
6920
|
+
cachedInputTokens: getCachedInputTokens(session, options),
|
|
6921
|
+
costUSD: session.costUSD,
|
|
6922
|
+
id: (_a = session.id) != null ? _a : session.sessionId,
|
|
6923
|
+
inputTokens: session.inputTokens,
|
|
6924
|
+
label: session.sessionId,
|
|
6925
|
+
models: session.models,
|
|
6926
|
+
outputTokens: session.outputTokens,
|
|
6927
|
+
period: formatDateLabelFromDateKey(getDateKey(new Date(session.lastActivity))),
|
|
6928
|
+
projects: [session.project],
|
|
6929
|
+
reasoningOutputTokens: getReasoningOutputTokens(session, options),
|
|
6930
|
+
sessionCount: 1,
|
|
6931
|
+
totalTokens: session.tokenTotal
|
|
6932
|
+
};
|
|
6933
|
+
});
|
|
6913
6934
|
}
|
|
6914
6935
|
function toUsageSessionUsageItem(session, options = {}) {
|
|
6936
|
+
var _a;
|
|
6915
6937
|
const startedAtDate = new Date(session.startedAt);
|
|
6916
6938
|
return {
|
|
6917
6939
|
cachedInputTokens: getCachedInputTokens(session, options),
|
|
@@ -6919,7 +6941,7 @@ function toUsageSessionUsageItem(session, options = {}) {
|
|
|
6919
6941
|
date: formatDateLabelFromDateKey(getDateKey(startedAtDate)),
|
|
6920
6942
|
duration: formatDuration(session.durationMinutes),
|
|
6921
6943
|
durationMinutes: session.durationMinutes,
|
|
6922
|
-
id: session.sessionId,
|
|
6944
|
+
id: (_a = session.id) != null ? _a : session.sessionId,
|
|
6923
6945
|
inputTokens: session.inputTokens,
|
|
6924
6946
|
model: session.topModel,
|
|
6925
6947
|
month: getMonthKey(startedAtDate),
|
|
@@ -7237,14 +7259,23 @@ function decodeClaudeProjectPath(projectPath) {
|
|
|
7237
7259
|
return (_a = parts.at(-1)) != null ? _a : projectPath;
|
|
7238
7260
|
}
|
|
7239
7261
|
function getClaudeLookupCandidates(model) {
|
|
7262
|
+
var _a;
|
|
7240
7263
|
const normalizedModel = model.trim();
|
|
7264
|
+
const withoutFastSuffix = normalizedModel.replace(/-fast$/u, "");
|
|
7265
|
+
const baseModel = (_a = withoutFastSuffix.split("/").at(-1)) != null ? _a : withoutFastSuffix;
|
|
7266
|
+
const normalizedBaseModel = baseModel.replace(/[.@]/gu, "-");
|
|
7267
|
+
const baseModelWithoutDate = normalizedBaseModel.replace(/-\d{8}$/u, "");
|
|
7241
7268
|
return [
|
|
7242
7269
|
normalizedModel,
|
|
7243
|
-
|
|
7244
|
-
|
|
7270
|
+
withoutFastSuffix,
|
|
7271
|
+
withoutFastSuffix.replace(/^anthropic\//u, ""),
|
|
7245
7272
|
`anthropic/${normalizedModel}`,
|
|
7246
|
-
|
|
7247
|
-
|
|
7273
|
+
baseModel,
|
|
7274
|
+
normalizedBaseModel,
|
|
7275
|
+
baseModelWithoutDate,
|
|
7276
|
+
`anthropic/${baseModelWithoutDate}`,
|
|
7277
|
+
baseModelWithoutDate.replace(/^claude-3-5-/u, "claude-"),
|
|
7278
|
+
baseModelWithoutDate.replace(/^claude-3-7-/u, "claude-")
|
|
7248
7279
|
];
|
|
7249
7280
|
}
|
|
7250
7281
|
function getGeminiLookupCandidates(model) {
|
|
@@ -7359,10 +7390,11 @@ function cloneDate(date) {
|
|
|
7359
7390
|
return new Date(date.getFullYear(), date.getMonth(), date.getDate());
|
|
7360
7391
|
}
|
|
7361
7392
|
|
|
7362
|
-
function toDiscoveredUsageFile(filePath, platform) {
|
|
7393
|
+
function toDiscoveredUsageFile(filePath, platform, cacheSignature = "") {
|
|
7363
7394
|
try {
|
|
7364
7395
|
const stats = statSync(filePath);
|
|
7365
7396
|
return [{
|
|
7397
|
+
cacheSignature,
|
|
7366
7398
|
mtimeMs: stats.mtimeMs,
|
|
7367
7399
|
path: filePath,
|
|
7368
7400
|
platform,
|
|
@@ -7376,7 +7408,7 @@ function createSessionFragment(options) {
|
|
|
7376
7408
|
return {
|
|
7377
7409
|
durationEndAt: "",
|
|
7378
7410
|
interactions: [],
|
|
7379
|
-
key: getSessionLookupKey(options.
|
|
7411
|
+
key: getSessionLookupKey(options.repository, options.sessionId),
|
|
7380
7412
|
project: options.project,
|
|
7381
7413
|
repository: options.repository,
|
|
7382
7414
|
sessionId: options.sessionId,
|
|
@@ -7422,6 +7454,15 @@ function normalizeRole(value) {
|
|
|
7422
7454
|
const MILLION = 1e6;
|
|
7423
7455
|
const DEFAULT_PRICING_CACHE_TTL_MS = 1e3 * 60 * 5;
|
|
7424
7456
|
const DEFAULT_LITELLM_PRICING_URL = "https://raw.githubusercontent.com/BerriAI/litellm/main/model_prices_and_context_window.json";
|
|
7457
|
+
const FAST_MULTIPLIER_EXACT_OVERRIDES = {
|
|
7458
|
+
"gpt-5.3-codex": 2,
|
|
7459
|
+
"gpt-5.4": 2,
|
|
7460
|
+
"gpt-5.5": 2.5
|
|
7461
|
+
};
|
|
7462
|
+
const FAST_MULTIPLIER_PREFIX_OVERRIDES = {
|
|
7463
|
+
"claude-opus-4-6": 6,
|
|
7464
|
+
"claude-opus-4-7": 6
|
|
7465
|
+
};
|
|
7425
7466
|
const DEFAULT_FALLBACK_PRICING_TABLE = {
|
|
7426
7467
|
"gpt-5": {
|
|
7427
7468
|
cachedInputCostPerMTokens: 0.125,
|
|
@@ -7441,6 +7482,13 @@ const DEFAULT_FALLBACK_PRICING_TABLE = {
|
|
|
7441
7482
|
inputCostPerMTokens: 2.5,
|
|
7442
7483
|
outputCostPerMTokens: 15
|
|
7443
7484
|
},
|
|
7485
|
+
"gpt-5.5": {
|
|
7486
|
+
cachedInputCostPerMTokens: 0.5,
|
|
7487
|
+
cacheCreationInputCostPerMTokens: 5,
|
|
7488
|
+
fastMultiplier: FAST_MULTIPLIER_EXACT_OVERRIDES["gpt-5.5"],
|
|
7489
|
+
inputCostPerMTokens: 5,
|
|
7490
|
+
outputCostPerMTokens: 30
|
|
7491
|
+
},
|
|
7444
7492
|
"claude-haiku-4-5": {
|
|
7445
7493
|
cachedInputCostPerMTokens: 0.1,
|
|
7446
7494
|
cacheCreationInputCostPerMTokens: 1.25,
|
|
@@ -7457,6 +7505,20 @@ const DEFAULT_FALLBACK_PRICING_TABLE = {
|
|
|
7457
7505
|
outputCostPerMTokens: 75,
|
|
7458
7506
|
outputCostPerMTokensAbove200K: 112.5
|
|
7459
7507
|
},
|
|
7508
|
+
"claude-opus-4-6": {
|
|
7509
|
+
cachedInputCostPerMTokens: 0.5,
|
|
7510
|
+
cacheCreationInputCostPerMTokens: 6.25,
|
|
7511
|
+
fastMultiplier: FAST_MULTIPLIER_PREFIX_OVERRIDES["claude-opus-4-6"],
|
|
7512
|
+
inputCostPerMTokens: 5,
|
|
7513
|
+
outputCostPerMTokens: 25
|
|
7514
|
+
},
|
|
7515
|
+
"claude-opus-4-7": {
|
|
7516
|
+
cachedInputCostPerMTokens: 0.5,
|
|
7517
|
+
cacheCreationInputCostPerMTokens: 6.25,
|
|
7518
|
+
fastMultiplier: FAST_MULTIPLIER_PREFIX_OVERRIDES["claude-opus-4-7"],
|
|
7519
|
+
inputCostPerMTokens: 5,
|
|
7520
|
+
outputCostPerMTokens: 25
|
|
7521
|
+
},
|
|
7460
7522
|
"claude-sonnet-4-5": {
|
|
7461
7523
|
cachedInputCostPerMTokens: 0.3,
|
|
7462
7524
|
cachedInputCostPerMTokensAbove200K: 0.6,
|
|
@@ -7550,11 +7612,11 @@ async function createLiteLLMPricingResolver(options = {}) {
|
|
|
7550
7612
|
};
|
|
7551
7613
|
}
|
|
7552
7614
|
function calculateUsageCostUSD(usage, pricing, options = {}) {
|
|
7553
|
-
var _a, _b;
|
|
7554
|
-
const multiplier = options.speed === "fast" ? (_a = pricing.fastMultiplier) != null ? _a : 1 : 1;
|
|
7615
|
+
var _a, _b, _c;
|
|
7616
|
+
const multiplier = options.speed === "fast" ? (_b = (_a = pricing.fastMultiplier) != null ? _a : options.defaultFastMultiplier) != null ? _b : 1 : 1;
|
|
7555
7617
|
const inputCost = calculateTieredCost(usage.inputTokens, pricing.inputCostPerMTokens, pricing.inputCostPerMTokensAbove200K);
|
|
7556
7618
|
const cachedCost = calculateTieredCost(usage.cachedInputTokens, pricing.cachedInputCostPerMTokens, pricing.cachedInputCostPerMTokensAbove200K);
|
|
7557
|
-
const cacheCreationCost = calculateTieredCost((
|
|
7619
|
+
const cacheCreationCost = calculateTieredCost((_c = usage.cacheCreationTokens) != null ? _c : 0, pricing.cacheCreationInputCostPerMTokens, pricing.cacheCreationInputCostPerMTokensAbove200K);
|
|
7558
7620
|
const outputCost = calculateTieredCost(usage.outputTokens, pricing.outputCostPerMTokens, pricing.outputCostPerMTokensAbove200K);
|
|
7559
7621
|
return (inputCost + cachedCost + cacheCreationCost + outputCost) * multiplier;
|
|
7560
7622
|
}
|
|
@@ -7578,6 +7640,15 @@ function createFallbackLiteLLMPricingDataset() {
|
|
|
7578
7640
|
cache_creation_input_token_cost: 25e-7,
|
|
7579
7641
|
cache_read_input_token_cost: 25e-8
|
|
7580
7642
|
},
|
|
7643
|
+
"gpt-5.5": {
|
|
7644
|
+
input_cost_per_token: 5e-6,
|
|
7645
|
+
output_cost_per_token: 3e-5,
|
|
7646
|
+
cache_creation_input_token_cost: 5e-6,
|
|
7647
|
+
cache_read_input_token_cost: 5e-7,
|
|
7648
|
+
provider_specific_entry: {
|
|
7649
|
+
fast: 2.5
|
|
7650
|
+
}
|
|
7651
|
+
},
|
|
7581
7652
|
"claude-haiku-4-5": {
|
|
7582
7653
|
input_cost_per_token: 1e-6,
|
|
7583
7654
|
output_cost_per_token: 5e-6,
|
|
@@ -7594,6 +7665,24 @@ function createFallbackLiteLLMPricingDataset() {
|
|
|
7594
7665
|
cache_creation_input_token_cost_above_200k_tokens: 375e-7,
|
|
7595
7666
|
cache_read_input_token_cost_above_200k_tokens: 3e-6
|
|
7596
7667
|
},
|
|
7668
|
+
"claude-opus-4-6": {
|
|
7669
|
+
input_cost_per_token: 5e-6,
|
|
7670
|
+
output_cost_per_token: 25e-6,
|
|
7671
|
+
cache_creation_input_token_cost: 625e-8,
|
|
7672
|
+
cache_read_input_token_cost: 5e-7,
|
|
7673
|
+
provider_specific_entry: {
|
|
7674
|
+
fast: 6
|
|
7675
|
+
}
|
|
7676
|
+
},
|
|
7677
|
+
"claude-opus-4-7": {
|
|
7678
|
+
input_cost_per_token: 5e-6,
|
|
7679
|
+
output_cost_per_token: 25e-6,
|
|
7680
|
+
cache_creation_input_token_cost: 625e-8,
|
|
7681
|
+
cache_read_input_token_cost: 5e-7,
|
|
7682
|
+
provider_specific_entry: {
|
|
7683
|
+
fast: 6
|
|
7684
|
+
}
|
|
7685
|
+
},
|
|
7597
7686
|
"claude-sonnet-4-5": {
|
|
7598
7687
|
input_cost_per_token: 3e-6,
|
|
7599
7688
|
output_cost_per_token: 15e-6,
|
|
@@ -7638,15 +7727,17 @@ function resolveDatasetPricing(dataset, candidates) {
|
|
|
7638
7727
|
if (!pricing || !hasNonZeroTokenPricing(pricing)) {
|
|
7639
7728
|
continue;
|
|
7640
7729
|
}
|
|
7641
|
-
return toModelPricing(pricing);
|
|
7730
|
+
return toModelPricing(pricing, candidates);
|
|
7642
7731
|
}
|
|
7643
7732
|
return null;
|
|
7644
7733
|
}
|
|
7645
7734
|
function resolveFallbackPricing(fallbackPricingTable, candidates) {
|
|
7735
|
+
var _a;
|
|
7646
7736
|
for (const candidate of candidates) {
|
|
7647
7737
|
const pricing = fallbackPricingTable[candidate];
|
|
7648
7738
|
if (pricing) {
|
|
7649
|
-
|
|
7739
|
+
const fastMultiplier = (_a = pricing.fastMultiplier) != null ? _a : resolveFastMultiplierOverride(candidates);
|
|
7740
|
+
return fastMultiplier == null ? pricing : { ...pricing, fastMultiplier };
|
|
7650
7741
|
}
|
|
7651
7742
|
}
|
|
7652
7743
|
return null;
|
|
@@ -7655,8 +7746,8 @@ function hasNonZeroTokenPricing(pricing) {
|
|
|
7655
7746
|
var _a, _b, _c, _d;
|
|
7656
7747
|
return ((_a = pricing.input_cost_per_token) != null ? _a : 0) > 0 || ((_b = pricing.output_cost_per_token) != null ? _b : 0) > 0 || ((_c = pricing.cache_creation_input_token_cost) != null ? _c : 0) > 0 || ((_d = pricing.cache_read_input_token_cost) != null ? _d : 0) > 0;
|
|
7657
7748
|
}
|
|
7658
|
-
function toModelPricing(pricing) {
|
|
7659
|
-
var _a, _b, _c, _d, _e;
|
|
7749
|
+
function toModelPricing(pricing, candidates) {
|
|
7750
|
+
var _a, _b, _c, _d, _e, _f;
|
|
7660
7751
|
const inputCostPerToken = (_a = pricing.input_cost_per_token) != null ? _a : 0;
|
|
7661
7752
|
const cachedInputCostPerToken = (_b = pricing.cache_read_input_token_cost) != null ? _b : inputCostPerToken;
|
|
7662
7753
|
const cacheCreationInputCostPerToken = (_c = pricing.cache_creation_input_token_cost) != null ? _c : inputCostPerToken;
|
|
@@ -7666,13 +7757,40 @@ function toModelPricing(pricing) {
|
|
|
7666
7757
|
cachedInputCostPerMTokensAbove200K: pricing.cache_read_input_token_cost_above_200k_tokens != null ? pricing.cache_read_input_token_cost_above_200k_tokens * MILLION : void 0,
|
|
7667
7758
|
cacheCreationInputCostPerMTokens: cacheCreationInputCostPerToken * MILLION,
|
|
7668
7759
|
cacheCreationInputCostPerMTokensAbove200K: pricing.cache_creation_input_token_cost_above_200k_tokens != null ? pricing.cache_creation_input_token_cost_above_200k_tokens * MILLION : void 0,
|
|
7669
|
-
fastMultiplier: (_e = pricing.provider_specific_entry) == null ? void 0 : _e.fast,
|
|
7760
|
+
fastMultiplier: (_f = (_e = pricing.provider_specific_entry) == null ? void 0 : _e.fast) != null ? _f : resolveFastMultiplierOverride(candidates),
|
|
7670
7761
|
inputCostPerMTokens: inputCostPerToken * MILLION,
|
|
7671
7762
|
inputCostPerMTokensAbove200K: pricing.input_cost_per_token_above_200k_tokens != null ? pricing.input_cost_per_token_above_200k_tokens * MILLION : void 0,
|
|
7672
7763
|
outputCostPerMTokens: outputCostPerToken * MILLION,
|
|
7673
7764
|
outputCostPerMTokensAbove200K: pricing.output_cost_per_token_above_200k_tokens != null ? pricing.output_cost_per_token_above_200k_tokens * MILLION : void 0
|
|
7674
7765
|
};
|
|
7675
7766
|
}
|
|
7767
|
+
function resolveFastMultiplierOverride(candidates) {
|
|
7768
|
+
for (const candidate of candidates) {
|
|
7769
|
+
const multiplier = FAST_MULTIPLIER_EXACT_OVERRIDES[candidate];
|
|
7770
|
+
if (multiplier != null) {
|
|
7771
|
+
return multiplier;
|
|
7772
|
+
}
|
|
7773
|
+
}
|
|
7774
|
+
for (const candidate of candidates) {
|
|
7775
|
+
const normalized = candidate.replace(/[.@]/gu, "-");
|
|
7776
|
+
for (const part of normalized.split(/[/:]/u)) {
|
|
7777
|
+
for (const [base, multiplier] of Object.entries(FAST_MULTIPLIER_PREFIX_OVERRIDES)) {
|
|
7778
|
+
if (matchesModelSuffix(part, base)) {
|
|
7779
|
+
return multiplier;
|
|
7780
|
+
}
|
|
7781
|
+
}
|
|
7782
|
+
}
|
|
7783
|
+
}
|
|
7784
|
+
return void 0;
|
|
7785
|
+
}
|
|
7786
|
+
function matchesModelSuffix(part, base) {
|
|
7787
|
+
const index = part.lastIndexOf(base);
|
|
7788
|
+
if (index < 0) {
|
|
7789
|
+
return false;
|
|
7790
|
+
}
|
|
7791
|
+
const suffix = part.slice(index);
|
|
7792
|
+
return suffix === base || suffix[base.length] === "-";
|
|
7793
|
+
}
|
|
7676
7794
|
function createZeroPricing() {
|
|
7677
7795
|
return {
|
|
7678
7796
|
cachedInputCostPerMTokens: 0,
|
|
@@ -7929,6 +8047,7 @@ const GEMINI_FALLBACK_PRICING_TABLE = {
|
|
|
7929
8047
|
}
|
|
7930
8048
|
};
|
|
7931
8049
|
|
|
8050
|
+
const CLAUDE_CODE_CACHE_SIGNATURE = "claude-code-dedupe:message-id-v1";
|
|
7932
8051
|
const claudeCodeUsageAdapter = {
|
|
7933
8052
|
async createPricingResolver() {
|
|
7934
8053
|
return createLiteLLMPricingResolver({
|
|
@@ -7949,7 +8068,7 @@ const claudeCodeUsageAdapter = {
|
|
|
7949
8068
|
absolute: true
|
|
7950
8069
|
}).catch(() => []);
|
|
7951
8070
|
}));
|
|
7952
|
-
return fileGroups.flat().flatMap((filePath) => toDiscoveredUsageFile(filePath, "claudeCode"));
|
|
8071
|
+
return fileGroups.flat().flatMap((filePath) => toDiscoveredUsageFile(filePath, "claudeCode", CLAUDE_CODE_CACHE_SIGNATURE));
|
|
7953
8072
|
},
|
|
7954
8073
|
parseFile(filePath, resolvePricing) {
|
|
7955
8074
|
var _a, _b, _c, _d;
|
|
@@ -8032,7 +8151,7 @@ function getClaudeUniqueHash(line) {
|
|
|
8032
8151
|
const message = normalizeUnknownRecord(line.message);
|
|
8033
8152
|
const messageId = normalizeStringValue(message == null ? void 0 : message.id);
|
|
8034
8153
|
const requestId = normalizeStringValue(line.requestId);
|
|
8035
|
-
return messageId
|
|
8154
|
+
return messageId ? `${messageId}:${requestId != null ? requestId : ""}` : null;
|
|
8036
8155
|
}
|
|
8037
8156
|
function extractClaudeMessageText(content) {
|
|
8038
8157
|
if (typeof content === "string") {
|
|
@@ -8321,6 +8440,8 @@ function getFiniteNumber(value) {
|
|
|
8321
8440
|
return typeof value === "number" && Number.isFinite(value) ? Math.max(0, Math.trunc(value)) : 0;
|
|
8322
8441
|
}
|
|
8323
8442
|
|
|
8443
|
+
const CODEX_DEFAULT_FAST_MULTIPLIER = 2;
|
|
8444
|
+
const CODEX_SPEED_CACHE_PREFIX = "codex-speed:";
|
|
8324
8445
|
const codexUsageAdapter = {
|
|
8325
8446
|
async createPricingResolver() {
|
|
8326
8447
|
return createLiteLLMPricingResolver({
|
|
@@ -8338,9 +8459,10 @@ const codexUsageAdapter = {
|
|
|
8338
8459
|
absolute: true,
|
|
8339
8460
|
cwd: sessionsDir
|
|
8340
8461
|
});
|
|
8341
|
-
|
|
8462
|
+
const cacheSignature = getCodexConfigSignature(config.codexPath);
|
|
8463
|
+
return files.flatMap((filePath) => toDiscoveredUsageFile(filePath, "codex", cacheSignature));
|
|
8342
8464
|
},
|
|
8343
|
-
parseFile(filePath, resolvePricing) {
|
|
8465
|
+
parseFile(filePath, resolvePricing, file) {
|
|
8344
8466
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
|
|
8345
8467
|
const lines = parseJsonlFile(filePath);
|
|
8346
8468
|
const sessionMeta = (_a = lines.find((line) => line.type === "session_meta")) == null ? void 0 : _a.payload;
|
|
@@ -8355,6 +8477,7 @@ const codexUsageAdapter = {
|
|
|
8355
8477
|
startedAt,
|
|
8356
8478
|
threadName: `Session for ${project}`
|
|
8357
8479
|
});
|
|
8480
|
+
const speed = getCodexSpeedFromSignature(file.cacheSignature);
|
|
8358
8481
|
let previousTotals = null;
|
|
8359
8482
|
let currentModel;
|
|
8360
8483
|
let currentModelIsFallback = false;
|
|
@@ -8388,7 +8511,7 @@ const codexUsageAdapter = {
|
|
|
8388
8511
|
} else if (!extractedModel && currentModelIsFallback) {
|
|
8389
8512
|
isFallbackModel = true;
|
|
8390
8513
|
}
|
|
8391
|
-
const usage = rawUsage ? getCodexInteractionUsage(rawUsage, model != null ? model : CODEX_FALLBACK_MODEL, resolvePricing) : null;
|
|
8514
|
+
const usage = rawUsage ? getCodexInteractionUsage(rawUsage, model != null ? model : CODEX_FALLBACK_MODEL, resolvePricing, speed) : null;
|
|
8392
8515
|
addFragmentInteraction(fragment, {
|
|
8393
8516
|
content: extractCodexContent(line),
|
|
8394
8517
|
costUSD: (_j = usage == null ? void 0 : usage.costUSD) != null ? _j : 0,
|
|
@@ -8403,7 +8526,10 @@ const codexUsageAdapter = {
|
|
|
8403
8526
|
return [fragment];
|
|
8404
8527
|
},
|
|
8405
8528
|
watchPatterns(config) {
|
|
8406
|
-
return [
|
|
8529
|
+
return [
|
|
8530
|
+
join(config.codexPath, "config.toml"),
|
|
8531
|
+
join(config.codexPath, "sessions", "**", "*.jsonl")
|
|
8532
|
+
];
|
|
8407
8533
|
}
|
|
8408
8534
|
};
|
|
8409
8535
|
function getCodexRawUsage(line, previousTotals) {
|
|
@@ -8416,16 +8542,85 @@ function getCodexRawUsage(line, previousTotals) {
|
|
|
8416
8542
|
const totalUsage = normalizeRawUsage(info == null ? void 0 : info.total_token_usage);
|
|
8417
8543
|
return lastUsage != null ? lastUsage : totalUsage ? subtractRawUsage(totalUsage, previousTotals) : null;
|
|
8418
8544
|
}
|
|
8419
|
-
function getCodexInteractionUsage(rawUsage, model, resolvePricing) {
|
|
8545
|
+
function getCodexInteractionUsage(rawUsage, model, resolvePricing, speed) {
|
|
8420
8546
|
const usage = convertCodexRawUsage(rawUsage);
|
|
8421
8547
|
if (isZeroUsage(usage)) {
|
|
8422
8548
|
return null;
|
|
8423
8549
|
}
|
|
8424
8550
|
return {
|
|
8425
8551
|
...usage,
|
|
8426
|
-
costUSD: calculateUsageCostUSD(usage, resolvePricing(model)
|
|
8552
|
+
costUSD: calculateUsageCostUSD(usage, resolvePricing(model), {
|
|
8553
|
+
defaultFastMultiplier: CODEX_DEFAULT_FAST_MULTIPLIER,
|
|
8554
|
+
speed
|
|
8555
|
+
})
|
|
8427
8556
|
};
|
|
8428
8557
|
}
|
|
8558
|
+
function getCodexConfigSignature(codexPath) {
|
|
8559
|
+
return `${CODEX_SPEED_CACHE_PREFIX}${readCodexConfigSpeed(getCodexConfigPath(codexPath))}`;
|
|
8560
|
+
}
|
|
8561
|
+
function getCodexConfigPath(codexPath) {
|
|
8562
|
+
return join(codexPath, "config.toml");
|
|
8563
|
+
}
|
|
8564
|
+
function readCodexConfigSpeed(configPath) {
|
|
8565
|
+
var _a;
|
|
8566
|
+
try {
|
|
8567
|
+
return (_a = parseCodexConfigSpeed(readFileSync(configPath, "utf8"))) != null ? _a : "standard";
|
|
8568
|
+
} catch {
|
|
8569
|
+
return "standard";
|
|
8570
|
+
}
|
|
8571
|
+
}
|
|
8572
|
+
function getCodexSpeedFromSignature(cacheSignature) {
|
|
8573
|
+
return cacheSignature === `${CODEX_SPEED_CACHE_PREFIX}fast` ? "fast" : "standard";
|
|
8574
|
+
}
|
|
8575
|
+
const CODEX_CONFIG_ASSIGNMENT_REGEX = /^\s*([a-z_][\w-]*)\s*=\s*["']([^"']+)["']\s*(?:#.*)?$/i;
|
|
8576
|
+
const CODEX_CONFIG_SECTION_REGEX = /^\s*\[([^\]]+)\]\s*(?:#.*)?$/;
|
|
8577
|
+
function parseCodexConfigSpeed(content) {
|
|
8578
|
+
var _a;
|
|
8579
|
+
let activeProfile;
|
|
8580
|
+
let currentSection = null;
|
|
8581
|
+
let topLevelSpeed;
|
|
8582
|
+
const profileSpeeds = /* @__PURE__ */ new Map();
|
|
8583
|
+
for (const rawLine of content.split("\n")) {
|
|
8584
|
+
const sectionMatch = rawLine.match(CODEX_CONFIG_SECTION_REGEX);
|
|
8585
|
+
if (sectionMatch) {
|
|
8586
|
+
currentSection = sectionMatch[1].trim();
|
|
8587
|
+
continue;
|
|
8588
|
+
}
|
|
8589
|
+
const match = rawLine.match(CODEX_CONFIG_ASSIGNMENT_REGEX);
|
|
8590
|
+
if (!match) {
|
|
8591
|
+
continue;
|
|
8592
|
+
}
|
|
8593
|
+
const key = match[1];
|
|
8594
|
+
const value = match[2].trim();
|
|
8595
|
+
if (!currentSection) {
|
|
8596
|
+
if (key === "profile") {
|
|
8597
|
+
activeProfile = value;
|
|
8598
|
+
} else if (key === "service_tier") {
|
|
8599
|
+
topLevelSpeed = toCodexSpeed(value);
|
|
8600
|
+
}
|
|
8601
|
+
continue;
|
|
8602
|
+
}
|
|
8603
|
+
const profileName = getCodexProfileName(currentSection);
|
|
8604
|
+
if (profileName && key === "service_tier") {
|
|
8605
|
+
profileSpeeds.set(profileName, toCodexSpeed(value));
|
|
8606
|
+
}
|
|
8607
|
+
}
|
|
8608
|
+
return (_a = activeProfile ? profileSpeeds.get(activeProfile) : void 0) != null ? _a : topLevelSpeed;
|
|
8609
|
+
}
|
|
8610
|
+
function getCodexProfileName(section) {
|
|
8611
|
+
if (!section.startsWith("profiles.")) {
|
|
8612
|
+
return null;
|
|
8613
|
+
}
|
|
8614
|
+
return stripTomlQuotes(section.slice("profiles.".length).trim());
|
|
8615
|
+
}
|
|
8616
|
+
function stripTomlQuotes(value) {
|
|
8617
|
+
const quote = value[0];
|
|
8618
|
+
return quote && (quote === '"' || quote === "'") && value.endsWith(quote) ? value.slice(1, -1) : value;
|
|
8619
|
+
}
|
|
8620
|
+
function toCodexSpeed(value) {
|
|
8621
|
+
const normalized = value.trim().toLowerCase();
|
|
8622
|
+
return normalized === "priority" || normalized === "fast" ? "fast" : "standard";
|
|
8623
|
+
}
|
|
8429
8624
|
function extractCodexContent(line) {
|
|
8430
8625
|
const payload = line.payload;
|
|
8431
8626
|
if (!payload) {
|
|
@@ -9950,7 +10145,7 @@ async function buildIncrementalUsageIndex(config, repository) {
|
|
|
9950
10145
|
const cachedFilesByPath = new Map(cachedFiles.map((file) => [file.path, file]));
|
|
9951
10146
|
const changedFiles = discoveredFiles.filter((file) => {
|
|
9952
10147
|
const cached = cachedFilesByPath.get(file.path);
|
|
9953
|
-
return !cached || cached.platform !== file.platform || cached.size !== file.size || cached.mtimeMs !== file.mtimeMs;
|
|
10148
|
+
return !cached || cached.platform !== file.platform || cached.cacheSignature !== file.cacheSignature || cached.size !== file.size || cached.mtimeMs !== file.mtimeMs;
|
|
9954
10149
|
});
|
|
9955
10150
|
const removedFiles = cachedFiles.filter((file) => !discoveredFiles.some((discovered) => discovered.path === file.path));
|
|
9956
10151
|
const affectedProjects = new Set(removedFiles.flatMap((file) => file.projectNames));
|
|
@@ -10014,8 +10209,9 @@ async function discoverUsageFiles(config) {
|
|
|
10014
10209
|
}
|
|
10015
10210
|
function parseUsageFile(file, pricingResolvers) {
|
|
10016
10211
|
const adapter = usagePlatformAdapters[file.platform];
|
|
10017
|
-
const payload = adapter.parseFile(file.path, pricingResolvers[file.platform]);
|
|
10212
|
+
const payload = adapter.parseFile(file.path, pricingResolvers[file.platform], file);
|
|
10018
10213
|
return {
|
|
10214
|
+
cacheSignature: file.cacheSignature,
|
|
10019
10215
|
mtimeMs: file.mtimeMs,
|
|
10020
10216
|
path: file.path,
|
|
10021
10217
|
payload,
|
|
@@ -10033,29 +10229,61 @@ function buildPlatformSessionsByPlatform(indexedFiles) {
|
|
|
10033
10229
|
function buildPlatformSessionsFromFiles(indexedFiles, platform) {
|
|
10034
10230
|
var _a;
|
|
10035
10231
|
const details = /* @__PURE__ */ new Map();
|
|
10036
|
-
const
|
|
10232
|
+
const selectedInteractions = selectDedupedInteractions(indexedFiles, platform);
|
|
10233
|
+
for (const { fragment, interaction } of selectedInteractions) {
|
|
10234
|
+
const detail = (_a = details.get(fragment.key)) != null ? _a : createSessionDetail(fragment);
|
|
10235
|
+
if (fragment.durationEndAt && (!detail.durationEndAt || Date.parse(fragment.durationEndAt) > Date.parse(detail.durationEndAt))) {
|
|
10236
|
+
detail.durationEndAt = fragment.durationEndAt;
|
|
10237
|
+
}
|
|
10238
|
+
addInteraction(detail, interaction);
|
|
10239
|
+
details.set(fragment.key, detail);
|
|
10240
|
+
}
|
|
10241
|
+
return Array.from(details.values()).map(finalizeSessionDetail).filter(hasBillableSessionDetail).map(toProjectSessionUsageItem).sort((a, b) => Date.parse(b.startedAt) - Date.parse(a.startedAt));
|
|
10242
|
+
}
|
|
10243
|
+
function selectDedupedInteractions(indexedFiles, platform) {
|
|
10244
|
+
const interactionsWithoutDedupeKey = [];
|
|
10245
|
+
const interactionsByDedupeKey = /* @__PURE__ */ new Map();
|
|
10037
10246
|
for (const file of indexedFiles) {
|
|
10038
10247
|
if (file.platform !== platform) {
|
|
10039
10248
|
continue;
|
|
10040
10249
|
}
|
|
10041
10250
|
for (const fragment of file.payload) {
|
|
10042
|
-
const detail = (_a = details.get(fragment.key)) != null ? _a : createSessionDetail(fragment);
|
|
10043
|
-
if (fragment.durationEndAt && (!detail.durationEndAt || Date.parse(fragment.durationEndAt) > Date.parse(detail.durationEndAt))) {
|
|
10044
|
-
detail.durationEndAt = fragment.durationEndAt;
|
|
10045
|
-
}
|
|
10046
10251
|
for (const interaction of fragment.interactions) {
|
|
10047
|
-
if (interaction.dedupeKey) {
|
|
10048
|
-
|
|
10049
|
-
|
|
10050
|
-
|
|
10051
|
-
|
|
10252
|
+
if (!interaction.dedupeKey) {
|
|
10253
|
+
interactionsWithoutDedupeKey.push({ fragment, interaction });
|
|
10254
|
+
continue;
|
|
10255
|
+
}
|
|
10256
|
+
const existing = interactionsByDedupeKey.get(interaction.dedupeKey);
|
|
10257
|
+
if (!existing) {
|
|
10258
|
+
interactionsByDedupeKey.set(interaction.dedupeKey, { fragment, interaction });
|
|
10259
|
+
} else if (shouldReplaceDedupedInteraction(interaction, existing.interaction)) {
|
|
10260
|
+
interactionsByDedupeKey.set(interaction.dedupeKey, { fragment: existing.fragment, interaction });
|
|
10052
10261
|
}
|
|
10053
|
-
addInteraction(detail, interaction);
|
|
10054
10262
|
}
|
|
10055
|
-
details.set(fragment.key, detail);
|
|
10056
10263
|
}
|
|
10057
10264
|
}
|
|
10058
|
-
return
|
|
10265
|
+
return [
|
|
10266
|
+
...interactionsWithoutDedupeKey,
|
|
10267
|
+
...interactionsByDedupeKey.values()
|
|
10268
|
+
];
|
|
10269
|
+
}
|
|
10270
|
+
function shouldReplaceDedupedInteraction(candidate, existing) {
|
|
10271
|
+
var _a, _b, _c, _d;
|
|
10272
|
+
const candidateTotal = (_b = (_a = candidate.usage) == null ? void 0 : _a.totalTokens) != null ? _b : 0;
|
|
10273
|
+
const existingTotal = (_d = (_c = existing.usage) == null ? void 0 : _c.totalTokens) != null ? _d : 0;
|
|
10274
|
+
if (candidateTotal !== existingTotal) {
|
|
10275
|
+
return candidateTotal > existingTotal;
|
|
10276
|
+
}
|
|
10277
|
+
const candidateIsFast = isFastModel(candidate.model);
|
|
10278
|
+
const existingIsFast = isFastModel(existing.model);
|
|
10279
|
+
if (candidateIsFast !== existingIsFast) {
|
|
10280
|
+
return candidateIsFast;
|
|
10281
|
+
}
|
|
10282
|
+
return candidate.costUSD > existing.costUSD;
|
|
10283
|
+
}
|
|
10284
|
+
function isFastModel(model) {
|
|
10285
|
+
var _a;
|
|
10286
|
+
return (_a = model == null ? void 0 : model.endsWith("-fast")) != null ? _a : false;
|
|
10059
10287
|
}
|
|
10060
10288
|
function createSessionDetail(fragment) {
|
|
10061
10289
|
var _a, _b;
|
|
@@ -10064,6 +10292,7 @@ function createSessionDetail(fragment) {
|
|
|
10064
10292
|
costUSD: 0,
|
|
10065
10293
|
durationEndAt: fragment.durationEndAt,
|
|
10066
10294
|
durationMinutes: 0,
|
|
10295
|
+
key: fragment.key,
|
|
10067
10296
|
inputTokens: 0,
|
|
10068
10297
|
interactions: [],
|
|
10069
10298
|
lastActivity: (_a = fragment.startedAt) != null ? _a : "",
|
|
@@ -10138,7 +10367,7 @@ function toProjectSessionUsageItem(detail) {
|
|
|
10138
10367
|
date: dateKey ? formatDateLabelFromDateKey(dateKey) : "",
|
|
10139
10368
|
duration: formatDuration(detail.durationMinutes),
|
|
10140
10369
|
durationMinutes: detail.durationMinutes,
|
|
10141
|
-
id: detail.
|
|
10370
|
+
id: detail.key,
|
|
10142
10371
|
inputTokens: detail.inputTokens,
|
|
10143
10372
|
interactions: detail.interactions.map(({ dedupeKey: _dedupeKey, ...interaction }) => ({
|
|
10144
10373
|
...interaction,
|
|
@@ -10344,7 +10573,7 @@ function getProjectAggregateEvents(sessions) {
|
|
|
10344
10573
|
project: session.project,
|
|
10345
10574
|
reasoningOutputTokens: interaction.usage.reasoningOutputTokens,
|
|
10346
10575
|
repository: session.repository,
|
|
10347
|
-
sessionId: session.
|
|
10576
|
+
sessionId: session.id,
|
|
10348
10577
|
timestamp: interaction.timestamp,
|
|
10349
10578
|
totalTokens: interaction.usage.totalTokens
|
|
10350
10579
|
};
|
|
@@ -10796,159 +11025,159 @@ const plugins = [
|
|
|
10796
11025
|
];
|
|
10797
11026
|
|
|
10798
11027
|
const assets = {
|
|
11028
|
+
"/favicon.ico": {
|
|
11029
|
+
"type": "image/vnd.microsoft.icon",
|
|
11030
|
+
"etag": "\"1083e-LfyFZ+1JmdianDqe/sQN2Ou0IzQ\"",
|
|
11031
|
+
"mtime": "2026-05-23T14:23:38.580Z",
|
|
11032
|
+
"size": 67646,
|
|
11033
|
+
"path": "../public/favicon.ico"
|
|
11034
|
+
},
|
|
10799
11035
|
"/logo.svg": {
|
|
10800
11036
|
"type": "image/svg+xml",
|
|
10801
11037
|
"etag": "\"1550-fwYFdULdJ83Qp0FjnnX31iQz9oI\"",
|
|
10802
|
-
"mtime": "2026-05-
|
|
11038
|
+
"mtime": "2026-05-23T14:23:38.580Z",
|
|
10803
11039
|
"size": 5456,
|
|
10804
11040
|
"path": "../public/logo.svg"
|
|
10805
11041
|
},
|
|
10806
11042
|
"/robots.txt": {
|
|
10807
11043
|
"type": "text/plain; charset=utf-8",
|
|
10808
11044
|
"etag": "\"18-j8OIsL9qGDmNZ+lHhp2tyH4XtaE\"",
|
|
10809
|
-
"mtime": "2026-05-
|
|
11045
|
+
"mtime": "2026-05-23T14:23:38.580Z",
|
|
10810
11046
|
"size": 24,
|
|
10811
11047
|
"path": "../public/robots.txt"
|
|
10812
11048
|
},
|
|
10813
|
-
"/
|
|
10814
|
-
"type": "image/vnd.microsoft.icon",
|
|
10815
|
-
"etag": "\"1083e-LfyFZ+1JmdianDqe/sQN2Ou0IzQ\"",
|
|
10816
|
-
"mtime": "2026-05-22T15:27:58.720Z",
|
|
10817
|
-
"size": 67646,
|
|
10818
|
-
"path": "../public/favicon.ico"
|
|
10819
|
-
},
|
|
10820
|
-
"/_nuxt/B6C9KBQ4.js": {
|
|
11049
|
+
"/_nuxt/BO_d_Oyx.js": {
|
|
10821
11050
|
"type": "text/javascript; charset=utf-8",
|
|
10822
|
-
"etag": "\"
|
|
10823
|
-
"mtime": "2026-05-
|
|
10824
|
-
"size":
|
|
10825
|
-
"path": "../public/_nuxt/
|
|
11051
|
+
"etag": "\"3cf2-0lW8nTIOrZ/84LIG/e4aAWtiK4U\"",
|
|
11052
|
+
"mtime": "2026-05-23T14:23:38.575Z",
|
|
11053
|
+
"size": 15602,
|
|
11054
|
+
"path": "../public/_nuxt/BO_d_Oyx.js"
|
|
10826
11055
|
},
|
|
10827
|
-
"/_nuxt/
|
|
11056
|
+
"/_nuxt/BtuXxixc.js": {
|
|
10828
11057
|
"type": "text/javascript; charset=utf-8",
|
|
10829
|
-
"etag": "\"
|
|
10830
|
-
"mtime": "2026-05-
|
|
10831
|
-
"size":
|
|
10832
|
-
"path": "../public/_nuxt/
|
|
11058
|
+
"etag": "\"4a32-RKhNLUY/9mTZffNHKzq+ZTE6NEk\"",
|
|
11059
|
+
"mtime": "2026-05-23T14:23:38.575Z",
|
|
11060
|
+
"size": 18994,
|
|
11061
|
+
"path": "../public/_nuxt/BtuXxixc.js"
|
|
10833
11062
|
},
|
|
10834
|
-
"/_nuxt/
|
|
11063
|
+
"/_nuxt/CBu27bzx.js": {
|
|
10835
11064
|
"type": "text/javascript; charset=utf-8",
|
|
10836
|
-
"etag": "\"
|
|
10837
|
-
"mtime": "2026-05-
|
|
10838
|
-
"size":
|
|
10839
|
-
"path": "../public/_nuxt/
|
|
11065
|
+
"etag": "\"d7b-AVXq8ZkGg3EwuGLn96fmpW4OGjI\"",
|
|
11066
|
+
"mtime": "2026-05-23T14:23:38.575Z",
|
|
11067
|
+
"size": 3451,
|
|
11068
|
+
"path": "../public/_nuxt/CBu27bzx.js"
|
|
10840
11069
|
},
|
|
10841
|
-
"/_nuxt/
|
|
11070
|
+
"/_nuxt/CC4_0abj.js": {
|
|
10842
11071
|
"type": "text/javascript; charset=utf-8",
|
|
10843
|
-
"etag": "\"
|
|
10844
|
-
"mtime": "2026-05-
|
|
10845
|
-
"size":
|
|
10846
|
-
"path": "../public/_nuxt/
|
|
11072
|
+
"etag": "\"14f4-HSFTyVIPyb4gKy6pzPkI1FSb2nw\"",
|
|
11073
|
+
"mtime": "2026-05-23T14:23:38.575Z",
|
|
11074
|
+
"size": 5364,
|
|
11075
|
+
"path": "../public/_nuxt/CC4_0abj.js"
|
|
10847
11076
|
},
|
|
10848
|
-
"/_nuxt/
|
|
11077
|
+
"/_nuxt/CLHpvfq1.js": {
|
|
10849
11078
|
"type": "text/javascript; charset=utf-8",
|
|
10850
|
-
"etag": "\"
|
|
10851
|
-
"mtime": "2026-05-
|
|
10852
|
-
"size":
|
|
10853
|
-
"path": "../public/_nuxt/
|
|
11079
|
+
"etag": "\"eb4-4rjemX6Xiwgd6CWSl2KPPk0STII\"",
|
|
11080
|
+
"mtime": "2026-05-23T14:23:38.575Z",
|
|
11081
|
+
"size": 3764,
|
|
11082
|
+
"path": "../public/_nuxt/CLHpvfq1.js"
|
|
10854
11083
|
},
|
|
10855
|
-
"/_nuxt/
|
|
11084
|
+
"/_nuxt/COBlwcVj.js": {
|
|
10856
11085
|
"type": "text/javascript; charset=utf-8",
|
|
10857
|
-
"etag": "\"
|
|
10858
|
-
"mtime": "2026-05-
|
|
10859
|
-
"size":
|
|
10860
|
-
"path": "../public/_nuxt/
|
|
11086
|
+
"etag": "\"bc73-Y7i7npRYQlWHMyUwkaVFnYcViz8\"",
|
|
11087
|
+
"mtime": "2026-05-23T14:23:38.575Z",
|
|
11088
|
+
"size": 48243,
|
|
11089
|
+
"path": "../public/_nuxt/COBlwcVj.js"
|
|
10861
11090
|
},
|
|
10862
|
-
"/_nuxt/
|
|
11091
|
+
"/_nuxt/CGsjOcfM.js": {
|
|
10863
11092
|
"type": "text/javascript; charset=utf-8",
|
|
10864
|
-
"etag": "\"
|
|
10865
|
-
"mtime": "2026-05-
|
|
10866
|
-
"size":
|
|
10867
|
-
"path": "../public/_nuxt/
|
|
11093
|
+
"etag": "\"1141f-bN3EpHipXo2C1U4csFLDLC6fWCE\"",
|
|
11094
|
+
"mtime": "2026-05-23T14:23:38.575Z",
|
|
11095
|
+
"size": 70687,
|
|
11096
|
+
"path": "../public/_nuxt/CGsjOcfM.js"
|
|
10868
11097
|
},
|
|
10869
|
-
"/_nuxt/
|
|
11098
|
+
"/_nuxt/CjeAKHhp.js": {
|
|
10870
11099
|
"type": "text/javascript; charset=utf-8",
|
|
10871
|
-
"etag": "\"
|
|
10872
|
-
"mtime": "2026-05-
|
|
10873
|
-
"size":
|
|
10874
|
-
"path": "../public/_nuxt/
|
|
11100
|
+
"etag": "\"760b-6/Vln7oc6We2Fv2JzlfIvdSbQ8o\"",
|
|
11101
|
+
"mtime": "2026-05-23T14:23:38.575Z",
|
|
11102
|
+
"size": 30219,
|
|
11103
|
+
"path": "../public/_nuxt/CjeAKHhp.js"
|
|
10875
11104
|
},
|
|
10876
|
-
"/_nuxt/
|
|
11105
|
+
"/_nuxt/CvvesHM7.js": {
|
|
10877
11106
|
"type": "text/javascript; charset=utf-8",
|
|
10878
|
-
"etag": "\"
|
|
10879
|
-
"mtime": "2026-05-
|
|
10880
|
-
"size":
|
|
10881
|
-
"path": "../public/_nuxt/
|
|
11107
|
+
"etag": "\"5e1e-OZRyFwLTAD0LX+mGdKN2HAR5jVk\"",
|
|
11108
|
+
"mtime": "2026-05-23T14:23:38.575Z",
|
|
11109
|
+
"size": 24094,
|
|
11110
|
+
"path": "../public/_nuxt/CvvesHM7.js"
|
|
10882
11111
|
},
|
|
10883
|
-
"/_nuxt/
|
|
11112
|
+
"/_nuxt/BL-DadsH.js": {
|
|
10884
11113
|
"type": "text/javascript; charset=utf-8",
|
|
10885
|
-
"etag": "\"
|
|
10886
|
-
"mtime": "2026-05-
|
|
10887
|
-
"size":
|
|
10888
|
-
"path": "../public/_nuxt/
|
|
11114
|
+
"etag": "\"4135e-MQb3g4SBvW5lVewRuNKmjRlf13Y\"",
|
|
11115
|
+
"mtime": "2026-05-23T14:23:38.575Z",
|
|
11116
|
+
"size": 267102,
|
|
11117
|
+
"path": "../public/_nuxt/BL-DadsH.js"
|
|
10889
11118
|
},
|
|
10890
|
-
"/_nuxt/
|
|
11119
|
+
"/_nuxt/N8W_Dp-N.js": {
|
|
10891
11120
|
"type": "text/javascript; charset=utf-8",
|
|
10892
|
-
"etag": "\"
|
|
10893
|
-
"mtime": "2026-05-
|
|
10894
|
-
"size":
|
|
10895
|
-
"path": "../public/_nuxt/
|
|
11121
|
+
"etag": "\"9f6b-XuYcAlmRZBqRFlSle9M9m9mFrRI\"",
|
|
11122
|
+
"mtime": "2026-05-23T14:23:38.577Z",
|
|
11123
|
+
"size": 40811,
|
|
11124
|
+
"path": "../public/_nuxt/N8W_Dp-N.js"
|
|
10896
11125
|
},
|
|
10897
11126
|
"/_nuxt/error-404.CFBEg71j.css": {
|
|
10898
11127
|
"type": "text/css; charset=utf-8",
|
|
10899
11128
|
"etag": "\"97e-GvhaEAryQvrSXyDcP4RiHXzYb5o\"",
|
|
10900
|
-
"mtime": "2026-05-
|
|
11129
|
+
"mtime": "2026-05-23T14:23:38.578Z",
|
|
10901
11130
|
"size": 2430,
|
|
10902
11131
|
"path": "../public/_nuxt/error-404.CFBEg71j.css"
|
|
10903
11132
|
},
|
|
10904
11133
|
"/_nuxt/error-500.BqCnH31G.css": {
|
|
10905
11134
|
"type": "text/css; charset=utf-8",
|
|
10906
11135
|
"etag": "\"773-Tpf6lA6A2FEDtjLyWUXKolBZ3hM\"",
|
|
10907
|
-
"mtime": "2026-05-
|
|
11136
|
+
"mtime": "2026-05-23T14:23:38.578Z",
|
|
10908
11137
|
"size": 1907,
|
|
10909
11138
|
"path": "../public/_nuxt/error-500.BqCnH31G.css"
|
|
10910
11139
|
},
|
|
10911
|
-
"/_nuxt/
|
|
11140
|
+
"/_nuxt/vkAmg0G5.js": {
|
|
10912
11141
|
"type": "text/javascript; charset=utf-8",
|
|
10913
|
-
"etag": "\"
|
|
10914
|
-
"mtime": "2026-05-
|
|
10915
|
-
"size":
|
|
10916
|
-
"path": "../public/_nuxt/
|
|
11142
|
+
"etag": "\"2a69-vHNrnLDtyhAaSseLnkiNli6Wf3k\"",
|
|
11143
|
+
"mtime": "2026-05-23T14:23:38.578Z",
|
|
11144
|
+
"size": 10857,
|
|
11145
|
+
"path": "../public/_nuxt/vkAmg0G5.js"
|
|
11146
|
+
},
|
|
11147
|
+
"/_nuxt/wUprbfrX.js": {
|
|
11148
|
+
"type": "text/javascript; charset=utf-8",
|
|
11149
|
+
"etag": "\"4399-F/KjRyJ+oS+PQ4RVLxrSSwvgmVA\"",
|
|
11150
|
+
"mtime": "2026-05-23T14:23:38.578Z",
|
|
11151
|
+
"size": 17305,
|
|
11152
|
+
"path": "../public/_nuxt/wUprbfrX.js"
|
|
11153
|
+
},
|
|
11154
|
+
"/_nuxt/entry.vHfFzkyD.css": {
|
|
11155
|
+
"type": "text/css; charset=utf-8",
|
|
11156
|
+
"etag": "\"1d217-AX0vUIWFE2kL17zPKjOPcQBxadQ\"",
|
|
11157
|
+
"mtime": "2026-05-23T14:23:38.578Z",
|
|
11158
|
+
"size": 119319,
|
|
11159
|
+
"path": "../public/_nuxt/entry.vHfFzkyD.css"
|
|
10917
11160
|
},
|
|
10918
11161
|
"/_nuxt/builds/latest.json": {
|
|
10919
11162
|
"type": "application/json",
|
|
10920
|
-
"etag": "\"47-
|
|
10921
|
-
"mtime": "2026-05-
|
|
11163
|
+
"etag": "\"47-t9P0TIFYP6zGSxVQ5dq1HIuFqRs\"",
|
|
11164
|
+
"mtime": "2026-05-23T14:23:38.572Z",
|
|
10922
11165
|
"size": 71,
|
|
10923
11166
|
"path": "../public/_nuxt/builds/latest.json"
|
|
10924
11167
|
},
|
|
10925
|
-
"/_nuxt/builds/meta/
|
|
11168
|
+
"/_nuxt/builds/meta/be10c896-ee75-4f4f-911d-c3f0a8b4d417.json": {
|
|
10926
11169
|
"type": "application/json",
|
|
10927
|
-
"etag": "\"58-
|
|
10928
|
-
"mtime": "2026-05-
|
|
11170
|
+
"etag": "\"58-gw6htu/si8XhmwFAJeIsDDnQeNw\"",
|
|
11171
|
+
"mtime": "2026-05-23T14:23:38.570Z",
|
|
10929
11172
|
"size": 88,
|
|
10930
|
-
"path": "../public/_nuxt/builds/meta/
|
|
11173
|
+
"path": "../public/_nuxt/builds/meta/be10c896-ee75-4f4f-911d-c3f0a8b4d417.json"
|
|
10931
11174
|
},
|
|
10932
|
-
"/_nuxt/
|
|
11175
|
+
"/_nuxt/IstswKJB.js": {
|
|
10933
11176
|
"type": "text/javascript; charset=utf-8",
|
|
10934
|
-
"etag": "\"35466-
|
|
10935
|
-
"mtime": "2026-05-
|
|
11177
|
+
"etag": "\"35466-qpjUFamQKI+spY54orxHBSsbAV4\"",
|
|
11178
|
+
"mtime": "2026-05-23T14:23:38.577Z",
|
|
10936
11179
|
"size": 218214,
|
|
10937
|
-
"path": "../public/_nuxt/
|
|
10938
|
-
},
|
|
10939
|
-
"/_nuxt/entry.vHfFzkyD.css": {
|
|
10940
|
-
"type": "text/css; charset=utf-8",
|
|
10941
|
-
"etag": "\"1d217-AX0vUIWFE2kL17zPKjOPcQBxadQ\"",
|
|
10942
|
-
"mtime": "2026-05-22T15:27:58.716Z",
|
|
10943
|
-
"size": 119319,
|
|
10944
|
-
"path": "../public/_nuxt/entry.vHfFzkyD.css"
|
|
10945
|
-
},
|
|
10946
|
-
"/_nuxt/DtbPvE6R.js": {
|
|
10947
|
-
"type": "text/javascript; charset=utf-8",
|
|
10948
|
-
"etag": "\"4135e-cTbNR7mK7vcfB4JteOXxth6FUlY\"",
|
|
10949
|
-
"mtime": "2026-05-22T15:27:58.716Z",
|
|
10950
|
-
"size": 267102,
|
|
10951
|
-
"path": "../public/_nuxt/DtbPvE6R.js"
|
|
11180
|
+
"path": "../public/_nuxt/IstswKJB.js"
|
|
10952
11181
|
}
|
|
10953
11182
|
};
|
|
10954
11183
|
|