wormclaude 1.0.174 → 1.0.175
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 +15 -1
- package/dist/theme.js +1 -1
- package/package.json +1 -1
package/dist/ansi.js
CHANGED
|
@@ -239,7 +239,21 @@ export function itemAnsi(it, cols) {
|
|
|
239
239
|
const head = paint(' ┌ ', theme.greyDim) + paint((t('tui.createFile') || 'Oluşturulacak dosya') + ': ', theme.redBright, true) + paint(`${it.file} (${lines.length} ${word})`, theme.white);
|
|
240
240
|
// Onaylamadan ÖNCE tüm kodu göster (Claude gibi) — fazlası scrollback'e gider. 300 satır güvenlik sınırı.
|
|
241
241
|
const PREV = 300;
|
|
242
|
-
const
|
|
242
|
+
const codeW = Math.max(8, W - 10); // gutter " │ NNN " ≈ 8 sütun
|
|
243
|
+
const shown = lines.slice(0, PREV).map((ln) => ln.replace(/\t/g, ' '));
|
|
244
|
+
const _lang = ((it.file || '').split('.').pop() || '').toLowerCase();
|
|
245
|
+
let body;
|
|
246
|
+
if (isHighlightable(_lang)) {
|
|
247
|
+
// Sözdizimi-vurgulu önizleme (sohbetteki kod blokları gibi) — satır no + renkli token'lar.
|
|
248
|
+
body = highlight(shown.join('\n'), _lang).map((toks, i) => {
|
|
249
|
+
const gutter = paint(` │ ${String(i + 1).padStart(3, ' ')} `, theme.greyDim);
|
|
250
|
+
const seg = toks.length ? wrapTokens(toks, codeW)[0] : ' ';
|
|
251
|
+
return gutter + (seg || ' ');
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
else {
|
|
255
|
+
body = shown.map((ln, i) => paint(` │ ${String(i + 1).padStart(3, ' ')} `, theme.greyDim) + paint(ln.slice(0, codeW), theme.grey));
|
|
256
|
+
}
|
|
243
257
|
const more = lines.length > PREV ? '\n' + paint(` │ … +${lines.length - PREV} ${word} (çok büyük dosya)`, theme.greyDim) : '';
|
|
244
258
|
return '\n' + head + (body.length ? '\n' + body.join('\n') : '') + more;
|
|
245
259
|
}
|
package/dist/theme.js
CHANGED