@oxecli/oxe 1.0.103 → 1.0.104

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 (3) hide show
  1. package/README.md +3 -1
  2. package/dist/ui.js +34 -3
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -20,7 +20,9 @@ Install Oxe globally with npm:
20
20
 
21
21
 
22
22
 
23
- Features
23
+ **Features**
24
+
25
+
24
26
 
25
27
  * Terminal-native — Work directly from your CLI.
26
28
  * Codebase-aware — Inspect and understand your project before making changes.
package/dist/ui.js CHANGED
@@ -667,13 +667,17 @@ export function dockTransientStart(mode = "blank") {
667
667
  return;
668
668
  dockEraseBox();
669
669
  if (mode === "flush") {
670
- // Park on the gap row directly under the preceding content (adjacent).
670
+ // Park directly under the preceding content (adjacent, no blank above), but
671
+ // still keep one blank row between the transient and the box — otherwise the
672
+ // working line (and the tool result that replaces it) sits flush against the
673
+ // prompt box. dockRel=2 mirrors the blank mode's spacing below the row.
671
674
  process.stdout.write("\x1b[1A\r");
672
675
  process.stdout.write("\n");
676
+ process.stdout.write("\n");
673
677
  process.stdout.write(dockFrameLines.join("\n"));
674
678
  process.stdout.write(`\x1b[${dockBoxRows - 1}A`);
675
- process.stdout.write("\x1b[1A\r");
676
- dockRel = 1;
679
+ process.stdout.write("\x1b[2A\r");
680
+ dockRel = 2;
677
681
  }
678
682
  else {
679
683
  // Park on a fresh spinner row that keeps a blank above and below it.
@@ -1390,6 +1394,7 @@ export function askBottomPrompt(label = "You", prefix = "❯", history = [], hin
1390
1394
  let draft = null;
1391
1395
  let bracketedPaste = false;
1392
1396
  let bracketedPasteBuffer = "";
1397
+ let bracketedPasteSince = 0;
1393
1398
  let pasteBurst = false;
1394
1399
  let pasteBurstTimer = null;
1395
1400
  readline.emitKeypressEvents(process.stdin);
@@ -1424,6 +1429,8 @@ export function askBottomPrompt(label = "You", prefix = "❯", history = [], hin
1424
1429
  : value;
1425
1430
  process.stdout.write("\x1b[?2004l");
1426
1431
  process.stdin.setRawMode(false);
1432
+ bracketedPaste = false;
1433
+ bracketedPasteBuffer = "";
1427
1434
  if (pasteBurstTimer)
1428
1435
  clearTimeout(pasteBurstTimer);
1429
1436
  if (isErr) {
@@ -1714,6 +1721,7 @@ export function askBottomPrompt(label = "You", prefix = "❯", history = [], hin
1714
1721
  const value = str || "";
1715
1722
  if (!bracketedPaste && (sequence === start || value === start)) {
1716
1723
  bracketedPaste = true;
1724
+ bracketedPasteSince = Date.now();
1717
1725
  bracketedPasteBuffer = "";
1718
1726
  const inline = value === start ? "" : value.startsWith(start) ? value.slice(start.length) : "";
1719
1727
  if (inline)
@@ -1734,6 +1742,29 @@ export function askBottomPrompt(label = "You", prefix = "❯", history = [], hin
1734
1742
  }
1735
1743
  if (!bracketedPaste)
1736
1744
  return false;
1745
+ // Safety net: if the paste-end marker (\x1b[201~) was lost — interrupted
1746
+ // paste, split escape sequence, or a terminal quirk — bracketedPaste stays
1747
+ // true and every later keystroke is swallowed here, which looks like the
1748
+ // input field locked up (even Ctrl+C is captured as a paste chunk). If the
1749
+ // paste has been open far longer than any real paste takes and a fresh
1750
+ // single-printable-char keystroke arrives, flush the buffered text as
1751
+ // literal input and reset so typing works again.
1752
+ if (Date.now() - bracketedPasteSince > 3000 &&
1753
+ str &&
1754
+ str.length === 1 &&
1755
+ !key?.ctrl &&
1756
+ !key?.meta) {
1757
+ const pasted = bracketedPasteBuffer
1758
+ .replace(/\r\n/g, "\n")
1759
+ .replace(/\r/g, "\n");
1760
+ bracketedPaste = false;
1761
+ bracketedPasteBuffer = "";
1762
+ if (pasted) {
1763
+ insert(pasted, true);
1764
+ repaint();
1765
+ }
1766
+ return false; // let this keystroke be handled normally below
1767
+ }
1737
1768
  if (sequence === end || value === end) {
1738
1769
  const pasted = bracketedPasteBuffer.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
1739
1770
  bracketedPaste = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxecli/oxe",
3
- "version": "1.0.103",
3
+ "version": "1.0.104",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },