bloby-bot 0.70.5 → 0.70.7
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/bin/cli.js +18 -15
- package/package.json +2 -1
package/bin/cli.js
CHANGED
|
@@ -355,8 +355,12 @@ class Steps {
|
|
|
355
355
|
render() {
|
|
356
356
|
if (!this.live) return;
|
|
357
357
|
let out = '';
|
|
358
|
-
|
|
359
|
-
|
|
358
|
+
// Move up by physical rows (long notes wrap) and clear the old frame;
|
|
359
|
+
// an undercounted cursor-up would repaint the steps below themselves.
|
|
360
|
+
if (this._lines > 0) out += `\x1b[${this._lines}A\x1b[0J`;
|
|
361
|
+
const cols = Math.max(20, process.stdout.columns || 80);
|
|
362
|
+
let rows = 0;
|
|
363
|
+
const W = (s = '') => { out += `\x1b[2K${s}\n`; rows += Math.max(1, Math.ceil(stripAnsi(s).length / cols)); };
|
|
360
364
|
for (let i = 0; i < this.titles.length; i++) {
|
|
361
365
|
if (i < this.current) W(` ${GLYPH.ok} ${this.titles[i]}`);
|
|
362
366
|
else if (i === this.current && this._failed) W(` ${GLYPH.err} ${this.titles[i]}`);
|
|
@@ -367,19 +371,12 @@ class Steps {
|
|
|
367
371
|
W();
|
|
368
372
|
const label = ratio >= 1 ? `${c.pink}Done${c.reset}` : `${c.dim}${Math.round(ratio * 100)}%${c.reset}`;
|
|
369
373
|
W(` ${progressBar(ratio)} ${label}`);
|
|
370
|
-
let count = this.titles.length + 2;
|
|
371
374
|
if (this.notes.length) {
|
|
372
375
|
W();
|
|
373
376
|
for (const n of this.notes) W(n);
|
|
374
|
-
count += 1 + this.notes.length;
|
|
375
|
-
}
|
|
376
|
-
if (count < this._lines) {
|
|
377
|
-
const extra = this._lines - count;
|
|
378
|
-
for (let i = 0; i < extra; i++) out += '\x1b[2K\n';
|
|
379
|
-
out += `\x1b[${extra}A`;
|
|
380
377
|
}
|
|
381
378
|
process.stdout.write(out);
|
|
382
|
-
this._lines =
|
|
379
|
+
this._lines = rows;
|
|
383
380
|
}
|
|
384
381
|
advance() {
|
|
385
382
|
if (this.current >= this.titles.length) return this;
|
|
@@ -1834,16 +1831,21 @@ function chooseTunnelMode() {
|
|
|
1834
1831
|
];
|
|
1835
1832
|
|
|
1836
1833
|
let selected = 0;
|
|
1837
|
-
let
|
|
1834
|
+
let rowCount = 0;
|
|
1835
|
+
let buf = '';
|
|
1838
1836
|
|
|
1837
|
+
// Count physical terminal rows, not logical lines — long lines wrap, and
|
|
1838
|
+
// an undercounted cursor-up repaints the menu below itself on every key.
|
|
1839
1839
|
function writeLine(text = '') {
|
|
1840
|
-
|
|
1841
|
-
|
|
1840
|
+
buf += `\x1b[2K${text}\n`;
|
|
1841
|
+
const cols = Math.max(20, process.stdout.columns || 80);
|
|
1842
|
+
rowCount += Math.max(1, Math.ceil(stripAnsi(text).length / cols));
|
|
1842
1843
|
}
|
|
1843
1844
|
|
|
1844
1845
|
function render() {
|
|
1845
|
-
|
|
1846
|
-
|
|
1846
|
+
buf = '';
|
|
1847
|
+
if (rowCount > 0) buf += `\x1b[${rowCount}A\x1b[0J`;
|
|
1848
|
+
rowCount = 0;
|
|
1847
1849
|
|
|
1848
1850
|
writeLine(` ${c.bold}${c.white}How do you want to connect your bot?${c.reset}`);
|
|
1849
1851
|
writeLine();
|
|
@@ -1861,6 +1863,7 @@ function chooseTunnelMode() {
|
|
|
1861
1863
|
}
|
|
1862
1864
|
if (i < options.length - 1) writeLine();
|
|
1863
1865
|
}
|
|
1866
|
+
process.stdout.write(buf);
|
|
1864
1867
|
}
|
|
1865
1868
|
|
|
1866
1869
|
process.stdout.write('\x1b[?25l');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bloby-bot",
|
|
3
|
-
"version": "0.70.
|
|
3
|
+
"version": "0.70.7",
|
|
4
4
|
"releaseNotes": [
|
|
5
5
|
"1. Fix: agent self-update ",
|
|
6
6
|
"1",
|
|
@@ -78,6 +78,7 @@
|
|
|
78
78
|
"radix-ui": "^1.4.3",
|
|
79
79
|
"react": "^19.2.4",
|
|
80
80
|
"react-dom": "^19.2.4",
|
|
81
|
+
"react-is": "^19.2.0",
|
|
81
82
|
"react-router": "^7.13.2",
|
|
82
83
|
"recharts": "^3.7.0",
|
|
83
84
|
"sonner": "^2.0.7",
|