wormclaude 1.0.25 → 1.0.27
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 +2 -2
- package/dist/cli.js +14 -7
- package/dist/theme.js +1 -1
- package/dist/tui.js +29 -2
- package/package.json +1 -1
package/dist/ansi.js
CHANGED
|
@@ -72,9 +72,9 @@ const CLAUDE_ROWS = [
|
|
|
72
72
|
];
|
|
73
73
|
/** Banner'ı ANSI olarak üretir (dar ekranda tek kelime, geniş ekranda yan yana). */
|
|
74
74
|
export function bannerAnsi(cols) {
|
|
75
|
-
if (cols <
|
|
75
|
+
if (cols < 64)
|
|
76
76
|
return paint('WORMCLAUDE', theme.red, true) + '\n' + paint(' ' + t('banner.subtitle'), theme.greyDim);
|
|
77
|
-
const rows = cols >=
|
|
77
|
+
const rows = cols >= 100 ? WORM_ROWS.map((w, i) => w + CLAUDE_ROWS[i]) : [...WORM_ROWS, ...CLAUDE_ROWS];
|
|
78
78
|
return rows.map((r) => paint(r, theme.red, true)).join('\n') + '\n' + paint(' ' + t('banner.subtitle'), theme.greyDim);
|
|
79
79
|
}
|
|
80
80
|
// ── Markdown bloğu → ANSI (kod blokları sözdizimi-vurgulu) ──
|
package/dist/cli.js
CHANGED
|
@@ -254,9 +254,15 @@ function buildLines(items, cols) {
|
|
|
254
254
|
for (const it of items) {
|
|
255
255
|
lines.push([]); // üstte boşluk
|
|
256
256
|
if (it.kind === 'banner') {
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
lines.push([{ text:
|
|
257
|
+
// Dar terminalde (<64) ASCII art sarıp bozulur → temiz tek-kelime kullan.
|
|
258
|
+
if (cols < 64) {
|
|
259
|
+
lines.push([{ text: 'WORMCLAUDE', color: red, bold: true }]);
|
|
260
|
+
}
|
|
261
|
+
else {
|
|
262
|
+
const rows = cols >= 100 ? WORM_ROWS.map((w, i) => w + CLAUDE_ROWS[i]) : [...WORM_ROWS, ...CLAUDE_ROWS];
|
|
263
|
+
for (const r of rows)
|
|
264
|
+
lines.push([{ text: r, color: red, bold: true }]);
|
|
265
|
+
}
|
|
260
266
|
lines.push([{ text: ' ' + t('banner.subtitle'), dim: true }]);
|
|
261
267
|
}
|
|
262
268
|
else if (it.kind === 'user') {
|
|
@@ -287,14 +293,14 @@ function buildLines(items, cols) {
|
|
|
287
293
|
function Banner() {
|
|
288
294
|
const { cols } = useDimensions();
|
|
289
295
|
const RED = theme.red; // WORM + CLAUDE tek renk (kan kırmızısı)
|
|
290
|
-
//
|
|
291
|
-
if (cols <
|
|
296
|
+
// Dar terminal (<64): temiz tek kelime (ASCII art sarıp bozulmaz)
|
|
297
|
+
if (cols < 64) {
|
|
292
298
|
return (React.createElement(Box, { flexDirection: "column", marginBottom: 1 },
|
|
293
299
|
React.createElement(Text, { color: RED, bold: true, wrap: "truncate" }, "WORMCLAUDE"),
|
|
294
300
|
React.createElement(Text, { color: theme.greyDim, wrap: "truncate" }, t('banner.subtitle'))));
|
|
295
301
|
}
|
|
296
302
|
// Geniş ekran: tek satır WORMCLAUDE (WORM + CLAUDE yan yana, tek renk → düzgün kırpılır)
|
|
297
|
-
if (cols >=
|
|
303
|
+
if (cols >= 100) {
|
|
298
304
|
return (React.createElement(Box, { flexDirection: "column", marginBottom: 1 },
|
|
299
305
|
WORM_ROWS.map((w, i) => React.createElement(Text, { key: i, color: RED, bold: true, wrap: "truncate" }, w + CLAUDE_ROWS[i])),
|
|
300
306
|
React.createElement(Text, { color: theme.greyDim, wrap: "truncate" }, ` ${t('banner.subtitle')}`)));
|
|
@@ -368,7 +374,8 @@ function StatusLine({ model, ctxTokens, trust = 0 }) {
|
|
|
368
374
|
const barColor = pct > 85 ? theme.errorRed : pct > 60 ? theme.redBright : theme.grey;
|
|
369
375
|
const cwd = path.basename(process.cwd()) || process.cwd();
|
|
370
376
|
const badge = tier(trust).badge;
|
|
371
|
-
|
|
377
|
+
// Tek satır + truncate → dar terminalde "WormClaud4" gibi taşma/wrap olmaz.
|
|
378
|
+
return (React.createElement(Text, { wrap: "truncate" },
|
|
372
379
|
React.createElement(Text, { color: theme.greyDim },
|
|
373
380
|
' ',
|
|
374
381
|
"WormClaude "),
|
package/dist/theme.js
CHANGED
package/dist/tui.js
CHANGED
|
@@ -110,11 +110,36 @@ export async function runTui() {
|
|
|
110
110
|
readline.emitKeypressEvents(process.stdin);
|
|
111
111
|
if (process.stdin.isTTY)
|
|
112
112
|
process.stdin.setRawMode(true);
|
|
113
|
+
// TÜM mouse-reporting modlarını kapat (ink oturumundan ?1007h sızmış olabilir). Kapalıyken
|
|
114
|
+
// fare sürükleme/seçimi tamamen terminalin işi olur → yukarı sürükleyip seçmek çalışır.
|
|
115
|
+
try {
|
|
116
|
+
process.stdout.write('\x1b[?1000l\x1b[?1002l\x1b[?1003l\x1b[?1006l\x1b[?1015l\x1b[?1007l');
|
|
117
|
+
}
|
|
118
|
+
catch { }
|
|
113
119
|
process.stdout.write(bannerAnsi(cols()) + '\n');
|
|
114
120
|
process.stdout.write(paint(' uncensored security + code', theme.greyDim) + paint(' · WormClaude ', theme.greyDim) + paint('v' + VERSION, theme.red, true) + paint(' · özel renderer (deneysel)', theme.greyDim) + '\n\n');
|
|
115
121
|
renderFooter();
|
|
122
|
+
let ctrlcAt = 0;
|
|
116
123
|
process.stdin.on('keypress', (str, key) => {
|
|
124
|
+
// Ctrl+C tek başına ÇIKMAZ (Windows'ta seçimi Ctrl+C ile kopyalarken uygulama kapanmasın).
|
|
125
|
+
// Giriş varsa temizler; boşsa 2 sn içinde ikinci Ctrl+C ile çıkar.
|
|
117
126
|
if (key && key.ctrl && key.name === 'c') {
|
|
127
|
+
if (inputBuf) {
|
|
128
|
+
inputBuf = '';
|
|
129
|
+
renderFooter();
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
const now = Date.now();
|
|
133
|
+
if (now - ctrlcAt < 2000) {
|
|
134
|
+
logUpdate.clear();
|
|
135
|
+
process.stdout.write('\n');
|
|
136
|
+
process.exit(0);
|
|
137
|
+
}
|
|
138
|
+
ctrlcAt = now;
|
|
139
|
+
printItem({ kind: 'note', text: 'Çıkmak için tekrar Ctrl+C (veya /cikis). Kopyalama Ctrl+C\'yi etkilemez.' });
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
if (key && key.ctrl && key.name === 'd') {
|
|
118
143
|
logUpdate.clear();
|
|
119
144
|
process.stdout.write('\n');
|
|
120
145
|
process.exit(0);
|
|
@@ -157,8 +182,10 @@ export async function runTui() {
|
|
|
157
182
|
renderFooter();
|
|
158
183
|
return;
|
|
159
184
|
}
|
|
160
|
-
// yazdırılabilir karakter /
|
|
161
|
-
|
|
185
|
+
// SADECE gerçek yazdırılabilir karakter ekle. Escape/kontrol dizileri (fare raporları, ok
|
|
186
|
+
// tuşları, fonksiyon tuşları) girişi BOZMAZ ve footer'ı yeniden çizdirmez → fareyle seçim
|
|
187
|
+
// sırasında ekran en alta snap edip seçimi düşürmez.
|
|
188
|
+
if (str && !key?.ctrl && !key?.meta && !str.startsWith('\x1b') && !/[\x00-\x1f]/.test(str)) {
|
|
162
189
|
inputBuf += str;
|
|
163
190
|
renderFooter();
|
|
164
191
|
}
|