limbo-ai 1.5.0 → 1.6.0
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 +15 -3
- package/package.json +1 -1
package/cli.js
CHANGED
|
@@ -17,7 +17,7 @@ const LIMBO_DIR = path.join(os.homedir(), '.limbo');
|
|
|
17
17
|
const ENV_FILE = path.join(LIMBO_DIR, '.env');
|
|
18
18
|
const COMPOSE_FILE = path.join(LIMBO_DIR, 'docker-compose.yml');
|
|
19
19
|
const GHCR_IMAGE = 'ghcr.io/tomasward1/limbo';
|
|
20
|
-
const DEFAULT_TAG = '
|
|
20
|
+
const DEFAULT_TAG = require('./package.json').version;
|
|
21
21
|
const PORT = 18789;
|
|
22
22
|
|
|
23
23
|
// OpenClaw compatibility snapshots from official docs:
|
|
@@ -348,6 +348,7 @@ async function selectMenu(question, options, lang) {
|
|
|
348
348
|
|
|
349
349
|
return new Promise((resolve) => {
|
|
350
350
|
let selectedIndex = 0;
|
|
351
|
+
let lastRenderLineCount = 0;
|
|
351
352
|
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
352
353
|
readline.emitKeypressEvents(process.stdin, rl);
|
|
353
354
|
const previousRawMode = process.stdin.isRaw;
|
|
@@ -361,9 +362,20 @@ async function selectMenu(question, options, lang) {
|
|
|
361
362
|
}
|
|
362
363
|
|
|
363
364
|
function draw() {
|
|
365
|
+
const output = renderMenu(question, options, selectedIndex, lang);
|
|
366
|
+
if (lastRenderLineCount > 0) {
|
|
367
|
+
readline.moveCursor(process.stdout, 0, -lastRenderLineCount);
|
|
368
|
+
}
|
|
369
|
+
for (let i = 0; i < lastRenderLineCount; i++) {
|
|
370
|
+
readline.clearLine(process.stdout, 0);
|
|
371
|
+
if (i < lastRenderLineCount - 1) readline.moveCursor(process.stdout, 0, 1);
|
|
372
|
+
}
|
|
373
|
+
if (lastRenderLineCount > 0) {
|
|
374
|
+
readline.moveCursor(process.stdout, 0, -Math.max(lastRenderLineCount - 1, 0));
|
|
375
|
+
}
|
|
364
376
|
readline.cursorTo(process.stdout, 0);
|
|
365
|
-
|
|
366
|
-
|
|
377
|
+
process.stdout.write(output);
|
|
378
|
+
lastRenderLineCount = output.split('\n').length;
|
|
367
379
|
}
|
|
368
380
|
|
|
369
381
|
function onKeypress(_, key = {}) {
|