claude-code-cost 0.23.1 → 0.24.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/README.md +67 -25
- package/lib/net-guard.js +20 -3
- package/package.json +1 -1
- package/public/app.js +45 -5
- package/public/index.html +34 -3
- package/public/style.css +155 -1
- package/public/themes.css +52 -82
- package/server.js +30 -3
package/README.md
CHANGED
|
@@ -4,51 +4,93 @@
|
|
|
4
4
|
[](LICENSE)
|
|
5
5
|
[](https://www.npmjs.com/package/claude-code-cost)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
See what [Claude Code](https://docs.anthropic.com/en/docs/claude-code) costs you per day, project, session, and message.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
**[Documentation](https://nikiforovall.blog/claude-code-cost/)**
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
<picture>
|
|
12
|
+
<source media="(prefers-color-scheme: dark)" srcset="website/public/shots/themes/ember-h2-hub-cost-dark.webp">
|
|
13
|
+
<img alt="The Overview tab: cost cards, a daily cost chart stacked by model, a Cost by Model chart, and the Projects table" src="website/public/shots/themes/ember-h2-hub-cost-light.webp">
|
|
14
|
+
</picture>
|
|
12
15
|
|
|
13
|
-
## Getting
|
|
16
|
+
## Getting started
|
|
17
|
+
|
|
18
|
+
You need Node.js 20 or later and a Claude config dir with at least one session.
|
|
14
19
|
|
|
15
20
|
```bash
|
|
16
21
|
npx claude-code-cost --open
|
|
17
22
|
```
|
|
18
23
|
|
|
19
|
-
|
|
24
|
+
The server starts on `http://localhost:3543` and `--open` opens it in your browser. If the port is in use, the server picks a random free port and prints the real URL.
|
|
25
|
+
|
|
26
|
+
You do not need hooks, plugins, or a config file. The dashboard reads the session logs that Claude Code already writes to `~/.claude/projects/` and never writes to them. Your transcripts and cost data stay on your machine. The server downloads the LiteLLM price list, and the Plan usage dialog runs your local `claude` CLI. See [What it reads and what it sends](https://nikiforovall.blog/claude-code-cost/getting-started/#what-it-reads-and-what-it-sends).
|
|
20
27
|
|
|
21
28
|
### Install as a desktop app
|
|
22
29
|
|
|
23
|
-
The dashboard is a PWA. With the server running, open it in Chrome or Edge and click **Install** in the top bar
|
|
30
|
+
The dashboard is a PWA. With the server running, open it in Chrome or Edge and click **Install** in the top bar, or the install icon in the address bar. The app opens in its own window. Right-click its icon for the **Overview** and **Insights** shortcuts. The server must still run, because the app is a window onto the local URL.
|
|
24
31
|
|
|
25
32
|
## Features
|
|
26
33
|
|
|
27
|
-
- **
|
|
28
|
-
- **
|
|
29
|
-
- **
|
|
30
|
-
- **
|
|
31
|
-
- **
|
|
32
|
-
- **
|
|
33
|
-
- **
|
|
34
|
-
- **17 color themes
|
|
35
|
-
- **
|
|
34
|
+
- **Drill down from the total to one message.** Open a project to see its sessions, then a session to see each message. <kbd>Backspace</kbd> goes back one level.
|
|
35
|
+
- **Session detail.** A cumulative cost curve, the tokens of each message, and a table with the model, the tools it called, and the running total. Subagents and Workflow runs are in the totals, with a row per agent. Compactions show with an estimated summarizer cost. A range brush picks which messages to show in long sessions.
|
|
36
|
+
- **Date ranges.** Presets from Today and Last 24h up to 1 Year, or two dates on a calendar. The range and the project scope apply to every view.
|
|
37
|
+
- **Insights.** The active 5-hour block with its time left, burn rate, monthly run-rate, cache savings, and subagent share. Charts for token composition, top tools, an hourly heatmap, and weekly cost, plus a table of past 5-hour blocks.
|
|
38
|
+
- **Plan usage.** Press <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>S</kbd> to see your plan windows, the percent used, and what drives the cost.
|
|
39
|
+
- **Pricing.** Live prices from the [LiteLLM](https://github.com/BerriAI/litellm) price list, with the 200K-token tier, cache reads and writes, and fast mode. A built-in table fills in when the list cannot load. Streamed lines are counted once per `message.id` plus `requestId`.
|
|
40
|
+
- **Keyboard.** <kbd>1</kbd> and <kbd>2</kbd> switch between Overview and Insights. <kbd>↓</kbd>/<kbd>↑</kbd> or <kbd>J</kbd>/<kbd>K</kbd> move through rows, and <kbd>Enter</kbd> opens one. Press <kbd>?</kbd> for the full list.
|
|
41
|
+
- **17 color themes**, each in light and dark.
|
|
42
|
+
- **Claude Code Hub.** Runs standalone or as a tab in [Claude Code Hub](https://github.com/NikiforovAll/claude-code-hub), with a shared project scope and theme.
|
|
43
|
+
|
|
44
|
+
All numbers are estimates from token counts and public list prices, not a bill. See [How costs are computed](https://nikiforovall.blog/claude-code-cost/how-costs-are-computed/).
|
|
45
|
+
|
|
46
|
+
<picture>
|
|
47
|
+
<source media="(prefers-color-scheme: dark)" srcset="website/public/shots/themes/ember-h2d-hub-cost-sessions-dark.webp">
|
|
48
|
+
<img alt="A project's sessions view: daily cost by model, Cost by Model, Total Cost, and the sessions table" src="website/public/shots/themes/ember-h2d-hub-cost-sessions-light.webp">
|
|
49
|
+
</picture>
|
|
50
|
+
|
|
51
|
+
<picture>
|
|
52
|
+
<source media="(prefers-color-scheme: dark)" srcset="website/public/shots/themes/ember-cost-detail-dark.webp">
|
|
53
|
+
<img alt="Session detail: stat header, Cumulative Cost and Token Breakdown per Message charts, the range brush, and the messages table" src="website/public/shots/themes/ember-cost-detail-light.webp">
|
|
54
|
+
</picture>
|
|
55
|
+
|
|
56
|
+
<picture>
|
|
57
|
+
<source media="(prefers-color-scheme: dark)" srcset="website/public/shots/themes/ember-cost-insights-dark.webp">
|
|
58
|
+
<img alt="Insights: active 5-hour block, burn rate, run-rate, cache savings and subagent share cards, charts, and the 5-hour billing blocks table" src="website/public/shots/themes/ember-cost-insights-light.webp">
|
|
59
|
+
</picture>
|
|
60
|
+
|
|
61
|
+
<picture>
|
|
62
|
+
<source media="(prefers-color-scheme: dark)" srcset="website/public/shots/themes/ember-h2g-hub-cost-range-dark.webp">
|
|
63
|
+
<img alt="The date range picker with presets from Today to 1 Year and a two-month calendar" src="website/public/shots/themes/ember-h2g-hub-cost-range-light.webp">
|
|
64
|
+
</picture>
|
|
36
65
|
|
|
37
|
-
|
|
66
|
+
## Configuration
|
|
38
67
|
|
|
39
|
-
|
|
68
|
+
A flag wins over its environment variable. Flags take a value as `--port 3000` or `--port=3000`.
|
|
40
69
|
|
|
41
|
-
|
|
70
|
+
| Flag | Environment variable | Default | What it does |
|
|
71
|
+
| --- | --- | --- | --- |
|
|
72
|
+
| `--port <n>` | `PORT` | `3543` | Port to listen on. Falls back to a random port if busy. |
|
|
73
|
+
| `--dir <path>` | `CLAUDE_CONFIG_DIR`, then `CLAUDE_DIR` | `~/.claude` | Claude config dir to read. |
|
|
74
|
+
| `--open` | | off | Open the dashboard in your browser. |
|
|
75
|
+
| `--host <addr>` | `HOST` | `127.0.0.1` | Address to bind. |
|
|
76
|
+
| `--allowed-hosts=<list>` | `ALLOWED_HOSTS` | empty | Extra host names to accept, on top of loopback names. |
|
|
77
|
+
| | `CLAUDE_BIN` | `claude` (`claude.exe` on Windows) | Claude Code executable for Plan usage. |
|
|
42
78
|
|
|
43
|
-
|
|
79
|
+
With a custom config dir, the server reads only `<dir>/projects`. With the default dir, it also reads `~/.config/claude/projects`.
|
|
44
80
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
--open Open browser on start
|
|
49
|
-
```
|
|
81
|
+
The server has no authentication. Bind a non-loopback address only on a network you trust. See [Configuration and CLI](https://nikiforovall.blog/claude-code-cost/reference/configuration/) for the network rules and the HTTP API.
|
|
82
|
+
|
|
83
|
+
## Documentation
|
|
50
84
|
|
|
51
|
-
|
|
85
|
+
- [Getting started](https://nikiforovall.blog/claude-code-cost/getting-started/)
|
|
86
|
+
- [Read the overview](https://nikiforovall.blog/claude-code-cost/guides/overview/)
|
|
87
|
+
- [Trace a project to a message](https://nikiforovall.blog/claude-code-cost/guides/sessions/)
|
|
88
|
+
- [Watch 5-hour blocks and burn rate](https://nikiforovall.blog/claude-code-cost/guides/insights/)
|
|
89
|
+
- [Choose a date range and project scope](https://nikiforovall.blog/claude-code-cost/guides/ranges-and-scope/)
|
|
90
|
+
- [How costs are computed](https://nikiforovall.blog/claude-code-cost/how-costs-are-computed/)
|
|
91
|
+
- [Keyboard shortcuts](https://nikiforovall.blog/claude-code-cost/reference/keyboard-shortcuts/)
|
|
92
|
+
- [Run inside Claude Code Hub](https://nikiforovall.blog/claude-code-cost/reference/claude-code-hub/)
|
|
93
|
+
- [Troubleshooting](https://nikiforovall.blog/claude-code-cost/reference/troubleshooting/)
|
|
52
94
|
|
|
53
95
|
## License
|
|
54
96
|
|
package/lib/net-guard.js
CHANGED
|
@@ -181,6 +181,16 @@ function createNetGuard(config = {}) {
|
|
|
181
181
|
return next();
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
+
// For a WebSocket upgrade, which originGuard must not judge: the handshake is a
|
|
185
|
+
// GET, and WebSocket has no CORS, so any page can open one. Browsers always send
|
|
186
|
+
// Origin on the handshake, so a missing or `null` one is refused, not trusted.
|
|
187
|
+
// Returns null when allowed, or the reason it was refused.
|
|
188
|
+
function upgradeVerdict(req) {
|
|
189
|
+
if (!hostAllowed(parseHostHeader(req.headers.host))) return 'unrecognized Host header';
|
|
190
|
+
if (originVerdict(req.headers.origin) !== true) return 'cross-origin or missing Origin';
|
|
191
|
+
return null;
|
|
192
|
+
}
|
|
193
|
+
|
|
184
194
|
// Constant for the life of the process, and frameGuard runs ahead of
|
|
185
195
|
// express.static — so this is built once rather than per asset fetch.
|
|
186
196
|
//
|
|
@@ -229,12 +239,19 @@ function createNetGuard(config = {}) {
|
|
|
229
239
|
* @param {any} app express app (or any http request handler)
|
|
230
240
|
* @param {number} port 0 selects a free port
|
|
231
241
|
* @param {(port: number) => void} [onReady]
|
|
232
|
-
*
|
|
242
|
+
* `onUpgrade` is attached to both servers; a caller that attached it to the
|
|
243
|
+
* returned one alone would drop every WebSocket that arrives over the other family.
|
|
244
|
+
*
|
|
245
|
+
* @param {{maxHeaderSize?: number, onUpgrade?: (req: any, socket: any, head: Buffer) => void}} [opts]
|
|
233
246
|
*/
|
|
234
247
|
function listenLoopback(app, port, onReady, opts = {}) {
|
|
235
248
|
const http = require('http');
|
|
236
249
|
const serverOpts = opts.maxHeaderSize ? { maxHeaderSize: opts.maxHeaderSize } : {};
|
|
237
|
-
const makeServer = (handler) =>
|
|
250
|
+
const makeServer = (handler) => {
|
|
251
|
+
const s = http.createServer(serverOpts, handler);
|
|
252
|
+
if (opts.onUpgrade) s.on('upgrade', opts.onUpgrade);
|
|
253
|
+
return s;
|
|
254
|
+
};
|
|
238
255
|
const server = makeServer(app);
|
|
239
256
|
let secondary = null;
|
|
240
257
|
|
|
@@ -261,7 +278,7 @@ function createNetGuard(config = {}) {
|
|
|
261
278
|
return `WARNING: listening on ${BIND_HOST} - reachable from your network, with no authentication.`;
|
|
262
279
|
}
|
|
263
280
|
|
|
264
|
-
return { BIND_HOST, ALLOWED_HOSTS, hostGuard, originGuard, frameGuard, listenLoopback, exposureWarning };
|
|
281
|
+
return { BIND_HOST, ALLOWED_HOSTS, EXPOSED, hostGuard, originGuard, upgradeVerdict, frameGuard, listenLoopback, exposureWarning };
|
|
265
282
|
}
|
|
266
283
|
|
|
267
284
|
module.exports = { createNetGuard, parseHostHeader, isLoopbackAddress };
|
package/package.json
CHANGED
package/public/app.js
CHANGED
|
@@ -563,13 +563,51 @@ async function fetchSessionDetail(sessionId) {
|
|
|
563
563
|
|
|
564
564
|
// #endregion
|
|
565
565
|
|
|
566
|
+
// #region LOADING
|
|
567
|
+
|
|
568
|
+
const BOOT_VERBS = ['Clawding…', 'Counting tokens…', 'Tallying costs…', 'Pricing models…', 'Crunching sessions…'];
|
|
569
|
+
let booted = false;
|
|
570
|
+
|
|
571
|
+
const CLAWD_SVG = `<svg class="clawd" viewBox="1 0 16 10" shape-rendering="crispEdges">
|
|
572
|
+
<rect x="3" y="0" width="12" height="2"/><rect x="3" y="2" width="2" height="2"/>
|
|
573
|
+
<rect x="6" y="2" width="6" height="2"/><rect x="13" y="2" width="2" height="2"/>
|
|
574
|
+
<rect x="1" y="4" width="16" height="2"/><rect x="3" y="6" width="12" height="2"/>
|
|
575
|
+
<rect x="4" y="8" width="1" height="2"/><rect x="6" y="8" width="1" height="2"/>
|
|
576
|
+
<rect x="11" y="8" width="1" height="2"/><rect x="13" y="8" width="1" height="2"/>
|
|
577
|
+
</svg>`;
|
|
578
|
+
|
|
579
|
+
const SKEL_BARS = [35, 60, 45, 80, 55, 70, 40, 90, 65, 50, 75, 30];
|
|
580
|
+
|
|
581
|
+
function skeletonHtml(view) {
|
|
582
|
+
const line = '<span class="skel"></span>';
|
|
583
|
+
const cards = `<div class="cards-row">${'<div class="stat-card"><span class="skel card-label"></span><span class="skel card-value"></span><span class="skel card-sub"></span></div>'.repeat(4)}</div>`;
|
|
584
|
+
const plot = booted
|
|
585
|
+
? SKEL_BARS.map((h) => `<span class="skel" style="--h:${h}%"></span>`).join('')
|
|
586
|
+
: `<div class="clawd-boot">${CLAWD_SVG}<span>${BOOT_VERBS[Math.floor(Math.random() * BOOT_VERBS.length)]}</span></div>`;
|
|
587
|
+
const charts = `<div class="charts-row">
|
|
588
|
+
<div class="chart-box"><span class="skel chart-title"></span><div class="skel-plot">${plot}</div></div>
|
|
589
|
+
<div class="chart-box"><span class="skel chart-title"></span><div class="skel-donut"></div></div>
|
|
590
|
+
</div>`;
|
|
591
|
+
const table = `<div class="skel-table">${`<div>${line.repeat(4)}</div>`.repeat(6)}</div>`;
|
|
592
|
+
const head =
|
|
593
|
+
view === 'overview' || view === 'insights'
|
|
594
|
+
? `<div class="skel-tabs">${line.repeat(2)}</div>`
|
|
595
|
+
: `<div class="breadcrumb">${line}</div>`;
|
|
596
|
+
const body = view === 'sessions' ? charts + table : cards + charts + table;
|
|
597
|
+
// The first JS skeleton replaces the static one from index.html; fading it in again would blink.
|
|
598
|
+
const fade = booted ? ' skeleton-fade' : '';
|
|
599
|
+
return `<div class="dashboard-content skeleton${esc(fade)}" aria-busy="true" aria-label="Loading">${head}${body}</div>`;
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
// #endregion
|
|
603
|
+
|
|
566
604
|
// #region RENDER_OVERVIEW
|
|
567
605
|
|
|
568
606
|
function renderOverview() {
|
|
569
607
|
const el = document.getElementById('overview-view');
|
|
570
608
|
if (!el) return;
|
|
571
609
|
if (!overviewData) {
|
|
572
|
-
el.innerHTML = '
|
|
610
|
+
el.innerHTML = skeletonHtml('overview');
|
|
573
611
|
return;
|
|
574
612
|
}
|
|
575
613
|
|
|
@@ -812,7 +850,7 @@ function renderInsights() {
|
|
|
812
850
|
const el = document.getElementById('insights-view');
|
|
813
851
|
if (!el) return;
|
|
814
852
|
if (!insightsData) {
|
|
815
|
-
el.innerHTML = '
|
|
853
|
+
el.innerHTML = skeletonHtml('insights');
|
|
816
854
|
return;
|
|
817
855
|
}
|
|
818
856
|
|
|
@@ -938,7 +976,7 @@ function renderSessions() {
|
|
|
938
976
|
const el = document.getElementById('sessions-view');
|
|
939
977
|
if (!el) return;
|
|
940
978
|
if (!sessionsData) {
|
|
941
|
-
el.innerHTML = '
|
|
979
|
+
el.innerHTML = skeletonHtml('sessions');
|
|
942
980
|
return;
|
|
943
981
|
}
|
|
944
982
|
|
|
@@ -1025,7 +1063,7 @@ function renderDetail() {
|
|
|
1025
1063
|
const el = document.getElementById('detail-view');
|
|
1026
1064
|
if (!el) return;
|
|
1027
1065
|
if (!sessionDetailData) {
|
|
1028
|
-
el.innerHTML = '
|
|
1066
|
+
el.innerHTML = skeletonHtml('detail');
|
|
1029
1067
|
return;
|
|
1030
1068
|
}
|
|
1031
1069
|
|
|
@@ -2589,7 +2627,7 @@ async function loadAndRender(view) {
|
|
|
2589
2627
|
if (viewEl) {
|
|
2590
2628
|
const hasContent = viewEl.querySelector('.dashboard-content');
|
|
2591
2629
|
if (!hasContent) {
|
|
2592
|
-
viewEl.innerHTML =
|
|
2630
|
+
viewEl.innerHTML = skeletonHtml(view);
|
|
2593
2631
|
}
|
|
2594
2632
|
}
|
|
2595
2633
|
|
|
@@ -2644,6 +2682,8 @@ async function loadAndRender(view) {
|
|
|
2644
2682
|
showToast(`Error: ${err.message}`);
|
|
2645
2683
|
const viewEl = document.getElementById(`${view}-view`);
|
|
2646
2684
|
if (viewEl) viewEl.innerHTML = `<div class="loading-state"><span>Failed to load data: ${err.message}</span></div>`;
|
|
2685
|
+
} finally {
|
|
2686
|
+
if (myNav === navCounter) booted = true;
|
|
2647
2687
|
}
|
|
2648
2688
|
}
|
|
2649
2689
|
|
package/public/index.html
CHANGED
|
@@ -145,9 +145,40 @@
|
|
|
145
145
|
</div>
|
|
146
146
|
|
|
147
147
|
<div class="dashboard" id="app">
|
|
148
|
-
<div class="
|
|
149
|
-
<div class="
|
|
150
|
-
<
|
|
148
|
+
<div class="dashboard-content skeleton skeleton-fade" id="loadingState" aria-busy="true" aria-label="Loading">
|
|
149
|
+
<div class="skel-tabs"><span class="skel"></span><span class="skel"></span></div>
|
|
150
|
+
<div class="cards-row">
|
|
151
|
+
<div class="stat-card"><span class="skel card-label"></span><span class="skel card-value"></span><span class="skel card-sub"></span></div>
|
|
152
|
+
<div class="stat-card"><span class="skel card-label"></span><span class="skel card-value"></span><span class="skel card-sub"></span></div>
|
|
153
|
+
<div class="stat-card"><span class="skel card-label"></span><span class="skel card-value"></span><span class="skel card-sub"></span></div>
|
|
154
|
+
<div class="stat-card"><span class="skel card-label"></span><span class="skel card-value"></span><span class="skel card-sub"></span></div>
|
|
155
|
+
</div>
|
|
156
|
+
<div class="charts-row">
|
|
157
|
+
<div class="chart-box">
|
|
158
|
+
<span class="skel chart-title"></span>
|
|
159
|
+
<div class="skel-plot">
|
|
160
|
+
<div class="clawd-boot">
|
|
161
|
+
<svg class="clawd" viewBox="1 0 16 10" shape-rendering="crispEdges">
|
|
162
|
+
<rect x="3" y="0" width="12" height="2"/><rect x="3" y="2" width="2" height="2"/>
|
|
163
|
+
<rect x="6" y="2" width="6" height="2"/><rect x="13" y="2" width="2" height="2"/>
|
|
164
|
+
<rect x="1" y="4" width="16" height="2"/><rect x="3" y="6" width="12" height="2"/>
|
|
165
|
+
<rect x="4" y="8" width="1" height="2"/><rect x="6" y="8" width="1" height="2"/>
|
|
166
|
+
<rect x="11" y="8" width="1" height="2"/><rect x="13" y="8" width="1" height="2"/>
|
|
167
|
+
</svg>
|
|
168
|
+
<span>Clawding…</span>
|
|
169
|
+
</div>
|
|
170
|
+
</div>
|
|
171
|
+
</div>
|
|
172
|
+
<div class="chart-box"><span class="skel chart-title"></span><div class="skel-donut"></div></div>
|
|
173
|
+
</div>
|
|
174
|
+
<div class="skel-table">
|
|
175
|
+
<div><span class="skel"></span><span class="skel"></span><span class="skel"></span><span class="skel"></span></div>
|
|
176
|
+
<div><span class="skel"></span><span class="skel"></span><span class="skel"></span><span class="skel"></span></div>
|
|
177
|
+
<div><span class="skel"></span><span class="skel"></span><span class="skel"></span><span class="skel"></span></div>
|
|
178
|
+
<div><span class="skel"></span><span class="skel"></span><span class="skel"></span><span class="skel"></span></div>
|
|
179
|
+
<div><span class="skel"></span><span class="skel"></span><span class="skel"></span><span class="skel"></span></div>
|
|
180
|
+
<div><span class="skel"></span><span class="skel"></span><span class="skel"></span><span class="skel"></span></div>
|
|
181
|
+
</div>
|
|
151
182
|
</div>
|
|
152
183
|
</div>
|
|
153
184
|
|
package/public/style.css
CHANGED
|
@@ -1346,6 +1346,160 @@ body.light .rb-window {
|
|
|
1346
1346
|
animation: spin 0.8s linear infinite;
|
|
1347
1347
|
}
|
|
1348
1348
|
|
|
1349
|
+
.skeleton-fade {
|
|
1350
|
+
animation: boot-fade 0.3s ease-out 0.15s both;
|
|
1351
|
+
}
|
|
1352
|
+
|
|
1353
|
+
.skeleton .breadcrumb .skel {
|
|
1354
|
+
width: 220px;
|
|
1355
|
+
}
|
|
1356
|
+
|
|
1357
|
+
.skel {
|
|
1358
|
+
display: block;
|
|
1359
|
+
height: 9px;
|
|
1360
|
+
width: 60%;
|
|
1361
|
+
border-radius: 4px;
|
|
1362
|
+
background: var(--border);
|
|
1363
|
+
animation: skel-breathe 1.4s ease-in-out infinite;
|
|
1364
|
+
}
|
|
1365
|
+
|
|
1366
|
+
.skeleton .card-label.skel {
|
|
1367
|
+
width: 40%;
|
|
1368
|
+
}
|
|
1369
|
+
|
|
1370
|
+
.skeleton .card-value.skel {
|
|
1371
|
+
height: 22px;
|
|
1372
|
+
width: 55%;
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1375
|
+
.skeleton .card-sub.skel {
|
|
1376
|
+
width: 70%;
|
|
1377
|
+
margin-top: 14px;
|
|
1378
|
+
}
|
|
1379
|
+
|
|
1380
|
+
.skeleton .chart-title.skel {
|
|
1381
|
+
width: 30%;
|
|
1382
|
+
}
|
|
1383
|
+
|
|
1384
|
+
.skel-tabs {
|
|
1385
|
+
display: flex;
|
|
1386
|
+
gap: 16px;
|
|
1387
|
+
padding: 10px 4px 14px;
|
|
1388
|
+
margin-bottom: 16px;
|
|
1389
|
+
border-bottom: 1px solid var(--border);
|
|
1390
|
+
}
|
|
1391
|
+
|
|
1392
|
+
.skel-tabs .skel {
|
|
1393
|
+
width: 70px;
|
|
1394
|
+
}
|
|
1395
|
+
|
|
1396
|
+
.skel-plot {
|
|
1397
|
+
position: relative;
|
|
1398
|
+
display: flex;
|
|
1399
|
+
align-items: flex-end;
|
|
1400
|
+
gap: 6px;
|
|
1401
|
+
height: 150px;
|
|
1402
|
+
}
|
|
1403
|
+
|
|
1404
|
+
.skel-plot > .skel {
|
|
1405
|
+
flex: 1;
|
|
1406
|
+
height: var(--h);
|
|
1407
|
+
width: auto;
|
|
1408
|
+
border-radius: 3px 3px 0 0;
|
|
1409
|
+
}
|
|
1410
|
+
|
|
1411
|
+
.skel-plot .clawd-boot {
|
|
1412
|
+
position: absolute;
|
|
1413
|
+
inset: 0;
|
|
1414
|
+
}
|
|
1415
|
+
|
|
1416
|
+
.skel-donut {
|
|
1417
|
+
width: 130px;
|
|
1418
|
+
height: 130px;
|
|
1419
|
+
margin: 10px auto;
|
|
1420
|
+
border-radius: 50%;
|
|
1421
|
+
border: 18px solid var(--border);
|
|
1422
|
+
animation: skel-breathe 1.4s ease-in-out infinite;
|
|
1423
|
+
}
|
|
1424
|
+
|
|
1425
|
+
.skel-table {
|
|
1426
|
+
display: flex;
|
|
1427
|
+
flex-direction: column;
|
|
1428
|
+
}
|
|
1429
|
+
|
|
1430
|
+
.skel-table > div {
|
|
1431
|
+
display: flex;
|
|
1432
|
+
gap: 24px;
|
|
1433
|
+
padding: 16px 12px;
|
|
1434
|
+
border-bottom: 1px solid var(--border);
|
|
1435
|
+
}
|
|
1436
|
+
|
|
1437
|
+
.skel-table .skel:first-child {
|
|
1438
|
+
width: 40%;
|
|
1439
|
+
}
|
|
1440
|
+
|
|
1441
|
+
.skel-table .skel {
|
|
1442
|
+
width: 12%;
|
|
1443
|
+
}
|
|
1444
|
+
|
|
1445
|
+
.clawd-boot {
|
|
1446
|
+
display: flex;
|
|
1447
|
+
flex-direction: column;
|
|
1448
|
+
align-items: center;
|
|
1449
|
+
justify-content: center;
|
|
1450
|
+
gap: 12px;
|
|
1451
|
+
color: var(--text-muted);
|
|
1452
|
+
font-size: 12px;
|
|
1453
|
+
}
|
|
1454
|
+
|
|
1455
|
+
.clawd {
|
|
1456
|
+
width: 64px;
|
|
1457
|
+
height: 40px;
|
|
1458
|
+
fill: #d97757;
|
|
1459
|
+
overflow: visible;
|
|
1460
|
+
transform-origin: 50% 100%;
|
|
1461
|
+
animation: clawd-jump 0.9s ease-in-out infinite;
|
|
1462
|
+
}
|
|
1463
|
+
|
|
1464
|
+
@keyframes skel-breathe {
|
|
1465
|
+
50% {
|
|
1466
|
+
opacity: 0.55;
|
|
1467
|
+
}
|
|
1468
|
+
}
|
|
1469
|
+
|
|
1470
|
+
@keyframes boot-fade {
|
|
1471
|
+
from {
|
|
1472
|
+
opacity: 0;
|
|
1473
|
+
}
|
|
1474
|
+
}
|
|
1475
|
+
|
|
1476
|
+
@keyframes clawd-jump {
|
|
1477
|
+
0%,
|
|
1478
|
+
100% {
|
|
1479
|
+
transform: translateY(0) scale(1, 1);
|
|
1480
|
+
}
|
|
1481
|
+
15% {
|
|
1482
|
+
transform: translateY(0) scale(1.1, 0.85);
|
|
1483
|
+
}
|
|
1484
|
+
45% {
|
|
1485
|
+
transform: translateY(-14px) scale(0.95, 1.05);
|
|
1486
|
+
}
|
|
1487
|
+
70% {
|
|
1488
|
+
transform: translateY(0) scale(1.08, 0.9);
|
|
1489
|
+
}
|
|
1490
|
+
85% {
|
|
1491
|
+
transform: translateY(0) scale(1, 1);
|
|
1492
|
+
}
|
|
1493
|
+
}
|
|
1494
|
+
|
|
1495
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1496
|
+
.skel,
|
|
1497
|
+
.skel-donut,
|
|
1498
|
+
.clawd {
|
|
1499
|
+
animation: none;
|
|
1500
|
+
}
|
|
1501
|
+
}
|
|
1502
|
+
|
|
1349
1503
|
.empty-state {
|
|
1350
1504
|
display: flex;
|
|
1351
1505
|
flex-direction: column;
|
|
@@ -2038,7 +2192,7 @@ body.light {
|
|
|
2038
2192
|
--text-secondary: #444444;
|
|
2039
2193
|
--text-tertiary: #666666;
|
|
2040
2194
|
--text-muted: #888888;
|
|
2041
|
-
--accent-text: #
|
|
2195
|
+
--accent-text: #a0501c;
|
|
2042
2196
|
--accent-dim: rgba(232, 111, 51, 0.18);
|
|
2043
2197
|
--accent-glow: rgba(232, 111, 51, 0.5);
|
|
2044
2198
|
--chart-fill: rgba(232, 111, 51, 0.28);
|
package/public/themes.css
CHANGED
|
@@ -11,18 +11,18 @@ body.light .theme-swatch-gruvbox { --sw-bg: #f3eee0; --sw-accent: #d65d0e; --sw-
|
|
|
11
11
|
body.light .theme-swatch-catppuccin { --sw-bg: #eff1f5; --sw-accent: #8839ef; --sw-ink: #4c4f69; --sw-border: #bcc0cc; }
|
|
12
12
|
.theme-swatch-tokyo-night { --sw-bg: #1a1b26; --sw-accent: #7aa2f7; --sw-ink: #c0caf5; --sw-border: #3b4261; }
|
|
13
13
|
body.light .theme-swatch-tokyo-night { --sw-bg: #e9eaf0; --sw-accent: #2e7de9; --sw-ink: #343b58; --sw-border: #a8aecb; }
|
|
14
|
-
.theme-swatch-solarized { --sw-bg: #073642; --sw-accent: #
|
|
15
|
-
body.light .theme-swatch-solarized { --sw-bg: #
|
|
14
|
+
.theme-swatch-solarized { --sw-bg: #073642; --sw-accent: #c96f47; --sw-ink: #e2dfd0; --sw-border: #586e75; }
|
|
15
|
+
body.light .theme-swatch-solarized { --sw-bg: #fdf6e3; --sw-accent: #2280c2; --sw-ink: #073642; --sw-border: #cdc4ab; }
|
|
16
16
|
.theme-swatch-dracula { --sw-bg: #282a36; --sw-accent: #bd93f9; --sw-ink: #f8f8f2; --sw-border: #565a75; }
|
|
17
17
|
body.light .theme-swatch-dracula { --sw-bg: #f0f0f5; --sw-accent: #7c3aed; --sw-ink: #16161e; --sw-border: #c9c9d6; }
|
|
18
18
|
.theme-swatch-nord { --sw-bg: #2e3440; --sw-accent: #88c0d0; --sw-ink: #eceff4; --sw-border: #4c566a; }
|
|
19
19
|
body.light .theme-swatch-nord { --sw-bg: #eceff4; --sw-accent: #5e81ac; --sw-ink: #2e3440; --sw-border: #c2c9d6; }
|
|
20
20
|
.theme-swatch-rose-pine { --sw-bg: #1f1d2e; --sw-accent: #c4a7e7; --sw-ink: #e0def4; --sw-border: #403d52; }
|
|
21
|
-
body.light .theme-swatch-rose-pine { --sw-bg: #faf4ed; --sw-accent: #907aa9; --sw-ink: #575279; --sw-border: #
|
|
21
|
+
body.light .theme-swatch-rose-pine { --sw-bg: #faf4ed; --sw-accent: #907aa9; --sw-ink: #575279; --sw-border: #cecacd; }
|
|
22
22
|
.theme-swatch-everforest { --sw-bg: #2d353b; --sw-accent: #a7c080; --sw-ink: #d3c6aa; --sw-border: #475258; }
|
|
23
|
-
body.light .theme-swatch-everforest { --sw-bg: #
|
|
23
|
+
body.light .theme-swatch-everforest { --sw-bg: #f5f4e8; --sw-accent: #6f8352; --sw-ink: #3d484e; --sw-border: #d3d2bf; }
|
|
24
24
|
.theme-swatch-kanagawa { --sw-bg: #1f1f28; --sw-accent: #7e9cd8; --sw-ink: #dcd7ba; --sw-border: #54546d; }
|
|
25
|
-
body.light .theme-swatch-kanagawa { --sw-bg: #
|
|
25
|
+
body.light .theme-swatch-kanagawa { --sw-bg: #f3f0e4; --sw-accent: #4d699b; --sw-ink: #545464; --sw-border: #d2ccb6; }
|
|
26
26
|
.theme-swatch-one-dark { --sw-bg: #282c34; --sw-accent: #61afef; --sw-ink: #d7dae0; --sw-border: #4b5263; }
|
|
27
27
|
body.light .theme-swatch-one-dark { --sw-bg: #fafafa; --sw-accent: #4078f2; --sw-ink: #383a42; --sw-border: #d4d4d6; }
|
|
28
28
|
.theme-swatch-night-owl { --sw-bg: #0b2942; --sw-accent: #82aaff; --sw-ink: #d6deeb; --sw-border: #5f7e97; }
|
|
@@ -32,7 +32,7 @@ body.light .theme-swatch-monokai { --sw-bg: #f1efed; --sw-accent: #c08a00; --sw-
|
|
|
32
32
|
.theme-swatch-github { --sw-bg: #24292e; --sw-accent: #58a6ff; --sw-ink: #e1e4e8; --sw-border: #444d56; }
|
|
33
33
|
body.light .theme-swatch-github { --sw-bg: #f6f8fa; --sw-accent: #0366d6; --sw-ink: #24292e; --sw-border: #d1d5da; }
|
|
34
34
|
.theme-swatch-ayu { --sw-bg: #10141c; --sw-accent: #e6b450; --sw-ink: #bfbdb6; --sw-border: #2d3343; }
|
|
35
|
-
body.light .theme-swatch-ayu { --sw-bg: #f8f9fa; --sw-accent: #
|
|
35
|
+
body.light .theme-swatch-ayu { --sw-bg: #f8f9fa; --sw-accent: #c97612; --sw-ink: #3d4149; --sw-border: #d8dde2; }
|
|
36
36
|
.theme-swatch-vitesse { --sw-bg: #181818; --sw-accent: #4d9375; --sw-ink: #dbd7ca; --sw-border: #333333; }
|
|
37
37
|
body.light .theme-swatch-vitesse { --sw-bg: #f7f7f7; --sw-accent: #1c6b48; --sw-ink: #393a34; --sw-border: #d6d6d6; }
|
|
38
38
|
.theme-swatch-synthwave { --sw-bg: #262335; --sw-accent: #ff7edb; --sw-ink: #ffffff; --sw-border: #495495; }
|
|
@@ -54,7 +54,6 @@ body[data-color-theme="gruvbox"]:not(.light) {
|
|
|
54
54
|
--text-tertiary: #bdae93;
|
|
55
55
|
--text-muted: #928374;
|
|
56
56
|
--chart-fill: rgba(254, 128, 25, 0.32);
|
|
57
|
-
--chart-1: #fe8019;
|
|
58
57
|
}
|
|
59
58
|
body.light[data-color-theme="gruvbox"] {
|
|
60
59
|
--accent: #d65d0e;
|
|
@@ -71,7 +70,6 @@ body.light[data-color-theme="gruvbox"] {
|
|
|
71
70
|
--text-tertiary: #665c54;
|
|
72
71
|
--text-muted: #7c6f64;
|
|
73
72
|
--chart-fill: rgba(214, 93, 14, 0.32);
|
|
74
|
-
--chart-1: #d65d0e;
|
|
75
73
|
}
|
|
76
74
|
|
|
77
75
|
/* Catppuccin */
|
|
@@ -90,7 +88,6 @@ body[data-color-theme="catppuccin"]:not(.light) {
|
|
|
90
88
|
--text-tertiary: #a6adc8;
|
|
91
89
|
--text-muted: #7f849c;
|
|
92
90
|
--chart-fill: rgba(203, 166, 247, 0.32);
|
|
93
|
-
--chart-1: #cba6f7;
|
|
94
91
|
}
|
|
95
92
|
body.light[data-color-theme="catppuccin"] {
|
|
96
93
|
--accent: #8839ef;
|
|
@@ -107,7 +104,6 @@ body.light[data-color-theme="catppuccin"] {
|
|
|
107
104
|
--text-tertiary: #6c6f85;
|
|
108
105
|
--text-muted: #8c8fa1;
|
|
109
106
|
--chart-fill: rgba(136, 57, 239, 0.32);
|
|
110
|
-
--chart-1: #8839ef;
|
|
111
107
|
}
|
|
112
108
|
|
|
113
109
|
/* Tokyo Night */
|
|
@@ -126,7 +122,6 @@ body[data-color-theme="tokyo-night"]:not(.light) {
|
|
|
126
122
|
--text-tertiary: #787c99;
|
|
127
123
|
--text-muted: #565f89;
|
|
128
124
|
--chart-fill: rgba(122, 162, 247, 0.32);
|
|
129
|
-
--chart-1: #7aa2f7;
|
|
130
125
|
}
|
|
131
126
|
body.light[data-color-theme="tokyo-night"] {
|
|
132
127
|
--accent: #2e7de9;
|
|
@@ -143,43 +138,42 @@ body.light[data-color-theme="tokyo-night"] {
|
|
|
143
138
|
--text-tertiary: #6c6e75;
|
|
144
139
|
--text-muted: #848cb5;
|
|
145
140
|
--chart-fill: rgba(46, 125, 233, 0.32);
|
|
146
|
-
--chart-1: #2e7de9;
|
|
147
141
|
}
|
|
148
142
|
|
|
149
143
|
/* Solarized */
|
|
150
144
|
body[data-color-theme="solarized"]:not(.light) {
|
|
151
|
-
--accent: #
|
|
152
|
-
--accent-text: #
|
|
153
|
-
--accent-dim: rgba(
|
|
154
|
-
--accent-glow: rgba(
|
|
145
|
+
--accent: #c96f47;
|
|
146
|
+
--accent-text: #d48a6a;
|
|
147
|
+
--accent-dim: rgba(201,111,71,0.25);
|
|
148
|
+
--accent-glow: rgba(201, 111, 71, 0.55);
|
|
155
149
|
--bg-deep: #002b36;
|
|
156
150
|
--bg-surface: #073642;
|
|
157
151
|
--bg-elevated: #0a4250;
|
|
158
152
|
--bg-hover: #11505f;
|
|
159
153
|
--border: #586e75;
|
|
160
|
-
--text-primary: #
|
|
161
|
-
--text-secondary: #
|
|
162
|
-
--text-tertiary: #
|
|
163
|
-
--text-muted: #
|
|
164
|
-
--chart-fill: rgba(
|
|
165
|
-
--chart-1: #cb4b16;
|
|
154
|
+
--text-primary: #e2dfd0;
|
|
155
|
+
--text-secondary: #b7c0bf;
|
|
156
|
+
--text-tertiary: #93a1a1;
|
|
157
|
+
--text-muted: #839496;
|
|
158
|
+
--chart-fill: rgba(201, 111, 71, 0.32);
|
|
166
159
|
}
|
|
167
160
|
body.light[data-color-theme="solarized"] {
|
|
168
|
-
--accent: #
|
|
169
|
-
--accent-text: #
|
|
170
|
-
--accent-dim: rgba(
|
|
171
|
-
--accent-glow: rgba(
|
|
161
|
+
--accent: #2280c2;
|
|
162
|
+
--accent-text: #1b6aa3;
|
|
163
|
+
--accent-dim: rgba(34,128,194,0.18);
|
|
164
|
+
--accent-glow: rgba(34, 128, 194, 0.5);
|
|
172
165
|
--bg-deep: #eee8d5;
|
|
173
|
-
--bg-surface: #
|
|
174
|
-
--bg-elevated: #
|
|
175
|
-
--bg-hover: #
|
|
176
|
-
--border: #
|
|
166
|
+
--bg-surface: #fdf6e3;
|
|
167
|
+
--bg-elevated: #fffbef;
|
|
168
|
+
--bg-hover: #efe8d3;
|
|
169
|
+
--border: #cdc4ab;
|
|
177
170
|
--text-primary: #073642;
|
|
178
|
-
--text-secondary: #
|
|
179
|
-
--text-tertiary: #
|
|
180
|
-
--text-muted: #
|
|
181
|
-
--
|
|
182
|
-
--
|
|
171
|
+
--text-secondary: #4f6369;
|
|
172
|
+
--text-tertiary: #586e75;
|
|
173
|
+
--text-muted: #728589;
|
|
174
|
+
--sidebar-bg: #e6dfc7;
|
|
175
|
+
--sidebar-item-bg: #f3ecd6;
|
|
176
|
+
--chart-fill: rgba(34, 128, 194, 0.32);
|
|
183
177
|
}
|
|
184
178
|
|
|
185
179
|
/* Dracula */
|
|
@@ -198,7 +192,6 @@ body[data-color-theme="dracula"]:not(.light) {
|
|
|
198
192
|
--text-tertiary: #b0b3c5;
|
|
199
193
|
--text-muted: #6272a4;
|
|
200
194
|
--chart-fill: rgba(189, 147, 249, 0.32);
|
|
201
|
-
--chart-1: #bd93f9;
|
|
202
195
|
}
|
|
203
196
|
body.light[data-color-theme="dracula"] {
|
|
204
197
|
--accent: #7c3aed;
|
|
@@ -215,7 +208,6 @@ body.light[data-color-theme="dracula"] {
|
|
|
215
208
|
--text-tertiary: #5a5a68;
|
|
216
209
|
--text-muted: #787885;
|
|
217
210
|
--chart-fill: rgba(124, 58, 237, 0.32);
|
|
218
|
-
--chart-1: #7c3aed;
|
|
219
211
|
}
|
|
220
212
|
|
|
221
213
|
/* Nord */
|
|
@@ -234,7 +226,6 @@ body[data-color-theme="nord"]:not(.light) {
|
|
|
234
226
|
--text-tertiary: #aeb6c5;
|
|
235
227
|
--text-muted: #7b88a1;
|
|
236
228
|
--chart-fill: rgba(136, 192, 208, 0.32);
|
|
237
|
-
--chart-1: #88c0d0;
|
|
238
229
|
}
|
|
239
230
|
body.light[data-color-theme="nord"] {
|
|
240
231
|
--accent: #5e81ac;
|
|
@@ -251,7 +242,6 @@ body.light[data-color-theme="nord"] {
|
|
|
251
242
|
--text-tertiary: #4c566a;
|
|
252
243
|
--text-muted: #6b7589;
|
|
253
244
|
--chart-fill: rgba(94, 129, 172, 0.32);
|
|
254
|
-
--chart-1: #5e81ac;
|
|
255
245
|
}
|
|
256
246
|
|
|
257
247
|
/* Rosé Pine */
|
|
@@ -270,7 +260,6 @@ body[data-color-theme="rose-pine"]:not(.light) {
|
|
|
270
260
|
--text-tertiary: #908caa;
|
|
271
261
|
--text-muted: #6e6a86;
|
|
272
262
|
--chart-fill: rgba(196, 167, 231, 0.32);
|
|
273
|
-
--chart-1: #c4a7e7;
|
|
274
263
|
}
|
|
275
264
|
body.light[data-color-theme="rose-pine"] {
|
|
276
265
|
--accent: #907aa9;
|
|
@@ -281,13 +270,12 @@ body.light[data-color-theme="rose-pine"] {
|
|
|
281
270
|
--bg-surface: #faf4ed;
|
|
282
271
|
--bg-elevated: #fffaf3;
|
|
283
272
|
--bg-hover: #ebdfd4;
|
|
284
|
-
--border: #
|
|
273
|
+
--border: #cecacd;
|
|
285
274
|
--text-primary: #575279;
|
|
286
275
|
--text-secondary: #635e87;
|
|
287
|
-
--text-tertiary: #
|
|
288
|
-
--text-muted: #
|
|
276
|
+
--text-tertiary: #6e6a88;
|
|
277
|
+
--text-muted: #857f96;
|
|
289
278
|
--chart-fill: rgba(144, 122, 169, 0.32);
|
|
290
|
-
--chart-1: #907aa9;
|
|
291
279
|
}
|
|
292
280
|
|
|
293
281
|
/* Everforest */
|
|
@@ -306,24 +294,22 @@ body[data-color-theme="everforest"]:not(.light) {
|
|
|
306
294
|
--text-tertiary: #9da9a0;
|
|
307
295
|
--text-muted: #859289;
|
|
308
296
|
--chart-fill: rgba(167, 192, 128, 0.32);
|
|
309
|
-
--chart-1: #a7c080;
|
|
310
297
|
}
|
|
311
298
|
body.light[data-color-theme="everforest"] {
|
|
312
299
|
--accent: #6f8352;
|
|
313
300
|
--accent-text: #56683f;
|
|
314
301
|
--accent-dim: rgba(111,131,82,0.18);
|
|
315
302
|
--accent-glow: rgba(111, 131, 82, 0.5);
|
|
316
|
-
--bg-deep: #
|
|
317
|
-
--bg-surface: #
|
|
318
|
-
--bg-elevated: #
|
|
319
|
-
--bg-hover: #
|
|
320
|
-
--border: #
|
|
321
|
-
--text-primary: #
|
|
322
|
-
--text-secondary: #
|
|
323
|
-
--text-tertiary: #
|
|
324
|
-
--text-muted: #
|
|
303
|
+
--bg-deep: #ebeadb;
|
|
304
|
+
--bg-surface: #f5f4e8;
|
|
305
|
+
--bg-elevated: #fbfbf4;
|
|
306
|
+
--bg-hover: #e5e4d3;
|
|
307
|
+
--border: #d3d2bf;
|
|
308
|
+
--text-primary: #3d484e;
|
|
309
|
+
--text-secondary: #55636b;
|
|
310
|
+
--text-tertiary: #66705f;
|
|
311
|
+
--text-muted: #7a8577;
|
|
325
312
|
--chart-fill: rgba(111, 131, 82, 0.32);
|
|
326
|
-
--chart-1: #6f8352;
|
|
327
313
|
}
|
|
328
314
|
|
|
329
315
|
/* Kanagawa */
|
|
@@ -342,24 +328,22 @@ body[data-color-theme="kanagawa"]:not(.light) {
|
|
|
342
328
|
--text-tertiary: #a6a69c;
|
|
343
329
|
--text-muted: #727169;
|
|
344
330
|
--chart-fill: rgba(126, 156, 216, 0.32);
|
|
345
|
-
--chart-1: #7e9cd8;
|
|
346
331
|
}
|
|
347
332
|
body.light[data-color-theme="kanagawa"] {
|
|
348
333
|
--accent: #4d699b;
|
|
349
334
|
--accent-text: #38537f;
|
|
350
335
|
--accent-dim: rgba(77,105,155,0.18);
|
|
351
336
|
--accent-glow: rgba(77, 105, 155, 0.5);
|
|
352
|
-
--bg-deep: #
|
|
353
|
-
--bg-surface: #
|
|
354
|
-
--bg-elevated: #
|
|
355
|
-
--bg-hover: #
|
|
356
|
-
--border: #
|
|
337
|
+
--bg-deep: #e9e5d6;
|
|
338
|
+
--bg-surface: #f3f0e4;
|
|
339
|
+
--bg-elevated: #faf8f1;
|
|
340
|
+
--bg-hover: #e2ddcb;
|
|
341
|
+
--border: #d2ccb6;
|
|
357
342
|
--text-primary: #545464;
|
|
358
343
|
--text-secondary: #66667a;
|
|
359
344
|
--text-tertiary: #716e61;
|
|
360
345
|
--text-muted: #8a8775;
|
|
361
346
|
--chart-fill: rgba(77, 105, 155, 0.32);
|
|
362
|
-
--chart-1: #4d699b;
|
|
363
347
|
}
|
|
364
348
|
|
|
365
349
|
/* One Dark */
|
|
@@ -378,7 +362,6 @@ body[data-color-theme="one-dark"]:not(.light) {
|
|
|
378
362
|
--text-tertiary: #8b919e;
|
|
379
363
|
--text-muted: #5c6370;
|
|
380
364
|
--chart-fill: rgba(97, 175, 239, 0.32);
|
|
381
|
-
--chart-1: #61afef;
|
|
382
365
|
}
|
|
383
366
|
body.light[data-color-theme="one-dark"] {
|
|
384
367
|
--accent: #4078f2;
|
|
@@ -395,7 +378,6 @@ body.light[data-color-theme="one-dark"] {
|
|
|
395
378
|
--text-tertiary: #696c77;
|
|
396
379
|
--text-muted: #a0a1a7;
|
|
397
380
|
--chart-fill: rgba(64, 120, 242, 0.32);
|
|
398
|
-
--chart-1: #4078f2;
|
|
399
381
|
}
|
|
400
382
|
|
|
401
383
|
/* Night Owl */
|
|
@@ -414,7 +396,6 @@ body[data-color-theme="night-owl"]:not(.light) {
|
|
|
414
396
|
--text-tertiary: #8ba3b8;
|
|
415
397
|
--text-muted: #637777;
|
|
416
398
|
--chart-fill: rgba(130, 170, 255, 0.32);
|
|
417
|
-
--chart-1: #82aaff;
|
|
418
399
|
}
|
|
419
400
|
body.light[data-color-theme="night-owl"] {
|
|
420
401
|
--accent: #0c969b;
|
|
@@ -431,7 +412,6 @@ body.light[data-color-theme="night-owl"] {
|
|
|
431
412
|
--text-tertiary: #6f6e85;
|
|
432
413
|
--text-muted: #989fb1;
|
|
433
414
|
--chart-fill: rgba(12, 150, 155, 0.32);
|
|
434
|
-
--chart-1: #0c969b;
|
|
435
415
|
}
|
|
436
416
|
|
|
437
417
|
/* Monokai Pro */
|
|
@@ -450,11 +430,10 @@ body[data-color-theme="monokai"]:not(.light) {
|
|
|
450
430
|
--text-tertiary: #939293;
|
|
451
431
|
--text-muted: #727072;
|
|
452
432
|
--chart-fill: rgba(255, 216, 102, 0.32);
|
|
453
|
-
--chart-1: #ffd866;
|
|
454
433
|
}
|
|
455
434
|
body.light[data-color-theme="monokai"] {
|
|
456
435
|
--accent: #c08a00;
|
|
457
|
-
--accent-text: #
|
|
436
|
+
--accent-text: #856000;
|
|
458
437
|
--accent-dim: rgba(192,138,0,0.18);
|
|
459
438
|
--accent-glow: rgba(192, 138, 0, 0.5);
|
|
460
439
|
--bg-deep: #e9e6e4;
|
|
@@ -467,7 +446,6 @@ body.light[data-color-theme="monokai"] {
|
|
|
467
446
|
--text-tertiary: #6b686d;
|
|
468
447
|
--text-muted: #8d8a8d;
|
|
469
448
|
--chart-fill: rgba(192, 138, 0, 0.32);
|
|
470
|
-
--chart-1: #c08a00;
|
|
471
449
|
}
|
|
472
450
|
|
|
473
451
|
/* GitHub */
|
|
@@ -486,7 +464,6 @@ body[data-color-theme="github"]:not(.light) {
|
|
|
486
464
|
--text-tertiary: #959da5;
|
|
487
465
|
--text-muted: #6a737d;
|
|
488
466
|
--chart-fill: rgba(88, 166, 255, 0.32);
|
|
489
|
-
--chart-1: #58a6ff;
|
|
490
467
|
}
|
|
491
468
|
body.light[data-color-theme="github"] {
|
|
492
469
|
--accent: #0366d6;
|
|
@@ -503,7 +480,6 @@ body.light[data-color-theme="github"] {
|
|
|
503
480
|
--text-tertiary: #586069;
|
|
504
481
|
--text-muted: #6a737d;
|
|
505
482
|
--chart-fill: rgba(3, 102, 214, 0.32);
|
|
506
|
-
--chart-1: #0366d6;
|
|
507
483
|
}
|
|
508
484
|
|
|
509
485
|
/* Ayu */
|
|
@@ -522,13 +498,12 @@ body[data-color-theme="ayu"]:not(.light) {
|
|
|
522
498
|
--text-tertiary: #8a9199;
|
|
523
499
|
--text-muted: #6c7380;
|
|
524
500
|
--chart-fill: rgba(230, 180, 80, 0.32);
|
|
525
|
-
--chart-1: #e6b450;
|
|
526
501
|
}
|
|
527
502
|
body.light[data-color-theme="ayu"] {
|
|
528
|
-
--accent: #
|
|
529
|
-
--accent-text: #
|
|
530
|
-
--accent-dim: rgba(
|
|
531
|
-
--accent-glow: rgba(
|
|
503
|
+
--accent: #c97612;
|
|
504
|
+
--accent-text: #a65e0c;
|
|
505
|
+
--accent-dim: rgba(201,118,18,0.18);
|
|
506
|
+
--accent-glow: rgba(201, 118, 18, 0.5);
|
|
532
507
|
--bg-deep: #eff1f3;
|
|
533
508
|
--bg-surface: #f8f9fa;
|
|
534
509
|
--bg-elevated: #fcfcfc;
|
|
@@ -538,8 +513,7 @@ body.light[data-color-theme="ayu"] {
|
|
|
538
513
|
--text-secondary: #5c6166;
|
|
539
514
|
--text-tertiary: #787b80;
|
|
540
515
|
--text-muted: #8a9199;
|
|
541
|
-
--chart-fill: rgba(
|
|
542
|
-
--chart-1: #f2ae49;
|
|
516
|
+
--chart-fill: rgba(201, 118, 18, 0.32);
|
|
543
517
|
}
|
|
544
518
|
|
|
545
519
|
/* Vitesse */
|
|
@@ -558,7 +532,6 @@ body[data-color-theme="vitesse"]:not(.light) {
|
|
|
558
532
|
--text-tertiary: #8f8f85;
|
|
559
533
|
--text-muted: #758575;
|
|
560
534
|
--chart-fill: rgba(77, 147, 117, 0.32);
|
|
561
|
-
--chart-1: #4d9375;
|
|
562
535
|
}
|
|
563
536
|
body.light[data-color-theme="vitesse"] {
|
|
564
537
|
--accent: #1c6b48;
|
|
@@ -575,7 +548,6 @@ body.light[data-color-theme="vitesse"] {
|
|
|
575
548
|
--text-tertiary: #6b6d63;
|
|
576
549
|
--text-muted: #a0ada0;
|
|
577
550
|
--chart-fill: rgba(28, 107, 72, 0.32);
|
|
578
|
-
--chart-1: #1c6b48;
|
|
579
551
|
}
|
|
580
552
|
|
|
581
553
|
/* Synthwave '84 */
|
|
@@ -594,7 +566,6 @@ body[data-color-theme="synthwave"]:not(.light) {
|
|
|
594
566
|
--text-tertiary: #b6b1d8;
|
|
595
567
|
--text-muted: #848bbd;
|
|
596
568
|
--chart-fill: rgba(255, 126, 219, 0.32);
|
|
597
|
-
--chart-1: #ff7edb;
|
|
598
569
|
}
|
|
599
570
|
body.light[data-color-theme="synthwave"] {
|
|
600
571
|
--accent: #c936a6;
|
|
@@ -611,5 +582,4 @@ body.light[data-color-theme="synthwave"] {
|
|
|
611
582
|
--text-tertiary: #5c5380;
|
|
612
583
|
--text-muted: #7d76a3;
|
|
613
584
|
--chart-fill: rgba(201, 54, 166, 0.32);
|
|
614
|
-
--chart-1: #c936a6;
|
|
615
585
|
}
|
package/server.js
CHANGED
|
@@ -411,6 +411,33 @@ function decodeProjectPath(encoded) {
|
|
|
411
411
|
} catch { return encoded; }
|
|
412
412
|
}
|
|
413
413
|
|
|
414
|
+
// The folder name is lossy (separators and hyphens both become "-"), so the cwd a transcript
|
|
415
|
+
// records names the project; the decode is the fallback for folders with no cwd line.
|
|
416
|
+
const CWD_RE = /"cwd":"((?:[^"\\]|\\.)*)"/;
|
|
417
|
+
const projectNames = new Map();
|
|
418
|
+
|
|
419
|
+
function readCwd(filePath) {
|
|
420
|
+
let fd;
|
|
421
|
+
try {
|
|
422
|
+
fd = fs.openSync(filePath, 'r');
|
|
423
|
+
const buf = Buffer.alloc(64 * 1024);
|
|
424
|
+
const n = fs.readSync(fd, buf, 0, buf.length, 0);
|
|
425
|
+
const m = buf.toString('utf-8', 0, n).match(CWD_RE);
|
|
426
|
+
return m ? JSON.parse(`"${m[1]}"`) : null;
|
|
427
|
+
} catch { return null; } finally {
|
|
428
|
+
if (fd !== undefined) fs.closeSync(fd);
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
function projectName(encodedPath, files) {
|
|
433
|
+
if (projectNames.has(encodedPath)) return projectNames.get(encodedPath);
|
|
434
|
+
const cwd = files.slice(0, 3).map(readCwd).find(Boolean);
|
|
435
|
+
if (!cwd) return decodeProjectPath(encodedPath);
|
|
436
|
+
const name = cwd.split(/[\\/]/).filter(Boolean).pop() || decodeProjectPath(encodedPath);
|
|
437
|
+
projectNames.set(encodedPath, name);
|
|
438
|
+
return name;
|
|
439
|
+
}
|
|
440
|
+
|
|
414
441
|
function getSessionIdFromFile(filePath) {
|
|
415
442
|
return path.basename(filePath, '.jsonl');
|
|
416
443
|
}
|
|
@@ -859,7 +886,7 @@ async function getOverviewData(range, projectFilter) {
|
|
|
859
886
|
if (projSessions > 0) {
|
|
860
887
|
projectSummaries.push({
|
|
861
888
|
encodedPath,
|
|
862
|
-
name:
|
|
889
|
+
name: projectName(encodedPath, proj.files),
|
|
863
890
|
totalCost: projCost,
|
|
864
891
|
sessionCount: projSessions,
|
|
865
892
|
lastActive: projLastActive,
|
|
@@ -935,7 +962,7 @@ async function getProjectsData(range, projectFilter) {
|
|
|
935
962
|
if (sessionCount > 0) {
|
|
936
963
|
result.push({
|
|
937
964
|
encodedPath,
|
|
938
|
-
name:
|
|
965
|
+
name: projectName(encodedPath, proj.files),
|
|
939
966
|
totalCost,
|
|
940
967
|
sessionCount,
|
|
941
968
|
lastActive,
|
|
@@ -1103,7 +1130,7 @@ async function getSessionDetailData(sessionId) {
|
|
|
1103
1130
|
const result = {
|
|
1104
1131
|
sessionId,
|
|
1105
1132
|
customTitle: session.customTitle,
|
|
1106
|
-
projectPath:
|
|
1133
|
+
projectPath: projectName(encodedPath, [matchingFile]),
|
|
1107
1134
|
encodedProjectPath: encodedPath,
|
|
1108
1135
|
totalCost: session.totalCost,
|
|
1109
1136
|
inputTokens: session.inputTokens,
|