claude-session-dashboard 0.4.4 → 0.5.0
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-ChSI7O-o.js +1 -0
- package/dist/client/assets/_sessionId-DxfkocLt.js +12 -0
- package/dist/client/assets/app-BAZLXX_G.css +1 -0
- package/dist/client/assets/createServerFn-DJjqV8Yc.js +1 -0
- package/dist/client/assets/index-BHwOAB5a.js +1 -0
- package/dist/client/assets/main-DMwMzWYr.js +69 -0
- package/dist/client/assets/sessions.queries-D7WObk5d.js +1 -0
- package/dist/client/assets/settings-BM0TBEkW.js +1 -0
- package/dist/client/assets/settings.types-BNSfIfFX.js +1 -0
- package/dist/client/assets/stats-wLUGXFpZ.js +4 -0
- package/dist/client/assets/useSessionCost-BPqnyONZ.js +37 -0
- package/dist/server/assets/{_dashboard-smfIqyQC.js → _dashboard-DZJZ9oYy.js} +13 -12
- package/dist/server/assets/{_sessionId-DIUMcrWR.js → _sessionId-znGcd1Dj.js} +53 -24
- package/dist/server/assets/_tanstack-start-manifest_v-BNorjuP4.js +4 -0
- package/dist/server/assets/{app-info.server-CXcS0a5s.js → app-info.api-CrHplh0q.js} +33 -18
- package/dist/server/assets/{createServerRpc-Bd3B-Ah9.js → createServerRpc-D_-6bKnO.js} +1 -1
- package/dist/server/assets/{createSsrRpc-CVg2UDl0.js → createSsrRpc-OFLSk08e.js} +2 -3
- package/dist/server/assets/{index-hFrIPkke.js → index-BnvjnlZM.js} +31 -14
- package/dist/server/assets/{project-analytics.server-Bxk8-NnT.js → project-analytics.api-6b5TIBNn.js} +12 -10
- package/dist/server/assets/{router-5hznwWqr.js → router-DAepjaOj.js} +80 -12
- package/dist/server/assets/{session-detail.server-BIoOQwSE.js → session-detail.api-BQts3iQn.js} +38 -33
- package/dist/server/assets/{session-parser-B0pdBvgT.js → session-parser-DKZZMuh6.js} +123 -31
- package/dist/server/assets/{session-scanner-CpgOq5m1.js → session-scanner-CECpfGFh.js} +4 -4
- package/dist/server/assets/{sessions.server-Biq8gbAJ.js → sessions.api-CQ-Lrk5S.js} +16 -14
- package/dist/server/assets/{sessions.queries-B5ZBiVJy.js → sessions.queries-MfPgj6cK.js} +4 -4
- package/dist/server/assets/{settings-D0FgLIR5.js → settings-DsLaw8yg.js} +42 -13
- package/dist/server/assets/{settings.server-6B2PvLgf.js → settings.api-Cq5KPUxN.js} +12 -11
- package/dist/server/assets/{settings.queries-DSQd324O.js → settings.queries-CMWxUDF-.js} +4 -4
- package/dist/server/assets/{settings.types-DntadCHo.js → settings.types-CphWe-HW.js} +10 -1
- package/dist/server/assets/{stats-Ae6umrPI.js → stats-DKbhSePW.js} +57 -43
- package/dist/server/assets/{stats.server-DhzOihwM.js → stats.api-tIZqhk4B.js} +12 -10
- package/dist/server/assets/{useSessionCost-CYs5UOX-.js → useSessionCost-iQEg4FRM.js} +2 -2
- package/dist/server/server.js +458 -808
- package/package.json +6 -2
- package/LICENSE +0 -21
- package/README.md +0 -194
- package/dist/client/assets/_dashboard-DLFGahko.js +0 -1
- package/dist/client/assets/_sessionId-xiPzwrlf.js +0 -12
- package/dist/client/assets/app-DREGBD44.css +0 -1
- package/dist/client/assets/createServerFn-BLR4iNR3.js +0 -1
- package/dist/client/assets/index-D_9sS4oJ.js +0 -1
- package/dist/client/assets/main-BcKPK-4E.js +0 -56
- package/dist/client/assets/sessions.queries-CHKiZnLm.js +0 -1
- package/dist/client/assets/settings-B2tG1vy0.js +0 -1
- package/dist/client/assets/settings.types-DHC6rkil.js +0 -1
- package/dist/client/assets/stats-BlA0NIHc.js +0 -4
- package/dist/client/assets/useSessionCost-BikgEmWy.js +0 -37
- package/dist/server/assets/_tanstack-start-manifest_v-Dmhlhehg.js +0 -4
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useMatches, Link, Outlet } from "@tanstack/react-router";
|
|
3
3
|
import { useQuery, queryOptions } from "@tanstack/react-query";
|
|
4
|
-
import { a as activeSessionsQuery } from "./sessions.queries-
|
|
5
|
-
import { c as createSsrRpc } from "./createSsrRpc-
|
|
4
|
+
import { a as activeSessionsQuery } from "./sessions.queries-MfPgj6cK.js";
|
|
5
|
+
import { c as createSsrRpc } from "./createSsrRpc-OFLSk08e.js";
|
|
6
6
|
import { c as createServerFn } from "../server.js";
|
|
7
7
|
import "zod";
|
|
8
|
-
import "@tanstack/history";
|
|
9
|
-
import "@tanstack/router-core/ssr/client";
|
|
10
|
-
import "@tanstack/router-core";
|
|
11
8
|
import "node:async_hooks";
|
|
12
|
-
import "@tanstack/router-core/ssr/server";
|
|
13
9
|
import "h3-v2";
|
|
10
|
+
import "@tanstack/router-core";
|
|
14
11
|
import "tiny-invariant";
|
|
15
12
|
import "seroval";
|
|
13
|
+
import "@tanstack/history";
|
|
14
|
+
import "@tanstack/router-core/ssr/client";
|
|
15
|
+
import "@tanstack/router-core/ssr/server";
|
|
16
|
+
import "react";
|
|
16
17
|
import "@tanstack/react-router/ssr/server";
|
|
17
18
|
function ActiveSessionsBadge() {
|
|
18
19
|
const { data: activeSessions } = useQuery(activeSessionsQuery);
|
|
@@ -22,7 +23,7 @@ function ActiveSessionsBadge() {
|
|
|
22
23
|
}
|
|
23
24
|
const getAppInfo = createServerFn({
|
|
24
25
|
method: "GET"
|
|
25
|
-
}).handler(createSsrRpc("
|
|
26
|
+
}).handler(createSsrRpc("04ac41a7e3e644815167d098c2d6c3375d00a72a11e5af0d37033ba771081ba9"));
|
|
26
27
|
const appInfoQuery = queryOptions({
|
|
27
28
|
queryKey: ["app-info"],
|
|
28
29
|
queryFn: () => getAppInfo(),
|
|
@@ -64,7 +65,7 @@ function AppShell({ children }) {
|
|
|
64
65
|
const { data: appInfo } = useQuery(appInfoQuery);
|
|
65
66
|
return /* @__PURE__ */ jsxs("div", { className: "flex min-h-screen", children: [
|
|
66
67
|
/* @__PURE__ */ jsxs("aside", { className: "flex w-56 shrink-0 flex-col border-r border-gray-800 bg-gray-950", children: [
|
|
67
|
-
/* @__PURE__ */ jsx("div", { className: "flex h-14 items-center border-b border-gray-800 px-4", children: /* @__PURE__ */ jsxs(Link, { to: "/sessions", className: "text-sm font-bold text-
|
|
68
|
+
/* @__PURE__ */ jsx("div", { className: "flex h-14 items-center border-b border-gray-800 px-4", children: /* @__PURE__ */ jsxs(Link, { to: "/sessions", className: "text-sm font-bold text-gray-100", children: [
|
|
68
69
|
/* @__PURE__ */ jsx("span", { className: "text-brand-500", children: "Claude" }),
|
|
69
70
|
" Dashboard"
|
|
70
71
|
] }) }),
|
|
@@ -74,7 +75,7 @@ function AppShell({ children }) {
|
|
|
74
75
|
Link,
|
|
75
76
|
{
|
|
76
77
|
to: item.to,
|
|
77
|
-
className: `flex items-center gap-2.5 rounded-lg px-3 py-2 text-sm transition-colors ${isActive ? "bg-gray-800 text-
|
|
78
|
+
className: `flex items-center gap-2.5 rounded-lg px-3 py-2 text-sm transition-colors ${isActive ? "bg-gray-800 text-gray-100" : "text-gray-400 hover:bg-gray-900 hover:text-gray-200"}`,
|
|
78
79
|
children: [
|
|
79
80
|
/* @__PURE__ */ jsx("span", { className: "text-gray-500", children: item.icon }),
|
|
80
81
|
item.label,
|
|
@@ -84,7 +85,7 @@ function AppShell({ children }) {
|
|
|
84
85
|
item.to
|
|
85
86
|
);
|
|
86
87
|
}) }),
|
|
87
|
-
/* @__PURE__ */ jsxs("div", { className: "border-t border-gray-800 p-3", children: [
|
|
88
|
+
/* @__PURE__ */ jsxs("div", { className: "border-t border-gray-800 p-3 space-y-3", children: [
|
|
88
89
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
89
90
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
90
91
|
/* @__PURE__ */ jsx(
|
|
@@ -110,12 +111,12 @@ function AppShell({ children }) {
|
|
|
110
111
|
}
|
|
111
112
|
)
|
|
112
113
|
] }),
|
|
113
|
-
/* @__PURE__ */ jsx("p", { className: "text-xs text-gray-
|
|
114
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs text-gray-500", children: "Read-only" })
|
|
114
115
|
] }),
|
|
115
116
|
appInfo && /* @__PURE__ */ jsxs(
|
|
116
117
|
"p",
|
|
117
118
|
{
|
|
118
|
-
className: "mt-1.5 truncate text-[10px] text-gray-
|
|
119
|
+
className: "mt-1.5 truncate text-[10px] text-gray-500",
|
|
119
120
|
title: `v${appInfo.version} · ${appInfo.appPath}`,
|
|
120
121
|
children: [
|
|
121
122
|
"v",
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { Link } from "@tanstack/react-router";
|
|
3
3
|
import { queryOptions, useQuery } from "@tanstack/react-query";
|
|
4
|
-
import { c as createSsrRpc } from "./createSsrRpc-
|
|
4
|
+
import { c as createSsrRpc } from "./createSsrRpc-OFLSk08e.js";
|
|
5
5
|
import { c as createServerFn } from "../server.js";
|
|
6
6
|
import { useRef, useCallback, useState, useEffect, useMemo } from "react";
|
|
7
7
|
import { format } from "date-fns";
|
|
8
8
|
import { a as formatDuration, f as formatTokenCount, e as formatDateTime, c as formatUSD } from "./format-DIZHV7IJ.js";
|
|
9
9
|
import { ResponsiveContainer, AreaChart, YAxis, Tooltip, ReferenceLine, Area } from "recharts";
|
|
10
|
-
import { s as settingsQuery } from "./settings.queries-
|
|
11
|
-
import { g as getMergedPricing, c as calculateSessionCost, u as useSessionCost, E as ExportDropdown, d as downloadFile, e as sessionToJSON } from "./useSessionCost-
|
|
12
|
-
import { a as activeSessionsQuery } from "./sessions.queries-
|
|
13
|
-
import {
|
|
14
|
-
import "@tanstack/history";
|
|
15
|
-
import "@tanstack/router-core/ssr/client";
|
|
16
|
-
import "@tanstack/router-core";
|
|
10
|
+
import { s as settingsQuery } from "./settings.queries-CMWxUDF-.js";
|
|
11
|
+
import { g as getMergedPricing, c as calculateSessionCost, u as useSessionCost, E as ExportDropdown, d as downloadFile, e as sessionToJSON } from "./useSessionCost-iQEg4FRM.js";
|
|
12
|
+
import { a as activeSessionsQuery } from "./sessions.queries-MfPgj6cK.js";
|
|
13
|
+
import { c as Route, u as usePrivacy } from "./router-DAepjaOj.js";
|
|
17
14
|
import "node:async_hooks";
|
|
18
|
-
import "@tanstack/router-core/ssr/server";
|
|
19
15
|
import "h3-v2";
|
|
16
|
+
import "@tanstack/router-core";
|
|
20
17
|
import "tiny-invariant";
|
|
21
18
|
import "seroval";
|
|
19
|
+
import "@tanstack/history";
|
|
20
|
+
import "@tanstack/router-core/ssr/client";
|
|
21
|
+
import "@tanstack/router-core/ssr/server";
|
|
22
22
|
import "@tanstack/react-router/ssr/server";
|
|
23
|
-
import "./settings.types-
|
|
23
|
+
import "./settings.types-CphWe-HW.js";
|
|
24
24
|
import "zod";
|
|
25
25
|
const getSessionDetail = createServerFn({
|
|
26
26
|
method: "GET"
|
|
27
|
-
}).inputValidator((input) => input).handler(createSsrRpc("
|
|
27
|
+
}).inputValidator((input) => input).handler(createSsrRpc("71794080473579a94431392ab409ebd02772f6a9f6a08386cadbb8c0d3cf804a"));
|
|
28
28
|
function sessionDetailQuery(sessionId, projectPath, isActive) {
|
|
29
29
|
return queryOptions({
|
|
30
30
|
queryKey: ["session", "detail", sessionId],
|
|
@@ -305,7 +305,7 @@ function TimelineChart({ data, width, onHover }) {
|
|
|
305
305
|
y1: TOP_MARGIN - 4,
|
|
306
306
|
x2: chartWidth - RIGHT_MARGIN,
|
|
307
307
|
y2: TOP_MARGIN - 4,
|
|
308
|
-
stroke: "
|
|
308
|
+
stroke: "var(--color-gray-700)",
|
|
309
309
|
strokeWidth: 1
|
|
310
310
|
}
|
|
311
311
|
),
|
|
@@ -317,7 +317,7 @@ function TimelineChart({ data, width, onHover }) {
|
|
|
317
317
|
y1: TOP_MARGIN - 8,
|
|
318
318
|
x2: tick.x,
|
|
319
319
|
y2: TOP_MARGIN - 4,
|
|
320
|
-
stroke: "
|
|
320
|
+
stroke: "var(--color-gray-600)",
|
|
321
321
|
strokeWidth: 1
|
|
322
322
|
}
|
|
323
323
|
),
|
|
@@ -348,7 +348,7 @@ function TimelineChart({ data, width, onHover }) {
|
|
|
348
348
|
y1: mainLaneY + LANE_HEIGHT / 2,
|
|
349
349
|
x2: chartWidth - RIGHT_MARGIN,
|
|
350
350
|
y2: mainLaneY + LANE_HEIGHT / 2,
|
|
351
|
-
stroke: "
|
|
351
|
+
stroke: "var(--color-gray-800)",
|
|
352
352
|
strokeWidth: 1,
|
|
353
353
|
strokeDasharray: "2,4"
|
|
354
354
|
}
|
|
@@ -405,7 +405,7 @@ function TimelineChart({ data, width, onHover }) {
|
|
|
405
405
|
y1: skillRowY + LANE_HEIGHT / 2,
|
|
406
406
|
x2: chartWidth - RIGHT_MARGIN,
|
|
407
407
|
y2: skillRowY + LANE_HEIGHT / 2,
|
|
408
|
-
stroke: "
|
|
408
|
+
stroke: "var(--color-gray-800)",
|
|
409
409
|
strokeWidth: 1,
|
|
410
410
|
strokeDasharray: "2,4"
|
|
411
411
|
}
|
|
@@ -457,7 +457,7 @@ function TimelineChart({ data, width, onHover }) {
|
|
|
457
457
|
y1: errorRowY + LANE_HEIGHT / 2,
|
|
458
458
|
x2: chartWidth - RIGHT_MARGIN,
|
|
459
459
|
y2: errorRowY + LANE_HEIGHT / 2,
|
|
460
|
-
stroke: "
|
|
460
|
+
stroke: "var(--color-gray-800)",
|
|
461
461
|
strokeWidth: 1,
|
|
462
462
|
strokeDasharray: "2,4"
|
|
463
463
|
}
|
|
@@ -908,7 +908,7 @@ function ContextWindowPanel({ contextWindow, tokens }) {
|
|
|
908
908
|
/* @__PURE__ */ jsx("span", { className: "rounded bg-gray-800 px-1.5 py-0.5 text-[10px] font-mono text-gray-400", children: shortModel })
|
|
909
909
|
] }),
|
|
910
910
|
/* @__PURE__ */ jsxs("div", { className: "mt-1 flex items-baseline gap-1", children: [
|
|
911
|
-
/* @__PURE__ */ jsx("span", { className: "text-2xl font-bold text-
|
|
911
|
+
/* @__PURE__ */ jsx("span", { className: "text-2xl font-bold text-gray-100", children: formatTokenCount(currentContextSize) }),
|
|
912
912
|
/* @__PURE__ */ jsxs("span", { className: "text-sm text-gray-500", children: [
|
|
913
913
|
"/ ",
|
|
914
914
|
formatTokenCount(contextLimit)
|
|
@@ -1032,8 +1032,8 @@ function ContextWindowPanel({ contextWindow, tokens }) {
|
|
|
1032
1032
|
Tooltip,
|
|
1033
1033
|
{
|
|
1034
1034
|
contentStyle: {
|
|
1035
|
-
background: "
|
|
1036
|
-
border: "1px solid
|
|
1035
|
+
background: "var(--color-gray-900)",
|
|
1036
|
+
border: "1px solid var(--color-gray-700)",
|
|
1037
1037
|
borderRadius: "8px",
|
|
1038
1038
|
fontSize: "11px"
|
|
1039
1039
|
},
|
|
@@ -1155,7 +1155,7 @@ function TokenFallback({ tokens }) {
|
|
|
1155
1155
|
];
|
|
1156
1156
|
return /* @__PURE__ */ jsxs("div", { className: "rounded-xl border border-gray-800 bg-gray-900/50 p-4", children: [
|
|
1157
1157
|
/* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-gray-300", children: "Token Usage" }),
|
|
1158
|
-
/* @__PURE__ */ jsx("p", { className: "mt-1 text-2xl font-bold text-
|
|
1158
|
+
/* @__PURE__ */ jsx("p", { className: "mt-1 text-2xl font-bold text-gray-100", children: formatTokenCount(activeTotal) }),
|
|
1159
1159
|
/* @__PURE__ */ jsxs("p", { className: "text-[10px] text-gray-500", children: [
|
|
1160
1160
|
"input + output (",
|
|
1161
1161
|
formatTokenCount(allTotal),
|
|
@@ -1336,7 +1336,7 @@ function SkillInvocationsPanel({
|
|
|
1336
1336
|
] }),
|
|
1337
1337
|
/* @__PURE__ */ jsx("div", { className: "mt-3 space-y-1", children: groups.map((group) => /* @__PURE__ */ jsxs("div", { className: "rounded bg-gray-950/40 px-2 py-1.5", children: [
|
|
1338
1338
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1339
|
-
/* @__PURE__ */ jsxs("span", { className: "shrink-0 rounded bg-
|
|
1339
|
+
/* @__PURE__ */ jsxs("span", { className: "shrink-0 rounded bg-brand-500/20 px-1.5 py-0.5 text-[10px] font-semibold text-brand-400", children: [
|
|
1340
1340
|
"/",
|
|
1341
1341
|
group.skill
|
|
1342
1342
|
] }),
|
|
@@ -1425,7 +1425,7 @@ function CostEstimationPanel({ tokensByModel }) {
|
|
|
1425
1425
|
return /* @__PURE__ */ jsxs("div", { className: "rounded-xl border border-gray-800 bg-gray-900/50 p-4", children: [
|
|
1426
1426
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
1427
1427
|
/* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-gray-300", children: "Cost Estimation" }),
|
|
1428
|
-
/* @__PURE__ */ jsxs("span", { className: "font-mono text-lg font-bold text-
|
|
1428
|
+
/* @__PURE__ */ jsxs("span", { className: "font-mono text-lg font-bold text-gray-100", children: [
|
|
1429
1429
|
"~",
|
|
1430
1430
|
formatUSD(cost.totalUSD)
|
|
1431
1431
|
] })
|
|
@@ -1540,6 +1540,35 @@ function useIsSessionActive(sessionId) {
|
|
|
1540
1540
|
const { data: activeSessions } = useQuery(activeSessionsQuery);
|
|
1541
1541
|
return activeSessions?.some((s) => s.sessionId === sessionId) ?? false;
|
|
1542
1542
|
}
|
|
1543
|
+
function SessionIdDisplay({ sessionId }) {
|
|
1544
|
+
const [copied, setCopied] = useState(false);
|
|
1545
|
+
const timerRef = useRef(void 0);
|
|
1546
|
+
useEffect(() => {
|
|
1547
|
+
return () => clearTimeout(timerRef.current);
|
|
1548
|
+
}, []);
|
|
1549
|
+
async function handleCopy() {
|
|
1550
|
+
try {
|
|
1551
|
+
await navigator.clipboard.writeText(`claude --resume ${sessionId}`);
|
|
1552
|
+
setCopied(true);
|
|
1553
|
+
clearTimeout(timerRef.current);
|
|
1554
|
+
timerRef.current = setTimeout(() => setCopied(false), 2e3);
|
|
1555
|
+
} catch {
|
|
1556
|
+
}
|
|
1557
|
+
}
|
|
1558
|
+
return /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1.5 font-mono text-xs text-gray-600", children: [
|
|
1559
|
+
/* @__PURE__ */ jsx("span", { children: sessionId }),
|
|
1560
|
+
/* @__PURE__ */ jsx(
|
|
1561
|
+
"button",
|
|
1562
|
+
{
|
|
1563
|
+
type: "button",
|
|
1564
|
+
onClick: handleCopy,
|
|
1565
|
+
className: "rounded px-1 py-0.5 text-gray-500 hover:bg-gray-800 hover:text-gray-300",
|
|
1566
|
+
title: "Copy resume command",
|
|
1567
|
+
children: copied ? "Copied!" : "Copy"
|
|
1568
|
+
}
|
|
1569
|
+
)
|
|
1570
|
+
] });
|
|
1571
|
+
}
|
|
1543
1572
|
function SessionDetailPage() {
|
|
1544
1573
|
const {
|
|
1545
1574
|
sessionId
|
|
@@ -1581,7 +1610,7 @@ function SessionDetailPage() {
|
|
|
1581
1610
|
/* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between", children: [
|
|
1582
1611
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
1583
1612
|
/* @__PURE__ */ jsx(Link, { to: "/sessions", className: "text-xs text-gray-500 hover:text-gray-300", children: "← Sessions" }),
|
|
1584
|
-
/* @__PURE__ */ jsx("h1", { className: "mt-1 text-xl font-bold text-
|
|
1613
|
+
/* @__PURE__ */ jsx("h1", { className: "mt-1 text-xl font-bold text-gray-100", children: privacyMode ? anonymizeProjectName(detail.projectName) : detail.projectName }),
|
|
1585
1614
|
/* @__PURE__ */ jsxs("div", { className: "mt-1 flex items-center gap-3 text-xs text-gray-400", children: [
|
|
1586
1615
|
detail.branch && /* @__PURE__ */ jsx("span", { className: "font-mono", children: anonymizeBranch(detail.branch) }),
|
|
1587
1616
|
startedAt && /* @__PURE__ */ jsx("span", { children: formatDateTime(startedAt) }),
|
|
@@ -1599,7 +1628,7 @@ function SessionDetailPage() {
|
|
|
1599
1628
|
label: "Export Session (JSON)",
|
|
1600
1629
|
onClick: () => downloadFile(sessionToJSON(detail), `session-${sessionId.slice(0, 8)}.json`, "application/json")
|
|
1601
1630
|
}] }),
|
|
1602
|
-
/* @__PURE__ */ jsx(
|
|
1631
|
+
/* @__PURE__ */ jsx(SessionIdDisplay, { sessionId })
|
|
1603
1632
|
] })
|
|
1604
1633
|
] }),
|
|
1605
1634
|
/* @__PURE__ */ jsxs("div", { className: "mt-6 grid grid-cols-1 gap-4 md:grid-cols-2", children: [
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const tsrStartManifest = () => ({ "routes": { "__root__": { "filePath": "/home/runner/work/claude-session-dashboard/claude-session-dashboard/apps/web/src/routes/__root.tsx", "children": ["/", "/_dashboard"], "preloads": ["/assets/main-DMwMzWYr.js"] }, "/_dashboard": { "filePath": "/home/runner/work/claude-session-dashboard/claude-session-dashboard/apps/web/src/routes/_dashboard.tsx", "children": ["/_dashboard/settings", "/_dashboard/stats", "/_dashboard/sessions/$sessionId", "/_dashboard/sessions/"], "preloads": ["/assets/_dashboard-ChSI7O-o.js", "/assets/createServerFn-DJjqV8Yc.js", "/assets/sessions.queries-D7WObk5d.js"] }, "/_dashboard/settings": { "filePath": "/home/runner/work/claude-session-dashboard/claude-session-dashboard/apps/web/src/routes/_dashboard/settings.tsx", "preloads": ["/assets/settings-BM0TBEkW.js", "/assets/settings.types-BNSfIfFX.js"] }, "/_dashboard/stats": { "filePath": "/home/runner/work/claude-session-dashboard/claude-session-dashboard/apps/web/src/routes/_dashboard/stats.tsx", "preloads": ["/assets/stats-wLUGXFpZ.js", "/assets/format-Bsprb3az.js", "/assets/useSessionCost-BPqnyONZ.js", "/assets/settings.types-BNSfIfFX.js"] }, "/_dashboard/sessions/$sessionId": { "filePath": "/home/runner/work/claude-session-dashboard/claude-session-dashboard/apps/web/src/routes/_dashboard/sessions/$sessionId.tsx", "preloads": ["/assets/_sessionId-DxfkocLt.js", "/assets/format-Bsprb3az.js", "/assets/useSessionCost-BPqnyONZ.js", "/assets/settings.types-BNSfIfFX.js"] }, "/_dashboard/sessions/": { "filePath": "/home/runner/work/claude-session-dashboard/claude-session-dashboard/apps/web/src/routes/_dashboard/sessions/index.tsx", "preloads": ["/assets/index-BHwOAB5a.js", "/assets/format-Bsprb3az.js"] } }, "clientEntry": "/assets/main-DMwMzWYr.js" });
|
|
2
|
+
export {
|
|
3
|
+
tsrStartManifest
|
|
4
|
+
};
|
|
@@ -1,37 +1,52 @@
|
|
|
1
|
-
import { c as createServerRpc } from "./createServerRpc-
|
|
1
|
+
import { c as createServerRpc } from "./createServerRpc-D_-6bKnO.js";
|
|
2
2
|
import * as fs from "node:fs";
|
|
3
|
+
import * as os from "node:os";
|
|
3
4
|
import * as path from "node:path";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
4
6
|
import { c as createServerFn } from "../server.js";
|
|
5
|
-
import "@tanstack/history";
|
|
6
|
-
import "@tanstack/router-core/ssr/client";
|
|
7
|
-
import "@tanstack/router-core";
|
|
8
7
|
import "node:async_hooks";
|
|
9
|
-
import "@tanstack/router-core/ssr/server";
|
|
10
8
|
import "h3-v2";
|
|
9
|
+
import "@tanstack/router-core";
|
|
11
10
|
import "tiny-invariant";
|
|
12
11
|
import "seroval";
|
|
12
|
+
import "@tanstack/history";
|
|
13
|
+
import "@tanstack/router-core/ssr/client";
|
|
14
|
+
import "@tanstack/router-core/ssr/server";
|
|
15
|
+
import "react";
|
|
16
|
+
import "@tanstack/react-router";
|
|
13
17
|
import "react/jsx-runtime";
|
|
14
18
|
import "@tanstack/react-router/ssr/server";
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
19
|
+
function readVersionFromPackageJson() {
|
|
20
|
+
const candidates = [new URL("../../../package.json", import.meta.url), new URL("../../../../package.json", import.meta.url)];
|
|
21
|
+
for (const candidate of candidates) {
|
|
22
|
+
try {
|
|
23
|
+
const pkgPath = fileURLToPath(candidate);
|
|
24
|
+
const raw = fs.readFileSync(pkgPath, "utf-8");
|
|
25
|
+
const pkg = JSON.parse(raw);
|
|
26
|
+
if (pkg.version) return pkg.version;
|
|
27
|
+
} catch {
|
|
28
|
+
}
|
|
29
|
+
}
|
|
25
30
|
try {
|
|
26
31
|
const pkgPath = path.resolve(process.cwd(), "package.json");
|
|
27
32
|
const raw = fs.readFileSync(pkgPath, "utf-8");
|
|
28
33
|
const pkg = JSON.parse(raw);
|
|
29
|
-
version
|
|
34
|
+
if (pkg.version) return pkg.version;
|
|
30
35
|
} catch {
|
|
31
36
|
}
|
|
37
|
+
return "unknown";
|
|
38
|
+
}
|
|
39
|
+
const getAppInfo_createServerFn_handler = createServerRpc({
|
|
40
|
+
id: "04ac41a7e3e644815167d098c2d6c3375d00a72a11e5af0d37033ba771081ba9",
|
|
41
|
+
name: "getAppInfo",
|
|
42
|
+
filename: "src/features/settings/app-info.api.ts"
|
|
43
|
+
}, (opts) => getAppInfo.__executeServer(opts));
|
|
44
|
+
const getAppInfo = createServerFn({
|
|
45
|
+
method: "GET"
|
|
46
|
+
}).handler(getAppInfo_createServerFn_handler, async () => {
|
|
32
47
|
return {
|
|
33
|
-
version,
|
|
34
|
-
appPath:
|
|
48
|
+
version: readVersionFromPackageJson(),
|
|
49
|
+
appPath: path.join(os.homedir(), ".claude"),
|
|
35
50
|
nodeEnv: "production"
|
|
36
51
|
};
|
|
37
52
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { T as TSS_SERVER_FUNCTION } from "../server.js";
|
|
2
|
-
|
|
2
|
+
var createServerRpc = (serverFnMeta, splitImportFn) => {
|
|
3
3
|
const url = "/_serverFn/" + serverFnMeta.id;
|
|
4
4
|
return Object.assign(splitImportFn, {
|
|
5
5
|
url,
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { T as TSS_SERVER_FUNCTION, g as getServerFnById } from "../server.js";
|
|
2
|
-
|
|
2
|
+
var createSsrRpc = (functionId, importer) => {
|
|
3
3
|
const url = "/_serverFn/" + functionId;
|
|
4
4
|
const serverFnMeta = { id: functionId };
|
|
5
5
|
const fn = async (...args) => {
|
|
6
|
-
|
|
7
|
-
return serverFn(...args);
|
|
6
|
+
return (await getServerFnById(functionId))(...args);
|
|
8
7
|
};
|
|
9
8
|
return Object.assign(fn, {
|
|
10
9
|
url,
|
|
@@ -1,23 +1,38 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useEffect, useRef, useCallback, useMemo } from "react";
|
|
3
3
|
import { useQuery } from "@tanstack/react-query";
|
|
4
4
|
import { Link, useNavigate } from "@tanstack/react-router";
|
|
5
|
-
import { p as paginatedSessionListQuery, a as activeSessionsQuery } from "./sessions.queries-
|
|
5
|
+
import { p as paginatedSessionListQuery, a as activeSessionsQuery } from "./sessions.queries-MfPgj6cK.js";
|
|
6
6
|
import { a as formatDuration, b as formatRelativeTime, d as formatBytes } from "./format-DIZHV7IJ.js";
|
|
7
|
-
import { u as usePrivacy,
|
|
8
|
-
import "./createSsrRpc-
|
|
7
|
+
import { u as usePrivacy, b as Route } from "./router-DAepjaOj.js";
|
|
8
|
+
import "./createSsrRpc-OFLSk08e.js";
|
|
9
9
|
import "../server.js";
|
|
10
|
-
import "@tanstack/history";
|
|
11
|
-
import "@tanstack/router-core/ssr/client";
|
|
12
|
-
import "@tanstack/router-core";
|
|
13
10
|
import "node:async_hooks";
|
|
14
|
-
import "@tanstack/router-core/ssr/server";
|
|
15
11
|
import "h3-v2";
|
|
12
|
+
import "@tanstack/router-core";
|
|
16
13
|
import "tiny-invariant";
|
|
17
14
|
import "seroval";
|
|
15
|
+
import "@tanstack/history";
|
|
16
|
+
import "@tanstack/router-core/ssr/client";
|
|
17
|
+
import "@tanstack/router-core/ssr/server";
|
|
18
18
|
import "@tanstack/react-router/ssr/server";
|
|
19
19
|
import "zod";
|
|
20
20
|
import "date-fns";
|
|
21
|
+
const PLATFORM_STYLES = {
|
|
22
|
+
windows: "bg-blue-950 text-blue-400 border border-blue-800",
|
|
23
|
+
wsl: "bg-purple-950 text-purple-400 border border-purple-800"
|
|
24
|
+
};
|
|
25
|
+
const DEFAULT_STYLE = "bg-gray-800 text-gray-400 border border-gray-700";
|
|
26
|
+
function SourceBadge({ sourceLabel, platform, className }) {
|
|
27
|
+
const platformStyle = platform ? PLATFORM_STYLES[platform] ?? DEFAULT_STYLE : DEFAULT_STYLE;
|
|
28
|
+
return /* @__PURE__ */ jsx(
|
|
29
|
+
"span",
|
|
30
|
+
{
|
|
31
|
+
className: `inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${platformStyle}${className ? ` ${className}` : ""}`,
|
|
32
|
+
children: sourceLabel
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
}
|
|
21
36
|
function StatusBadge({ isActive }) {
|
|
22
37
|
if (isActive) {
|
|
23
38
|
return /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1.5 rounded-full bg-emerald-500/15 px-2.5 py-0.5 text-xs font-medium text-emerald-400", children: [
|
|
@@ -61,8 +76,9 @@ function SessionCard({ session }) {
|
|
|
61
76
|
/* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-3", children: [
|
|
62
77
|
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
63
78
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
64
|
-
/* @__PURE__ */ jsx("h3", { className: "truncate text-sm font-semibold text-
|
|
65
|
-
/* @__PURE__ */ jsx(StatusBadge, { isActive: session.isActive })
|
|
79
|
+
/* @__PURE__ */ jsx("h3", { className: "truncate text-sm font-semibold text-gray-100", children: displayName }),
|
|
80
|
+
/* @__PURE__ */ jsx(StatusBadge, { isActive: session.isActive }),
|
|
81
|
+
session.sourceLabel && /* @__PURE__ */ jsx(SourceBadge, { sourceLabel: session.sourceLabel, platform: session.sourcePlatform })
|
|
66
82
|
] }),
|
|
67
83
|
displayBranch && /* @__PURE__ */ jsx("p", { className: "mt-1 truncate text-xs text-gray-500", children: /* @__PURE__ */ jsx("span", { className: "font-mono", children: displayBranch }) })
|
|
68
84
|
] }),
|
|
@@ -75,7 +91,8 @@ function SessionCard({ session }) {
|
|
|
75
91
|
" msgs"
|
|
76
92
|
] }),
|
|
77
93
|
session.model && /* @__PURE__ */ jsx("span", { title: "Model", className: "truncate font-mono text-gray-500", children: session.model.replace(/^claude-/, "").split("-202")[0] }),
|
|
78
|
-
/* @__PURE__ */ jsx("span", { title: "File size", className: "text-gray-500", children: formatBytes(session.fileSizeBytes) })
|
|
94
|
+
/* @__PURE__ */ jsx("span", { title: "File size", className: "text-gray-500", children: formatBytes(session.fileSizeBytes) }),
|
|
95
|
+
/* @__PURE__ */ jsx("span", { title: "Session ID", className: "font-mono text-gray-500", children: session.sessionId.slice(0, 8) })
|
|
79
96
|
] }),
|
|
80
97
|
displayCwd && /* @__PURE__ */ jsx("p", { className: "mt-2 truncate text-xs font-mono text-gray-600", children: displayCwd })
|
|
81
98
|
]
|
|
@@ -137,7 +154,7 @@ function SessionFilters({ projects, activeCount }) {
|
|
|
137
154
|
"button",
|
|
138
155
|
{
|
|
139
156
|
onClick: () => handleStatusChange(s),
|
|
140
|
-
className: `px-3 py-1.5 capitalize transition-colors ${status === s ? "bg-gray-700 text-
|
|
157
|
+
className: `px-3 py-1.5 capitalize transition-colors ${status === s ? "bg-gray-700 text-gray-100" : "text-gray-400 hover:text-gray-200"} ${s === "all" ? "rounded-l-lg" : ""} ${s === "completed" ? "rounded-r-lg" : ""}`,
|
|
141
158
|
children: [
|
|
142
159
|
s,
|
|
143
160
|
s === "active" && activeCount > 0 && /* @__PURE__ */ jsxs("span", { className: "ml-1 text-emerald-400", children: [
|
|
@@ -256,7 +273,7 @@ function PaginationControls({
|
|
|
256
273
|
"button",
|
|
257
274
|
{
|
|
258
275
|
onClick: () => onPageChange(item),
|
|
259
|
-
className: `min-w-[2rem] rounded-lg px-2 py-1.5 text-xs font-mono transition-colors ${item === page ? "bg-brand-600 text-
|
|
276
|
+
className: `min-w-[2rem] rounded-lg px-2 py-1.5 text-xs font-mono transition-colors ${item === page ? "bg-brand-600 text-gray-100" : "border border-gray-700 bg-gray-800 text-gray-400 hover:bg-gray-700 hover:text-gray-200"}`,
|
|
260
277
|
children: item
|
|
261
278
|
},
|
|
262
279
|
item
|
|
@@ -367,7 +384,7 @@ function SessionList() {
|
|
|
367
384
|
}
|
|
368
385
|
function SessionsPage() {
|
|
369
386
|
return /* @__PURE__ */ jsxs("div", { children: [
|
|
370
|
-
/* @__PURE__ */ jsx("h1", { className: "text-2xl font-bold text-
|
|
387
|
+
/* @__PURE__ */ jsx("h1", { className: "text-2xl font-bold text-gray-100", children: "Sessions" }),
|
|
371
388
|
/* @__PURE__ */ jsx("p", { className: "mt-1 text-sm text-gray-400", children: "All Claude Code sessions from ~/.claude" }),
|
|
372
389
|
/* @__PURE__ */ jsx("div", { className: "mt-6", children: /* @__PURE__ */ jsx(SessionList, {}) })
|
|
373
390
|
] });
|
|
@@ -1,22 +1,24 @@
|
|
|
1
|
-
import { c as createServerRpc } from "./createServerRpc-
|
|
2
|
-
import {
|
|
1
|
+
import { c as createServerRpc } from "./createServerRpc-D_-6bKnO.js";
|
|
2
|
+
import { s as scanAllSessions } from "./session-scanner-CECpfGFh.js";
|
|
3
3
|
import { c as createServerFn } from "../server.js";
|
|
4
4
|
import "node:fs";
|
|
5
5
|
import "node:path";
|
|
6
|
-
import "./session-parser-
|
|
6
|
+
import "./session-parser-DKZZMuh6.js";
|
|
7
7
|
import "node:os";
|
|
8
|
+
import "node:fs/promises";
|
|
8
9
|
import "node:readline";
|
|
9
|
-
import "@tanstack/history";
|
|
10
|
-
import "@tanstack/router-core/ssr/client";
|
|
11
|
-
import "@tanstack/router-core";
|
|
12
10
|
import "node:async_hooks";
|
|
13
|
-
import "@tanstack/router-core/ssr/server";
|
|
14
11
|
import "h3-v2";
|
|
12
|
+
import "@tanstack/router-core";
|
|
15
13
|
import "tiny-invariant";
|
|
16
14
|
import "seroval";
|
|
15
|
+
import "@tanstack/history";
|
|
16
|
+
import "@tanstack/router-core/ssr/client";
|
|
17
|
+
import "@tanstack/router-core/ssr/server";
|
|
18
|
+
import "react";
|
|
19
|
+
import "@tanstack/react-router";
|
|
17
20
|
import "react/jsx-runtime";
|
|
18
21
|
import "@tanstack/react-router/ssr/server";
|
|
19
|
-
import "@tanstack/react-router";
|
|
20
22
|
function aggregateProjectAnalytics(allSessions) {
|
|
21
23
|
const projectMap = /* @__PURE__ */ new Map();
|
|
22
24
|
for (const session of allSessions) {
|
|
@@ -45,9 +47,9 @@ function aggregateProjectAnalytics(allSessions) {
|
|
|
45
47
|
};
|
|
46
48
|
}
|
|
47
49
|
const getProjectAnalytics_createServerFn_handler = createServerRpc({
|
|
48
|
-
id: "
|
|
50
|
+
id: "39e65590d2bc41f653f54a9b6a9e0a72f185da275304c0a4a595d811cf185572",
|
|
49
51
|
name: "getProjectAnalytics",
|
|
50
|
-
filename: "src/features/project-analytics/project-analytics.
|
|
52
|
+
filename: "src/features/project-analytics/project-analytics.api.ts"
|
|
51
53
|
}, (opts) => getProjectAnalytics.__executeServer(opts));
|
|
52
54
|
const getProjectAnalytics = createServerFn({
|
|
53
55
|
method: "GET"
|