opencode-statboard 2.10.8 → 2.10.9
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/tui-dashboard.js +12 -3
package/package.json
CHANGED
package/tui-dashboard.js
CHANGED
|
@@ -441,6 +441,15 @@ class TUIServer {
|
|
|
441
441
|
}
|
|
442
442
|
}
|
|
443
443
|
|
|
444
|
+
fillScreen(lines) {
|
|
445
|
+
const height = this.getContentHeight();
|
|
446
|
+
const width = this.getContentWidth();
|
|
447
|
+
const contentWidth = width - 2; // account for borders
|
|
448
|
+
const contentHeight = height - 2;
|
|
449
|
+
while (lines.length < contentHeight) lines.push('');
|
|
450
|
+
return lines.map(l => l.padEnd(contentWidth)).join('\n');
|
|
451
|
+
}
|
|
452
|
+
|
|
444
453
|
renderOverview() {
|
|
445
454
|
const ov = this.data;
|
|
446
455
|
const t = this.t.bind(this);
|
|
@@ -472,7 +481,7 @@ class TUIServer {
|
|
|
472
481
|
'{bold}' + t('avgCostDay') + ':{/bold} ' + this.formatCost(cost.avgCostPerDay || 0),
|
|
473
482
|
'{bold}' + t('avgTokensDay') + ':{/bold} ' + this.formatNumber(cost.avgTokensPerDay || 0)
|
|
474
483
|
];
|
|
475
|
-
return
|
|
484
|
+
return this.fillScreen(lines);
|
|
476
485
|
}
|
|
477
486
|
|
|
478
487
|
renderProjects() {
|
|
@@ -501,7 +510,7 @@ class TUIServer {
|
|
|
501
510
|
lines.push('{gray}... ' + t('noData') + ' ' + (projects.length - 50) + ' ' + t('projects') + '{/gray}');
|
|
502
511
|
}
|
|
503
512
|
|
|
504
|
-
return
|
|
513
|
+
return this.fillScreen(lines);
|
|
505
514
|
}
|
|
506
515
|
|
|
507
516
|
renderModels() {
|
|
@@ -527,7 +536,7 @@ class TUIServer {
|
|
|
527
536
|
lines.push(namePad + ' ' + provPad + ' ' + tokPad + ' ' + costPad + ' ' + speedPad);
|
|
528
537
|
}
|
|
529
538
|
|
|
530
|
-
return
|
|
539
|
+
return this.fillScreen(lines);
|
|
531
540
|
}
|
|
532
541
|
|
|
533
542
|
renderTrend() {
|