wormclaude 1.0.136 → 1.0.137

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/theme.js CHANGED
@@ -16,4 +16,4 @@ export const theme = {
16
16
  synType: '#a78bfa', // tip/sınıf adları, sabitler
17
17
  synProp: '#e0e0e0', // özellik/anahtar adları
18
18
  };
19
- export const VERSION = '1.0.136';
19
+ export const VERSION = '1.0.137';
package/dist/tui.js CHANGED
@@ -475,6 +475,10 @@ export async function runTui() {
475
475
  process.stdout.write('\x1b[?1000l\x1b[?1002l\x1b[?1003l\x1b[?1006l\x1b[?1015l\x1b[?1007l');
476
476
  }
477
477
  catch { }
478
+ try {
479
+ process.stdout.write('\x1b[?2004h');
480
+ }
481
+ catch { } // bracketed paste AÇ (çok-satırlı yapıştırma)
478
482
  process.stdout.write('\x1b[?25l'); // gerçek imleci gizle (kendi ▌ bloğumuzu çiziyoruz)
479
483
  redrawAll();
480
484
  // Açılış: Claude tarzı GÜVEN ekranı — trust metni (içerik) + ok-tuşlu Evet/Hayır seçici (ask modal).
@@ -502,13 +506,45 @@ export async function runTui() {
502
506
  } }).catch(() => { });
503
507
  connectMcpServers().then((srv) => { if (srv && srv.length)
504
508
  printItem({ kind: 'note', text: t('tui.mcpConnected', srv.length) }); }).catch(() => { }); // MCP araçları (varsa)
505
- const quit = () => { process.stdout.write('\x1b[r\x1b[?25h\x1b[2J\x1b[3J\x1b[H'); process.exit(0); };
509
+ const quit = () => { process.stdout.write('\x1b[?2004l\x1b[r\x1b[?25h\x1b[2J\x1b[3J\x1b[H'); process.exit(0); };
506
510
  process.on('exit', () => { try {
507
- process.stdout.write('\x1b[r\x1b[?25h');
511
+ process.stdout.write('\x1b[?2004l\x1b[r\x1b[?25h');
508
512
  }
509
513
  catch { } });
510
514
  let ctrlcAt = 0;
515
+ let pasting = false; // bracketed-paste içinde miyiz (ESC[200~ … ESC[201~)
511
516
  process.stdin.on('keypress', (str, key) => {
517
+ // ── BRACKETED PASTE ────────────────────────────────────────────────────
518
+ // Terminal yapıştırmayı ESC[200~ … ESC[201~ ile sarar. İşaretçiler arasında
519
+ // gelen 'return' = SATIR SONU (submit DEĞİL) → çok-satırlı metin tek seferde
520
+ // input'a girer. Enter'a SADECE gerçek işaretçi gelince dokunur; işaretçi yoksa
521
+ // normal Enter davranışı AYNEN korunur (asla bozulmaz).
522
+ const _seq = (key && key.sequence) || str || '';
523
+ if (_seq.indexOf('[200~') !== -1) {
524
+ pasting = true;
525
+ return;
526
+ }
527
+ if (_seq.indexOf('[201~') !== -1) {
528
+ pasting = false;
529
+ scheduleFooter();
530
+ return;
531
+ }
532
+ if (pasting) {
533
+ if (key && (key.name === 'return' || key.name === 'enter')) {
534
+ inputBuf = inputBuf.slice(0, inputCur) + '\n' + inputBuf.slice(inputCur);
535
+ inputCur++;
536
+ cmdSel = 0;
537
+ scheduleFooter();
538
+ return;
539
+ }
540
+ if (str && !str.startsWith('\x1b') && !/[\x00-\x08\x0e-\x1f]/.test(str)) {
541
+ inputBuf = inputBuf.slice(0, inputCur) + str + inputBuf.slice(inputCur);
542
+ inputCur += str.length;
543
+ cmdSel = 0;
544
+ scheduleFooter();
545
+ }
546
+ return; // paste sırasında diğer tüm tuş işlemlerini atla
547
+ }
512
548
  // Soru dialogu (AskUserQuestion) aktifse: ↑↓ / 1-9 seç, Enter onayla, Esc/Ctrl+C ilk seçenek
513
549
  if (ask) {
514
550
  const n = ask.options.length;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wormclaude",
3
- "version": "1.0.136",
3
+ "version": "1.0.137",
4
4
  "description": "WormClaude CLI - uncensored security+code assistant (ink TUI, Claude-style)",
5
5
  "type": "module",
6
6
  "bin": {