wormclaude 1.0.30 → 1.0.32
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 +1 -1
- package/dist/tui.js +17 -20
- package/package.json +1 -1
package/dist/theme.js
CHANGED
package/dist/tui.js
CHANGED
|
@@ -55,7 +55,8 @@ export async function runTui() {
|
|
|
55
55
|
const printItem = (it) => { displayItems.push(it); logUpdate.clear(); process.stdout.write(itemAnsi(it, cols()) + '\n'); renderFooter(); };
|
|
56
56
|
// ── Resize: ekranı temizle, HER ŞEYİ o anki genişlikte yeniden bas (banner + kod responsive) ──
|
|
57
57
|
function redrawAll() {
|
|
58
|
-
|
|
58
|
+
logUpdate.clear(); // ÖNCE log-update sayacını sıfırla (yoksa
|
|
59
|
+
process.stdout.write('\x1b[2J\x1b[3J\x1b[H'); // sonraki render eraseLines ile banner'ı siler → garble)
|
|
59
60
|
for (const it of displayItems)
|
|
60
61
|
process.stdout.write(itemAnsi(it, cols()) + '\n');
|
|
61
62
|
renderFooter();
|
|
@@ -82,20 +83,10 @@ export async function runTui() {
|
|
|
82
83
|
shown = '…' + shown.slice(-(avail - 1));
|
|
83
84
|
lines.push(prompt + shown + (busy ? '' : paint('▌', theme.greyDim)));
|
|
84
85
|
lines.push(paint('/kopyala panoya · Ctrl+C çıkış', theme.greyDim));
|
|
85
|
-
|
|
86
|
-
//
|
|
87
|
-
//
|
|
88
|
-
|
|
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'));
|
|
86
|
+
// Canlı bölge KÜÇÜK tutulur (sadece footer). Büyük pad'li bölge, yukarı kaydırınca
|
|
87
|
+
// log-update'in yanlış yeri silmesine → input'un kaybolmasına yol açıyordu. Input içeriğin
|
|
88
|
+
// hemen altında oturur (üstte 1 boş satır boşluk var).
|
|
89
|
+
logUpdate(lines.map((l) => fit(l, W)).join('\n'));
|
|
99
90
|
}
|
|
100
91
|
// ── Bir sohbet turu (Milestone 1: araç yok, saf metin) ──
|
|
101
92
|
async function runTurn(userText) {
|
|
@@ -164,9 +155,9 @@ export async function runTui() {
|
|
|
164
155
|
if (key && key.ctrl && key.name === 'd') {
|
|
165
156
|
quit();
|
|
166
157
|
}
|
|
167
|
-
if (busy)
|
|
168
|
-
return; // tur sırasında giriş kilitli (M1)
|
|
169
158
|
if (key && key.name === 'return') {
|
|
159
|
+
if (busy)
|
|
160
|
+
return; // tur sürerken Enter işlemez; yazılan metin durur (type-ahead)
|
|
170
161
|
const v = inputBuf.trim();
|
|
171
162
|
inputBuf = '';
|
|
172
163
|
if (!v) {
|
|
@@ -209,8 +200,14 @@ export async function runTui() {
|
|
|
209
200
|
renderFooter();
|
|
210
201
|
}
|
|
211
202
|
});
|
|
212
|
-
// resize →
|
|
203
|
+
// resize → her event'te ANINDA temizle (sürüklerken garbled reflow gösterme), settle sonrası
|
|
204
|
+
// (100ms) HER ŞEYİ yeni genişlikte yeniden bas (banner/kod responsive, bozulmaz).
|
|
213
205
|
let rzTimer = null;
|
|
214
|
-
process.stdout.on('resize', () => {
|
|
215
|
-
|
|
206
|
+
process.stdout.on('resize', () => {
|
|
207
|
+
logUpdate.clear();
|
|
208
|
+
process.stdout.write('\x1b[2J\x1b[3J\x1b[H');
|
|
209
|
+
if (rzTimer)
|
|
210
|
+
clearTimeout(rzTimer);
|
|
211
|
+
rzTimer = setTimeout(redrawAll, 100);
|
|
212
|
+
});
|
|
216
213
|
}
|