maxpool 1.24.44 → 1.24.45

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/tui.js +8 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "maxpool",
3
- "version": "1.24.44",
3
+ "version": "1.24.45",
4
4
  "description": "Multi-account Claude Code proxy with adaptive, rate-aware load balancing across Claude accounts",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/tui.js CHANGED
@@ -76,6 +76,12 @@ function acctHeader(W) {
76
76
  + quota;
77
77
  }
78
78
 
79
+ /** padStart by VISIBLE width (ANSI color codes take no columns). */
80
+ function lpadVis(s, w) {
81
+ const gap = w - vw(s);
82
+ return gap > 0 ? ' '.repeat(gap) + s : s;
83
+ }
84
+
79
85
  function rpad(s, w) {
80
86
  const gap = w - vw(s);
81
87
  return gap > 0 ? s + ' '.repeat(gap) : s;
@@ -2569,11 +2575,11 @@ export class TUI {
2569
2575
  for (const k of Object.keys(tot)) tot[k] += w[k];
2570
2576
  out.push(' ' + name.slice(0, 10).padEnd(10)
2571
2577
  + [fmt(w.h24), delta(w.h24, w.h24p), fmt(w.d7), delta(w.d7, w.d7p), fmt(w.d30), delta(w.d30, w.d30p), fmt(w.total), fmtTok(w.tok7)]
2572
- .map(c => String(c).padStart(CW)).join(''));
2578
+ .map(c => lpadVis(String(c), CW)).join(''));
2573
2579
  }
2574
2580
  out.push(dim(' ' + 'total'.padEnd(10)
2575
2581
  + [fmt(tot.h24), delta(tot.h24, tot.h24p), fmt(tot.d7), delta(tot.d7, tot.d7p), fmt(tot.d30), delta(tot.d30, tot.d30p), fmt(tot.total), fmtTok(tot.tok7)]
2576
- .map(c => String(c).padStart(CW)).join('')));
2582
+ .map(c => lpadVis(String(c), CW)).join('')));
2577
2583
 
2578
2584
  const link = (this.am.poolLinks || []).find(l => l.lastOkAt);
2579
2585
  out.push(dim(` data since boot${link ? ` · team pool synced ${new Date(link.lastOkAt).toLocaleTimeString()}` : ''}`));