termux-dev 1.4.3 → 1.4.4

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 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.3</tspan>
28
+ THE TERMINAL-NATIVE AI CODING AGENT <tspan fill="#00f2fe" font-weight="bold">v1.4.4</tspan>
29
29
  </text>
30
30
 
31
31
  <!-- Top Accent Line -->
@@ -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.3'
21
+ 'User-Agent': 'devx-doctor/1.4.4'
22
22
  }
23
23
  }, (res) => {
24
24
  res.resume(); // consume response data to free up memory and release socket
@@ -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.3 (headless) | ${planMode ? 'PLAN' : 'AGENT'} | ${config.model}`)));
38
+ console.log(pc.bold(pc.cyan(`⚡ devx v1.4.4 (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.3'),
487
+ ' ' + theme.boldFn('v1.4.4'),
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.3'),
502
+ indent + theme.boldFn('v1.4.4'),
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.3 • theme: ${currentTh.name})`)}`,
648
+ message: `${pc.bold('⚙️ Settings')} ${pc.dim(`(devx v1.4.4 • 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.3 by ApvCode)')}`,
689
+ name: `${currentTh.colorFn('✨ About devx')} ${pc.dim('(v1.4.4 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.3 — Terminal-Native AI Coding Agent\n` +
705
+ p.note(`⚡ devx v1.4.4 — 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.3')
774
+ .version('1.4.4')
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')
@@ -230,31 +230,9 @@ export function askPrompt(opts = {}) {
230
230
  }
231
231
  dropdownLines.push(pc.dim('│') + ' ' + pc.dim('╰' + botBorderStr + '╯'));
232
232
  }
233
- // 1. Move cursor back to Line 0 from lastCursorLine and erase everything down
234
- if (lastCursorLine > 0) {
235
- process.stdout.write(`\x1b[${lastCursorLine}A`);
236
- }
237
- process.stdout.write('\r\x1b[J');
238
- // 2. Prepare and write input display
239
- let inputDisplay = pc.dim('│') + ' ';
240
- if (input.length === 0) {
241
- const maxPlace = Math.max(12, cols - 8);
242
- const displayPlace = placeholder.length > maxPlace ? placeholder.slice(0, maxPlace - 1) + '…' : placeholder;
243
- inputDisplay += pc.dim(displayPlace);
244
- }
245
- else {
246
- inputDisplay += formatInputWithBadges(input);
247
- }
248
- process.stdout.write(inputDisplay);
249
- // 3. Write dropdown lines below input if present
250
- if (dropdownLines.length > 0) {
251
- for (const dl of dropdownLines) {
252
- process.stdout.write(`\n${dl}`);
253
- }
254
- }
255
- // 4. Calculate cursor position
233
+ // Calculate cursor position
256
234
  // Calculate how many wrapped lines inputDisplay occupies
257
- const plainAll = stripAnsi(inputDisplay);
235
+ const plainAll = stripAnsi(pc.dim('│') + ' ' + formatInputWithBadges(input));
258
236
  const allLines = plainAll.split('\n');
259
237
  let totalInputLines = 0;
260
238
  for (const l of allLines) {
@@ -272,7 +250,34 @@ export function askPrompt(opts = {}) {
272
250
  const wrapOffsetInLastLine = Math.floor(lastLineSegment.length / cols);
273
251
  curLine += wrapOffsetInLastLine;
274
252
  const curCol = lastLineSegment.length % cols;
275
- // Current line after writing dropdown is: (totalInputLines - 1) + dropdownLines.length
253
+ // 1. Single-line fast path (flicker-free atomic render)
254
+ let inputDisplay = pc.dim('│') + ' ';
255
+ if (input.length === 0) {
256
+ const maxPlace = Math.max(12, cols - 8);
257
+ const displayPlace = placeholder.length > maxPlace ? placeholder.slice(0, maxPlace - 1) + '…' : placeholder;
258
+ inputDisplay += pc.dim(displayPlace);
259
+ }
260
+ else {
261
+ inputDisplay += formatInputWithBadges(input);
262
+ }
263
+ if (totalInputLines === 1 && dropdownLines.length === 0 && lastCursorLine === 0 && lastDropdownLines === 0) {
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`);
273
+ }
274
+ process.stdout.write('\r\x1b[J');
275
+ process.stdout.write(inputDisplay);
276
+ if (dropdownLines.length > 0) {
277
+ for (const dl of dropdownLines) {
278
+ process.stdout.write(`\n${dl}`);
279
+ }
280
+ }
276
281
  const totalBottomLine = (totalInputLines - 1) + dropdownLines.length;
277
282
  const linesUp = totalBottomLine - curLine;
278
283
  if (linesUp > 0) {
@@ -607,36 +612,52 @@ export function askPrompt(opts = {}) {
607
612
  }
608
613
  return;
609
614
  }
610
- // Backspace
611
- if (str === '\x08' || str === '\x7f' || (str.length === 1 && (str.charCodeAt(0) === 8 || str.charCodeAt(0) === 127))) {
612
- if (cursorPos > 0) {
613
- const spans = getTagSpans();
614
- const endingSpan = spans.find(s => s.end === cursorPos);
615
- if (endingSpan) {
616
- input = input.slice(0, endingSpan.start) + input.slice(endingSpan.end);
617
- cursorPos = endingSpan.start;
615
+ // Backspace / DEL handling (handles single or multiple backspaces from mobile IME)
616
+ if (str.includes('\x08') || str.includes('\x7f')) {
617
+ for (let i = 0; i < str.length; i++) {
618
+ const ch = str[i];
619
+ if (ch === '\x08' || ch === '\x7f') {
620
+ if (cursorPos > 0) {
621
+ const spans = getTagSpans();
622
+ const endingSpan = spans.find(s => s.end === cursorPos);
623
+ if (endingSpan) {
624
+ input = input.slice(0, endingSpan.start) + input.slice(endingSpan.end);
625
+ cursorPos = endingSpan.start;
626
+ }
627
+ else {
628
+ input = input.slice(0, cursorPos - 1) + input.slice(cursorPos);
629
+ cursorPos--;
630
+ }
631
+ }
618
632
  }
619
- else {
620
- input = input.slice(0, cursorPos - 1) + input.slice(cursorPos);
621
- cursorPos--;
633
+ else if (ch.charCodeAt(0) >= 32) {
634
+ const spans = getTagSpans();
635
+ const inside = spans.find(s => cursorPos > s.start && cursorPos < s.end);
636
+ if (inside)
637
+ cursorPos = inside.end;
638
+ input = input.slice(0, cursorPos) + ch + input.slice(cursorPos);
639
+ cursorPos++;
622
640
  }
623
- selectedIndex = 0;
624
- render();
625
641
  }
642
+ selectedIndex = 0;
643
+ render();
626
644
  return;
627
645
  }
628
646
  // Ignore unknown escape sequences
629
647
  if (str.startsWith('\x1b')) {
630
648
  return;
631
649
  }
632
- // Normal character input - snap out of span if needed
650
+ // Normal character input - clean control characters
651
+ const cleanStr = str.replace(/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]/g, '');
652
+ if (!cleanStr)
653
+ return;
633
654
  const spans = getTagSpans();
634
655
  const inside = spans.find(s => cursorPos > s.start && cursorPos < s.end);
635
656
  if (inside) {
636
657
  cursorPos = inside.end;
637
658
  }
638
- input = input.slice(0, cursorPos) + str + input.slice(cursorPos);
639
- cursorPos += str.length;
659
+ input = input.slice(0, cursorPos) + cleanStr + input.slice(cursorPos);
660
+ cursorPos += cleanStr.length;
640
661
  selectedIndex = 0;
641
662
  render();
642
663
  }
@@ -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.3 &bull; Terminal-Native AI Assistant</div>
142
+ <div class="footer">devx v1.4.4 &bull; Terminal-Native AI Assistant</div>
143
143
  </div>
144
144
  </body>
145
145
  </html>`;
@@ -63,7 +63,7 @@ export class MCPClient {
63
63
  capabilities: {},
64
64
  clientInfo: {
65
65
  name: 'devx',
66
- version: '1.4.3'
66
+ version: '1.4.4'
67
67
  }
68
68
  });
69
69
  if (!initResult) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "termux-dev",
3
- "version": "1.4.3",
3
+ "version": "1.4.4",
4
4
  "description": "Ultra-fast, terminal-native AI coding assistant and agent built for Android Termux, Windows, macOS, and Linux.",
5
5
  "main": "dist/cli/index.js",
6
6
  "type": "module",