lazyclaw 3.99.10 → 3.99.11
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/README.md +1 -1
- package/cli.mjs +21 -2
- package/package.json +1 -1
package/README.md
CHANGED
package/cli.mjs
CHANGED
|
@@ -3655,8 +3655,15 @@ async function cmdLauncher() {
|
|
|
3655
3655
|
// Outer loop — each iteration is one menu render → pick →
|
|
3656
3656
|
// dispatch round. Subcommand return drops back here and the menu
|
|
3657
3657
|
// is redrawn. Quit / Esc / Ctrl-C breaks the loop and returns,
|
|
3658
|
-
// which lets the calling main() exit naturally
|
|
3659
|
-
//
|
|
3658
|
+
// which lets the calling main() exit naturally.
|
|
3659
|
+
//
|
|
3660
|
+
// try/finally below is load-bearing: the loop body keeps stdin
|
|
3661
|
+
// ref'd so the picker's keypress events fire. If we just `return`
|
|
3662
|
+
// on Quit, stdin stays ref'd and Node's event loop never empties
|
|
3663
|
+
// → the `lazyclaw` process hangs forever after the user picked
|
|
3664
|
+
// Quit. The finally explicitly pauses + unrefs stdin so the
|
|
3665
|
+
// process exits cleanly the moment the user picks Quit.
|
|
3666
|
+
try {
|
|
3660
3667
|
while (true) {
|
|
3661
3668
|
// First-run / config-missing guard: a fresh install has no
|
|
3662
3669
|
// `provider` set, so any menu pick that calls a provider would
|
|
@@ -3767,6 +3774,18 @@ async function cmdLauncher() {
|
|
|
3767
3774
|
await _quickPrompt(` ${dim('Press Enter to return to the menu… ')}`);
|
|
3768
3775
|
}
|
|
3769
3776
|
}
|
|
3777
|
+
} finally {
|
|
3778
|
+
// Drop the stdin holds we kept open while the menu was active.
|
|
3779
|
+
// Without this, the Node event loop never empties on Quit and
|
|
3780
|
+
// the `lazyclaw` process hangs at the shell prompt. Mirrors the
|
|
3781
|
+
// cleanup path cmdChat installed in v3.92 for the same reason.
|
|
3782
|
+
if (process.stdin.isTTY && process.stdin.setRawMode) {
|
|
3783
|
+
try { process.stdin.setRawMode(false); } catch (_) {}
|
|
3784
|
+
}
|
|
3785
|
+
try { process.stdout.write('\x1b[?25h'); } catch (_) {} // restore cursor
|
|
3786
|
+
try { process.stdin.pause(); } catch (_) {}
|
|
3787
|
+
try { process.stdin.unref(); } catch (_) {}
|
|
3788
|
+
}
|
|
3770
3789
|
}
|
|
3771
3790
|
|
|
3772
3791
|
async function _quickPrompt(label) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lazyclaw",
|
|
3
|
-
"version": "3.99.
|
|
3
|
+
"version": "3.99.11",
|
|
4
4
|
"description": "Lazy, elegant terminal CLI for chatting with Claude / OpenAI / Gemini / Ollama and orchestrating multi-step LLM workflows. Banner-on-launch, slash-command ghost autocomplete, persistent sessions, local HTTP gateway.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude",
|