wormclaude 1.0.29 → 1.0.30
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 +7 -6
- package/dist/theme.js +1 -1
- package/dist/tui.js +14 -2
- package/package.json +1 -1
package/dist/ansi.js
CHANGED
|
@@ -72,12 +72,13 @@ 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
|
-
//
|
|
76
|
-
// (
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
const rows = cols >= 90 ? WORM_ROWS.map((
|
|
80
|
-
|
|
75
|
+
// HER ZAMAN büyük ASCII (tek-kelime fallback YOK). Geniş (≥90) → WORM+CLAUDE yan yana;
|
|
76
|
+
// dar → WORM üstte CLAUDE altta (2 blok). Daha da darsa satırlar genişliğe KIRPILIR (sarmaz,
|
|
77
|
+
// bozulmaz — TUI resize'da yeniden bastığı için temiz). Kutu çizim karakterleri 1 sütun.
|
|
78
|
+
const w = Math.max(10, cols);
|
|
79
|
+
const rows = cols >= 90 ? WORM_ROWS.map((r, i) => r + CLAUDE_ROWS[i]) : [...WORM_ROWS, ...CLAUDE_ROWS];
|
|
80
|
+
const body = rows.map((r) => paint(r.length > w ? r.slice(0, w) : r, theme.red, true)).join('\n');
|
|
81
|
+
return body + '\n' + paint(' ' + t('banner.subtitle'), theme.greyDim);
|
|
81
82
|
}
|
|
82
83
|
// ── Markdown bloğu → ANSI (kod blokları sözdizimi-vurgulu) ──
|
|
83
84
|
function markdownAnsi(text, cols) {
|
package/dist/theme.js
CHANGED
package/dist/tui.js
CHANGED
|
@@ -82,8 +82,20 @@ export async function runTui() {
|
|
|
82
82
|
shown = '…' + shown.slice(-(avail - 1));
|
|
83
83
|
lines.push(prompt + shown + (busy ? '' : paint('▌', theme.greyDim)));
|
|
84
84
|
lines.push(paint('/kopyala panoya · Ctrl+C çıkış', theme.greyDim));
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
const footerLines = lines.map((l) => fit(l, W)); // genişliğe kırp (sarma olmaz)
|
|
86
|
+
// Giriş kutusunu ekranın EN ALTINA sabitle: içerik kısaysa üstüne boş satır doldur.
|
|
87
|
+
// (İçerik ekranı doldurunca pad ≤ 0 → footer doğal olarak içeriğin hemen altında / en altta.)
|
|
88
|
+
const rows = process.stdout.rows || 24;
|
|
89
|
+
let contentH = 0;
|
|
90
|
+
for (const it of displayItems) {
|
|
91
|
+
for (const ln of itemAnsi(it, W).split('\n'))
|
|
92
|
+
contentH += Math.max(1, Math.ceil((vis(ln) || 1) / W));
|
|
93
|
+
if (contentH >= rows)
|
|
94
|
+
break;
|
|
95
|
+
}
|
|
96
|
+
const pad = rows - contentH - footerLines.length - 1;
|
|
97
|
+
const out = pad > 0 ? [...Array(pad).fill(''), ...footerLines] : footerLines;
|
|
98
|
+
logUpdate(out.join('\n'));
|
|
87
99
|
}
|
|
88
100
|
// ── Bir sohbet turu (Milestone 1: araç yok, saf metin) ──
|
|
89
101
|
async function runTurn(userText) {
|