limbo-ai 1.9.3 → 1.9.4
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/cli.js +18 -3
- package/package.json +1 -1
package/cli.js
CHANGED
|
@@ -813,8 +813,17 @@ function applyOpenClawConfig(cfg) {
|
|
|
813
813
|
ok(t(cfg.language, 'configFlowDone'));
|
|
814
814
|
}
|
|
815
815
|
|
|
816
|
-
// Strip ANSI escape sequences
|
|
817
|
-
|
|
816
|
+
// Strip all ANSI/VT100 escape sequences from a string.
|
|
817
|
+
// Uses standards-based ECMA-48 byte ranges:
|
|
818
|
+
// CSI: ESC [ <param bytes 0x30-0x3F>* <intermediate bytes 0x20-0x2F>* <final byte 0x40-0x7E>
|
|
819
|
+
// Two-char ESC: ESC <0x40-0x5F> (e.g. ESC M, ESC =, ESC 7/8 save/restore cursor)
|
|
820
|
+
// OSC: ESC ] <any> BEL|ST
|
|
821
|
+
// Covers private-mode sequences like \x1b[?25l (hide cursor) that the old [0-9;]* missed.
|
|
822
|
+
const stripAnsi = (str) => str
|
|
823
|
+
.replace(/\x1b\[[0-?]*[ -/]*[@-~]/g, '') // CSI sequences (all parameter byte combos)
|
|
824
|
+
.replace(/\x1b[@-Z\\-_]/g, '') // two-char ESC sequences
|
|
825
|
+
.replace(/\x1b\][^\x07\x1b]*(?:\x07|\x1b\\)/g, '') // OSC sequences
|
|
826
|
+
.replace(/\r/g, '');
|
|
818
827
|
|
|
819
828
|
// Spawn OpenClaw auth with filtered output: extract OAuth URLs, suppress branding.
|
|
820
829
|
// --tty is required so openclaw sees a TTY inside the container and runs the auth wizard.
|
|
@@ -852,8 +861,14 @@ function streamFilteredAuth(dockerArgs, onUrl = null) {
|
|
|
852
861
|
}
|
|
853
862
|
return; // don't double-print the line containing the URL
|
|
854
863
|
}
|
|
855
|
-
// Suppress OpenClaw branding
|
|
864
|
+
// Suppress OpenClaw branding
|
|
856
865
|
if (/openclaw/i.test(line)) return;
|
|
866
|
+
// Suppress TUI chrome: lines that are only spinner/decoration/box-drawing chars.
|
|
867
|
+
// OpenClaw's TUI writes animation frames separated by \r — after our \r-split, each
|
|
868
|
+
// frame becomes a short line (often a single char). We filter these out so they don't
|
|
869
|
+
// scatter across the terminal as individual console.log lines.
|
|
870
|
+
const tuiChrome = /^[\s\u2500-\u257f\u2580-\u259f\u25a0-\u25ff\u2600-\u26ff◇◆●○◈→←↑↓⠀-\u28ff]*$/u;
|
|
871
|
+
if (tuiChrome.test(line)) return;
|
|
857
872
|
if (line.trim()) console.log(` ${line}`);
|
|
858
873
|
};
|
|
859
874
|
|