wormclaude 1.0.40 → 1.0.41
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 +32 -4
- package/package.json +1 -1
package/dist/theme.js
CHANGED
package/dist/tui.js
CHANGED
|
@@ -57,6 +57,8 @@ export async function runTui() {
|
|
|
57
57
|
// İzin (araç onayı) durumu
|
|
58
58
|
let perm = null;
|
|
59
59
|
const allowAll = new Set(); // "Tümüne izin" denen araçlar (oturum boyu)
|
|
60
|
+
const inputHistory = []; // gönderilen mesajlar (↑/↓ ile geri çağrılır)
|
|
61
|
+
let histIdx = -1; // -1 = geçmişte gezinmiyor
|
|
60
62
|
// ── Claude tarzı başlık (model/plan/mail/cwd) — responsive ──
|
|
61
63
|
function headerLines(W) {
|
|
62
64
|
const a = paint(' WormClaude ', theme.greyDim) + paint('v' + VERSION, theme.red, true)
|
|
@@ -89,10 +91,11 @@ export async function runTui() {
|
|
|
89
91
|
if (vis(shown) > avail)
|
|
90
92
|
shown = '…' + shown.slice(-(avail - 1));
|
|
91
93
|
const inputLine = paint('❯ ', theme.redBright, true) + paint(shown, theme.white) + paint('▌', theme.greyDim);
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
// Durum satırı KUTUNUN ÜSTÜNDE (en altta değil): çalışırken spinner, boştayken ipucu.
|
|
95
|
+
const status = busy
|
|
96
|
+
? paint(` ${SPIN[spin % SPIN.length]} çalışıyor…${streamChars ? ' ' + streamChars + ' karakter' : ''}`, theme.grey)
|
|
97
|
+
: paint(' /kopyala · /help komutlar · ↑↓ geçmiş · Ctrl+C çıkış', theme.greyDim);
|
|
98
|
+
body = [status, line, inputLine, line];
|
|
96
99
|
}
|
|
97
100
|
let out = '\x1b7'; // imleci kaydet
|
|
98
101
|
body.forEach((l, i) => { out += `\x1b[${start + i};1H\x1b[2K` + fit(l, W); });
|
|
@@ -246,15 +249,40 @@ export async function runTui() {
|
|
|
246
249
|
if (key && key.ctrl && key.name === 'd') {
|
|
247
250
|
quit();
|
|
248
251
|
}
|
|
252
|
+
// ↑/↓ — geçmiş mesajlarda gezin (shell tarzı komut geçmişi)
|
|
253
|
+
if (key && key.name === 'up') {
|
|
254
|
+
if (inputHistory.length) {
|
|
255
|
+
histIdx = histIdx < 0 ? inputHistory.length - 1 : Math.max(0, histIdx - 1);
|
|
256
|
+
inputBuf = inputHistory[histIdx];
|
|
257
|
+
drawFooter();
|
|
258
|
+
}
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
if (key && key.name === 'down') {
|
|
262
|
+
if (histIdx >= 0) {
|
|
263
|
+
histIdx++;
|
|
264
|
+
if (histIdx >= inputHistory.length) {
|
|
265
|
+
histIdx = -1;
|
|
266
|
+
inputBuf = '';
|
|
267
|
+
}
|
|
268
|
+
else
|
|
269
|
+
inputBuf = inputHistory[histIdx];
|
|
270
|
+
drawFooter();
|
|
271
|
+
}
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
249
274
|
if (key && key.name === 'return') {
|
|
250
275
|
if (busy)
|
|
251
276
|
return; // tur sürerken Enter beklemede; yazılan metin durur (type-ahead)
|
|
252
277
|
const v = inputBuf.trim();
|
|
253
278
|
inputBuf = '';
|
|
279
|
+
histIdx = -1;
|
|
254
280
|
if (!v) {
|
|
255
281
|
drawFooter();
|
|
256
282
|
return;
|
|
257
283
|
}
|
|
284
|
+
if (v)
|
|
285
|
+
inputHistory.push(v); // geçmişe ekle (↑ ile geri çağrılır)
|
|
258
286
|
if (v === '/cikis' || v === '/exit' || v === '/quit') {
|
|
259
287
|
quit();
|
|
260
288
|
}
|