@ekkos/cli 1.0.23 → 1.0.24
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 +44 -20
- package/package.json +1 -1
|
@@ -632,22 +632,27 @@ async function launchDashboard(initialSessionName, jsonlPath, refreshMs) {
|
|
|
632
632
|
style: { fg: 'red', bold: true }, // ansi redBright = official Clawd orange
|
|
633
633
|
});
|
|
634
634
|
// Token chart (fills 40% of remaining)
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
635
|
+
function createTokenChart(top, left, width, height) {
|
|
636
|
+
return contrib.line({
|
|
637
|
+
top, left, width, height,
|
|
638
|
+
label: ' Tokens/Turn (K) ',
|
|
639
|
+
showLegend: true,
|
|
640
|
+
legend: { width: 8 },
|
|
641
|
+
style: {
|
|
642
|
+
line: 'green',
|
|
643
|
+
text: 'white',
|
|
644
|
+
baseline: 'white',
|
|
645
|
+
border: { fg: 'cyan' },
|
|
646
|
+
},
|
|
647
|
+
border: { type: 'line', fg: 'cyan' },
|
|
648
|
+
xLabelPadding: 0,
|
|
649
|
+
xPadding: 1,
|
|
650
|
+
wholeNumbersOnly: false,
|
|
651
|
+
});
|
|
652
|
+
}
|
|
653
|
+
let tokenChart = createTokenChart(layout.chart.top, 0, W, layout.chart.height);
|
|
654
|
+
let chartLayoutW = 0;
|
|
655
|
+
let chartLayoutH = 0;
|
|
651
656
|
// Turn table — manual rendering for full-width columns + dim dividers
|
|
652
657
|
const turnBox = blessed.box({
|
|
653
658
|
top: layout.table.top, left: 0, width: W, height: layout.table.height,
|
|
@@ -704,10 +709,29 @@ async function launchDashboard(initialSessionName, jsonlPath, refreshMs) {
|
|
|
704
709
|
contextBox.left = H_PAD;
|
|
705
710
|
contextBox.width = contentWidth;
|
|
706
711
|
contextBox.height = layout.context.height;
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
712
|
+
// blessed-contrib line can keep a stale tiny canvas when terminals report
|
|
713
|
+
// initial dimensions incorrectly (observed in Windows Terminal). Rebuild
|
|
714
|
+
// the chart widget whenever dimensions change so the plot fills the panel.
|
|
715
|
+
if (chartLayoutW !== contentWidth || chartLayoutH !== layout.chart.height) {
|
|
716
|
+
try {
|
|
717
|
+
screen.remove(tokenChart);
|
|
718
|
+
}
|
|
719
|
+
catch { }
|
|
720
|
+
try {
|
|
721
|
+
tokenChart.destroy?.();
|
|
722
|
+
}
|
|
723
|
+
catch { }
|
|
724
|
+
tokenChart = createTokenChart(layout.chart.top, H_PAD, contentWidth, layout.chart.height);
|
|
725
|
+
chartLayoutW = contentWidth;
|
|
726
|
+
chartLayoutH = layout.chart.height;
|
|
727
|
+
screen.append(tokenChart);
|
|
728
|
+
}
|
|
729
|
+
else {
|
|
730
|
+
tokenChart.top = layout.chart.top;
|
|
731
|
+
tokenChart.left = H_PAD;
|
|
732
|
+
tokenChart.width = contentWidth;
|
|
733
|
+
tokenChart.height = layout.chart.height;
|
|
734
|
+
}
|
|
711
735
|
turnBox.top = layout.table.top;
|
|
712
736
|
turnBox.left = H_PAD;
|
|
713
737
|
turnBox.width = contentWidth;
|