claude-session-dashboard 0.4.2 → 0.4.4
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/client/assets/_dashboard-DLFGahko.js +1 -0
- package/dist/client/assets/{_sessionId-D4Tpmmb5.js → _sessionId-xiPzwrlf.js} +1 -1
- package/dist/client/assets/{createServerFn-BYTDoNe-.js → createServerFn-BLR4iNR3.js} +1 -1
- package/dist/client/assets/{index-DnK_zh3s.js → index-D_9sS4oJ.js} +1 -1
- package/dist/client/assets/{main-CV28H4XG.js → main-BcKPK-4E.js} +3 -3
- package/dist/client/assets/{sessions.queries-tzrs5GhP.js → sessions.queries-CHKiZnLm.js} +1 -1
- package/dist/client/assets/{settings-D8yv1q93.js → settings-B2tG1vy0.js} +1 -1
- package/dist/client/assets/{settings.types-CMYAW0cQ.js → settings.types-DHC6rkil.js} +1 -1
- package/dist/client/assets/{stats-C_6E4jyb.js → stats-BlA0NIHc.js} +1 -1
- package/dist/client/assets/{useSessionCost-BBu3AmcX.js → useSessionCost-BikgEmWy.js} +1 -1
- package/dist/server/assets/{_dashboard-TUzgwLqB.js → _dashboard-smfIqyQC.js} +56 -30
- package/dist/server/assets/{_sessionId-DyFxvcBN.js → _sessionId-DIUMcrWR.js} +1 -1
- package/dist/server/assets/_tanstack-start-manifest_v-Dmhlhehg.js +4 -0
- package/dist/server/assets/app-info.server-CXcS0a5s.js +40 -0
- package/dist/server/assets/{index-Bx7vBs4O.js → index-hFrIPkke.js} +1 -1
- package/dist/server/assets/{project-analytics.server-BsmZ4xil.js → project-analytics.server-Bxk8-NnT.js} +2 -3
- package/dist/server/assets/{router-Cd4jLk4T.js → router-5hznwWqr.js} +5 -5
- package/dist/server/assets/{session-detail.server-BDup9xb0.js → session-detail.server-BIoOQwSE.js} +1 -2
- package/dist/server/assets/{session-parser-75iTexM0.js → session-parser-B0pdBvgT.js} +168 -48
- package/dist/server/assets/{session-scanner-CPud4KGP.js → session-scanner-CpgOq5m1.js} +4 -5
- package/dist/server/assets/{sessions.server-60puUvjv.js → sessions.server-Biq8gbAJ.js} +2 -3
- package/dist/server/assets/{settings-KKaz1ty7.js → settings-D0FgLIR5.js} +1 -1
- package/dist/server/assets/{stats-Bsrkajci.js → stats-Ae6umrPI.js} +1 -1
- package/dist/server/assets/{stats.server-qTOvID9-.js → stats.server-DhzOihwM.js} +86 -83
- package/dist/server/server.js +16 -13
- package/package.json +1 -1
- package/dist/client/assets/_dashboard-t702m22X.js +0 -1
- package/dist/server/assets/_tanstack-start-manifest_v-RaGuPsWw.js +0 -4
- package/dist/server/assets/claude-path-BdwflgZ1.js +0 -31
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { c as createServerRpc } from "./createServerRpc-Bd3B-Ah9.js";
|
|
2
2
|
import * as fs from "node:fs";
|
|
3
|
-
import {
|
|
4
|
-
import { s as scanAllSessions, w as scanAllSessionsWithPaths } from "./session-scanner-CPud4KGP.js";
|
|
5
|
-
import { a as parseDetail } from "./session-parser-75iTexM0.js";
|
|
3
|
+
import { a as getStatsPath, p as parseDetail } from "./session-parser-B0pdBvgT.js";
|
|
6
4
|
import * as path from "node:path";
|
|
7
5
|
import * as os from "node:os";
|
|
8
6
|
import { z } from "zod";
|
|
7
|
+
import { s as scanAllSessionsWithPaths } from "./session-scanner-CpgOq5m1.js";
|
|
9
8
|
import { c as createServerFn } from "../server.js";
|
|
9
|
+
import "node:readline";
|
|
10
10
|
import "@tanstack/history";
|
|
11
11
|
import "@tanstack/router-core/ssr/client";
|
|
12
12
|
import "@tanstack/router-core";
|
|
@@ -113,25 +113,63 @@ const StatsCacheSchema = z.object({
|
|
|
113
113
|
});
|
|
114
114
|
let cachedStats = null;
|
|
115
115
|
let mergedCache = null;
|
|
116
|
-
const MERGE_STALENESS_MS =
|
|
116
|
+
const MERGE_STALENESS_MS = 6e4;
|
|
117
117
|
function getTodayDateString() {
|
|
118
|
-
return new Date().toISOString().split("T")[0];
|
|
118
|
+
return (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
|
|
119
119
|
}
|
|
120
120
|
function extractDateString(isoOrDate) {
|
|
121
121
|
return isoOrDate.split("T")[0];
|
|
122
122
|
}
|
|
123
|
-
function
|
|
124
|
-
const
|
|
125
|
-
|
|
123
|
+
async function parseStats() {
|
|
124
|
+
const statsPath = getStatsPath();
|
|
125
|
+
const stat = await fs.promises.stat(statsPath).catch(() => null);
|
|
126
|
+
if (!stat) {
|
|
127
|
+
try {
|
|
128
|
+
const computed = await computeStatsFromSessions();
|
|
129
|
+
return computed;
|
|
130
|
+
} catch {
|
|
131
|
+
return null;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
if (cachedStats && cachedStats.mtimeMs === stat.mtimeMs) {
|
|
135
|
+
return maybeEnrichWithRecentSessions(cachedStats.data, stat.mtimeMs);
|
|
136
|
+
}
|
|
137
|
+
const diskResult = readDiskCache("stats", stat.mtimeMs, StatsCacheSchema);
|
|
138
|
+
if (diskResult) {
|
|
139
|
+
cachedStats = { mtimeMs: stat.mtimeMs, data: diskResult };
|
|
140
|
+
return maybeEnrichWithRecentSessions(diskResult, stat.mtimeMs);
|
|
141
|
+
}
|
|
126
142
|
try {
|
|
127
|
-
const
|
|
128
|
-
const
|
|
129
|
-
|
|
143
|
+
const raw = await fs.promises.readFile(statsPath, "utf-8");
|
|
144
|
+
const parsed = JSON.parse(raw);
|
|
145
|
+
const result = StatsCacheSchema.parse(parsed);
|
|
146
|
+
writeDiskCache("stats", statsPath, stat.mtimeMs, result);
|
|
147
|
+
cachedStats = { mtimeMs: stat.mtimeMs, data: result };
|
|
148
|
+
return maybeEnrichWithRecentSessions(result, stat.mtimeMs);
|
|
130
149
|
} catch {
|
|
150
|
+
const computed = await computeStatsFromSessions();
|
|
151
|
+
return computed;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
async function maybeEnrichWithRecentSessions(stats, mtimeMs) {
|
|
155
|
+
const today = getTodayDateString();
|
|
156
|
+
const lastComputed = extractDateString(stats.lastComputedDate);
|
|
157
|
+
if (lastComputed >= today) {
|
|
158
|
+
return stats;
|
|
159
|
+
}
|
|
160
|
+
if (mergedCache && mergedCache.mtimeMs === mtimeMs && Date.now() - mergedCache.mergedAt < MERGE_STALENESS_MS) {
|
|
161
|
+
return mergedCache.data;
|
|
162
|
+
}
|
|
163
|
+
try {
|
|
164
|
+
const merged = await mergeRecentSessions(stats);
|
|
165
|
+
mergedCache = { mtimeMs, mergedAt: Date.now(), data: merged };
|
|
166
|
+
return merged;
|
|
167
|
+
} catch {
|
|
168
|
+
return stats;
|
|
131
169
|
}
|
|
132
170
|
}
|
|
133
171
|
async function parseDetailsInBatches(sessions, batchSize = 10) {
|
|
134
|
-
const results = new Map();
|
|
172
|
+
const results = /* @__PURE__ */ new Map();
|
|
135
173
|
for (let i = 0; i < sessions.length; i += batchSize) {
|
|
136
174
|
const batch = sessions.slice(i, i + batchSize);
|
|
137
175
|
const details = await Promise.all(
|
|
@@ -139,7 +177,12 @@ async function parseDetailsInBatches(sessions, batchSize = 10) {
|
|
|
139
177
|
try {
|
|
140
178
|
return {
|
|
141
179
|
sessionId: s.sessionId,
|
|
142
|
-
detail: await parseDetail(
|
|
180
|
+
detail: await parseDetail(
|
|
181
|
+
s.filePath,
|
|
182
|
+
s.sessionId,
|
|
183
|
+
s.projectPath,
|
|
184
|
+
s.projectName
|
|
185
|
+
)
|
|
143
186
|
};
|
|
144
187
|
} catch {
|
|
145
188
|
return null;
|
|
@@ -152,23 +195,6 @@ async function parseDetailsInBatches(sessions, batchSize = 10) {
|
|
|
152
195
|
}
|
|
153
196
|
return results;
|
|
154
197
|
}
|
|
155
|
-
async function maybeEnrichWithRecentSessions(stats, mtimeMs) {
|
|
156
|
-
const today = getTodayDateString();
|
|
157
|
-
const lastComputed = extractDateString(stats.lastComputedDate);
|
|
158
|
-
if (lastComputed >= today) {
|
|
159
|
-
return stats;
|
|
160
|
-
}
|
|
161
|
-
if (mergedCache && mergedCache.mtimeMs === mtimeMs && Date.now() - mergedCache.mergedAt < MERGE_STALENESS_MS) {
|
|
162
|
-
return mergedCache.data;
|
|
163
|
-
}
|
|
164
|
-
try {
|
|
165
|
-
const merged = await mergeRecentSessions(stats);
|
|
166
|
-
mergedCache = { mtimeMs, mergedAt: Date.now(), data: merged };
|
|
167
|
-
return merged;
|
|
168
|
-
} catch {
|
|
169
|
-
return stats;
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
198
|
async function mergeRecentSessions(stats) {
|
|
173
199
|
const summaries = await scanAllSessionsWithPaths();
|
|
174
200
|
const cutoffDate = extractDateString(stats.lastComputedDate);
|
|
@@ -180,7 +206,7 @@ async function mergeRecentSessions(stats) {
|
|
|
180
206
|
return stats;
|
|
181
207
|
}
|
|
182
208
|
const detailMap = await parseDetailsInBatches(recentSessions);
|
|
183
|
-
const activityMap = new Map();
|
|
209
|
+
const activityMap = /* @__PURE__ */ new Map();
|
|
184
210
|
for (const entry of stats.dailyActivity) {
|
|
185
211
|
activityMap.set(entry.date, {
|
|
186
212
|
messageCount: entry.messageCount,
|
|
@@ -188,7 +214,7 @@ async function mergeRecentSessions(stats) {
|
|
|
188
214
|
toolCallCount: entry.toolCallCount
|
|
189
215
|
});
|
|
190
216
|
}
|
|
191
|
-
const modelTokensMap = new Map();
|
|
217
|
+
const modelTokensMap = /* @__PURE__ */ new Map();
|
|
192
218
|
for (const entry of stats.dailyModelTokens) {
|
|
193
219
|
modelTokensMap.set(entry.date, { ...entry.tokensByModel });
|
|
194
220
|
}
|
|
@@ -208,8 +234,7 @@ async function mergeRecentSessions(stats) {
|
|
|
208
234
|
cur.sessionCount += 1;
|
|
209
235
|
if (detail) {
|
|
210
236
|
cur.messageCount += detail.turns.length;
|
|
211
|
-
cur.toolCallCount += Object.values(detail.toolFrequency)
|
|
212
|
-
.reduce((sum, n) => sum + n, 0);
|
|
237
|
+
cur.toolCallCount += Object.values(detail.toolFrequency).reduce((sum, n) => sum + n, 0);
|
|
213
238
|
const dayTokens = modelTokensMap.get(date) ?? {};
|
|
214
239
|
for (const [model, usage] of Object.entries(detail.tokensByModel)) {
|
|
215
240
|
const total = usage.inputTokens + usage.outputTokens;
|
|
@@ -218,8 +243,10 @@ async function mergeRecentSessions(stats) {
|
|
|
218
243
|
modelTokensMap.set(date, dayTokens);
|
|
219
244
|
for (const [model, usage] of Object.entries(detail.tokensByModel)) {
|
|
220
245
|
const existing = modelUsage[model] ?? {
|
|
221
|
-
inputTokens: 0,
|
|
222
|
-
|
|
246
|
+
inputTokens: 0,
|
|
247
|
+
outputTokens: 0,
|
|
248
|
+
cacheReadInputTokens: 0,
|
|
249
|
+
cacheCreationInputTokens: 0
|
|
223
250
|
};
|
|
224
251
|
existing.inputTokens += usage.inputTokens;
|
|
225
252
|
existing.outputTokens += usage.outputTokens;
|
|
@@ -264,12 +291,22 @@ async function mergeRecentSessions(stats) {
|
|
|
264
291
|
hourCounts
|
|
265
292
|
};
|
|
266
293
|
}
|
|
294
|
+
function updateHourCounts(hourCounts, session) {
|
|
295
|
+
const startedAt = session.startedAt;
|
|
296
|
+
if (!startedAt) return;
|
|
297
|
+
try {
|
|
298
|
+
const date = new Date(startedAt);
|
|
299
|
+
const hour = date.getHours().toString();
|
|
300
|
+
hourCounts[hour] = (hourCounts[hour] ?? 0) + 1;
|
|
301
|
+
} catch {
|
|
302
|
+
}
|
|
303
|
+
}
|
|
267
304
|
async function computeStatsFromSessions() {
|
|
268
305
|
try {
|
|
269
306
|
const summaries = await scanAllSessionsWithPaths();
|
|
270
307
|
const detailMap = await parseDetailsInBatches(summaries);
|
|
271
|
-
const activityMap = new Map();
|
|
272
|
-
const modelTokensMap = new Map();
|
|
308
|
+
const activityMap = /* @__PURE__ */ new Map();
|
|
309
|
+
const modelTokensMap = /* @__PURE__ */ new Map();
|
|
273
310
|
const modelUsage = {};
|
|
274
311
|
const hourCounts = {};
|
|
275
312
|
let totalMessages = 0;
|
|
@@ -282,8 +319,7 @@ async function computeStatsFromSessions() {
|
|
|
282
319
|
cur.sessionCount += 1;
|
|
283
320
|
if (detail) {
|
|
284
321
|
cur.messageCount += detail.turns.length;
|
|
285
|
-
cur.toolCallCount += Object.values(detail.toolFrequency)
|
|
286
|
-
.reduce((sum, n) => sum + n, 0);
|
|
322
|
+
cur.toolCallCount += Object.values(detail.toolFrequency).reduce((sum, n) => sum + n, 0);
|
|
287
323
|
totalMessages += detail.turns.length;
|
|
288
324
|
const dayTokens = modelTokensMap.get(d) ?? {};
|
|
289
325
|
for (const [model, usage] of Object.entries(detail.tokensByModel)) {
|
|
@@ -293,8 +329,10 @@ async function computeStatsFromSessions() {
|
|
|
293
329
|
modelTokensMap.set(d, dayTokens);
|
|
294
330
|
for (const [model, usage] of Object.entries(detail.tokensByModel)) {
|
|
295
331
|
const existing = modelUsage[model] ?? {
|
|
296
|
-
inputTokens: 0,
|
|
297
|
-
|
|
332
|
+
inputTokens: 0,
|
|
333
|
+
outputTokens: 0,
|
|
334
|
+
cacheReadInputTokens: 0,
|
|
335
|
+
cacheCreationInputTokens: 0
|
|
298
336
|
};
|
|
299
337
|
existing.inputTokens += usage.inputTokens;
|
|
300
338
|
existing.outputTokens += usage.outputTokens;
|
|
@@ -322,15 +360,11 @@ async function computeStatsFromSessions() {
|
|
|
322
360
|
firstSessionDate = s.startedAt;
|
|
323
361
|
}
|
|
324
362
|
}
|
|
325
|
-
const dailyActivity = Array.from(activityMap.entries())
|
|
326
|
-
|
|
327
|
-
.sort((a, b) => a.date < b.date ? -1 : 1);
|
|
328
|
-
const dailyModelTokens = Array.from(modelTokensMap.entries())
|
|
329
|
-
.map(([date, tokensByModel]) => ({ date, tokensByModel }))
|
|
330
|
-
.sort((a, b) => a.date < b.date ? -1 : 1);
|
|
363
|
+
const dailyActivity = Array.from(activityMap.entries()).map(([date, v]) => ({ date, ...v })).sort((a, b) => a.date < b.date ? -1 : 1);
|
|
364
|
+
const dailyModelTokens = Array.from(modelTokensMap.entries()).map(([date, tokensByModel]) => ({ date, tokensByModel })).sort((a, b) => a.date < b.date ? -1 : 1);
|
|
331
365
|
return {
|
|
332
366
|
version: 1,
|
|
333
|
-
lastComputedDate: new Date().toISOString(),
|
|
367
|
+
lastComputedDate: (/* @__PURE__ */ new Date()).toISOString(),
|
|
334
368
|
dailyActivity,
|
|
335
369
|
dailyModelTokens,
|
|
336
370
|
modelUsage,
|
|
@@ -340,44 +374,13 @@ async function computeStatsFromSessions() {
|
|
|
340
374
|
sessionId: longestSession.sessionId,
|
|
341
375
|
duration: longestSession.duration,
|
|
342
376
|
messageCount: longestSession.messageCount,
|
|
343
|
-
timestamp: longestSession.timestamp || new Date().toISOString()
|
|
377
|
+
timestamp: longestSession.timestamp || (/* @__PURE__ */ new Date()).toISOString()
|
|
344
378
|
},
|
|
345
|
-
firstSessionDate: firstSessionDate ?? new Date().toISOString(),
|
|
379
|
+
firstSessionDate: firstSessionDate ?? (/* @__PURE__ */ new Date()).toISOString(),
|
|
346
380
|
hourCounts
|
|
347
381
|
};
|
|
348
|
-
} catch (error) {
|
|
349
|
-
return null;
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
async function parseStats() {
|
|
353
|
-
const statsPath = getStatsPath();
|
|
354
|
-
const stat = await fs.promises.stat(statsPath).catch(() => null);
|
|
355
|
-
if (!stat) {
|
|
356
|
-
try {
|
|
357
|
-
const computed = await computeStatsFromSessions();
|
|
358
|
-
return computed;
|
|
359
|
-
} catch {
|
|
360
|
-
return null;
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
if (cachedStats && cachedStats.mtimeMs === stat.mtimeMs) {
|
|
364
|
-
return maybeEnrichWithRecentSessions(cachedStats.data, stat.mtimeMs);
|
|
365
|
-
}
|
|
366
|
-
const diskResult = readDiskCache("stats", stat.mtimeMs, StatsCacheSchema);
|
|
367
|
-
if (diskResult) {
|
|
368
|
-
cachedStats = { mtimeMs: stat.mtimeMs, data: diskResult };
|
|
369
|
-
return maybeEnrichWithRecentSessions(diskResult, stat.mtimeMs);
|
|
370
|
-
}
|
|
371
|
-
try {
|
|
372
|
-
const raw = await fs.promises.readFile(statsPath, "utf-8");
|
|
373
|
-
const parsed = JSON.parse(raw);
|
|
374
|
-
const result = StatsCacheSchema.parse(parsed);
|
|
375
|
-
writeDiskCache("stats", statsPath, stat.mtimeMs, result);
|
|
376
|
-
cachedStats = { mtimeMs: stat.mtimeMs, data: result };
|
|
377
|
-
return maybeEnrichWithRecentSessions(result, stat.mtimeMs);
|
|
378
382
|
} catch {
|
|
379
|
-
|
|
380
|
-
return computed;
|
|
383
|
+
return null;
|
|
381
384
|
}
|
|
382
385
|
}
|
|
383
386
|
const getStats_createServerFn_handler = createServerRpc({
|
package/dist/server/server.js
CHANGED
|
@@ -423,7 +423,7 @@ function getResponse() {
|
|
|
423
423
|
return event.res;
|
|
424
424
|
}
|
|
425
425
|
async function getStartManifest(matchedRoutes) {
|
|
426
|
-
const { tsrStartManifest } = await import("./assets/_tanstack-start-manifest_v-
|
|
426
|
+
const { tsrStartManifest } = await import("./assets/_tanstack-start-manifest_v-Dmhlhehg.js");
|
|
427
427
|
const startManifest = tsrStartManifest();
|
|
428
428
|
const rootRoute = startManifest.routes[rootRouteId] = startManifest.routes[rootRouteId] || {};
|
|
429
429
|
rootRoute.assets = rootRoute.assets || [];
|
|
@@ -577,12 +577,12 @@ function createMultiplexedStream(jsonStream, rawStreams) {
|
|
|
577
577
|
}
|
|
578
578
|
});
|
|
579
579
|
}
|
|
580
|
-
const manifest = { "
|
|
580
|
+
const manifest = { "ff8a3161afdfa175e9c519e4146a56ab5bce6e80745e99cfc2191ebbb7a859bb": {
|
|
581
|
+
functionName: "getSessionDetail_createServerFn_handler",
|
|
582
|
+
importer: () => import("./assets/session-detail.server-BIoOQwSE.js")
|
|
583
|
+
}, "4b9a58c176f487b49800a372100037cdf33cf048f3592a449f115c7e3f5ea799": {
|
|
581
584
|
functionName: "getStats_createServerFn_handler",
|
|
582
|
-
importer: () => import("./assets/stats.server-
|
|
583
|
-
}, "64052f224a1d6696436e5d3deeee2b798f0742e1292ffabd038c3a7bf75e6fcb": {
|
|
584
|
-
functionName: "getProjectAnalytics_createServerFn_handler",
|
|
585
|
-
importer: () => import("./assets/project-analytics.server-BsmZ4xil.js")
|
|
585
|
+
importer: () => import("./assets/stats.server-DhzOihwM.js")
|
|
586
586
|
}, "810657681a273df5b4e58f0d8fcc6a5451598b489431b9bcaa98eea0ad815da8": {
|
|
587
587
|
functionName: "getSettings_createServerFn_handler",
|
|
588
588
|
importer: () => import("./assets/settings.server-6B2PvLgf.js")
|
|
@@ -591,16 +591,19 @@ const manifest = { "4b9a58c176f487b49800a372100037cdf33cf048f3592a449f115c7e3f5e
|
|
|
591
591
|
importer: () => import("./assets/settings.server-6B2PvLgf.js")
|
|
592
592
|
}, "bf8e4a7901f1843bdc9c46be1ad5ad59c615b8bbe611b73eb3ff28f20e43ee0d": {
|
|
593
593
|
functionName: "getSessionList_createServerFn_handler",
|
|
594
|
-
importer: () => import("./assets/sessions.server-
|
|
594
|
+
importer: () => import("./assets/sessions.server-Biq8gbAJ.js")
|
|
595
595
|
}, "839d29fe93dfa2a6d506af7b48ca25197190a5ff4c796e970ddfdc6e8c98827f": {
|
|
596
596
|
functionName: "getActiveSessionList_createServerFn_handler",
|
|
597
|
-
importer: () => import("./assets/sessions.server-
|
|
597
|
+
importer: () => import("./assets/sessions.server-Biq8gbAJ.js")
|
|
598
598
|
}, "a3f42f9012fd83586787da8f7cb90649da739dd947d867eb67572f68735ff495": {
|
|
599
599
|
functionName: "getPaginatedSessions_createServerFn_handler",
|
|
600
|
-
importer: () => import("./assets/sessions.server-
|
|
601
|
-
}, "
|
|
602
|
-
functionName: "
|
|
603
|
-
importer: () => import("./assets/
|
|
600
|
+
importer: () => import("./assets/sessions.server-Biq8gbAJ.js")
|
|
601
|
+
}, "955327d72ca3168c4751159ca07b8fb0fe0d2381dd0b991f06b941480959fbe8": {
|
|
602
|
+
functionName: "getAppInfo_createServerFn_handler",
|
|
603
|
+
importer: () => import("./assets/app-info.server-CXcS0a5s.js")
|
|
604
|
+
}, "64052f224a1d6696436e5d3deeee2b798f0742e1292ffabd038c3a7bf75e6fcb": {
|
|
605
|
+
functionName: "getProjectAnalytics_createServerFn_handler",
|
|
606
|
+
importer: () => import("./assets/project-analytics.server-Bxk8-NnT.js")
|
|
604
607
|
} };
|
|
605
608
|
async function getServerFnById(id) {
|
|
606
609
|
const serverFnInfo = manifest[id];
|
|
@@ -1016,7 +1019,7 @@ let entriesPromise;
|
|
|
1016
1019
|
let baseManifestPromise;
|
|
1017
1020
|
let cachedFinalManifestPromise;
|
|
1018
1021
|
async function loadEntries() {
|
|
1019
|
-
const routerEntry = await import("./assets/router-
|
|
1022
|
+
const routerEntry = await import("./assets/router-5hznwWqr.js").then((n) => n.r);
|
|
1020
1023
|
const startEntry = await import("./assets/start-HYkvq4Ni.js");
|
|
1021
1024
|
return { startEntry, routerEntry };
|
|
1022
1025
|
}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e,u as o,L as r,O as i}from"./main-CV28H4XG.js";import{u as c}from"./createServerFn-BYTDoNe-.js";import{a as x}from"./sessions.queries-tzrs5GhP.js";function h(){const{data:t}=c(x),a=t?.length??0;return a===0?null:e.jsx("span",{className:"ml-auto rounded-full bg-emerald-500/20 px-1.5 py-0.5 text-[10px] font-medium text-emerald-400",children:a})}const d=[{to:"/sessions",label:"Sessions",icon:e.jsxs("svg",{className:"h-4 w-4",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[e.jsx("line",{x1:"2",y1:"4",x2:"14",y2:"4"}),e.jsx("line",{x1:"2",y1:"8",x2:"14",y2:"8"}),e.jsx("line",{x1:"2",y1:"12",x2:"14",y2:"12"})]})},{to:"/stats",label:"Stats",icon:e.jsxs("svg",{className:"h-4 w-4",viewBox:"0 0 16 16",fill:"currentColor",children:[e.jsx("rect",{x:"1",y:"8",width:"3",height:"7",rx:"0.5"}),e.jsx("rect",{x:"6.5",y:"4",width:"3",height:"11",rx:"0.5"}),e.jsx("rect",{x:"12",y:"1",width:"3",height:"14",rx:"0.5"})]})},{to:"/settings",label:"Settings",icon:e.jsxs("svg",{className:"h-4 w-4",viewBox:"0 0 16 16",fill:"currentColor",children:[e.jsx("path",{d:"M8 10a2 2 0 100-4 2 2 0 000 4z"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.5.8a1 1 0 011-.8h1a1 1 0 011 .8l.15.9a5.5 5.5 0 011.1.64l.86-.36a1 1 0 011.17.36l.5.86a1 1 0 01-.18 1.17l-.7.55a5.5 5.5 0 010 1.27l.7.55a1 1 0 01.18 1.17l-.5.86a1 1 0 01-1.17.36l-.86-.36a5.5 5.5 0 01-1.1.64l-.14.9a1 1 0 01-1 .8h-1a1 1 0 01-1-.8l-.14-.9a5.5 5.5 0 01-1.1-.64l-.87.36a1 1 0 01-1.17-.36l-.5-.86a1 1 0 01.18-1.17l.7-.55a5.5 5.5 0 010-1.27l-.7-.55a1 1 0 01-.18-1.17l.5-.86a1 1 0 011.17-.36l.87.36a5.5 5.5 0 011.1-.64L6.5.8zM8 11a3 3 0 100-6 3 3 0 000 6z"})]})}];function m({children:t}){const a=o(),l=a[a.length-1]?.pathname??"";return e.jsxs("div",{className:"flex min-h-screen",children:[e.jsxs("aside",{className:"flex w-56 shrink-0 flex-col border-r border-gray-800 bg-gray-950",children:[e.jsx("div",{className:"flex h-14 items-center border-b border-gray-800 px-4",children:e.jsxs(r,{to:"/sessions",className:"text-sm font-bold text-white",children:[e.jsx("span",{className:"text-brand-500",children:"Claude"})," Dashboard"]})}),e.jsx("nav",{className:"flex-1 p-3",children:d.map(s=>{const n=l.startsWith(s.to);return e.jsxs(r,{to:s.to,className:`flex items-center gap-2.5 rounded-lg px-3 py-2 text-sm transition-colors ${n?"bg-gray-800 text-white":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,children:[e.jsx("span",{className:"text-gray-500",children:s.icon}),s.label,s.to==="/sessions"&&e.jsx(h,{})]},s.to)})}),e.jsx("div",{className:"border-t border-gray-800 p-3",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("a",{href:"https://github.com/dlupiak/claude-session-dashboard",target:"_blank",rel:"noopener noreferrer",className:"text-gray-500 hover:text-gray-300 transition-colors",title:"GitHub Repository",children:e.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 16 16",fill:"currentColor",children:e.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"})})}),e.jsx("a",{href:"https://www.npmjs.com/package/claude-session-dashboard",target:"_blank",rel:"noopener noreferrer",className:"text-gray-500 hover:text-gray-300 transition-colors",title:"npm Package",children:e.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 16 16",fill:"currentColor",children:e.jsx("path",{d:"M0 0v16h16V0H0zm13 13H8V5H5v8H3V3h10v10z"})})})]}),e.jsx("p",{className:"text-xs text-gray-600",children:"Read-only"})]})})]}),e.jsx("main",{className:"flex-1 overflow-auto",children:e.jsx("div",{className:"mx-auto max-w-5xl px-6 py-6",children:t})})]})}function j(){return e.jsx(m,{children:e.jsx(i,{})})}export{j as component};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
const tsrStartManifest = () => ({ "routes": { "__root__": { "filePath": "/Users/dmytro.lupiak/Documents/GitHub/claude-session-dashboard/apps/web/src/routes/__root.tsx", "children": ["/", "/_dashboard"], "preloads": ["/assets/main-CV28H4XG.js"], "assets": [] }, "/": { "filePath": "/Users/dmytro.lupiak/Documents/GitHub/claude-session-dashboard/apps/web/src/routes/index.tsx" }, "/_dashboard": { "filePath": "/Users/dmytro.lupiak/Documents/GitHub/claude-session-dashboard/apps/web/src/routes/_dashboard.tsx", "children": ["/_dashboard/settings", "/_dashboard/stats", "/_dashboard/sessions/$sessionId", "/_dashboard/sessions/"], "assets": [], "preloads": ["/assets/_dashboard-t702m22X.js", "/assets/createServerFn-BYTDoNe-.js", "/assets/sessions.queries-tzrs5GhP.js"] }, "/_dashboard/settings": { "filePath": "/Users/dmytro.lupiak/Documents/GitHub/claude-session-dashboard/apps/web/src/routes/_dashboard/settings.tsx", "assets": [], "preloads": ["/assets/settings-D8yv1q93.js", "/assets/settings.types-CMYAW0cQ.js"] }, "/_dashboard/stats": { "filePath": "/Users/dmytro.lupiak/Documents/GitHub/claude-session-dashboard/apps/web/src/routes/_dashboard/stats.tsx", "assets": [], "preloads": ["/assets/stats-C_6E4jyb.js", "/assets/format-Bsprb3az.js", "/assets/useSessionCost-BBu3AmcX.js", "/assets/settings.types-CMYAW0cQ.js"] }, "/_dashboard/sessions/$sessionId": { "filePath": "/Users/dmytro.lupiak/Documents/GitHub/claude-session-dashboard/apps/web/src/routes/_dashboard/sessions/$sessionId.tsx", "assets": [], "preloads": ["/assets/_sessionId-D4Tpmmb5.js", "/assets/format-Bsprb3az.js", "/assets/useSessionCost-BBu3AmcX.js", "/assets/settings.types-CMYAW0cQ.js"] }, "/_dashboard/sessions/": { "filePath": "/Users/dmytro.lupiak/Documents/GitHub/claude-session-dashboard/apps/web/src/routes/_dashboard/sessions/index.tsx", "assets": [], "preloads": ["/assets/index-DnK_zh3s.js", "/assets/format-Bsprb3az.js"] } }, "clientEntry": "/assets/main-CV28H4XG.js" });
|
|
2
|
-
export {
|
|
3
|
-
tsrStartManifest
|
|
4
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import * as path from "node:path";
|
|
2
|
-
import * as os from "node:os";
|
|
3
|
-
function resolveClaudeDir() {
|
|
4
|
-
if (process.env.CLAUDE_HOME) {
|
|
5
|
-
return path.resolve(process.env.CLAUDE_HOME);
|
|
6
|
-
}
|
|
7
|
-
return path.join(os.homedir(), ".claude");
|
|
8
|
-
}
|
|
9
|
-
const CLAUDE_DIR = resolveClaudeDir();
|
|
10
|
-
function getProjectsDir() {
|
|
11
|
-
return path.join(CLAUDE_DIR, "projects");
|
|
12
|
-
}
|
|
13
|
-
function getStatsPath() {
|
|
14
|
-
return path.join(CLAUDE_DIR, "stats-cache.json");
|
|
15
|
-
}
|
|
16
|
-
function decodeProjectDirName(dirName) {
|
|
17
|
-
return dirName.replace(/^-/, "/").replace(/-/g, "/");
|
|
18
|
-
}
|
|
19
|
-
function extractProjectName(decodedPath) {
|
|
20
|
-
return path.basename(decodedPath);
|
|
21
|
-
}
|
|
22
|
-
function extractSessionId(filename) {
|
|
23
|
-
return filename.replace(/\.jsonl$/, "");
|
|
24
|
-
}
|
|
25
|
-
export {
|
|
26
|
-
getProjectsDir as a,
|
|
27
|
-
extractSessionId as b,
|
|
28
|
-
decodeProjectDirName as d,
|
|
29
|
-
extractProjectName as e,
|
|
30
|
-
getStatsPath as g
|
|
31
|
-
};
|