wormclaude 1.0.125 → 1.0.127
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 +20 -27
- package/package.json +1 -1
package/dist/theme.js
CHANGED
package/dist/tui.js
CHANGED
|
@@ -6,9 +6,7 @@
|
|
|
6
6
|
import readline from 'node:readline';
|
|
7
7
|
import stringWidth from 'string-width';
|
|
8
8
|
import { loadConfig, streamChat, fetchAccount } from './api.js';
|
|
9
|
-
import { allToolSchemas, executeToolCalls, executeTool, toolLabel, setToolConfig
|
|
10
|
-
import * as path from 'node:path';
|
|
11
|
-
import * as fs from 'node:fs';
|
|
9
|
+
import { allToolSchemas, executeToolCalls, executeTool, toolLabel, setToolConfig } from './tools.js';
|
|
12
10
|
import { sanitizeOutput } from './errorsan.js';
|
|
13
11
|
import { itemAnsi, markdownAnsi } from './ansi.js';
|
|
14
12
|
import { theme, VERSION } from './theme.js';
|
|
@@ -85,7 +83,6 @@ export async function runTui() {
|
|
|
85
83
|
const displayItems = [{ kind: 'banner' }];
|
|
86
84
|
let inputBuf = '', inputCur = 0, busy = false, streamChars = 0, spin = 0;
|
|
87
85
|
let taskStart = 0; // görev başlangıç zamanı (spinner'da geçen süre için)
|
|
88
|
-
let awaitingWorkspace = true; // açılışta çalışma klasörü sorulur (ilk submit = klasör)
|
|
89
86
|
// Canlı akış artık FOOTER'da DEĞİL — içerik akışına (mesajın altından aşağı) satır-satır basılır.
|
|
90
87
|
const SPIN = ['·', '✢', '✳', '✶', '✻', '✽', '✶', '✳', '✢'];
|
|
91
88
|
// Canlı bağlam ölçer: son isteğin prompt_tokens'ı = o anki kullanılan bağlam (footer'da gösterilir).
|
|
@@ -451,10 +448,25 @@ export async function runTui() {
|
|
|
451
448
|
catch { }
|
|
452
449
|
process.stdout.write('\x1b[?25l'); // gerçek imleci gizle (kendi ▌ bloğumuzu çiziyoruz)
|
|
453
450
|
redrawAll();
|
|
454
|
-
// Açılış:
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
451
|
+
// Açılış: Claude tarzı GÜVEN ekranı — trust metni (içerik) + ok-tuşlu Evet/Hayır seçici (ask modal).
|
|
452
|
+
{
|
|
453
|
+
const _en = getLang() === 'en';
|
|
454
|
+
printItem({ kind: 'note', text: (_en ? 'Accessing workspace:' : 'Çalışma alanına erişiliyor:') + '\n\n' +
|
|
455
|
+
process.cwd() + '\n\n' +
|
|
456
|
+
t('trust.check') + '\n\n' +
|
|
457
|
+
t('trust.canDo') });
|
|
458
|
+
const _noLabel = _en ? 'No, exit' : 'Hayır, çık';
|
|
459
|
+
ask = {
|
|
460
|
+
question: _en ? 'Trust this folder?' : 'Bu klasöre güveniyor musun?',
|
|
461
|
+
options: [{ label: _en ? 'Yes, I trust this folder' : 'Evet, bu klasöre güveniyorum' }, { label: _noLabel }],
|
|
462
|
+
sel: 0,
|
|
463
|
+
resolve: (v) => { if (v === _noLabel)
|
|
464
|
+
quit();
|
|
465
|
+
else
|
|
466
|
+
refresh(); },
|
|
467
|
+
};
|
|
468
|
+
refresh();
|
|
469
|
+
}
|
|
458
470
|
fetchAccount(config).then((a) => { if (a) {
|
|
459
471
|
account = a;
|
|
460
472
|
redrawAll();
|
|
@@ -623,25 +635,6 @@ export async function runTui() {
|
|
|
623
635
|
inputBuf = '';
|
|
624
636
|
inputCur = 0;
|
|
625
637
|
histIdx = -1;
|
|
626
|
-
// Açılış klasör sorusu: ilk submit = çalışma klasörü (Enter = mevcut, ya da yol yaz/oluştur)
|
|
627
|
-
if (awaitingWorkspace) {
|
|
628
|
-
awaitingWorkspace = false;
|
|
629
|
-
const tgt = v.replace(/^["']|["']$/g, '');
|
|
630
|
-
if (tgt) {
|
|
631
|
-
try {
|
|
632
|
-
const abs = path.isAbsolute(tgt) ? tgt : path.resolve(process.cwd(), tgt);
|
|
633
|
-
fs.mkdirSync(abs, { recursive: true });
|
|
634
|
-
process.chdir(abs);
|
|
635
|
-
setBashCwd(abs);
|
|
636
|
-
}
|
|
637
|
-
catch (e) {
|
|
638
|
-
printItem({ kind: 'note', text: (getLang() === 'en' ? 'Folder error: ' : 'Klasör hatası: ') + (e?.message || e) });
|
|
639
|
-
}
|
|
640
|
-
}
|
|
641
|
-
printItem({ kind: 'note', text: (getLang() === 'en' ? '✓ Working folder: ' : '✓ Çalışma klasörü: ') + process.cwd() });
|
|
642
|
-
refresh();
|
|
643
|
-
return;
|
|
644
|
-
}
|
|
645
638
|
if (!v) {
|
|
646
639
|
refresh();
|
|
647
640
|
return;
|