claude-code-cost 0.5.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/public/app.js +64 -49
- package/public/style.css +31 -12
- package/server.js +9 -0
package/package.json
CHANGED
package/public/app.js
CHANGED
|
@@ -13,8 +13,12 @@ let currentSessionId = null;
|
|
|
13
13
|
let parentView = 'projects';
|
|
14
14
|
let lastSelectedProject = null;
|
|
15
15
|
let lastSelectedSession = null;
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
const DEFAULT_SORT = {
|
|
17
|
+
overview: { field: 'totalCost', order: 'desc' },
|
|
18
|
+
projects: { field: 'lastActive', order: 'desc' },
|
|
19
|
+
sessions: { field: 'lastTimestamp', order: 'desc' },
|
|
20
|
+
};
|
|
21
|
+
const viewSort = structuredClone(DEFAULT_SORT);
|
|
18
22
|
let dateRange = 3;
|
|
19
23
|
const charts = {};
|
|
20
24
|
let lastRenderHash = {};
|
|
@@ -88,13 +92,19 @@ function sortCompare(a, b, field, order) {
|
|
|
88
92
|
return 0;
|
|
89
93
|
}
|
|
90
94
|
|
|
95
|
+
function currentSort() {
|
|
96
|
+
return viewSort[currentView];
|
|
97
|
+
}
|
|
98
|
+
|
|
91
99
|
function sortArrow(field) {
|
|
92
|
-
|
|
93
|
-
|
|
100
|
+
const s = currentSort();
|
|
101
|
+
if (!s || s.field !== field) return '';
|
|
102
|
+
return `<span class="sort-arrow">${s.order === 'asc' ? '\u25B2' : '\u25BC'}</span>`;
|
|
94
103
|
}
|
|
95
104
|
|
|
96
105
|
function thClass(field) {
|
|
97
|
-
|
|
106
|
+
const s = currentSort();
|
|
107
|
+
return s && s.field === field ? 'sorted' : '';
|
|
98
108
|
}
|
|
99
109
|
|
|
100
110
|
function parentBreadcrumb() {
|
|
@@ -134,8 +144,6 @@ function getUrlState() {
|
|
|
134
144
|
project: p.get('project'),
|
|
135
145
|
projectName: p.get('projectName'),
|
|
136
146
|
session: p.get('session'),
|
|
137
|
-
sort: p.get('sort'),
|
|
138
|
-
order: p.get('order'),
|
|
139
147
|
parentView: p.get('parentView') || 'projects',
|
|
140
148
|
};
|
|
141
149
|
}
|
|
@@ -150,20 +158,23 @@ function saveDateRange(val) {
|
|
|
150
158
|
}
|
|
151
159
|
|
|
152
160
|
function loadSort() {
|
|
153
|
-
const
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
+
for (const view of Object.keys(DEFAULT_SORT)) {
|
|
162
|
+
const raw = localStorage.getItem(`cc-cost:sort:${view}`);
|
|
163
|
+
if (raw) {
|
|
164
|
+
try {
|
|
165
|
+
const { field, order } = JSON.parse(raw);
|
|
166
|
+
if (field) viewSort[view].field = field;
|
|
167
|
+
if (order) viewSort[view].order = order;
|
|
168
|
+
} catch {
|
|
169
|
+
/* ignore */
|
|
170
|
+
}
|
|
161
171
|
}
|
|
162
172
|
}
|
|
163
173
|
}
|
|
164
174
|
|
|
165
175
|
function saveSort() {
|
|
166
|
-
|
|
176
|
+
const s = currentSort();
|
|
177
|
+
localStorage.setItem(`cc-cost:sort:${currentView}`, JSON.stringify(s));
|
|
167
178
|
}
|
|
168
179
|
|
|
169
180
|
function updateUrl() {
|
|
@@ -173,8 +184,6 @@ function updateUrl() {
|
|
|
173
184
|
if (currentProjectName) p.set('projectName', currentProjectName);
|
|
174
185
|
if (currentSessionId) p.set('session', currentSessionId);
|
|
175
186
|
if (parentView !== 'projects') p.set('parentView', parentView);
|
|
176
|
-
if (sortField !== 'totalCost') p.set('sort', sortField);
|
|
177
|
-
if (sortOrder !== 'desc') p.set('order', sortOrder);
|
|
178
187
|
const qs = p.toString();
|
|
179
188
|
history.replaceState(null, '', qs ? `?${qs}` : '/');
|
|
180
189
|
sessionStorage.setItem('cc-cost:nav', qs);
|
|
@@ -229,11 +238,14 @@ function pruneLocalCache() {
|
|
|
229
238
|
for (let i = 0; i < toRemove; i++) localStorage.removeItem(entries[i].k);
|
|
230
239
|
}
|
|
231
240
|
|
|
241
|
+
function isPrefKey(k) {
|
|
242
|
+
return k.startsWith('cc-cost:sort:') || k === 'cc-cost:range';
|
|
243
|
+
}
|
|
232
244
|
function clearLocalCache() {
|
|
233
245
|
const keys = [];
|
|
234
246
|
for (let i = 0; i < localStorage.length; i++) {
|
|
235
247
|
const k = localStorage.key(i);
|
|
236
|
-
if (k.startsWith('cc-cost:')) keys.push(k);
|
|
248
|
+
if (k.startsWith('cc-cost:') && !isPrefKey(k)) keys.push(k);
|
|
237
249
|
}
|
|
238
250
|
keys.forEach((k) => localStorage.removeItem(k));
|
|
239
251
|
}
|
|
@@ -287,7 +299,7 @@ function renderOverview() {
|
|
|
287
299
|
}
|
|
288
300
|
|
|
289
301
|
const s = overviewData.summary;
|
|
290
|
-
const h = JSON.stringify({ overviewData,
|
|
302
|
+
const h = JSON.stringify({ overviewData, sort: viewSort.overview });
|
|
291
303
|
if (lastRenderHash.overview === h) return;
|
|
292
304
|
lastRenderHash.overview = h;
|
|
293
305
|
|
|
@@ -345,7 +357,7 @@ function renderOverview() {
|
|
|
345
357
|
</tr></thead>
|
|
346
358
|
<tbody>
|
|
347
359
|
${[...overviewData.projects]
|
|
348
|
-
.sort((a, b) => sortCompare(a, b,
|
|
360
|
+
.sort((a, b) => sortCompare(a, b, viewSort.overview.field, viewSort.overview.order))
|
|
349
361
|
.map(
|
|
350
362
|
(p) => `
|
|
351
363
|
<tr data-clickable onclick="navigateToSessions('${esc(p.encodedPath)}', '${esc(p.name)}')">
|
|
@@ -381,11 +393,11 @@ function renderProjects() {
|
|
|
381
393
|
return;
|
|
382
394
|
}
|
|
383
395
|
|
|
384
|
-
const h = JSON.stringify({ projectsData,
|
|
396
|
+
const h = JSON.stringify({ projectsData, sort: viewSort.projects });
|
|
385
397
|
if (lastRenderHash.projects === h) return;
|
|
386
398
|
lastRenderHash.projects = h;
|
|
387
399
|
|
|
388
|
-
const sorted = [...projectsData].sort((a, b) => sortCompare(a, b,
|
|
400
|
+
const sorted = [...projectsData].sort((a, b) => sortCompare(a, b, viewSort.projects.field, viewSort.projects.order));
|
|
389
401
|
|
|
390
402
|
if (sorted.length === 0) {
|
|
391
403
|
el.innerHTML = `<div class="dashboard-content"><div class="empty-state">
|
|
@@ -437,7 +449,7 @@ function renderSessions() {
|
|
|
437
449
|
return;
|
|
438
450
|
}
|
|
439
451
|
|
|
440
|
-
const h = JSON.stringify({ sessionsData, sessionsDaily, sessionsModelDistribution,
|
|
452
|
+
const h = JSON.stringify({ sessionsData, sessionsDaily, sessionsModelDistribution, sort: viewSort.sessions });
|
|
441
453
|
if (lastRenderHash.sessions === h) return;
|
|
442
454
|
lastRenderHash.sessions = h;
|
|
443
455
|
|
|
@@ -488,7 +500,7 @@ function renderSessions() {
|
|
|
488
500
|
</tr></thead>
|
|
489
501
|
<tbody>
|
|
490
502
|
${[...sessionsData]
|
|
491
|
-
.sort((a, b) => sortCompare(a, b,
|
|
503
|
+
.sort((a, b) => sortCompare(a, b, viewSort.sessions.field, viewSort.sessions.order))
|
|
492
504
|
.map(
|
|
493
505
|
(s) => `
|
|
494
506
|
<tr data-clickable onclick="navigateToDetail('${esc(s.sessionId)}')">
|
|
@@ -621,9 +633,10 @@ function buildMessageRowsWithSubagents(d) {
|
|
|
621
633
|
|
|
622
634
|
function buildMessageRow(m) {
|
|
623
635
|
const sa = m._subagent;
|
|
636
|
+
const toolTags = !sa && m.tools ? m.tools.map((t) => `<span class="tool-tag">${esc(t)}</span>`).join(' ') : '';
|
|
624
637
|
const modelCol = sa
|
|
625
638
|
? `<span class="model-badge">${esc(shortModel(m.model))}</span> <span class="subagent-tag">${esc(sa.agentType)}</span>`
|
|
626
|
-
: `<span class="model-badge">${esc(shortModel(m.model))}</span
|
|
639
|
+
: `<span class="model-badge">${esc(shortModel(m.model))}</span>${toolTags ? ` ${toolTags}` : ''}`;
|
|
627
640
|
return `<tr>
|
|
628
641
|
<td class="muted">${m.index}</td>
|
|
629
642
|
<td class="muted">${new Date(m.timestamp).toLocaleTimeString()}</td>
|
|
@@ -645,8 +658,8 @@ function getChartColors() {
|
|
|
645
658
|
const style = getComputedStyle(document.body);
|
|
646
659
|
return {
|
|
647
660
|
accent: style.getPropertyValue('--accent').trim() || '#e86f33',
|
|
648
|
-
|
|
649
|
-
text: style.getPropertyValue('--text-
|
|
661
|
+
chartFill: style.getPropertyValue('--chart-fill').trim() || 'rgba(232,111,51,0.6)',
|
|
662
|
+
text: style.getPropertyValue('--text-secondary').trim() || '#c2c4c9',
|
|
650
663
|
border: style.getPropertyValue('--border').trim() || '#363840',
|
|
651
664
|
bg: style.getPropertyValue('--bg-elevated').trim() || '#1e2025',
|
|
652
665
|
chart1: style.getPropertyValue('--chart-1').trim() || '#e86f33',
|
|
@@ -709,7 +722,7 @@ function renderDailyChart(daily, canvasId = 'dailyChart', chartKey = 'daily') {
|
|
|
709
722
|
{
|
|
710
723
|
label: 'Daily Cost',
|
|
711
724
|
data: daily.map((d) => d.cost),
|
|
712
|
-
backgroundColor: c.
|
|
725
|
+
backgroundColor: c.accent,
|
|
713
726
|
borderColor: c.accent,
|
|
714
727
|
borderWidth: 1,
|
|
715
728
|
borderRadius: 3,
|
|
@@ -804,7 +817,7 @@ function renderCumulativeChart(messages) {
|
|
|
804
817
|
label: 'Cumulative Cost',
|
|
805
818
|
data: messages.map((m) => m.cumulativeCost),
|
|
806
819
|
borderColor: c.accent,
|
|
807
|
-
backgroundColor: c.
|
|
820
|
+
backgroundColor: c.chartFill,
|
|
808
821
|
fill: true,
|
|
809
822
|
borderWidth: 2,
|
|
810
823
|
pointRadius: messages.length > 50 ? 0 : 3,
|
|
@@ -930,7 +943,6 @@ function showView(viewId) {
|
|
|
930
943
|
|
|
931
944
|
async function navigate(view, params) {
|
|
932
945
|
currentView = view;
|
|
933
|
-
loadSort();
|
|
934
946
|
if (params?.project) currentProjectPath = params.project;
|
|
935
947
|
if (params?.projectName) currentProjectName = params.projectName;
|
|
936
948
|
if (params?.session) currentSessionId = params.session;
|
|
@@ -972,11 +984,12 @@ async function navigateToDetail(sessionId) {
|
|
|
972
984
|
|
|
973
985
|
// biome-ignore lint/correctness/noUnusedVariables: called from HTML onclick
|
|
974
986
|
function sortBy(field) {
|
|
975
|
-
|
|
976
|
-
|
|
987
|
+
const s = currentSort();
|
|
988
|
+
if (s.field === field) {
|
|
989
|
+
s.order = s.order === 'desc' ? 'asc' : 'desc';
|
|
977
990
|
} else {
|
|
978
|
-
|
|
979
|
-
|
|
991
|
+
s.field = field;
|
|
992
|
+
s.order = 'desc';
|
|
980
993
|
}
|
|
981
994
|
lastRenderHash[currentView] = null;
|
|
982
995
|
saveSort();
|
|
@@ -1002,6 +1015,7 @@ async function refreshData() {
|
|
|
1002
1015
|
btn.classList.add('loading');
|
|
1003
1016
|
btn.disabled = true;
|
|
1004
1017
|
const t = showToast(`Recalculating for ${dateRange} days...`, true);
|
|
1018
|
+
const minWait = new Promise((r) => setTimeout(r, 250));
|
|
1005
1019
|
try {
|
|
1006
1020
|
await fetch('/api/refresh', { method: 'POST' });
|
|
1007
1021
|
clearLocalCache();
|
|
@@ -1009,6 +1023,8 @@ async function refreshData() {
|
|
|
1009
1023
|
lastRenderHash = {};
|
|
1010
1024
|
await loadAndRender(currentView);
|
|
1011
1025
|
forceRefresh = false;
|
|
1026
|
+
await minWait;
|
|
1027
|
+
showToast('Data refreshed', false, 'success');
|
|
1012
1028
|
} finally {
|
|
1013
1029
|
dismissToast(t);
|
|
1014
1030
|
btn.classList.remove('loading');
|
|
@@ -1018,6 +1034,7 @@ async function refreshData() {
|
|
|
1018
1034
|
|
|
1019
1035
|
async function loadAndRender(view) {
|
|
1020
1036
|
const myNav = ++navCounter;
|
|
1037
|
+
const prevSelectedIdx = selectedRowIdx;
|
|
1021
1038
|
ensureViewElements();
|
|
1022
1039
|
showView(`${view}-view`);
|
|
1023
1040
|
|
|
@@ -1043,11 +1060,10 @@ async function loadAndRender(view) {
|
|
|
1043
1060
|
break;
|
|
1044
1061
|
case 'sessions':
|
|
1045
1062
|
if (currentProjectPath) {
|
|
1046
|
-
sessionsData
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
renderSessions();
|
|
1063
|
+
if (!sessionsData) {
|
|
1064
|
+
lastRenderHash.sessions = null;
|
|
1065
|
+
renderSessions();
|
|
1066
|
+
}
|
|
1051
1067
|
await fetchSessions(currentProjectPath);
|
|
1052
1068
|
if (myNav !== navCounter) return;
|
|
1053
1069
|
renderSessions();
|
|
@@ -1055,15 +1071,17 @@ async function loadAndRender(view) {
|
|
|
1055
1071
|
break;
|
|
1056
1072
|
case 'detail':
|
|
1057
1073
|
if (currentSessionId) {
|
|
1058
|
-
sessionDetailData
|
|
1059
|
-
|
|
1060
|
-
|
|
1074
|
+
if (!sessionDetailData) {
|
|
1075
|
+
lastRenderHash.detail = null;
|
|
1076
|
+
renderDetail();
|
|
1077
|
+
}
|
|
1061
1078
|
await fetchSessionDetail(currentSessionId);
|
|
1062
1079
|
if (myNav !== navCounter) return;
|
|
1063
1080
|
renderDetail();
|
|
1064
1081
|
}
|
|
1065
1082
|
break;
|
|
1066
1083
|
}
|
|
1084
|
+
if (prevSelectedIdx >= 0) selectRow(prevSelectedIdx);
|
|
1067
1085
|
} catch (err) {
|
|
1068
1086
|
if (myNav !== navCounter) return;
|
|
1069
1087
|
console.error(`Failed to load ${view}:`, err);
|
|
@@ -1230,11 +1248,11 @@ document.addEventListener('keydown', (e) => {
|
|
|
1230
1248
|
|
|
1231
1249
|
// #region TOAST
|
|
1232
1250
|
|
|
1233
|
-
function showToast(msg, persistent) {
|
|
1251
|
+
function showToast(msg, persistent, type) {
|
|
1234
1252
|
const container = document.getElementById('toast');
|
|
1235
1253
|
if (!container) return;
|
|
1236
1254
|
const el = document.createElement('div');
|
|
1237
|
-
el.className = 'toast';
|
|
1255
|
+
el.className = type ? `toast toast-${type}` : 'toast';
|
|
1238
1256
|
el.textContent = msg;
|
|
1239
1257
|
container.appendChild(el);
|
|
1240
1258
|
if (!persistent) setTimeout(() => el.remove(), 3000);
|
|
@@ -1279,6 +1297,7 @@ window.hubNavigate = function hubNavigate(app, url) {
|
|
|
1279
1297
|
// #region INIT
|
|
1280
1298
|
|
|
1281
1299
|
loadTheme();
|
|
1300
|
+
loadSort();
|
|
1282
1301
|
|
|
1283
1302
|
document.addEventListener('click', async (e) => {
|
|
1284
1303
|
if (e.target.matches('.parent-breadcrumb')) {
|
|
@@ -1293,9 +1312,6 @@ document.addEventListener('DOMContentLoaded', async () => {
|
|
|
1293
1312
|
dateRange = loadDateRange();
|
|
1294
1313
|
document.getElementById('rangeSelect').value = dateRange;
|
|
1295
1314
|
|
|
1296
|
-
if (state.sort) sortField = state.sort;
|
|
1297
|
-
if (state.order) sortOrder = state.order;
|
|
1298
|
-
|
|
1299
1315
|
if (state.session) {
|
|
1300
1316
|
currentSessionId = state.session;
|
|
1301
1317
|
parentView = state.parentView;
|
|
@@ -1317,7 +1333,6 @@ document.addEventListener('DOMContentLoaded', async () => {
|
|
|
1317
1333
|
window.addEventListener('popstate', () => {
|
|
1318
1334
|
const state = getUrlState();
|
|
1319
1335
|
currentView = state.view || 'overview';
|
|
1320
|
-
loadSort();
|
|
1321
1336
|
parentView = state.parentView;
|
|
1322
1337
|
currentProjectPath = state.project;
|
|
1323
1338
|
currentProjectName = state.projectName;
|
package/public/style.css
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
--accent-text: #f0a070;
|
|
15
15
|
--accent-dim: rgba(232, 111, 51, 0.22);
|
|
16
16
|
--accent-glow: rgba(232, 111, 51, 0.55);
|
|
17
|
+
--chart-fill: rgba(232, 111, 51, 0.6);
|
|
17
18
|
--success: #3ecf8e;
|
|
18
19
|
--success-dim: rgba(62, 207, 142, 0.18);
|
|
19
20
|
--warning: #f0b429;
|
|
@@ -22,12 +23,12 @@
|
|
|
22
23
|
--error-dim: rgba(239, 68, 68, 0.18);
|
|
23
24
|
--mono: 'IBM Plex Mono', monospace;
|
|
24
25
|
--serif: 'Playfair Display', serif;
|
|
25
|
-
--chart-1: #
|
|
26
|
-
--chart-2: #
|
|
27
|
-
--chart-3: #
|
|
28
|
-
--chart-4: #
|
|
29
|
-
--chart-5: #
|
|
30
|
-
--chart-6: #
|
|
26
|
+
--chart-1: #e86f33;
|
|
27
|
+
--chart-2: #4a9eda;
|
|
28
|
+
--chart-3: #3ecf8e;
|
|
29
|
+
--chart-4: #f0b429;
|
|
30
|
+
--chart-5: #b784f5;
|
|
31
|
+
--chart-6: #fb7185;
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
/* #endregion */
|
|
@@ -547,6 +548,18 @@ body {
|
|
|
547
548
|
vertical-align: middle;
|
|
548
549
|
}
|
|
549
550
|
|
|
551
|
+
.tool-tag {
|
|
552
|
+
font-size: 9px;
|
|
553
|
+
text-transform: lowercase;
|
|
554
|
+
letter-spacing: 0.03em;
|
|
555
|
+
color: var(--chart-2, #60a5fa);
|
|
556
|
+
background: rgba(96, 165, 250, 0.12);
|
|
557
|
+
padding: 1px 5px;
|
|
558
|
+
border-radius: 3px;
|
|
559
|
+
margin-left: 4px;
|
|
560
|
+
vertical-align: middle;
|
|
561
|
+
}
|
|
562
|
+
|
|
550
563
|
/* #endregion */
|
|
551
564
|
|
|
552
565
|
/* #region LOADING */
|
|
@@ -745,6 +758,11 @@ body {
|
|
|
745
758
|
animation: slideIn 0.2s ease;
|
|
746
759
|
}
|
|
747
760
|
|
|
761
|
+
.toast.toast-success {
|
|
762
|
+
border-color: #2ea043;
|
|
763
|
+
color: #2ea043;
|
|
764
|
+
}
|
|
765
|
+
|
|
748
766
|
@keyframes slideIn {
|
|
749
767
|
from {
|
|
750
768
|
opacity: 0;
|
|
@@ -773,18 +791,19 @@ body.light {
|
|
|
773
791
|
--accent-text: #b85a20;
|
|
774
792
|
--accent-dim: rgba(232, 111, 51, 0.18);
|
|
775
793
|
--accent-glow: rgba(232, 111, 51, 0.5);
|
|
794
|
+
--chart-fill: rgba(232, 111, 51, 0.5);
|
|
776
795
|
--success: #1a8a5a;
|
|
777
796
|
--success-dim: rgba(26, 138, 90, 0.15);
|
|
778
797
|
--warning: #b07d0a;
|
|
779
798
|
--warning-dim: rgba(176, 125, 10, 0.15);
|
|
780
799
|
--error: #c53030;
|
|
781
800
|
--error-dim: rgba(197, 48, 48, 0.15);
|
|
782
|
-
--chart-1: #
|
|
783
|
-
--chart-2: #
|
|
784
|
-
--chart-3: #
|
|
785
|
-
--chart-4: #
|
|
786
|
-
--chart-5: #
|
|
787
|
-
--chart-6: #
|
|
801
|
+
--chart-1: #e86f33;
|
|
802
|
+
--chart-2: #4a9eda;
|
|
803
|
+
--chart-3: #3ecf8e;
|
|
804
|
+
--chart-4: #f0b429;
|
|
805
|
+
--chart-5: #b784f5;
|
|
806
|
+
--chart-6: #fb7185;
|
|
788
807
|
}
|
|
789
808
|
|
|
790
809
|
/* #endregion */
|
package/server.js
CHANGED
|
@@ -191,6 +191,14 @@ function createDedupeHash(data) {
|
|
|
191
191
|
return `${mid}:${rid}`;
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
+
function extractTools(content) {
|
|
195
|
+
if (!Array.isArray(content)) return null;
|
|
196
|
+
const tools = content
|
|
197
|
+
.filter(c => c.type === 'tool_use' && c.name)
|
|
198
|
+
.map(c => c.name);
|
|
199
|
+
return tools.length > 0 ? tools : null;
|
|
200
|
+
}
|
|
201
|
+
|
|
194
202
|
function calculateEntryCost(data, pricing) {
|
|
195
203
|
// Auto mode: use costUSD if present, otherwise calculate
|
|
196
204
|
if (data.costUSD != null) return data.costUSD;
|
|
@@ -435,6 +443,7 @@ async function loadProjectData(files, pricing) {
|
|
|
435
443
|
cacheCreationTokens: usage.cache_creation_input_tokens || 0,
|
|
436
444
|
cacheReadTokens: usage.cache_read_input_tokens || 0,
|
|
437
445
|
speed: usage.speed || 'standard',
|
|
446
|
+
tools: extractTools(parsed.message?.content),
|
|
438
447
|
});
|
|
439
448
|
|
|
440
449
|
// Capture first user prompt from the JSONL (look for human/user messages)
|