termux-dev 1.4.4 → 1.4.5
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/assets/banner.svg +1 -1
- package/assets/preview_work1.png +0 -0
- package/dist/cli/doctor.js +1 -1
- package/dist/cli/headless.js +1 -1
- package/dist/cli/index.js +6 -6
- package/dist/cli/prompt.js +85 -64
- package/dist/cli/server.js +1 -1
- package/dist/mcp/client.js +1 -1
- package/package.json +1 -1
package/assets/banner.svg
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
<!-- Tagline & Badge -->
|
|
27
27
|
<text x="425" y="142" font-family="system-ui, -apple-system, sans-serif" font-size="14" font-weight="600" fill="#8b949e" text-anchor="middle" letter-spacing="3">
|
|
28
|
-
THE TERMINAL-NATIVE AI CODING AGENT <tspan fill="#00f2fe" font-weight="bold">v1.4.
|
|
28
|
+
THE TERMINAL-NATIVE AI CODING AGENT <tspan fill="#00f2fe" font-weight="bold">v1.4.5</tspan>
|
|
29
29
|
</text>
|
|
30
30
|
|
|
31
31
|
<!-- Top Accent Line -->
|
|
Binary file
|
package/dist/cli/doctor.js
CHANGED
|
@@ -18,7 +18,7 @@ async function pingUrl(url) {
|
|
|
18
18
|
const req = https.get(url, {
|
|
19
19
|
timeout: 3000,
|
|
20
20
|
headers: {
|
|
21
|
-
'User-Agent': 'devx-doctor/1.4.
|
|
21
|
+
'User-Agent': 'devx-doctor/1.4.5'
|
|
22
22
|
}
|
|
23
23
|
}, (res) => {
|
|
24
24
|
res.resume(); // consume response data to free up memory and release socket
|
package/dist/cli/headless.js
CHANGED
|
@@ -35,7 +35,7 @@ export async function runHeadlessMode(userPrompt, config, options = {}) {
|
|
|
35
35
|
});
|
|
36
36
|
try {
|
|
37
37
|
if (!isQuiet && !isJson) {
|
|
38
|
-
console.log(pc.bold(pc.cyan(`⚡ devx v1.4.
|
|
38
|
+
console.log(pc.bold(pc.cyan(`⚡ devx v1.4.5 (headless) | ${planMode ? 'PLAN' : 'AGENT'} | ${config.model}`)));
|
|
39
39
|
console.log(pc.dim(`Task: ${userPrompt}\n`));
|
|
40
40
|
}
|
|
41
41
|
for await (const event of agent.run(abortController.signal)) {
|
package/dist/cli/index.js
CHANGED
|
@@ -484,7 +484,7 @@ function drawLogo() {
|
|
|
484
484
|
theme.colorFn(' █▀▀▄ █▀▀▀ █ █ █ █'),
|
|
485
485
|
theme.colorFn(' █ █ █▀▀▀ ▀▄▀ ▀▄▀ '),
|
|
486
486
|
theme.colorFn(' █▄▄▀ █▄▄▄ ▀ ▀ ▀ '),
|
|
487
|
-
' ' + theme.boldFn('v1.4.
|
|
487
|
+
' ' + theme.boldFn('v1.4.5'),
|
|
488
488
|
''
|
|
489
489
|
];
|
|
490
490
|
for (const line of logo) {
|
|
@@ -499,7 +499,7 @@ function drawLogo() {
|
|
|
499
499
|
indent + theme.colorFn('▀▀▀█▀▀▀ █▀▀▀ █▀▀█ █▄ ▄█ █ █ ▀▄ ▄▀ █▀▀▄ █▀▀▀ █ █'),
|
|
500
500
|
indent + theme.colorFn(' █ █▀▀▀ █▄▄▀ █ █ █ █ █ █ ▀▀ █ █ █▀▀▀ █ █'),
|
|
501
501
|
indent + theme.colorFn(' █ █▄▄▄ █ ▀▄ █ █ ▀▄▄▀ ▄▀ ▀▄ █▄▄▀ █▄▄▄ ▀▄▀ '),
|
|
502
|
-
indent + theme.boldFn('v1.4.
|
|
502
|
+
indent + theme.boldFn('v1.4.5'),
|
|
503
503
|
''
|
|
504
504
|
];
|
|
505
505
|
for (const line of logo) {
|
|
@@ -645,7 +645,7 @@ async function handleSettings(config) {
|
|
|
645
645
|
const maxIterLabel = maxIter >= 9999 ? 'Unlimited' : `${maxIter} steps`;
|
|
646
646
|
const currentTh = getCurrentTheme();
|
|
647
647
|
const choice = await select({
|
|
648
|
-
message: `${pc.bold('⚙️ Settings')} ${pc.dim(`(devx v1.4.
|
|
648
|
+
message: `${pc.bold('⚙️ Settings')} ${pc.dim(`(devx v1.4.5 • theme: ${currentTh.name})`)}`,
|
|
649
649
|
choices: [
|
|
650
650
|
{
|
|
651
651
|
name: `🎨 Color Theme: ${currentTh.emoji} ${currentTh.name}`,
|
|
@@ -686,7 +686,7 @@ async function handleSettings(config) {
|
|
|
686
686
|
description: 'Limit how many tool steps (file edits, terminal commands) agent can do per request'
|
|
687
687
|
},
|
|
688
688
|
{
|
|
689
|
-
name: `${currentTh.colorFn('✨ About devx')} ${pc.dim('(v1.4.
|
|
689
|
+
name: `${currentTh.colorFn('✨ About devx')} ${pc.dim('(v1.4.5 by ApvCode)')}`,
|
|
690
690
|
value: 'about',
|
|
691
691
|
description: 'Terminal-Native AI Coding Agent created by ApvCode (https://github.com/apvcode/Termux-Dev)'
|
|
692
692
|
},
|
|
@@ -702,7 +702,7 @@ async function handleSettings(config) {
|
|
|
702
702
|
continue;
|
|
703
703
|
}
|
|
704
704
|
if (choice === 'about') {
|
|
705
|
-
p.note(`⚡ devx v1.4.
|
|
705
|
+
p.note(`⚡ devx v1.4.5 — Terminal-Native AI Coding Agent\n` +
|
|
706
706
|
`🎨 Theme: ${currentTh.emoji} ${currentTh.name}\n` +
|
|
707
707
|
`👤 Author: ApvCode (https://github.com/apvcode)\n` +
|
|
708
708
|
`🌟 Repository: https://github.com/apvcode/Termux-Dev\n` +
|
|
@@ -771,7 +771,7 @@ export async function main() {
|
|
|
771
771
|
program
|
|
772
772
|
.name('devx')
|
|
773
773
|
.description('Terminal-native AI coding assistant and vibe-coding agent')
|
|
774
|
-
.version('1.4.
|
|
774
|
+
.version('1.4.5')
|
|
775
775
|
.option('-p, --prompt <task>', 'Run one-shot task non-interactively (headless mode)')
|
|
776
776
|
.option('-y, --yolo', 'Automatically approve all tool executions without confirmation')
|
|
777
777
|
.option('-m, --model <model>', 'Specify AI model to use for this execution')
|
package/dist/cli/prompt.js
CHANGED
|
@@ -202,13 +202,11 @@ export function askPrompt(opts = {}) {
|
|
|
202
202
|
const availWidth = innerBoxWidth - 2;
|
|
203
203
|
let row = '';
|
|
204
204
|
if (availWidth < 20) {
|
|
205
|
-
// Very narrow mobile screen: show command name only
|
|
206
205
|
const labelStr = item.label.length > availWidth ? item.label.slice(0, availWidth - 1) + '…' : item.label.padEnd(availWidth);
|
|
207
206
|
const plain = pointer + labelStr;
|
|
208
207
|
row = isSelected ? theme.badgeFn(plain) : (pointer + theme.boldFn(labelStr));
|
|
209
208
|
}
|
|
210
209
|
else {
|
|
211
|
-
// Show command name and truncated description
|
|
212
210
|
const labelMax = Math.min(15, Math.floor(availWidth * 0.45));
|
|
213
211
|
const labelStr = item.label.length > labelMax ? item.label.slice(0, labelMax - 1) + '…' : item.label.padEnd(labelMax);
|
|
214
212
|
const descMax = availWidth - labelMax - 1;
|
|
@@ -221,7 +219,6 @@ export function askPrompt(opts = {}) {
|
|
|
221
219
|
row = `${pointer}${theme.boldFn(labelStr)} ${pc.gray(descStr)}`;
|
|
222
220
|
}
|
|
223
221
|
}
|
|
224
|
-
// Safety guarantee: exact visible width must match innerBoxWidth
|
|
225
222
|
const currentLen = stripAnsi(row).length;
|
|
226
223
|
if (currentLen < innerBoxWidth) {
|
|
227
224
|
row += ' '.repeat(innerBoxWidth - currentLen);
|
|
@@ -230,64 +227,78 @@ export function askPrompt(opts = {}) {
|
|
|
230
227
|
}
|
|
231
228
|
dropdownLines.push(pc.dim('│') + ' ' + pc.dim('╰' + botBorderStr + '╯'));
|
|
232
229
|
}
|
|
233
|
-
//
|
|
234
|
-
|
|
235
|
-
const
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
}
|
|
241
|
-
// Calculate where the cursor is inside inputDisplay
|
|
242
|
-
const plainBefore = stripAnsi(pc.dim('│') + ' ' + formatInputWithBadges(input.slice(0, cursorPos)));
|
|
243
|
-
const linesBefore = plainBefore.split('\n');
|
|
244
|
-
let curLine = 0;
|
|
245
|
-
for (let i = 0; i < linesBefore.length - 1; i++) {
|
|
246
|
-
const l = linesBefore[i];
|
|
247
|
-
curLine += l.length === 0 ? 1 : Math.max(1, Math.floor((l.length - 1) / cols) + 1);
|
|
248
|
-
}
|
|
249
|
-
const lastLineSegment = linesBefore[linesBefore.length - 1];
|
|
250
|
-
const wrapOffsetInLastLine = Math.floor(lastLineSegment.length / cols);
|
|
251
|
-
curLine += wrapOffsetInLastLine;
|
|
252
|
-
const curCol = lastLineSegment.length % cols;
|
|
253
|
-
// 1. Single-line fast path (flicker-free atomic render)
|
|
254
|
-
let inputDisplay = pc.dim('│') + ' ';
|
|
230
|
+
// === SCROLLING SINGLE-LINE INPUT (never wraps, works on all terminals) ===
|
|
231
|
+
const prefix = pc.dim('│') + ' ';
|
|
232
|
+
const prefixLen = 3; // visible width of "│ "
|
|
233
|
+
// Reserve 1 char safety margin so terminal never auto-wraps
|
|
234
|
+
const maxVisible = cols - prefixLen - 1;
|
|
235
|
+
let lineContent;
|
|
236
|
+
let screenCursorCol;
|
|
255
237
|
if (input.length === 0) {
|
|
256
|
-
|
|
257
|
-
const displayPlace = placeholder.length >
|
|
258
|
-
|
|
238
|
+
// Show placeholder
|
|
239
|
+
const displayPlace = placeholder.length > maxVisible ? placeholder.slice(0, maxVisible - 1) + '…' : placeholder;
|
|
240
|
+
lineContent = prefix + pc.dim(displayPlace);
|
|
241
|
+
screenCursorCol = prefixLen;
|
|
259
242
|
}
|
|
260
|
-
else {
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
process.stdout.write(`\r\x1b[2K${inputDisplay}`);
|
|
265
|
-
process.stdout.write(`\r\x1b[${curCol}C`);
|
|
266
|
-
lastCursorLine = 0;
|
|
267
|
-
lastDropdownLines = 0;
|
|
268
|
-
return;
|
|
269
|
-
}
|
|
270
|
-
// 2. Multi-line / dropdown path: move to Line 0 and erase down
|
|
271
|
-
if (lastCursorLine > 0) {
|
|
272
|
-
process.stdout.write(`\x1b[${lastCursorLine}A`);
|
|
243
|
+
else if (input.length <= maxVisible) {
|
|
244
|
+
// Input fits on screen entirely
|
|
245
|
+
lineContent = prefix + formatInputWithBadges(input);
|
|
246
|
+
screenCursorCol = prefixLen + cursorPos;
|
|
273
247
|
}
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
248
|
+
else {
|
|
249
|
+
// Scrolling window: show a slice of input around cursor
|
|
250
|
+
const scrollPad = Math.floor(maxVisible / 3);
|
|
251
|
+
let winStart = 0;
|
|
252
|
+
if (cursorPos > maxVisible - scrollPad) {
|
|
253
|
+
winStart = cursorPos - (maxVisible - scrollPad);
|
|
254
|
+
}
|
|
255
|
+
if (winStart > input.length - maxVisible) {
|
|
256
|
+
winStart = Math.max(0, input.length - maxVisible);
|
|
257
|
+
}
|
|
258
|
+
const winEnd = Math.min(winStart + maxVisible, input.length);
|
|
259
|
+
let visibleSlice = input.slice(winStart, winEnd);
|
|
260
|
+
// Add scroll indicators
|
|
261
|
+
if (winStart > 0) {
|
|
262
|
+
visibleSlice = '…' + visibleSlice.slice(1);
|
|
263
|
+
}
|
|
264
|
+
if (winEnd < input.length) {
|
|
265
|
+
visibleSlice = visibleSlice.slice(0, -1) + '…';
|
|
266
|
+
}
|
|
267
|
+
lineContent = prefix + formatInputWithBadges(visibleSlice);
|
|
268
|
+
screenCursorCol = prefixLen + (cursorPos - winStart);
|
|
269
|
+
// Clamp cursor position for scroll indicator adjustments
|
|
270
|
+
if (winStart > 0 && cursorPos === winStart) {
|
|
271
|
+
screenCursorCol = prefixLen + 1;
|
|
279
272
|
}
|
|
280
273
|
}
|
|
281
|
-
|
|
282
|
-
const
|
|
283
|
-
if (
|
|
284
|
-
|
|
274
|
+
// Pad line to exactly cols-1 to overwrite any stale characters
|
|
275
|
+
const visLen = stripAnsi(lineContent).length;
|
|
276
|
+
if (visLen < cols - 1) {
|
|
277
|
+
lineContent += ' '.repeat(cols - 1 - visLen);
|
|
278
|
+
}
|
|
279
|
+
// Move cursor up past any previous dropdown lines, then clear and redraw
|
|
280
|
+
if (lastDropdownLines > 0) {
|
|
281
|
+
process.stdout.write(`\x1b[${lastDropdownLines}A`);
|
|
282
|
+
}
|
|
283
|
+
// Write input line (always exactly 1 physical line, no wrap)
|
|
284
|
+
process.stdout.write(`\r\x1b[2K${lineContent}`);
|
|
285
|
+
// Write dropdown lines below
|
|
286
|
+
for (let i = 0; i < Math.max(dropdownLines.length, lastDropdownLines); i++) {
|
|
287
|
+
if (i < dropdownLines.length) {
|
|
288
|
+
process.stdout.write(`\n\x1b[2K${dropdownLines[i]}`);
|
|
289
|
+
}
|
|
290
|
+
else {
|
|
291
|
+
process.stdout.write(`\n\x1b[2K`);
|
|
292
|
+
}
|
|
285
293
|
}
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
294
|
+
// Move cursor back up to the input line
|
|
295
|
+
const totalBelow = Math.max(dropdownLines.length, lastDropdownLines);
|
|
296
|
+
if (totalBelow > 0) {
|
|
297
|
+
process.stdout.write(`\x1b[${totalBelow}A`);
|
|
289
298
|
}
|
|
290
|
-
|
|
299
|
+
// Position cursor at the correct column
|
|
300
|
+
process.stdout.write(`\r\x1b[${screenCursorCol}C`);
|
|
301
|
+
lastCursorLine = 0; // Always line 0 now
|
|
291
302
|
lastDropdownLines = dropdownLines.length;
|
|
292
303
|
}
|
|
293
304
|
render();
|
|
@@ -303,10 +314,14 @@ export function askPrompt(opts = {}) {
|
|
|
303
314
|
process.stdin.pause();
|
|
304
315
|
}
|
|
305
316
|
function clearBoxAndExit(finalInput) {
|
|
306
|
-
|
|
307
|
-
|
|
317
|
+
// Clear dropdown lines below
|
|
318
|
+
if (lastDropdownLines > 0) {
|
|
319
|
+
for (let i = 0; i < lastDropdownLines; i++) {
|
|
320
|
+
process.stdout.write(`\n\x1b[2K`);
|
|
321
|
+
}
|
|
322
|
+
process.stdout.write(`\x1b[${lastDropdownLines}A`);
|
|
308
323
|
}
|
|
309
|
-
process.stdout.write(
|
|
324
|
+
process.stdout.write(`\r\x1b[2K`);
|
|
310
325
|
const fullText = expandPastes(finalInput);
|
|
311
326
|
if (fullText.trim()) {
|
|
312
327
|
if (GLOBAL_PROMPT_HISTORY.length === 0 || GLOBAL_PROMPT_HISTORY[GLOBAL_PROMPT_HISTORY.length - 1] !== fullText.trim()) {
|
|
@@ -314,7 +329,7 @@ export function askPrompt(opts = {}) {
|
|
|
314
329
|
}
|
|
315
330
|
}
|
|
316
331
|
const lines = fullText.split('\n');
|
|
317
|
-
process.stdout.write(
|
|
332
|
+
process.stdout.write(`${pc.dim('│')} ${formatInputWithBadges(lines[0])}\n`);
|
|
318
333
|
for (let i = 1; i < lines.length; i++) {
|
|
319
334
|
process.stdout.write(pc.dim('│') + ' ' + lines[i] + '\n');
|
|
320
335
|
}
|
|
@@ -440,10 +455,13 @@ export function askPrompt(opts = {}) {
|
|
|
440
455
|
}
|
|
441
456
|
// Ctrl+C
|
|
442
457
|
if (str === '\x03' || (str.length === 1 && str.charCodeAt(0) === 3)) {
|
|
443
|
-
if (
|
|
444
|
-
|
|
458
|
+
if (lastDropdownLines > 0) {
|
|
459
|
+
for (let i = 0; i < lastDropdownLines; i++) {
|
|
460
|
+
process.stdout.write(`\n\x1b[2K`);
|
|
461
|
+
}
|
|
462
|
+
process.stdout.write(`\x1b[${lastDropdownLines}A`);
|
|
445
463
|
}
|
|
446
|
-
process.stdout.write('\r\x1b[
|
|
464
|
+
process.stdout.write('\r\x1b[2K\n');
|
|
447
465
|
cleanup();
|
|
448
466
|
resolve('__CANCEL__');
|
|
449
467
|
return;
|
|
@@ -503,10 +521,13 @@ export function askPrompt(opts = {}) {
|
|
|
503
521
|
render();
|
|
504
522
|
}
|
|
505
523
|
else {
|
|
506
|
-
if (
|
|
507
|
-
|
|
524
|
+
if (lastDropdownLines > 0) {
|
|
525
|
+
for (let i = 0; i < lastDropdownLines; i++) {
|
|
526
|
+
process.stdout.write(`\n\x1b[2K`);
|
|
527
|
+
}
|
|
528
|
+
process.stdout.write(`\x1b[${lastDropdownLines}A`);
|
|
508
529
|
}
|
|
509
|
-
process.stdout.write('\r\x1b[
|
|
530
|
+
process.stdout.write('\r\x1b[2K');
|
|
510
531
|
cleanup();
|
|
511
532
|
resolve(`__TOGGLE_MODE__:${input}`);
|
|
512
533
|
}
|
package/dist/cli/server.js
CHANGED
|
@@ -139,7 +139,7 @@ function renderDirectoryHtml(dirPath, relPath, files, port) {
|
|
|
139
139
|
${parentLink}
|
|
140
140
|
${items || '<li style="padding: 20px; text-align: center; color: #6e7681;">No visible files in this directory</li>'}
|
|
141
141
|
</ul>
|
|
142
|
-
<div class="footer">devx v1.4.
|
|
142
|
+
<div class="footer">devx v1.4.5 • Terminal-Native AI Assistant</div>
|
|
143
143
|
</div>
|
|
144
144
|
</body>
|
|
145
145
|
</html>`;
|
package/dist/mcp/client.js
CHANGED
package/package.json
CHANGED