acuvo-code 0.5.2 → 0.5.3

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.
Files changed (2) hide show
  1. package/lib/input-box.mjs +15 -1
  2. package/package.json +1 -1
package/lib/input-box.mjs CHANGED
@@ -457,7 +457,21 @@ export function pinRegion(output, { rows = 2, env = process.env } = {}) {
457
457
  * otherwise sit inside our region and scroll along with the session, so the
458
458
  * banner would never be at the top of anything.
459
459
  */
460
- output.write(`${CSI}2J${CSI}1;${bottom}r${CSI}1;1H`);
460
+ /**
461
+ * ⚠️⚠️ `3J` BEFORE `2J`, AND WITHOUT IT THE PROMPT IS OFF-SCREEN. Roman:
462
+ * *"when you type acuvo you have to scroll down to see the prompt area."*
463
+ *
464
+ * `ESC[2J` clears the visible screen but PUSHES what was there into
465
+ * SCROLLBACK — so VS Code (and most terminals) leave the viewport parked up
466
+ * in the history, showing the old shell output with our banner and prompt
467
+ * below the fold. The user has to scroll to find the thing they just started.
468
+ *
469
+ * `ESC[3J` deletes the scrollback itself, so there is nothing above to be
470
+ * parked in and the viewport has nowhere to sit but the top of a clean
471
+ * screen. Both are needed and the order matters: erase the history, erase the
472
+ * screen, then home.
473
+ */
474
+ output.write(`${CSI}3J${CSI}2J${CSI}1;${bottom}r${CSI}1;1H`);
461
475
 
462
476
  const release = () => {
463
477
  if (released) return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "acuvo-code",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "description": "Acuvo Code — the terminal client for the Acuvo capability registry. Zero dependencies, by design.",
5
5
  "type": "module",
6
6
  "bin": {