@taj-special/dravix-code 1.4.6 → 1.4.7
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/index.js +2 -2
- package/dist/cli/repl.js +15 -11
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -278,9 +278,9 @@ async function main() {
|
|
|
278
278
|
}
|
|
279
279
|
const rows = process.stdout.rows ?? 24;
|
|
280
280
|
const cols = process.stdout.columns ?? 80;
|
|
281
|
-
// FULL-SCREEN: clear everything including scrollback, set scroll region
|
|
281
|
+
// FULL-SCREEN: clear everything including scrollback, set scroll region for chat (bottom 3 rows fixed)
|
|
282
282
|
process.stdout.write('\x1b[2J\x1b[3J'); // Clear screen + scrollback buffer
|
|
283
|
-
process.stdout.write(`\x1b[1;${rows}r`); // Scroll region =
|
|
283
|
+
process.stdout.write(`\x1b[1;${rows - 3}r`); // Scroll region = chat area (rows 1 to rows-3)
|
|
284
284
|
process.stdout.write('\x1b[1;1H'); // Move to top-left
|
|
285
285
|
// Draw the app (ONE logo only)
|
|
286
286
|
banner();
|
package/dist/cli/repl.js
CHANGED
|
@@ -877,10 +877,12 @@ async function askPermission(label, key, alwaysAllowed, noAlways, diffShown, pre
|
|
|
877
877
|
});
|
|
878
878
|
}
|
|
879
879
|
async function readLine(prompt, cwd) {
|
|
880
|
+
const sepRow = (process.stdout.rows ?? 24) - 2;
|
|
881
|
+
const inpRow = (process.stdout.rows ?? 24) - 1;
|
|
880
882
|
let SEP = colors.dim(' ' + '─'.repeat(Math.max((process.stdout.columns ?? 80) - 4, 40)));
|
|
881
|
-
|
|
882
|
-
process.stdout.write(
|
|
883
|
-
process.stdout.write(
|
|
883
|
+
// Draw fixed bottom separator + input
|
|
884
|
+
process.stdout.write(`\x1b[${sepRow};1H\x1b[2K${SEP}`);
|
|
885
|
+
process.stdout.write(`\x1b[${inpRow};1H\x1b[2K${prompt}`);
|
|
884
886
|
return new Promise((resolve) => {
|
|
885
887
|
let prefix = '';
|
|
886
888
|
let pasteBlock = null;
|
|
@@ -906,9 +908,7 @@ async function readLine(prompt, cwd) {
|
|
|
906
908
|
let tabPreWord = '';
|
|
907
909
|
function onResize() {
|
|
908
910
|
const newCols = process.stdout.columns ?? 80;
|
|
909
|
-
const oldSepRows = Math.ceil(sepVisualLen / newCols);
|
|
910
911
|
SEP = colors.dim(' ' + '─'.repeat(Math.max(newCols - 4, 40)));
|
|
911
|
-
sepVisualLen = 2 + Math.max(newCols - 4, 40);
|
|
912
912
|
if (atMode) {
|
|
913
913
|
for (let i = 0; i < atBoxLines + 3; i++)
|
|
914
914
|
process.stdout.write('\x1b[1A');
|
|
@@ -934,11 +934,11 @@ async function readLine(prompt, cwd) {
|
|
|
934
934
|
drawTabPicker();
|
|
935
935
|
}
|
|
936
936
|
else {
|
|
937
|
-
|
|
938
|
-
process.stdout.
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
process.stdout.write(
|
|
937
|
+
// No mode active — just redraw the fixed bottom separator + input
|
|
938
|
+
const sepR = (process.stdout.rows ?? 24) - 2;
|
|
939
|
+
const inpR = (process.stdout.rows ?? 24) - 1;
|
|
940
|
+
process.stdout.write(`\x1b[${sepR};1H\x1b[2K${SEP}`);
|
|
941
|
+
process.stdout.write(`\x1b[${inpR};1H`);
|
|
942
942
|
redraw();
|
|
943
943
|
}
|
|
944
944
|
}
|
|
@@ -1211,6 +1211,7 @@ async function readLine(prompt, cwd) {
|
|
|
1211
1211
|
}
|
|
1212
1212
|
function redraw() {
|
|
1213
1213
|
const cols = process.stdout.columns ?? 80;
|
|
1214
|
+
const inpRow = (process.stdout.rows ?? 24) - 1;
|
|
1214
1215
|
const maxLen = Math.max(cols - 6, 10);
|
|
1215
1216
|
let displayPre = prefix;
|
|
1216
1217
|
if (displayPre.length > maxLen)
|
|
@@ -1223,7 +1224,7 @@ async function readLine(prompt, cwd) {
|
|
|
1223
1224
|
else {
|
|
1224
1225
|
inp = colors.primary(' › ') + colors.text(displayPre);
|
|
1225
1226
|
}
|
|
1226
|
-
process.stdout.write(
|
|
1227
|
+
process.stdout.write(`\x1b[${inpRow};1H\x1b[2K` + inp);
|
|
1227
1228
|
process.stdout.write('\r\n' + SEP + '\x1b[1A\r' + inp);
|
|
1228
1229
|
}
|
|
1229
1230
|
function submit() {
|
|
@@ -1246,6 +1247,9 @@ async function readLine(prompt, cwd) {
|
|
|
1246
1247
|
process.stdout.write('\r\x1b[K');
|
|
1247
1248
|
process.stdout.write('\x1b[1B\x1b[2K');
|
|
1248
1249
|
process.stdout.write('\x1b[2A\x1b[2K');
|
|
1250
|
+
// Move cursor to bottom of scroll region for next AI output
|
|
1251
|
+
const scrEnd = (process.stdout.rows ?? 24) - 3;
|
|
1252
|
+
process.stdout.write(`\x1b[${scrEnd};1H`);
|
|
1249
1253
|
if (!text) {
|
|
1250
1254
|
resolve(null);
|
|
1251
1255
|
return;
|