wispy-cli 2.7.21 → 2.7.23
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/wispy.mjs +18 -1
- package/package.json +1 -1
package/bin/wispy.mjs
CHANGED
|
@@ -1468,7 +1468,24 @@ if (command === "server" || command === "overview") {
|
|
|
1468
1468
|
// Already set up env flags above, fall through to REPL
|
|
1469
1469
|
}
|
|
1470
1470
|
|
|
1471
|
-
// If we get here
|
|
1471
|
+
// If we get here with no args → launch TUI (like OpenClaw)
|
|
1472
|
+
// Chat is only available through TUI. Use `wispy exec` for non-interactive one-shot.
|
|
1473
|
+
if (!command || command === "server" || command === "overview") {
|
|
1474
|
+
// No args → TUI
|
|
1475
|
+
if (!command) {
|
|
1476
|
+
try {
|
|
1477
|
+
await import(join(rootDir, "lib/wispy-tui.mjs"));
|
|
1478
|
+
// TUI handles its own lifecycle via waitUntilExit() — do NOT process.exit() here
|
|
1479
|
+
} catch (err) {
|
|
1480
|
+
console.error("TUI failed to start:", err.message);
|
|
1481
|
+
console.log("Falling back to REPL...");
|
|
1482
|
+
await import(join(rootDir, "lib/wispy-repl.mjs"));
|
|
1483
|
+
}
|
|
1484
|
+
// Keep process alive — TUI/REPL manages exit
|
|
1485
|
+
await new Promise(() => {}); // block forever, TUI calls process.exit() when done
|
|
1486
|
+
}
|
|
1487
|
+
}
|
|
1488
|
+
|
|
1472
1489
|
try {
|
|
1473
1490
|
await import(join(rootDir, "lib/wispy-repl.mjs"));
|
|
1474
1491
|
} catch (err) {
|
package/package.json
CHANGED