claude-code-cost 1.5.0 → 1.6.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/package.json +2 -1
- package/public/app.js +104 -52
- package/public/index.html +4 -1
- package/public/style.css +149 -21
- package/public/themes.css +61 -61
- package/public/vendor/claude-hub-sdk.js +20 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-code-cost",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "Cost dashboard for Claude Code usage",
|
|
5
5
|
"main": "server.js",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
"open": "^11.0.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
+
"@biomejs/biome": "2.4.10",
|
|
24
25
|
"husky": "^9.0.0"
|
|
25
26
|
},
|
|
26
27
|
"keywords": [
|
package/public/app.js
CHANGED
|
@@ -726,8 +726,8 @@ function renderOverview() {
|
|
|
726
726
|
<table class="data-table">
|
|
727
727
|
<thead><tr>
|
|
728
728
|
<th class="${thClass('name')}" onclick="sortBy('name')">Project ${sortArrow('name')}</th>
|
|
729
|
-
<th class="${thClass('totalCost')}" onclick="sortBy('totalCost')">Cost ${sortArrow('totalCost')}</th>
|
|
730
|
-
<th class="${thClass('sessionCount')}" onclick="sortBy('sessionCount')">Sessions ${sortArrow('sessionCount')}</th>
|
|
729
|
+
<th class="num ${thClass('totalCost')}" onclick="sortBy('totalCost')">Cost ${sortArrow('totalCost')}</th>
|
|
730
|
+
<th class="num ${thClass('sessionCount')}" onclick="sortBy('sessionCount')">Sessions ${sortArrow('sessionCount')}</th>
|
|
731
731
|
<th class="${thClass('lastActive')}" onclick="sortBy('lastActive')">Last Active ${sortArrow('lastActive')}</th>
|
|
732
732
|
<th>Model</th>
|
|
733
733
|
</tr></thead>
|
|
@@ -739,7 +739,7 @@ function renderOverview() {
|
|
|
739
739
|
<tr data-clickable onclick="navigateToSessions('${escAttrJs(p.encodedPath)}', '${escAttrJs(p.name)}')">
|
|
740
740
|
<td>${esc(p.name)}</td>
|
|
741
741
|
<td class="cost-cell">${formatCost(p.totalCost)}</td>
|
|
742
|
-
<td>${p.sessionCount}</td>
|
|
742
|
+
<td class="num">${p.sessionCount}</td>
|
|
743
743
|
<td class="muted">${timeAgo(p.lastActive)}</td>
|
|
744
744
|
<td><span class="model-badge">${esc(shortModel(p.primaryModel))}</span></td>
|
|
745
745
|
</tr>`,
|
|
@@ -774,6 +774,10 @@ function heatmapDayLabel(dateStr) {
|
|
|
774
774
|
// early-morning hours.
|
|
775
775
|
const HEATMAP_START_HOUR = 6;
|
|
776
776
|
|
|
777
|
+
const HEATMAP_SWATCHES = [0, 0.25, 0.5, 0.75, 1]
|
|
778
|
+
.map((s) => `<span class="hm-swatch"><i style="opacity:${s}"></i></span>`)
|
|
779
|
+
.join('');
|
|
780
|
+
|
|
777
781
|
function ampm(h) {
|
|
778
782
|
if (h === 0) return '12am';
|
|
779
783
|
if (h === 12) return '12pm';
|
|
@@ -792,6 +796,9 @@ function buildHeatmap(hm, days, today) {
|
|
|
792
796
|
if (max === 0) return '<div class="empty-state"><div>No activity in this range</div></div>';
|
|
793
797
|
const labels = days.map(heatmapDayLabel);
|
|
794
798
|
const hourAt = (col) => (col + HEATMAP_START_HOUR) % 24;
|
|
799
|
+
const cellDay = (d, h) => (h < HEATMAP_START_HOUR ? (labels[d + 1] ?? labels[d]) : labels[d]);
|
|
800
|
+
const peakDay = rowCosts.findIndex((row) => row.includes(max));
|
|
801
|
+
const peakCol = rowCosts[peakDay].indexOf(max);
|
|
795
802
|
const hours = Array.from(
|
|
796
803
|
{ length: 24 },
|
|
797
804
|
(_, col) => `<span class="hm-hour">${hourAt(col) % 3 === 0 ? ampm(hourAt(col)) : ''}</span>`,
|
|
@@ -805,8 +812,9 @@ function buildHeatmap(hm, days, today) {
|
|
|
805
812
|
${rowCosts[d]
|
|
806
813
|
.map((cost, col) => {
|
|
807
814
|
const h = hourAt(col);
|
|
815
|
+
const cell = d === peakDay && col === peakCol ? '<span class="hm-cell hm-peak"' : '<span class="hm-cell"';
|
|
808
816
|
return `
|
|
809
|
-
|
|
817
|
+
${cell} data-hm="${cellDay(d, h)}|${h}|${cost}">
|
|
810
818
|
<i style="opacity:${cost > 0 ? Math.max(0.12, cost / max).toFixed(2) : 0}"></i>
|
|
811
819
|
</span>`;
|
|
812
820
|
})
|
|
@@ -814,7 +822,13 @@ function buildHeatmap(hm, days, today) {
|
|
|
814
822
|
</div>`;
|
|
815
823
|
})
|
|
816
824
|
.join('');
|
|
817
|
-
|
|
825
|
+
const peakHour = hourAt(peakCol);
|
|
826
|
+
const foot = `
|
|
827
|
+
<div class="hm-foot">
|
|
828
|
+
<span class="hm-peak-label">Peak: ${esc(cellDay(peakDay, peakHour))}, ${ampm(peakHour)} · <strong>${formatCost(max)}</strong></span>
|
|
829
|
+
<span class="hm-legend">$0 ${HEATMAP_SWATCHES} ${formatCost(max)}/h</span>
|
|
830
|
+
</div>`;
|
|
831
|
+
return `<div class="heatmap">${rows}<div class="hm-row"><span class="hm-day"></span>${hours}</div>${foot}</div>`;
|
|
818
832
|
}
|
|
819
833
|
|
|
820
834
|
// Shared floating tooltip for heatmap cells — the native title attr is too slow and unstyled.
|
|
@@ -966,7 +980,7 @@ function renderInsights() {
|
|
|
966
980
|
<div class="section-title">5-Hour Billing Blocks</div>
|
|
967
981
|
<table class="data-table">
|
|
968
982
|
<thead><tr>
|
|
969
|
-
<th>Block</th><th>Status</th><th>Messages</th><th>Tokens</th><th>Cost</th><th>Models</th>
|
|
983
|
+
<th>Block</th><th>Status</th><th class="num">Messages</th><th class="num">Tokens</th><th class="num">Cost</th><th>Models</th>
|
|
970
984
|
</tr></thead>
|
|
971
985
|
<tbody>
|
|
972
986
|
${d.blocks
|
|
@@ -975,8 +989,8 @@ function renderInsights() {
|
|
|
975
989
|
<tr>
|
|
976
990
|
<td>${blockSpanLabel(b)}</td>
|
|
977
991
|
<td>${b.active ? `<span class="block-badge active">ACTIVE · ${formatDuration(b.burn.remainingMin)} left</span>` : `<span class="block-badge">ended ${timeAgo(b.lastActivity)}</span>`}</td>
|
|
978
|
-
<td>${b.messageCount}</td>
|
|
979
|
-
<td>${formatTokens(b.tokens)}</td>
|
|
992
|
+
<td class="num">${b.messageCount}</td>
|
|
993
|
+
<td class="num">${formatTokens(b.tokens)}</td>
|
|
980
994
|
<td class="cost-cell">${formatCost(b.cost)}</td>
|
|
981
995
|
<td>${b.models.map((m) => `<span class="model-badge">${esc(shortModel(m))}</span>`).join(' ')}</td>
|
|
982
996
|
</tr>`,
|
|
@@ -1031,8 +1045,9 @@ function renderSessions() {
|
|
|
1031
1045
|
${PARENT_BREADCRUMB}
|
|
1032
1046
|
<span class="sep">/</span>
|
|
1033
1047
|
<span class="current">${esc(currentProjectName || 'Project')}</span>
|
|
1048
|
+
<span class="breadcrumb-total"><span class="cost">${formatCost(sessionsData.reduce((s, x) => s + x.totalCost, 0))}</span> · ${sessionsData.length} sessions</span>
|
|
1034
1049
|
</div>
|
|
1035
|
-
<div class="charts-row" style="grid-template-columns:3fr 2fr
|
|
1050
|
+
<div class="charts-row" style="grid-template-columns:3fr 2fr">
|
|
1036
1051
|
<div class="chart-box">
|
|
1037
1052
|
<div class="chart-title">${costSeriesTitle(sessionsCostSeries)}</div>
|
|
1038
1053
|
<canvas id="sessionsCostChart"></canvas>
|
|
@@ -1041,20 +1056,15 @@ function renderSessions() {
|
|
|
1041
1056
|
<div class="chart-title">Cost by Model</div>
|
|
1042
1057
|
<canvas id="sessionsModelChart"></canvas>
|
|
1043
1058
|
</div>
|
|
1044
|
-
<div class="chart-box" style="display:flex;flex-direction:column;justify-content:center;align-items:center;min-width:120px">
|
|
1045
|
-
<div class="chart-title">Total Cost</div>
|
|
1046
|
-
<div style="font-size:22px;font-weight:700;color:var(--accent)">${formatCost(sessionsData.reduce((s, x) => s + x.totalCost, 0))}</div>
|
|
1047
|
-
<div style="color:var(--text-tertiary);font-size:12px;margin-top:4px">${sessionsData.length} sessions</div>
|
|
1048
|
-
</div>
|
|
1049
1059
|
</div>
|
|
1050
1060
|
|
|
1051
1061
|
<table class="data-table">
|
|
1052
1062
|
<thead><tr>
|
|
1053
1063
|
<th class="${thClass('firstPrompt')}" onclick="sortBy('firstPrompt')">Session ${sortArrow('firstPrompt')}</th>
|
|
1054
|
-
<th class="${thClass('totalCost')}" onclick="sortBy('totalCost')">Cost ${sortArrow('totalCost')}</th>
|
|
1055
|
-
<th class="${thClass('totalTokens')}" onclick="sortBy('totalTokens')">Tokens ${sortArrow('totalTokens')}</th>
|
|
1056
|
-
<th class="${thClass('messageCount')}" onclick="sortBy('messageCount')">Messages ${sortArrow('messageCount')}</th>
|
|
1057
|
-
<th class="${thClass('durationMinutes')}" onclick="sortBy('durationMinutes')">Duration ${sortArrow('durationMinutes')}</th>
|
|
1064
|
+
<th class="num ${thClass('totalCost')}" onclick="sortBy('totalCost')">Cost ${sortArrow('totalCost')}</th>
|
|
1065
|
+
<th class="num ${thClass('totalTokens')}" onclick="sortBy('totalTokens')">Tokens ${sortArrow('totalTokens')}</th>
|
|
1066
|
+
<th class="num ${thClass('messageCount')}" onclick="sortBy('messageCount')">Messages ${sortArrow('messageCount')}</th>
|
|
1067
|
+
<th class="num ${thClass('durationMinutes')}" onclick="sortBy('durationMinutes')">Duration ${sortArrow('durationMinutes')}</th>
|
|
1058
1068
|
<th>Model</th>
|
|
1059
1069
|
<th class="${thClass('lastTimestamp')}" onclick="sortBy('lastTimestamp')">Last Active ${sortArrow('lastTimestamp')}</th>
|
|
1060
1070
|
</tr></thead>
|
|
@@ -1066,9 +1076,9 @@ function renderSessions() {
|
|
|
1066
1076
|
<tr data-clickable onclick="navigateToDetail('${escAttrJs(s.sessionId)}')">
|
|
1067
1077
|
<td class="truncate" title="${esc(s.customTitle || s.firstPrompt || s.sessionId)}">${esc(s.customTitle || s.firstPrompt || s.sessionId)}</td>
|
|
1068
1078
|
<td class="cost-cell">${formatCost(s.totalCost)}</td>
|
|
1069
|
-
<td>${formatTokens(s.totalTokens)}</td>
|
|
1070
|
-
<td>${s.
|
|
1071
|
-
<td class="muted">${formatDuration(s.durationMinutes)}</td>
|
|
1079
|
+
<td class="num">${formatTokens(s.totalTokens)}</td>
|
|
1080
|
+
<td class="num">${s.compactions?.count ? `<span class="compaction-tag" title="${esc(`${s.compactions.count} compaction(s), ~${formatCost(s.compactions.totalCost)}`)}">${s.compactions.count}× compact</span> ` : ''}${s.messageCount}</td>
|
|
1081
|
+
<td class="muted num">${formatDuration(s.durationMinutes)}</td>
|
|
1072
1082
|
<td><span class="model-badge">${esc(shortModel(s.primaryModel))}</span></td>
|
|
1073
1083
|
<td class="muted">${timeAgo(s.lastTimestamp)}</td>
|
|
1074
1084
|
</tr>`,
|
|
@@ -1148,7 +1158,7 @@ function renderDetail() {
|
|
|
1148
1158
|
</div>
|
|
1149
1159
|
<div class="detail-stat">
|
|
1150
1160
|
<div class="detail-label">Models</div>
|
|
1151
|
-
<div class="detail-value">${esc(d.models.map((m) => shortModel(m)).join(', '))}</div>
|
|
1161
|
+
<div class="detail-value models">${esc(d.models.map((m) => shortModel(m)).join(', '))}</div>
|
|
1152
1162
|
</div>
|
|
1153
1163
|
${compactionStat(d.compactions)}
|
|
1154
1164
|
</div>
|
|
@@ -1189,15 +1199,15 @@ function renderDetail() {
|
|
|
1189
1199
|
<div class="section-title" id="messagesTitle"></div>
|
|
1190
1200
|
<table class="messages-table">
|
|
1191
1201
|
<thead><tr>
|
|
1192
|
-
<th>#</th>
|
|
1202
|
+
<th class="num">#</th>
|
|
1193
1203
|
<th>Time</th>
|
|
1194
1204
|
<th>Model</th>
|
|
1195
|
-
<th>Input</th>
|
|
1196
|
-
<th>Output</th>
|
|
1197
|
-
<th>Cache Cr.</th>
|
|
1198
|
-
<th>Cache Rd.</th>
|
|
1199
|
-
<th>Cost</th>
|
|
1200
|
-
<th>Cumulative</th>
|
|
1205
|
+
<th class="num">Input</th>
|
|
1206
|
+
<th class="num">Output</th>
|
|
1207
|
+
<th class="num">Cache Cr.</th>
|
|
1208
|
+
<th class="num">Cache Rd.</th>
|
|
1209
|
+
<th class="num">Cost</th>
|
|
1210
|
+
<th class="num">Cumulative</th>
|
|
1201
1211
|
</tr></thead>
|
|
1202
1212
|
<tbody id="messagesBody"></tbody>
|
|
1203
1213
|
</table>
|
|
@@ -1273,10 +1283,10 @@ function workflowsSection(d) {
|
|
|
1273
1283
|
const mins = Math.round((new Date(w.lastTimestamp) - new Date(w.firstTimestamp)) / 60000);
|
|
1274
1284
|
return `<tr>
|
|
1275
1285
|
<td>${esc(w.name)}</td>
|
|
1276
|
-
<td>${w.agents}</td>
|
|
1277
|
-
<td class="muted">${mins} min</td>
|
|
1278
|
-
<td>${formatTokens(w.inputTokens + w.cacheCreationTokens + w.cacheReadTokens)}</td>
|
|
1279
|
-
<td>${formatTokens(w.outputTokens)}</td>
|
|
1286
|
+
<td class="num">${w.agents}</td>
|
|
1287
|
+
<td class="muted num">${mins} min</td>
|
|
1288
|
+
<td class="num">${formatTokens(w.inputTokens + w.cacheCreationTokens + w.cacheReadTokens)}</td>
|
|
1289
|
+
<td class="num">${formatTokens(w.outputTokens)}</td>
|
|
1280
1290
|
<td class="cost-cell">${formatCost(w.totalCost)}</td>
|
|
1281
1291
|
<td>${meter(pct, { label: `${pct}%`, ariaLabel: `${pct}% of session cost` })}</td>
|
|
1282
1292
|
</tr>`;
|
|
@@ -1287,11 +1297,11 @@ function workflowsSection(d) {
|
|
|
1287
1297
|
<table class="messages-table" style="margin-bottom:20px">
|
|
1288
1298
|
<thead><tr>
|
|
1289
1299
|
<th>Workflow</th>
|
|
1290
|
-
<th>Agents</th>
|
|
1291
|
-
<th>Span</th>
|
|
1292
|
-
<th>Input</th>
|
|
1293
|
-
<th>Output</th>
|
|
1294
|
-
<th>Cost</th>
|
|
1300
|
+
<th class="num">Agents</th>
|
|
1301
|
+
<th class="num">Span</th>
|
|
1302
|
+
<th class="num">Input</th>
|
|
1303
|
+
<th class="num">Output</th>
|
|
1304
|
+
<th class="num">Cost</th>
|
|
1295
1305
|
<th>Share</th>
|
|
1296
1306
|
</tr></thead>
|
|
1297
1307
|
<tbody>${rows}</tbody>
|
|
@@ -1325,13 +1335,13 @@ function buildMessageRow(m) {
|
|
|
1325
1335
|
? ` class="subagent-row" data-clickable onclick="navigateToAgent('${escAttrJs(sa.agentId)}')" title="${esc(`${sa.messageCount} turns · open subagent`)}"`
|
|
1326
1336
|
: '';
|
|
1327
1337
|
return `<tr${rowAttrs}>
|
|
1328
|
-
<td class="muted">${m.index}</td>
|
|
1338
|
+
<td class="muted num">${m.index}</td>
|
|
1329
1339
|
<td class="muted">${localTime(m.timestamp)}</td>
|
|
1330
1340
|
<td>${modelCol}</td>
|
|
1331
|
-
<td>${formatTokens(m.inputTokens)}</td>
|
|
1332
|
-
<td>${formatTokens(m.outputTokens)}</td>
|
|
1333
|
-
<td>${formatTokens(m.cacheCreationTokens)}</td>
|
|
1334
|
-
<td>${formatTokens(m.cacheReadTokens)}</td>
|
|
1341
|
+
<td class="num">${formatTokens(m.inputTokens)}</td>
|
|
1342
|
+
<td class="num">${formatTokens(m.outputTokens)}</td>
|
|
1343
|
+
<td class="num">${formatTokens(m.cacheCreationTokens)}</td>
|
|
1344
|
+
<td class="num">${formatTokens(m.cacheReadTokens)}</td>
|
|
1335
1345
|
<td class="cost-cell">${formatCost(m.cost)}</td>
|
|
1336
1346
|
<td class="cumulative">${formatCost(m.cumulativeCost)}</td>
|
|
1337
1347
|
</tr>`;
|
|
@@ -1384,6 +1394,7 @@ function messageTooltipTitle(messages, items) {
|
|
|
1384
1394
|
|
|
1385
1395
|
// Takes the palette the caller already read, so a chart costs one getComputedStyle, not two.
|
|
1386
1396
|
function chartDefaults(c = getChartColors()) {
|
|
1397
|
+
Chart.defaults.font.family = c.mono;
|
|
1387
1398
|
return {
|
|
1388
1399
|
responsive: true,
|
|
1389
1400
|
maintainAspectRatio: false,
|
|
@@ -1409,11 +1420,11 @@ function chartDefaults(c = getChartColors()) {
|
|
|
1409
1420
|
},
|
|
1410
1421
|
scales: {
|
|
1411
1422
|
x: {
|
|
1412
|
-
ticks: { color: c.text, font: { size:
|
|
1423
|
+
ticks: { color: c.text, font: { size: 11 }, maxRotation: 0, autoSkipPadding: 12 },
|
|
1413
1424
|
grid: { color: c.border, drawBorder: false },
|
|
1414
1425
|
},
|
|
1415
1426
|
y: {
|
|
1416
|
-
ticks: { color: c.text, font: { size:
|
|
1427
|
+
ticks: { color: c.text, font: { size: 11 } },
|
|
1417
1428
|
grid: { color: c.border, drawBorder: false },
|
|
1418
1429
|
},
|
|
1419
1430
|
},
|
|
@@ -1529,7 +1540,7 @@ function renderCostChart(series, canvasId = 'costChart', chartKey = 'cost', dist
|
|
|
1529
1540
|
legend: {
|
|
1530
1541
|
display: models.length > 1,
|
|
1531
1542
|
position: 'bottom',
|
|
1532
|
-
labels: { color: c.text, font: { size:
|
|
1543
|
+
labels: { color: c.text, font: { size: 11 }, boxWidth: 8, boxHeight: 8 },
|
|
1533
1544
|
},
|
|
1534
1545
|
},
|
|
1535
1546
|
scales: {
|
|
@@ -1684,7 +1695,7 @@ function renderCumulativeChart(messages) {
|
|
|
1684
1695
|
...defaults.scales,
|
|
1685
1696
|
x: {
|
|
1686
1697
|
...defaults.scales.x,
|
|
1687
|
-
title: { display: true, text: 'Message #', color: c.text, font: { size:
|
|
1698
|
+
title: { display: true, text: 'Message #', color: c.text, font: { size: 11 } },
|
|
1688
1699
|
},
|
|
1689
1700
|
y: {
|
|
1690
1701
|
...defaults.scales.y,
|
|
@@ -1962,6 +1973,7 @@ function rangeBrushHtml(total) {
|
|
|
1962
1973
|
<div class="range-brush" id="rangeBrush">
|
|
1963
1974
|
<div class="rb-head">
|
|
1964
1975
|
<span class="rb-label"><span class="rb-scope"></span><span class="rb-burst-count" hidden><i></i></span></span>
|
|
1976
|
+
<span class="rb-hint">Drag the window or use ← → to pick messages</span>
|
|
1965
1977
|
<div class="rb-presets" role="group" aria-label="Window size">
|
|
1966
1978
|
${presets}
|
|
1967
1979
|
<button type="button" class="rb-preset" data-size="all">All</button>
|
|
@@ -3129,9 +3141,9 @@ function helpKeys(row, mac = IS_MAC, keyLabel = hub.keyLabel) {
|
|
|
3129
3141
|
|
|
3130
3142
|
// Interleaves each pair's rows left-then-right so CSS grid auto-placement lands
|
|
3131
3143
|
// them on shared row tracks (see .shortcuts in style.css).
|
|
3132
|
-
function buildHelpShortcuts() {
|
|
3144
|
+
function buildHelpShortcuts(pairs = SHORTCUT_PAIRS) {
|
|
3133
3145
|
const cells = [];
|
|
3134
|
-
|
|
3146
|
+
pairs.forEach(([left, right = EMPTY_GROUP], pair) => {
|
|
3135
3147
|
const first = pair === 0 ? ' sc-first' : '';
|
|
3136
3148
|
const sides = [
|
|
3137
3149
|
[left, 'sc-l'],
|
|
@@ -3384,13 +3396,53 @@ function renderLimits() {
|
|
|
3384
3396
|
`;
|
|
3385
3397
|
}
|
|
3386
3398
|
|
|
3387
|
-
|
|
3399
|
+
// The matching rows of every group, paired again two groups to a row.
|
|
3400
|
+
function filteredShortcutPairs(query) {
|
|
3401
|
+
const q = query.toLowerCase();
|
|
3402
|
+
const groups = SHORTCUT_PAIRS.flat()
|
|
3403
|
+
.filter((g) => !g.hub || hub.status !== 'standalone')
|
|
3404
|
+
.map((g) => ({
|
|
3405
|
+
...g,
|
|
3406
|
+
rows: g.rows.filter((r) => `${r.label} ${helpKeys(r).join(' ')}`.toLowerCase().includes(q)),
|
|
3407
|
+
}))
|
|
3408
|
+
.filter((g) => g.rows.length);
|
|
3409
|
+
const pairs = [];
|
|
3410
|
+
for (let i = 0; i < groups.length; i += 2) pairs.push(groups.slice(i, i + 2));
|
|
3411
|
+
return pairs;
|
|
3412
|
+
}
|
|
3413
|
+
|
|
3414
|
+
function renderHelpShortcuts() {
|
|
3388
3415
|
const list = document.getElementById('helpShortcuts');
|
|
3389
|
-
|
|
3416
|
+
const query = document.getElementById('helpFilter').value.trim();
|
|
3417
|
+
const pairs = query ? filteredShortcutPairs(query) : SHORTCUT_PAIRS;
|
|
3418
|
+
list.innerHTML = pairs.length
|
|
3419
|
+
? buildHelpShortcuts(pairs)
|
|
3420
|
+
: `<div class="sc-empty">No shortcut matches "${esc(query)}"</div>`;
|
|
3390
3421
|
list.classList.toggle('sc-standalone', hub.status === 'standalone');
|
|
3391
|
-
document.getElementById('helpModal').classList.toggle('visible');
|
|
3392
3422
|
}
|
|
3393
3423
|
|
|
3424
|
+
function toggleHelpModal() {
|
|
3425
|
+
const modal = document.getElementById('helpModal');
|
|
3426
|
+
const filter = document.getElementById('helpFilter');
|
|
3427
|
+
if (modal.classList.toggle('visible')) {
|
|
3428
|
+
filter.value = '';
|
|
3429
|
+
renderHelpShortcuts();
|
|
3430
|
+
filter.focus();
|
|
3431
|
+
}
|
|
3432
|
+
}
|
|
3433
|
+
|
|
3434
|
+
document.getElementById('helpFilter').addEventListener('input', renderHelpShortcuts);
|
|
3435
|
+
// The page's key handler skips text fields, so the filter handles its own Esc.
|
|
3436
|
+
document.getElementById('helpFilter').addEventListener('keydown', (e) => {
|
|
3437
|
+
if (e.key !== 'Escape') return;
|
|
3438
|
+
e.preventDefault();
|
|
3439
|
+
e.stopPropagation();
|
|
3440
|
+
if (e.target.value) {
|
|
3441
|
+
e.target.value = '';
|
|
3442
|
+
renderHelpShortcuts();
|
|
3443
|
+
} else toggleHelpModal();
|
|
3444
|
+
});
|
|
3445
|
+
|
|
3394
3446
|
// #endregion
|
|
3395
3447
|
|
|
3396
3448
|
// #region KEYBOARD_SHORTCUTS
|
package/public/index.html
CHANGED
|
@@ -110,7 +110,10 @@
|
|
|
110
110
|
<p>Pricing is fetched live and cached for 6 hours. If the fetch fails, a bundled offline snapshot is used as fallback. This dashboard is read-only.</p>
|
|
111
111
|
</div>
|
|
112
112
|
<hr class="modal-divider">
|
|
113
|
-
<
|
|
113
|
+
<div class="help-bar">
|
|
114
|
+
<h4 class="shortcut-section">Keyboard Shortcuts</h4>
|
|
115
|
+
<input type="search" id="helpFilter" class="help-filter" placeholder="Filter shortcuts" aria-label="Filter shortcuts" autocomplete="off" data-bwignore data-1p-ignore data-lpignore="true" spellcheck="false">
|
|
116
|
+
</div>
|
|
114
117
|
<dl class="shortcuts" id="helpShortcuts"></dl>
|
|
115
118
|
</div>
|
|
116
119
|
</div>
|
package/public/style.css
CHANGED
|
@@ -393,7 +393,7 @@ body {
|
|
|
393
393
|
/* Shared by the Shortcuts header and the From/To field captions. */
|
|
394
394
|
.range-head-label {
|
|
395
395
|
display: block;
|
|
396
|
-
font-size:
|
|
396
|
+
font-size: 11px;
|
|
397
397
|
letter-spacing: 0.12em;
|
|
398
398
|
text-transform: uppercase;
|
|
399
399
|
color: var(--text-muted);
|
|
@@ -487,8 +487,8 @@ body {
|
|
|
487
487
|
background: var(--bg-surface);
|
|
488
488
|
color: var(--text-tertiary);
|
|
489
489
|
border-radius: 4px;
|
|
490
|
-
width:
|
|
491
|
-
height:
|
|
490
|
+
width: 24px;
|
|
491
|
+
height: 24px;
|
|
492
492
|
display: flex;
|
|
493
493
|
align-items: center;
|
|
494
494
|
justify-content: center;
|
|
@@ -507,7 +507,7 @@ body {
|
|
|
507
507
|
height: 9px;
|
|
508
508
|
}
|
|
509
509
|
.range-nav-gap {
|
|
510
|
-
width:
|
|
510
|
+
width: 24px;
|
|
511
511
|
}
|
|
512
512
|
|
|
513
513
|
.range-dow,
|
|
@@ -516,7 +516,7 @@ body {
|
|
|
516
516
|
grid-template-columns: repeat(7, 1fr);
|
|
517
517
|
}
|
|
518
518
|
.range-dow span {
|
|
519
|
-
font-size:
|
|
519
|
+
font-size: 11px;
|
|
520
520
|
text-align: center;
|
|
521
521
|
color: var(--text-muted);
|
|
522
522
|
letter-spacing: 0.06em;
|
|
@@ -537,7 +537,7 @@ body {
|
|
|
537
537
|
}
|
|
538
538
|
.range-day.off {
|
|
539
539
|
color: var(--text-muted);
|
|
540
|
-
opacity: 0.
|
|
540
|
+
opacity: 0.75;
|
|
541
541
|
cursor: default;
|
|
542
542
|
}
|
|
543
543
|
.range-day.today::after {
|
|
@@ -556,7 +556,7 @@ body {
|
|
|
556
556
|
}
|
|
557
557
|
.range-day.in {
|
|
558
558
|
background: var(--accent-dim);
|
|
559
|
-
color: var(--
|
|
559
|
+
color: var(--text-primary);
|
|
560
560
|
}
|
|
561
561
|
.range-day.edge {
|
|
562
562
|
background: var(--accent);
|
|
@@ -678,7 +678,7 @@ body {
|
|
|
678
678
|
}
|
|
679
679
|
|
|
680
680
|
.stat-card .card-label {
|
|
681
|
-
font-size:
|
|
681
|
+
font-size: 11px;
|
|
682
682
|
text-transform: uppercase;
|
|
683
683
|
letter-spacing: 0.05em;
|
|
684
684
|
color: var(--text-muted);
|
|
@@ -697,7 +697,7 @@ body {
|
|
|
697
697
|
}
|
|
698
698
|
|
|
699
699
|
.stat-card .card-sub {
|
|
700
|
-
font-size:
|
|
700
|
+
font-size: 11px;
|
|
701
701
|
color: var(--text-muted);
|
|
702
702
|
margin-top: 4px;
|
|
703
703
|
}
|
|
@@ -791,7 +791,7 @@ body {
|
|
|
791
791
|
overflow-x: hidden;
|
|
792
792
|
overflow-y: auto;
|
|
793
793
|
font-family: var(--mono);
|
|
794
|
-
font-size:
|
|
794
|
+
font-size: 11px;
|
|
795
795
|
color: var(--text-secondary);
|
|
796
796
|
}
|
|
797
797
|
|
|
@@ -820,9 +820,10 @@ body {
|
|
|
820
820
|
}
|
|
821
821
|
|
|
822
822
|
.share-name {
|
|
823
|
+
display: -webkit-box;
|
|
824
|
+
-webkit-box-orient: vertical;
|
|
825
|
+
-webkit-line-clamp: 2;
|
|
823
826
|
overflow: hidden;
|
|
824
|
-
text-overflow: ellipsis;
|
|
825
|
-
white-space: nowrap;
|
|
826
827
|
}
|
|
827
828
|
|
|
828
829
|
.share-cost {
|
|
@@ -957,6 +958,13 @@ body {
|
|
|
957
958
|
color: var(--text-muted);
|
|
958
959
|
}
|
|
959
960
|
|
|
961
|
+
.rb-hint {
|
|
962
|
+
margin-left: auto;
|
|
963
|
+
font-size: 11px;
|
|
964
|
+
color: var(--text-muted);
|
|
965
|
+
white-space: nowrap;
|
|
966
|
+
}
|
|
967
|
+
|
|
960
968
|
.rb-presets {
|
|
961
969
|
display: flex;
|
|
962
970
|
gap: 4px;
|
|
@@ -970,7 +978,8 @@ body {
|
|
|
970
978
|
background: transparent;
|
|
971
979
|
border: 1px solid var(--border);
|
|
972
980
|
border-radius: 4px;
|
|
973
|
-
|
|
981
|
+
min-height: 24px;
|
|
982
|
+
padding: 2px 10px;
|
|
974
983
|
cursor: pointer;
|
|
975
984
|
}
|
|
976
985
|
|
|
@@ -1038,6 +1047,13 @@ body {
|
|
|
1038
1047
|
border-right: 1px solid var(--workflow);
|
|
1039
1048
|
pointer-events: auto;
|
|
1040
1049
|
overflow: hidden;
|
|
1050
|
+
container-type: inline-size;
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
@container (max-width: 72px) {
|
|
1054
|
+
.rb-span i {
|
|
1055
|
+
display: none;
|
|
1056
|
+
}
|
|
1041
1057
|
}
|
|
1042
1058
|
|
|
1043
1059
|
.rb-span i {
|
|
@@ -1212,7 +1228,7 @@ body.light .rb-window {
|
|
|
1212
1228
|
.data-table th {
|
|
1213
1229
|
text-align: left;
|
|
1214
1230
|
padding: 8px 12px;
|
|
1215
|
-
font-size:
|
|
1231
|
+
font-size: 11px;
|
|
1216
1232
|
text-transform: uppercase;
|
|
1217
1233
|
letter-spacing: 0.05em;
|
|
1218
1234
|
color: var(--text-muted);
|
|
@@ -1283,6 +1299,11 @@ body.light .rb-window {
|
|
|
1283
1299
|
border: 1px solid var(--border);
|
|
1284
1300
|
}
|
|
1285
1301
|
|
|
1302
|
+
.data-table tbody tr:hover .model-badge,
|
|
1303
|
+
.data-table tbody tr.kb-selected .model-badge {
|
|
1304
|
+
background: var(--bg-elevated);
|
|
1305
|
+
}
|
|
1306
|
+
|
|
1286
1307
|
/* #endregion */
|
|
1287
1308
|
|
|
1288
1309
|
/* #region BREADCRUMB */
|
|
@@ -1313,12 +1334,24 @@ body.light .rb-window {
|
|
|
1313
1334
|
color: var(--text-secondary);
|
|
1314
1335
|
}
|
|
1315
1336
|
|
|
1337
|
+
.breadcrumb-total {
|
|
1338
|
+
margin-left: 8px;
|
|
1339
|
+
color: var(--text-tertiary);
|
|
1340
|
+
}
|
|
1341
|
+
|
|
1342
|
+
.breadcrumb-total .cost {
|
|
1343
|
+
font-size: 14px;
|
|
1344
|
+
font-weight: 600;
|
|
1345
|
+
color: var(--accent-text);
|
|
1346
|
+
}
|
|
1347
|
+
|
|
1316
1348
|
/* #endregion */
|
|
1317
1349
|
|
|
1318
1350
|
/* #region DETAIL */
|
|
1319
1351
|
|
|
1320
1352
|
.detail-header {
|
|
1321
1353
|
display: flex;
|
|
1354
|
+
align-items: first baseline;
|
|
1322
1355
|
gap: 16px;
|
|
1323
1356
|
margin-bottom: 20px;
|
|
1324
1357
|
flex-wrap: wrap;
|
|
@@ -1331,7 +1364,7 @@ body.light .rb-window {
|
|
|
1331
1364
|
}
|
|
1332
1365
|
|
|
1333
1366
|
.detail-stat .detail-label {
|
|
1334
|
-
font-size:
|
|
1367
|
+
font-size: 11px;
|
|
1335
1368
|
color: var(--text-muted);
|
|
1336
1369
|
text-transform: uppercase;
|
|
1337
1370
|
letter-spacing: 0.03em;
|
|
@@ -1344,9 +1377,17 @@ body.light .rb-window {
|
|
|
1344
1377
|
}
|
|
1345
1378
|
|
|
1346
1379
|
.detail-stat .detail-value.cost {
|
|
1380
|
+
font-size: 22px;
|
|
1381
|
+
line-height: 1.1;
|
|
1347
1382
|
color: var(--accent-text);
|
|
1348
1383
|
}
|
|
1349
1384
|
|
|
1385
|
+
.detail-stat .detail-value.models {
|
|
1386
|
+
font-size: 13px;
|
|
1387
|
+
font-weight: 400;
|
|
1388
|
+
color: var(--text-tertiary);
|
|
1389
|
+
}
|
|
1390
|
+
|
|
1350
1391
|
/* Rides on .detail-label for the small-muted-caption look; only the offset differs. */
|
|
1351
1392
|
.detail-stat .detail-scope {
|
|
1352
1393
|
margin-left: 5px;
|
|
@@ -1382,7 +1423,7 @@ body.light .rb-window {
|
|
|
1382
1423
|
.messages-table th {
|
|
1383
1424
|
text-align: left;
|
|
1384
1425
|
padding: 6px 10px;
|
|
1385
|
-
font-size:
|
|
1426
|
+
font-size: 11px;
|
|
1386
1427
|
text-transform: uppercase;
|
|
1387
1428
|
letter-spacing: 0.05em;
|
|
1388
1429
|
color: var(--text-muted);
|
|
@@ -1406,9 +1447,17 @@ body.light .rb-window {
|
|
|
1406
1447
|
font-size: 10px;
|
|
1407
1448
|
}
|
|
1408
1449
|
|
|
1450
|
+
.data-table .num,
|
|
1451
|
+
.data-table .cost-cell,
|
|
1452
|
+
.messages-table .num,
|
|
1453
|
+
.messages-table .cost-cell,
|
|
1454
|
+
.messages-table .cumulative {
|
|
1455
|
+
text-align: right;
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1409
1458
|
.compaction-tag {
|
|
1410
1459
|
text-transform: uppercase;
|
|
1411
|
-
color: var(--compact);
|
|
1460
|
+
color: color-mix(in srgb, var(--compact) 55%, var(--text-primary));
|
|
1412
1461
|
background: color-mix(in srgb, var(--compact) 14%, transparent);
|
|
1413
1462
|
white-space: nowrap;
|
|
1414
1463
|
}
|
|
@@ -1429,7 +1478,7 @@ body.light .rb-window {
|
|
|
1429
1478
|
.subagent-tag,
|
|
1430
1479
|
.tool-tag,
|
|
1431
1480
|
.compaction-tag {
|
|
1432
|
-
font-size:
|
|
1481
|
+
font-size: 10px;
|
|
1433
1482
|
letter-spacing: 0.03em;
|
|
1434
1483
|
padding: 1px 5px;
|
|
1435
1484
|
border-radius: 3px;
|
|
@@ -1468,10 +1517,11 @@ body.light .rb-window {
|
|
|
1468
1517
|
margin-left: 0;
|
|
1469
1518
|
}
|
|
1470
1519
|
|
|
1520
|
+
/* Mixed toward --text-primary so the series hue reaches 4.5:1 on its tint in light and dark. */
|
|
1471
1521
|
.tool-tag {
|
|
1472
1522
|
text-transform: lowercase;
|
|
1473
|
-
color: var(--chart-2
|
|
1474
|
-
background:
|
|
1523
|
+
color: color-mix(in srgb, var(--chart-2) 55%, var(--text-primary));
|
|
1524
|
+
background: color-mix(in srgb, var(--chart-2) 12%, transparent);
|
|
1475
1525
|
}
|
|
1476
1526
|
|
|
1477
1527
|
/* #endregion */
|
|
@@ -1953,7 +2003,8 @@ body.light .rb-window {
|
|
|
1953
2003
|
}
|
|
1954
2004
|
|
|
1955
2005
|
.seg-btn {
|
|
1956
|
-
|
|
2006
|
+
min-height: 24px;
|
|
2007
|
+
padding: 3px 10px;
|
|
1957
2008
|
border: none;
|
|
1958
2009
|
border-radius: 4px;
|
|
1959
2010
|
background: none;
|
|
@@ -2057,6 +2108,41 @@ body.light .rb-window {
|
|
|
2057
2108
|
font-weight: 600;
|
|
2058
2109
|
}
|
|
2059
2110
|
|
|
2111
|
+
.help-bar {
|
|
2112
|
+
display: flex;
|
|
2113
|
+
align-items: center;
|
|
2114
|
+
gap: 12px;
|
|
2115
|
+
margin-bottom: 8px;
|
|
2116
|
+
}
|
|
2117
|
+
|
|
2118
|
+
.help-bar .shortcut-section {
|
|
2119
|
+
margin: 0;
|
|
2120
|
+
}
|
|
2121
|
+
|
|
2122
|
+
.help-filter {
|
|
2123
|
+
margin-left: auto;
|
|
2124
|
+
width: 220px;
|
|
2125
|
+
padding: 4px 10px;
|
|
2126
|
+
background: var(--bg-deep);
|
|
2127
|
+
border: 1px solid var(--border);
|
|
2128
|
+
border-radius: 6px;
|
|
2129
|
+
color: var(--text-primary);
|
|
2130
|
+
font-family: inherit;
|
|
2131
|
+
font-size: 12px;
|
|
2132
|
+
}
|
|
2133
|
+
|
|
2134
|
+
.help-filter:focus {
|
|
2135
|
+
outline: none;
|
|
2136
|
+
border-color: var(--accent);
|
|
2137
|
+
}
|
|
2138
|
+
|
|
2139
|
+
.shortcuts .sc-empty {
|
|
2140
|
+
grid-column: 1 / -1;
|
|
2141
|
+
padding: 24px 0;
|
|
2142
|
+
color: var(--text-muted);
|
|
2143
|
+
text-align: center;
|
|
2144
|
+
}
|
|
2145
|
+
|
|
2060
2146
|
.help-docs {
|
|
2061
2147
|
margin: 0 12px 0 auto;
|
|
2062
2148
|
padding: 4px 10px;
|
|
@@ -2282,6 +2368,48 @@ kbd {
|
|
|
2282
2368
|
outline-offset: 1px;
|
|
2283
2369
|
}
|
|
2284
2370
|
|
|
2371
|
+
.heatmap:has(.hm-peak-label:hover) .hm-row .hm-cell.hm-peak {
|
|
2372
|
+
outline: 2px solid var(--text-primary);
|
|
2373
|
+
outline-offset: 1px;
|
|
2374
|
+
}
|
|
2375
|
+
|
|
2376
|
+
.hm-foot {
|
|
2377
|
+
display: flex;
|
|
2378
|
+
align-items: center;
|
|
2379
|
+
justify-content: space-between;
|
|
2380
|
+
gap: 12px;
|
|
2381
|
+
margin-top: 8px;
|
|
2382
|
+
font-family: var(--mono);
|
|
2383
|
+
font-size: 11px;
|
|
2384
|
+
color: var(--text-muted);
|
|
2385
|
+
}
|
|
2386
|
+
|
|
2387
|
+
.hm-foot strong {
|
|
2388
|
+
color: var(--text-primary);
|
|
2389
|
+
font-weight: 600;
|
|
2390
|
+
}
|
|
2391
|
+
|
|
2392
|
+
.hm-legend {
|
|
2393
|
+
display: flex;
|
|
2394
|
+
align-items: center;
|
|
2395
|
+
gap: 4px;
|
|
2396
|
+
}
|
|
2397
|
+
|
|
2398
|
+
.hm-swatch {
|
|
2399
|
+
position: relative;
|
|
2400
|
+
width: 14px;
|
|
2401
|
+
height: 10px;
|
|
2402
|
+
border-radius: 2px;
|
|
2403
|
+
background: var(--bg-hover);
|
|
2404
|
+
overflow: hidden;
|
|
2405
|
+
}
|
|
2406
|
+
|
|
2407
|
+
.hm-swatch i {
|
|
2408
|
+
position: absolute;
|
|
2409
|
+
inset: 0;
|
|
2410
|
+
background: var(--accent);
|
|
2411
|
+
}
|
|
2412
|
+
|
|
2285
2413
|
.hm-tip {
|
|
2286
2414
|
position: fixed;
|
|
2287
2415
|
z-index: 100;
|
package/public/themes.css
CHANGED
|
@@ -52,7 +52,7 @@ body:not([data-color-theme]):not(.light) {
|
|
|
52
52
|
--text-primary: #f0f1f3;
|
|
53
53
|
--text-secondary: #c2c4c9;
|
|
54
54
|
--text-tertiary: #9a9da5;
|
|
55
|
-
--text-muted: #
|
|
55
|
+
--text-muted: #858891;
|
|
56
56
|
}
|
|
57
57
|
body.light:not([data-color-theme]) {
|
|
58
58
|
--accent: #e86f33;
|
|
@@ -67,7 +67,7 @@ body.light:not([data-color-theme]) {
|
|
|
67
67
|
--text-primary: #0a0a0a;
|
|
68
68
|
--text-secondary: #2c2c2c;
|
|
69
69
|
--text-tertiary: #565656;
|
|
70
|
-
--text-muted: #
|
|
70
|
+
--text-muted: #666666;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
/* Gruvbox */
|
|
@@ -84,7 +84,7 @@ body[data-color-theme="gruvbox"]:not(.light) {
|
|
|
84
84
|
--text-primary: #ebdbb2;
|
|
85
85
|
--text-secondary: #d5c4a1;
|
|
86
86
|
--text-tertiary: #bdae93;
|
|
87
|
-
--text-muted: #
|
|
87
|
+
--text-muted: #a69782;
|
|
88
88
|
}
|
|
89
89
|
body.light[data-color-theme="gruvbox"] {
|
|
90
90
|
--accent: #d65d0e;
|
|
@@ -98,8 +98,8 @@ body.light[data-color-theme="gruvbox"] {
|
|
|
98
98
|
--border: #c9bc9d;
|
|
99
99
|
--text-primary: #3c3836;
|
|
100
100
|
--text-secondary: #504945;
|
|
101
|
-
--text-tertiary: #
|
|
102
|
-
--text-muted: #
|
|
101
|
+
--text-tertiary: #5f564f;
|
|
102
|
+
--text-muted: #70645b;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
/* Catppuccin */
|
|
@@ -116,7 +116,7 @@ body[data-color-theme="catppuccin"]:not(.light) {
|
|
|
116
116
|
--text-primary: #cdd6f4;
|
|
117
117
|
--text-secondary: #bac2de;
|
|
118
118
|
--text-tertiary: #a6adc8;
|
|
119
|
-
--text-muted: #
|
|
119
|
+
--text-muted: #82879f;
|
|
120
120
|
}
|
|
121
121
|
body.light[data-color-theme="catppuccin"] {
|
|
122
122
|
--accent: #8839ef;
|
|
@@ -130,8 +130,8 @@ body.light[data-color-theme="catppuccin"] {
|
|
|
130
130
|
--border: #bcc0cc;
|
|
131
131
|
--text-primary: #4c4f69;
|
|
132
132
|
--text-secondary: #5c5f77;
|
|
133
|
-
--text-tertiary: #
|
|
134
|
-
--text-muted: #
|
|
133
|
+
--text-tertiary: #545770;
|
|
134
|
+
--text-muted: #63667d;
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
/* Tokyo Night */
|
|
@@ -147,8 +147,8 @@ body[data-color-theme="tokyo-night"]:not(.light) {
|
|
|
147
147
|
--border: #3b4261;
|
|
148
148
|
--text-primary: #c0caf5;
|
|
149
149
|
--text-secondary: #a9b1d6;
|
|
150
|
-
--text-tertiary: #
|
|
151
|
-
--text-muted: #
|
|
150
|
+
--text-tertiary: #959cbe;
|
|
151
|
+
--text-muted: #838aaf;
|
|
152
152
|
}
|
|
153
153
|
body.light[data-color-theme="tokyo-night"] {
|
|
154
154
|
--accent: #2e7de9;
|
|
@@ -162,8 +162,8 @@ body.light[data-color-theme="tokyo-night"] {
|
|
|
162
162
|
--border: #a8aecb;
|
|
163
163
|
--text-primary: #343b58;
|
|
164
164
|
--text-secondary: #565a6e;
|
|
165
|
-
--text-tertiary: #
|
|
166
|
-
--text-muted: #
|
|
165
|
+
--text-tertiary: #505466;
|
|
166
|
+
--text-muted: #5d627a;
|
|
167
167
|
}
|
|
168
168
|
|
|
169
169
|
/* Solarized */
|
|
@@ -179,8 +179,8 @@ body[data-color-theme="solarized"]:not(.light) {
|
|
|
179
179
|
--border: #586e75;
|
|
180
180
|
--text-primary: #e2dfd0;
|
|
181
181
|
--text-secondary: #b7c0bf;
|
|
182
|
-
--text-tertiary: #
|
|
183
|
-
--text-muted: #
|
|
182
|
+
--text-tertiary: #b7beb7;
|
|
183
|
+
--text-muted: #9faaa7;
|
|
184
184
|
}
|
|
185
185
|
body.light[data-color-theme="solarized"] {
|
|
186
186
|
--accent: #2280c2;
|
|
@@ -194,8 +194,8 @@ body.light[data-color-theme="solarized"] {
|
|
|
194
194
|
--border: #cdc4ab;
|
|
195
195
|
--text-primary: #073642;
|
|
196
196
|
--text-secondary: #4f6369;
|
|
197
|
-
--text-tertiary: #
|
|
198
|
-
--text-muted: #
|
|
197
|
+
--text-tertiary: #385861;
|
|
198
|
+
--text-muted: #4a666e;
|
|
199
199
|
--sidebar-bg: #e6dfc7;
|
|
200
200
|
--sidebar-item-bg: #f3ecd6;
|
|
201
201
|
}
|
|
@@ -213,8 +213,8 @@ body[data-color-theme="dracula"]:not(.light) {
|
|
|
213
213
|
--border: #565a75;
|
|
214
214
|
--text-primary: #f8f8f2;
|
|
215
215
|
--text-secondary: #d8d8d2;
|
|
216
|
-
--text-tertiary: #
|
|
217
|
-
--text-muted: #
|
|
216
|
+
--text-tertiary: #b2b5c6;
|
|
217
|
+
--text-muted: #9aa1bc;
|
|
218
218
|
}
|
|
219
219
|
body.light[data-color-theme="dracula"] {
|
|
220
220
|
--accent: #7c3aed;
|
|
@@ -228,8 +228,8 @@ body.light[data-color-theme="dracula"] {
|
|
|
228
228
|
--border: #c9c9d6;
|
|
229
229
|
--text-primary: #16161e;
|
|
230
230
|
--text-secondary: #34343f;
|
|
231
|
-
--text-tertiary: #
|
|
232
|
-
--text-muted: #
|
|
231
|
+
--text-tertiary: #575765;
|
|
232
|
+
--text-muted: #666674;
|
|
233
233
|
}
|
|
234
234
|
|
|
235
235
|
/* Nord */
|
|
@@ -245,8 +245,8 @@ body[data-color-theme="nord"]:not(.light) {
|
|
|
245
245
|
--border: #4c566a;
|
|
246
246
|
--text-primary: #eceff4;
|
|
247
247
|
--text-secondary: #d8dee9;
|
|
248
|
-
--text-tertiary: #
|
|
249
|
-
--text-muted: #
|
|
248
|
+
--text-tertiary: #bec4d1;
|
|
249
|
+
--text-muted: #a7b0c1;
|
|
250
250
|
}
|
|
251
251
|
body.light[data-color-theme="nord"] {
|
|
252
252
|
--accent: #5e81ac;
|
|
@@ -261,7 +261,7 @@ body.light[data-color-theme="nord"] {
|
|
|
261
261
|
--text-primary: #2e3440;
|
|
262
262
|
--text-secondary: #3b4252;
|
|
263
263
|
--text-tertiary: #4c566a;
|
|
264
|
-
--text-muted: #
|
|
264
|
+
--text-muted: #5e687c;
|
|
265
265
|
}
|
|
266
266
|
|
|
267
267
|
/* Rosé Pine */
|
|
@@ -277,8 +277,8 @@ body[data-color-theme="rose-pine"]:not(.light) {
|
|
|
277
277
|
--border: #403d52;
|
|
278
278
|
--text-primary: #e0def4;
|
|
279
279
|
--text-secondary: #c5c2dd;
|
|
280
|
-
--text-tertiary: #
|
|
281
|
-
--text-muted: #
|
|
280
|
+
--text-tertiary: #a09db9;
|
|
281
|
+
--text-muted: #8e8ba7;
|
|
282
282
|
}
|
|
283
283
|
body.light[data-color-theme="rose-pine"] {
|
|
284
284
|
--accent: #907aa9;
|
|
@@ -292,8 +292,8 @@ body.light[data-color-theme="rose-pine"] {
|
|
|
292
292
|
--border: #cecacd;
|
|
293
293
|
--text-primary: #575279;
|
|
294
294
|
--text-secondary: #635e87;
|
|
295
|
-
--text-tertiary: #
|
|
296
|
-
--text-muted: #
|
|
295
|
+
--text-tertiary: #5a557b;
|
|
296
|
+
--text-muted: #6a6485;
|
|
297
297
|
}
|
|
298
298
|
|
|
299
299
|
/* Everforest */
|
|
@@ -309,8 +309,8 @@ body[data-color-theme="everforest"]:not(.light) {
|
|
|
309
309
|
--border: #475258;
|
|
310
310
|
--text-primary: #d3c6aa;
|
|
311
311
|
--text-secondary: #bfb6a3;
|
|
312
|
-
--text-tertiary: #
|
|
313
|
-
--text-muted: #
|
|
312
|
+
--text-tertiary: #c3bea7;
|
|
313
|
+
--text-muted: #a8ab9a;
|
|
314
314
|
}
|
|
315
315
|
body.light[data-color-theme="everforest"] {
|
|
316
316
|
--accent: #6f8352;
|
|
@@ -324,8 +324,8 @@ body.light[data-color-theme="everforest"] {
|
|
|
324
324
|
--border: #d3d2bf;
|
|
325
325
|
--text-primary: #3d484e;
|
|
326
326
|
--text-secondary: #55636b;
|
|
327
|
-
--text-tertiary: #
|
|
328
|
-
--text-muted: #
|
|
327
|
+
--text-tertiary: #515b56;
|
|
328
|
+
--text-muted: #606a62;
|
|
329
329
|
}
|
|
330
330
|
|
|
331
331
|
/* Kanagawa */
|
|
@@ -342,7 +342,7 @@ body[data-color-theme="kanagawa"]:not(.light) {
|
|
|
342
342
|
--text-primary: #dcd7ba;
|
|
343
343
|
--text-secondary: #c8c093;
|
|
344
344
|
--text-tertiary: #a6a69c;
|
|
345
|
-
--text-muted: #
|
|
345
|
+
--text-muted: #94948a;
|
|
346
346
|
}
|
|
347
347
|
body.light[data-color-theme="kanagawa"] {
|
|
348
348
|
--accent: #4d699b;
|
|
@@ -356,8 +356,8 @@ body.light[data-color-theme="kanagawa"] {
|
|
|
356
356
|
--border: #d2ccb6;
|
|
357
357
|
--text-primary: #545464;
|
|
358
358
|
--text-secondary: #66667a;
|
|
359
|
-
--text-tertiary: #
|
|
360
|
-
--text-muted: #
|
|
359
|
+
--text-tertiary: #565564;
|
|
360
|
+
--text-muted: #666469;
|
|
361
361
|
}
|
|
362
362
|
|
|
363
363
|
/* One Dark */
|
|
@@ -373,8 +373,8 @@ body[data-color-theme="one-dark"]:not(.light) {
|
|
|
373
373
|
--border: #4b5263;
|
|
374
374
|
--text-primary: #d7dae0;
|
|
375
375
|
--text-secondary: #abb2bf;
|
|
376
|
-
--text-tertiary: #
|
|
377
|
-
--text-muted: #
|
|
376
|
+
--text-tertiary: #acb0ba;
|
|
377
|
+
--text-muted: #999ea8;
|
|
378
378
|
}
|
|
379
379
|
body.light[data-color-theme="one-dark"] {
|
|
380
380
|
--accent: #4078f2;
|
|
@@ -388,8 +388,8 @@ body.light[data-color-theme="one-dark"] {
|
|
|
388
388
|
--border: #d4d4d6;
|
|
389
389
|
--text-primary: #383a42;
|
|
390
390
|
--text-secondary: #50525a;
|
|
391
|
-
--text-tertiary: #
|
|
392
|
-
--text-muted: #
|
|
391
|
+
--text-tertiary: #575963;
|
|
392
|
+
--text-muted: #666871;
|
|
393
393
|
}
|
|
394
394
|
|
|
395
395
|
/* Night Owl */
|
|
@@ -405,8 +405,8 @@ body[data-color-theme="night-owl"]:not(.light) {
|
|
|
405
405
|
--border: #5f7e97;
|
|
406
406
|
--text-primary: #d6deeb;
|
|
407
407
|
--text-secondary: #b8c5d6;
|
|
408
|
-
--text-tertiary: #
|
|
409
|
-
--text-muted: #
|
|
408
|
+
--text-tertiary: #9bb0c3;
|
|
409
|
+
--text-muted: #899eab;
|
|
410
410
|
}
|
|
411
411
|
body.light[data-color-theme="night-owl"] {
|
|
412
412
|
--accent: #0c969b;
|
|
@@ -420,8 +420,8 @@ body.light[data-color-theme="night-owl"] {
|
|
|
420
420
|
--border: #d0d0d0;
|
|
421
421
|
--text-primary: #403f53;
|
|
422
422
|
--text-secondary: #545167;
|
|
423
|
-
--text-tertiary: #
|
|
424
|
-
--text-muted: #
|
|
423
|
+
--text-tertiary: #5a596f;
|
|
424
|
+
--text-muted: #68687e;
|
|
425
425
|
}
|
|
426
426
|
|
|
427
427
|
/* Monokai Pro */
|
|
@@ -437,8 +437,8 @@ body[data-color-theme="monokai"]:not(.light) {
|
|
|
437
437
|
--border: #5b595c;
|
|
438
438
|
--text-primary: #fcfcfa;
|
|
439
439
|
--text-secondary: #d9d8d6;
|
|
440
|
-
--text-tertiary: #
|
|
441
|
-
--text-muted: #
|
|
440
|
+
--text-tertiary: #bfbfbe;
|
|
441
|
+
--text-muted: #ababab;
|
|
442
442
|
}
|
|
443
443
|
body.light[data-color-theme="monokai"] {
|
|
444
444
|
--accent: #c08a00;
|
|
@@ -452,8 +452,8 @@ body.light[data-color-theme="monokai"] {
|
|
|
452
452
|
--border: #cdc8c5;
|
|
453
453
|
--text-primary: #2c292d;
|
|
454
454
|
--text-secondary: #46434a;
|
|
455
|
-
--text-tertiary: #
|
|
456
|
-
--text-muted: #
|
|
455
|
+
--text-tertiary: #59565b;
|
|
456
|
+
--text-muted: #68656a;
|
|
457
457
|
}
|
|
458
458
|
|
|
459
459
|
/* GitHub */
|
|
@@ -469,8 +469,8 @@ body[data-color-theme="github"]:not(.light) {
|
|
|
469
469
|
--border: #444d56;
|
|
470
470
|
--text-primary: #e1e4e8;
|
|
471
471
|
--text-secondary: #d1d5da;
|
|
472
|
-
--text-tertiary: #
|
|
473
|
-
--text-muted: #
|
|
472
|
+
--text-tertiary: #a6adb4;
|
|
473
|
+
--text-muted: #929aa2;
|
|
474
474
|
}
|
|
475
475
|
body.light[data-color-theme="github"] {
|
|
476
476
|
--accent: #0366d6;
|
|
@@ -484,8 +484,8 @@ body.light[data-color-theme="github"] {
|
|
|
484
484
|
--border: #d1d5da;
|
|
485
485
|
--text-primary: #24292e;
|
|
486
486
|
--text-secondary: #444d56;
|
|
487
|
-
--text-tertiary: #
|
|
488
|
-
--text-muted: #
|
|
487
|
+
--text-tertiary: #575f68;
|
|
488
|
+
--text-muted: #666e78;
|
|
489
489
|
}
|
|
490
490
|
|
|
491
491
|
/* Ayu */
|
|
@@ -501,8 +501,8 @@ body[data-color-theme="ayu"]:not(.light) {
|
|
|
501
501
|
--border: #2d3343;
|
|
502
502
|
--text-primary: #bfbdb6;
|
|
503
503
|
--text-secondary: #a8a6a0;
|
|
504
|
-
--text-tertiary: #
|
|
505
|
-
--text-muted: #
|
|
504
|
+
--text-tertiary: #8d949b;
|
|
505
|
+
--text-muted: #7c838d;
|
|
506
506
|
}
|
|
507
507
|
body.light[data-color-theme="ayu"] {
|
|
508
508
|
--accent: #c97612;
|
|
@@ -516,8 +516,8 @@ body.light[data-color-theme="ayu"] {
|
|
|
516
516
|
--border: #d8dde2;
|
|
517
517
|
--text-primary: #3d4149;
|
|
518
518
|
--text-secondary: #5c6166;
|
|
519
|
-
--text-tertiary: #
|
|
520
|
-
--text-muted: #
|
|
519
|
+
--text-tertiary: #5a5e64;
|
|
520
|
+
--text-muted: #686d74;
|
|
521
521
|
}
|
|
522
522
|
|
|
523
523
|
/* Vitesse */
|
|
@@ -533,8 +533,8 @@ body[data-color-theme="vitesse"]:not(.light) {
|
|
|
533
533
|
--border: #333333;
|
|
534
534
|
--text-primary: #dbd7ca;
|
|
535
535
|
--text-secondary: #bfbaaa;
|
|
536
|
-
--text-tertiary: #
|
|
537
|
-
--text-muted: #
|
|
536
|
+
--text-tertiary: #99998e;
|
|
537
|
+
--text-muted: #7e8a7b;
|
|
538
538
|
}
|
|
539
539
|
body.light[data-color-theme="vitesse"] {
|
|
540
540
|
--accent: #1c6b48;
|
|
@@ -548,8 +548,8 @@ body.light[data-color-theme="vitesse"] {
|
|
|
548
548
|
--border: #d6d6d6;
|
|
549
549
|
--text-primary: #393a34;
|
|
550
550
|
--text-secondary: #4e4f47;
|
|
551
|
-
--text-tertiary: #
|
|
552
|
-
--text-muted: #
|
|
551
|
+
--text-tertiary: #5d5e56;
|
|
552
|
+
--text-muted: #6a6d64;
|
|
553
553
|
}
|
|
554
554
|
|
|
555
555
|
/* Synthwave '84 */
|
|
@@ -566,7 +566,7 @@ body[data-color-theme="synthwave"]:not(.light) {
|
|
|
566
566
|
--text-primary: #ffffff;
|
|
567
567
|
--text-secondary: #d8d6e8;
|
|
568
568
|
--text-tertiary: #b6b1d8;
|
|
569
|
-
--text-muted: #
|
|
569
|
+
--text-muted: #8f94c3;
|
|
570
570
|
}
|
|
571
571
|
body.light[data-color-theme="synthwave"] {
|
|
572
572
|
--accent: #c936a6;
|
|
@@ -580,6 +580,6 @@ body.light[data-color-theme="synthwave"] {
|
|
|
580
580
|
--border: #c5bcdd;
|
|
581
581
|
--text-primary: #241b2f;
|
|
582
582
|
--text-secondary: #3d3455;
|
|
583
|
-
--text-tertiary: #
|
|
584
|
-
--text-muted: #
|
|
583
|
+
--text-tertiary: #59507c;
|
|
584
|
+
--text-muted: #675f8b;
|
|
585
585
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// claude-hub-sdk 1.
|
|
1
|
+
// claude-hub-sdk 1.8.0 (sha256 9a67dd2aa534). Copied by npm run sdk:sync in claude-code-hub. Do not edit.
|
|
2
2
|
// Claude Code Hub SDK: the one rule that names a key press, shared by the hub page, client.js and
|
|
3
3
|
// stub.js. The hub serves it to its page as /sdk/keys.js; mount() and sdk:sync put it in front of
|
|
4
4
|
// client.js and stub.js, so an app still loads one file.
|
|
@@ -33,7 +33,21 @@ var ClaudeHubKeys = (() => {
|
|
|
33
33
|
return combo.split('+').map((k) => mods[k] ?? named[k] ?? (k.length === 1 ? k.toUpperCase() : k));
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
// A host claim (protocol §5.2) names a press by its physical code, or by its character when the layout
|
|
37
|
+
// moves the key: {ctrlKey?, altKey?, shiftKey?, metaKey?, code, key: 'Unidentified'} or {…, key, code: ''}.
|
|
38
|
+
// A press matches a claim when one of its two signatures is the claim's first. AltGr types a
|
|
39
|
+
// character, so its press matches by character only. cck's frames use the same format.
|
|
40
|
+
function keySigs(e) {
|
|
41
|
+
const mods = [e.ctrlKey && 'ctrl', e.altKey && 'alt', e.shiftKey && 'shift', e.metaKey && 'meta']
|
|
42
|
+
.filter(Boolean)
|
|
43
|
+
.join('+');
|
|
44
|
+
return [
|
|
45
|
+
e.code && !e.getModifierState?.('AltGraph') && `${mods}|c:${e.code}`,
|
|
46
|
+
typeof e.key === 'string' && e.key !== 'Unidentified' && `${mods}|k:${e.key.toLowerCase()}`,
|
|
47
|
+
].filter(Boolean);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return { comboOf, keyParts, keySigs };
|
|
37
51
|
})();
|
|
38
52
|
|
|
39
53
|
if (typeof module === 'object' && module.exports) module.exports = ClaudeHubKeys;
|
|
@@ -60,6 +74,8 @@ if (typeof module === 'object' && module.exports) module.exports = ClaudeHubKeys
|
|
|
60
74
|
status: 'standalone',
|
|
61
75
|
themes: [],
|
|
62
76
|
inHub: false,
|
|
77
|
+
settings: null,
|
|
78
|
+
onSettings: () => off,
|
|
63
79
|
onStatus: () => off,
|
|
64
80
|
onActive: () => off,
|
|
65
81
|
onThemes: () => off,
|
|
@@ -67,9 +83,10 @@ if (typeof module === 'object' && module.exports) module.exports = ClaudeHubKeys
|
|
|
67
83
|
bindTheme: () => off,
|
|
68
84
|
handle() {},
|
|
69
85
|
publish() {},
|
|
70
|
-
invoke(action, params = {}) {
|
|
86
|
+
invoke(action, params = {}, opts = {}) {
|
|
71
87
|
const target = standaloneFn(action)?.(params);
|
|
72
88
|
if (!target) return Promise.resolve({ ok: false, reason: 'unhandled' });
|
|
89
|
+
if (opts.open === 'pane') return Promise.resolve({ ok: true, handledBy: 'standalone', url: target });
|
|
73
90
|
win.open(target, '_blank', 'noopener');
|
|
74
91
|
return Promise.resolve({ ok: true, handledBy: 'standalone' });
|
|
75
92
|
},
|