@oxecli/oxe 1.0.9 → 1.0.10

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 CHANGED
@@ -290,6 +290,9 @@ export class CLI {
290
290
  break;
291
291
  }
292
292
  this.interruptPending = true;
293
+ // clearBox leaves the cursor on the leading blank row; the newline
294
+ // below places the message one row lower, giving one blank above it
295
+ // (mirrors Python's console.print()).
293
296
  process.stdout.write("\n");
294
297
  process.stdout.write(wasActive
295
298
  ? "\x1b[2mInterrupted. Press Ctrl+C again to exit, or type a new prompt.\x1b[0m\n"
@@ -310,6 +313,9 @@ export async function main() {
310
313
  }
311
314
  catch (err) {
312
315
  if (err?.message === "interrupt" || err?.message === "eof") {
316
+ // cleanup() already moved to a fresh line; the leading newline below
317
+ // leaves that row as a blank, giving exactly one blank under the prompt,
318
+ // and the trailing newline gives one blank under the goodbye message.
313
319
  process.stdout.write("\nClosing terminal session. Goodbye!\n");
314
320
  return;
315
321
  }
@@ -322,6 +328,8 @@ export async function main() {
322
328
  }
323
329
  finally {
324
330
  await engine.cleanupStoredResponses();
325
- await engine.client.close();
331
+ const client = engine.client;
332
+ if (typeof client?.close === "function")
333
+ await client.close();
326
334
  }
327
335
  }
package/dist/config.js CHANGED
@@ -236,9 +236,8 @@ export async function promptApiKey(prompt) {
236
236
  const onData = (buf) => {
237
237
  for (const b of buf) {
238
238
  if (b === 3) {
239
- // Ctrl+C
239
+ // Ctrl+C: cleanup() already writes the terminating newline.
240
240
  cleanup();
241
- process.stdout.write("\n");
242
241
  reject(new Error("interrupt"));
243
242
  return;
244
243
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxecli/oxe",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },