wormclaude 1.0.52 → 1.0.53

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.52';
19
+ export const VERSION = '1.0.53';
package/dist/tui.js CHANGED
@@ -67,8 +67,8 @@ export async function runTui() {
67
67
  let streamPreview = ''; // canlı akış önizlemesi (footer'da)
68
68
  const PREVIEW_LINES = 6; // akışta sabit önizleme satırı (yükseklik stabil → titreme yok)
69
69
  const SPIN = ['·', '✢', '✳', '✶', '✻', '✽', '✶', '✳', '✢'];
70
- // Giriş kutusunu genişliğe göre ÇOK SATIRA sar (uzun mesaj/kod sağa taşmaz, alta iner).
71
- const MAX_INPUT_LINES = 10;
70
+ // Giriş kutusunu genişliğe göre ÇOK SATIRA sar; çok uzunsa (yapıştırma) KISALTIP özet gösterir.
71
+ const MAX_INPUT_LINES = 6;
72
72
  const inputBoxLines = (W) => {
73
73
  const inner = Math.max(4, W - 2); // "✶ " önek payı
74
74
  const wrapped = [];
@@ -82,8 +82,14 @@ export async function runTui() {
82
82
  cur += ch;
83
83
  }
84
84
  wrapped.push(cur);
85
- const shown = wrapped.length > MAX_INPUT_LINES ? wrapped.slice(-MAX_INPUT_LINES) : wrapped; // çok uzunsa sonu göster
86
- return shown.map((ln, i) => (i === 0 ? paint('✶ ', theme.redBright, true) : ' ') + paint(ln, theme.white) + (i === shown.length - 1 ? paint('▌', theme.greyDim) : ''));
85
+ if (wrapped.length <= MAX_INPUT_LINES) {
86
+ return wrapped.map((ln, i) => (i === 0 ? paint('✶ ', theme.redBright, true) : ' ') + paint(ln, theme.white) + (i === wrapped.length - 1 ? paint('▌', theme.greyDim) : ''));
87
+ }
88
+ // Çok uzun (büyük yapıştırma): son birkaç satır + üstte özet — footer'ı doldurmaz.
89
+ const extra = wrapped.length - (MAX_INPUT_LINES - 1);
90
+ const tail = wrapped.slice(-(MAX_INPUT_LINES - 1));
91
+ const head = paint(`✶ …(+${extra} satır · ${inputBuf.length} karakter, Enter ile gönder)`, theme.greyDim);
92
+ return [head, ...tail.map((ln, i) => ' ' + paint(ln, theme.white) + (i === tail.length - 1 ? paint('▌', theme.greyDim) : ''))];
87
93
  };
88
94
  // Footer yüksekliği DİNAMİK: izin=4; değilse (durum/menü) + çizgi + giriş-satırları + çizgi.
89
95
  // SABİT rezerve footer alanı (scroll region bir kez ayarlanır → churn/duplicate yok). Footer bu
@@ -91,6 +97,11 @@ export async function runTui() {
91
97
  const FOOTER_MAX = () => Math.min(11, Math.max(5, rows() - 6));
92
98
  // refresh = sadece footer'ı çiz (region sabit; içerik yeniden BASILMAZ → duplicate olmaz).
93
99
  const refresh = () => drawFooter();
100
+ // DEBOUNCE: hızlı yazma/yapıştırma akınında her tuşta DEĞİL, tick başına BİR KEZ çiz. Yoksa
101
+ // her karakter tam footer redraw'u tetikleyip render'ı kuyruğa biriktiriyor (elini çeksen de gidiyor).
102
+ let _fpending = false;
103
+ const scheduleFooter = () => { if (_fpending)
104
+ return; _fpending = true; setImmediate(() => { _fpending = false; drawFooter(); }); };
94
105
  setToolConfig(config); // araçlar (Write/Bash/Edit…) aynı config'i kullansın
95
106
  // İzin (araç onayı) + soru (AskUserQuestion) durumu
96
107
  let perm = null;
@@ -558,7 +569,7 @@ export async function runTui() {
558
569
  if (key && key.name === 'backspace') {
559
570
  inputBuf = inputBuf.slice(0, -1);
560
571
  cmdSel = 0;
561
- refresh();
572
+ scheduleFooter();
562
573
  return;
563
574
  }
564
575
  if (key && key.name === 'escape') {
@@ -570,7 +581,7 @@ export async function runTui() {
570
581
  if (str && !key?.ctrl && !key?.meta && !str.startsWith('\x1b') && !/[\x00-\x1f]/.test(str)) {
571
582
  inputBuf += str;
572
583
  cmdSel = 0;
573
- refresh();
584
+ scheduleFooter();
574
585
  }
575
586
  });
576
587
  // resize → settle sonrası her şeyi yeni boyutta yeniden bas (region + banner + footer)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wormclaude",
3
- "version": "1.0.52",
3
+ "version": "1.0.53",
4
4
  "description": "WormClaude CLI - uncensored security+code assistant (ink TUI, Claude-style)",
5
5
  "type": "module",
6
6
  "bin": {