@oxecli/oxe 1.0.10 → 1.0.12
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/dist/cli.js +9 -5
- package/dist/config.js +1 -0
- package/dist/ui.js +2 -0
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -222,7 +222,7 @@ export class CLI {
|
|
|
222
222
|
if (lower === "/exit" || lower === "/quit") {
|
|
223
223
|
this.saveSession(engine);
|
|
224
224
|
await engine.cleanupStoredResponses();
|
|
225
|
-
process.stdout.write("\nClosing terminal session. Goodbye!\n");
|
|
225
|
+
process.stdout.write("\nClosing terminal session. Goodbye!\n\n");
|
|
226
226
|
break;
|
|
227
227
|
}
|
|
228
228
|
if (lower === "/help") {
|
|
@@ -286,7 +286,7 @@ export class CLI {
|
|
|
286
286
|
if (this.interruptPending) {
|
|
287
287
|
this.saveSession(engine);
|
|
288
288
|
await engine.cleanupStoredResponses();
|
|
289
|
-
process.stdout.write("\nClosing terminal session. Goodbye!\n");
|
|
289
|
+
process.stdout.write("\nClosing terminal session. Goodbye!\n\n");
|
|
290
290
|
break;
|
|
291
291
|
}
|
|
292
292
|
this.interruptPending = true;
|
|
@@ -314,9 +314,10 @@ export async function main() {
|
|
|
314
314
|
catch (err) {
|
|
315
315
|
if (err?.message === "interrupt" || err?.message === "eof") {
|
|
316
316
|
// cleanup() already moved to a fresh line; the leading newline below
|
|
317
|
-
// leaves that row as a blank
|
|
318
|
-
//
|
|
319
|
-
process.stdout.write("\nClosing terminal session. Goodbye!\n");
|
|
317
|
+
// leaves that row as a blank (one under the prompt), and the trailing
|
|
318
|
+
// double-newline leaves a blank row under the message too.
|
|
319
|
+
process.stdout.write("\nClosing terminal session. Goodbye!\n\n");
|
|
320
|
+
process.exit(0);
|
|
320
321
|
return;
|
|
321
322
|
}
|
|
322
323
|
throw err;
|
|
@@ -332,4 +333,7 @@ export async function main() {
|
|
|
332
333
|
if (typeof client?.close === "function")
|
|
333
334
|
await client.close();
|
|
334
335
|
}
|
|
336
|
+
// The prompt's readline keypress listener is never removed and stdin remains
|
|
337
|
+
// resumed, so Node won't exit on its own after the loop ends. Exit explicitly.
|
|
338
|
+
process.exit(0);
|
|
335
339
|
}
|
package/dist/config.js
CHANGED
package/dist/ui.js
CHANGED
|
@@ -611,6 +611,8 @@ export function askBottomPrompt(label = "You", prefix = "❯", history = []) {
|
|
|
611
611
|
process.stdin.setRawMode(false);
|
|
612
612
|
showCursor();
|
|
613
613
|
clearBox();
|
|
614
|
+
process.stdin.removeListener("keypress", onKeypress);
|
|
615
|
+
process.stdin.pause();
|
|
614
616
|
if (isErr)
|
|
615
617
|
reject(value);
|
|
616
618
|
else
|