@oxecli/oxe 1.0.89 → 1.0.90
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/ui.js +13 -7
- package/package.json +1 -1
package/dist/ui.js
CHANGED
|
@@ -1205,7 +1205,8 @@ export function askBottomPrompt(label = "You", prefix = "❯", history = [], hin
|
|
|
1205
1205
|
// focused and editable; Enter won't re-submit and Ctrl+C interrupts it.
|
|
1206
1206
|
let submitting = false;
|
|
1207
1207
|
const clearBox = () => {
|
|
1208
|
-
|
|
1208
|
+
if (lastCursorRow > 0)
|
|
1209
|
+
process.stdout.write(`\x1b[${lastCursorRow}A`);
|
|
1209
1210
|
for (let i = 0; i < lastTotalRows; i++) {
|
|
1210
1211
|
process.stdout.write("\r\x1b[K");
|
|
1211
1212
|
if (i < lastTotalRows - 1)
|
|
@@ -1228,7 +1229,9 @@ export function askBottomPrompt(label = "You", prefix = "❯", history = [], hin
|
|
|
1228
1229
|
dockSetInactive();
|
|
1229
1230
|
}
|
|
1230
1231
|
else {
|
|
1231
|
-
|
|
1232
|
+
if (lastCursorRow > 0)
|
|
1233
|
+
process.stdout.write(`\x1b[${lastCursorRow}A`);
|
|
1234
|
+
process.stdout.write("\r");
|
|
1232
1235
|
dockSetFrame((prevFrameLines ?? []).join("\n"), lastTotalRows);
|
|
1233
1236
|
dockEnterDocked();
|
|
1234
1237
|
}
|
|
@@ -1266,7 +1269,11 @@ export function askBottomPrompt(label = "You", prefix = "❯", history = [], hin
|
|
|
1266
1269
|
process.stdout.write(`\x1b[${up}A\r`);
|
|
1267
1270
|
}
|
|
1268
1271
|
else {
|
|
1269
|
-
|
|
1272
|
+
// Cursor is parked at the box top (row 0). Never emit \x1b[0A (which
|
|
1273
|
+
// terminals treat as "cursor up 1"): start from column 0, redraw only
|
|
1274
|
+
// the changed lines, then return the cursor to the box top so dock
|
|
1275
|
+
// content (AI streaming, tool results) keeps inserting above the box.
|
|
1276
|
+
process.stdout.write("\r");
|
|
1270
1277
|
const oldLines = prevFrameLines ?? [];
|
|
1271
1278
|
const maxLen = Math.max(oldLines.length, newLines.length);
|
|
1272
1279
|
for (let i = 0; i < maxLen; i++) {
|
|
@@ -1276,10 +1283,9 @@ export function askBottomPrompt(label = "You", prefix = "❯", history = [], hin
|
|
|
1276
1283
|
if (i < maxLen - 1)
|
|
1277
1284
|
process.stdout.write("\n");
|
|
1278
1285
|
}
|
|
1279
|
-
|
|
1280
|
-
//
|
|
1281
|
-
|
|
1282
|
-
process.stdout.write(`\x1b[${atLine}A\r`);
|
|
1286
|
+
// Return to the box top (maxLen-1 rows up; never 0 since the frame has
|
|
1287
|
+
// at least a top border, body and bottom border).
|
|
1288
|
+
process.stdout.write(`\x1b[${maxLen - 1}A\r`);
|
|
1283
1289
|
prevFrameLines = newLines;
|
|
1284
1290
|
lastCursorRow = 0;
|
|
1285
1291
|
lastTotalRows = totalRows;
|