@ekkos/cli 1.0.21 → 1.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/dashboard.js +12 -8
- package/package.json +1 -1
|
@@ -446,7 +446,8 @@ async function waitForNewSession() {
|
|
|
446
446
|
const jsonlPath = allNewJsonl[0].path;
|
|
447
447
|
// Derive name from filename (e.g. abc123.jsonl → use candidateName if set, else basename)
|
|
448
448
|
const baseName = path.basename(jsonlPath, '.jsonl');
|
|
449
|
-
const
|
|
449
|
+
const derivedName = /^[0-9a-f]{8}-/.test(baseName) ? (0, state_js_1.uuidToWords)(baseName) : baseName;
|
|
450
|
+
const name = candidateName || derivedName;
|
|
450
451
|
console.log(chalk_1.default.green(` Found session via scan: ${name}`));
|
|
451
452
|
return { sessionName: name, jsonlPath };
|
|
452
453
|
}
|
|
@@ -983,6 +984,7 @@ async function launchDashboard(initialSessionName, jsonlPath, refreshMs) {
|
|
|
983
984
|
const savingsStr = totalSavings > 0
|
|
984
985
|
? ` {green-fg}saved $${totalSavings.toFixed(2)}{/green-fg}`
|
|
985
986
|
: '';
|
|
987
|
+
footerBox.setLabel(` ${sessionName} `);
|
|
986
988
|
footerBox.setContent(` {green-fg}$${data.totalCost.toFixed(2)}{/green-fg}` +
|
|
987
989
|
` ${totalTokensM}M` +
|
|
988
990
|
` ${routingStr}` +
|
|
@@ -1183,13 +1185,15 @@ async function launchDashboard(initialSessionName, jsonlPath, refreshMs) {
|
|
|
1183
1185
|
});
|
|
1184
1186
|
screen.append(help);
|
|
1185
1187
|
screen.render();
|
|
1186
|
-
//
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1188
|
+
// Defer listener so the '?' keypress that opened help doesn't immediately close it
|
|
1189
|
+
setImmediate(() => {
|
|
1190
|
+
const closeHelp = () => {
|
|
1191
|
+
help.destroy();
|
|
1192
|
+
screen.render();
|
|
1193
|
+
screen.removeListener('key', closeHelp);
|
|
1194
|
+
};
|
|
1195
|
+
screen.once('key', closeHelp);
|
|
1196
|
+
});
|
|
1193
1197
|
});
|
|
1194
1198
|
// Clear terminal buffer — prevents garbage text from previous commands
|
|
1195
1199
|
screen.program.clear();
|