wormclaude 1.0.139 → 1.0.141
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/ansi.js +3 -2
- package/dist/theme.js +1 -1
- package/dist/tui.js +23 -14
- package/package.json +1 -1
package/dist/ansi.js
CHANGED
|
@@ -198,9 +198,10 @@ export function itemAnsi(it, cols) {
|
|
|
198
198
|
const word = t('tui.linesWord') || 'satır';
|
|
199
199
|
const lines = it.lines || [];
|
|
200
200
|
const head = paint(' ┌ ', theme.greyDim) + paint((t('tui.createFile') || 'Oluşturulacak dosya') + ': ', theme.redBright, true) + paint(`${it.file} (${lines.length} ${word})`, theme.white);
|
|
201
|
-
|
|
201
|
+
// Onaylamadan ÖNCE tüm kodu göster (Claude gibi) — fazlası scrollback'e gider. 300 satır güvenlik sınırı.
|
|
202
|
+
const PREV = 300;
|
|
202
203
|
const body = lines.slice(0, PREV).map((ln, i) => paint(` │ ${String(i + 1).padStart(3, ' ')} `, theme.greyDim) + paint(ln.replace(/\t/g, ' ').slice(0, Math.max(8, W - 10)), theme.grey));
|
|
203
|
-
const more = lines.length > PREV ? '\n' + paint(` │ … +${lines.length - PREV} ${word}`, theme.greyDim) : '';
|
|
204
|
+
const more = lines.length > PREV ? '\n' + paint(` │ … +${lines.length - PREV} ${word} (çok büyük dosya)`, theme.greyDim) : '';
|
|
204
205
|
return '\n' + head + (body.length ? '\n' + body.join('\n') : '') + more;
|
|
205
206
|
}
|
|
206
207
|
if (it.kind === 'note')
|
package/dist/theme.js
CHANGED
package/dist/tui.js
CHANGED
|
@@ -432,15 +432,16 @@ export async function runTui() {
|
|
|
432
432
|
onResult: (c, _i, res) => {
|
|
433
433
|
if ((c.name === 'WebSearch' || c.name === 'WebFetch') && res.ok)
|
|
434
434
|
usedWeb = true;
|
|
435
|
-
//
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
435
|
+
// İÇERİK İKİ KEZ BASILMASIN: Write/Edit içeriği onay anında (fileprev) tam gösterildi →
|
|
436
|
+
// burada SADECE tek-satır özet ("Yazıldı N satır → X"), token/ekran israfı yok.
|
|
437
|
+
let result = sanitizeOutput(res.output);
|
|
438
|
+
if (res.ok && (c.name === 'Write' || c.name === 'Edit')) {
|
|
439
|
+
const _c = c.name === 'Write' ? res.args?.content : res.args?.new_string;
|
|
440
|
+
const _n = _c != null ? String(_c).split('\n').length : 0;
|
|
441
|
+
const _verb = c.name === 'Write' ? (t('tui.wrote') || 'Yazıldı') : (t('tui.edited') || 'Düzenlendi');
|
|
442
|
+
result = `${_verb} ${_n} ${t('tui.linesWord') || 'satır'} → ${relWs(res.args.file_path)}`;
|
|
439
443
|
}
|
|
440
|
-
|
|
441
|
-
preview = { verb: t('tui.edited') || 'Düzenlendi', file: relWs(res.args.file_path), lines: String(res.args.new_string).split('\n') };
|
|
442
|
-
}
|
|
443
|
-
printItem({ kind: 'tool', label: toolLabel(c.name, res.args), result: sanitizeOutput(res.output), ok: res.ok, preview });
|
|
444
|
+
printItem({ kind: 'tool', label: toolLabel(c.name, res.args), result, ok: res.ok });
|
|
444
445
|
},
|
|
445
446
|
});
|
|
446
447
|
for (let i = 0; i < toolCalls.length; i++)
|
|
@@ -495,19 +496,27 @@ export async function runTui() {
|
|
|
495
496
|
// Açılış: Claude tarzı GÜVEN ekranı — trust metni (içerik) + ok-tuşlu Evet/Hayır seçici (ask modal).
|
|
496
497
|
{
|
|
497
498
|
const _en = getLang() === 'en';
|
|
498
|
-
|
|
499
|
+
const _trustNote = { kind: 'note', text: (_en ? 'Accessing workspace:' : 'Çalışma alanına erişiliyor:') + '\n\n' +
|
|
499
500
|
process.cwd() + '\n\n' +
|
|
500
501
|
t('trust.check') + '\n\n' +
|
|
501
|
-
t('trust.canDo') }
|
|
502
|
+
t('trust.canDo') };
|
|
503
|
+
printItem(_trustNote);
|
|
502
504
|
const _noLabel = _en ? 'No, exit' : 'Hayır, çık';
|
|
503
505
|
ask = {
|
|
504
506
|
question: _en ? 'Trust this folder?' : 'Bu klasöre güveniyor musun?',
|
|
505
507
|
options: [{ label: _en ? 'Yes, I trust this folder' : 'Evet, bu klasöre güveniyorum' }, { label: _noLabel }],
|
|
506
508
|
sel: 0,
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
509
|
+
// Onay sonrası trust/workspace yazısını KALDIR (Claude gibi) → ekran temizlenir.
|
|
510
|
+
resolve: (v) => {
|
|
511
|
+
if (v === _noLabel) {
|
|
512
|
+
quit();
|
|
513
|
+
return;
|
|
514
|
+
}
|
|
515
|
+
const _i = displayItems.indexOf(_trustNote);
|
|
516
|
+
if (_i >= 0)
|
|
517
|
+
displayItems.splice(_i, 1);
|
|
518
|
+
redrawAll();
|
|
519
|
+
},
|
|
511
520
|
};
|
|
512
521
|
refresh();
|
|
513
522
|
}
|