wormclaude 1.0.125 → 1.0.126
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 +15 -21
- 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';
|
|
@@ -451,10 +449,10 @@ export async function runTui() {
|
|
|
451
449
|
catch { }
|
|
452
450
|
process.stdout.write('\x1b[?25l'); // gerçek imleci gizle (kendi ▌ bloğumuzu çiziyoruz)
|
|
453
451
|
redrawAll();
|
|
454
|
-
// Açılış:
|
|
452
|
+
// Açılış: Claude tarzı GÜVEN onayı (yol yazdırma yok — cwd zaten kullanıcının açtığı klasör).
|
|
455
453
|
printItem({ kind: 'note', text: getLang() === 'en'
|
|
456
|
-
?
|
|
457
|
-
:
|
|
454
|
+
? `🔒 Accessing workspace:\n ${process.cwd()}\n\n Trust this folder? It's where files will be created. Press Enter to continue · type "no" to exit · /cd <path> to change later.`
|
|
455
|
+
: `🔒 Çalışma alanına erişiliyor:\n ${process.cwd()}\n\n Bu klasöre güveniyor musun? Dosyalar burada oluşturulur. Devam için Enter · çıkmak için "hayır" yaz · sonra değiştirmek için /cd <yol>.` });
|
|
458
456
|
fetchAccount(config).then((a) => { if (a) {
|
|
459
457
|
account = a;
|
|
460
458
|
redrawAll();
|
|
@@ -623,24 +621,20 @@ export async function runTui() {
|
|
|
623
621
|
inputBuf = '';
|
|
624
622
|
inputCur = 0;
|
|
625
623
|
histIdx = -1;
|
|
626
|
-
// Açılış
|
|
624
|
+
// Açılış GÜVEN onayı (Claude tarzı): Enter = onayla, "hayır"/"no" = çık. Yol yazdırma YOK.
|
|
627
625
|
if (awaitingWorkspace) {
|
|
628
626
|
awaitingWorkspace = false;
|
|
629
|
-
const
|
|
630
|
-
if (
|
|
631
|
-
|
|
632
|
-
|
|
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
|
-
}
|
|
627
|
+
const _low = v.toLowerCase();
|
|
628
|
+
if (['hayır', 'hayir', 'no', 'n', 'q', 'exit', 'quit', 'çık', 'cik'].includes(_low)) {
|
|
629
|
+
quit();
|
|
630
|
+
return;
|
|
640
631
|
}
|
|
641
|
-
printItem({ kind: 'note', text: (getLang() === 'en' ? '
|
|
642
|
-
|
|
643
|
-
|
|
632
|
+
printItem({ kind: 'note', text: '✓ ' + (getLang() === 'en' ? 'Workspace trusted: ' : 'Klasöre güvenildi: ') + process.cwd() });
|
|
633
|
+
if (!v) {
|
|
634
|
+
refresh();
|
|
635
|
+
return;
|
|
636
|
+
} // sadece Enter → onayla, görev bekle
|
|
637
|
+
// görev yazıldıysa → onayla + aşağı düşüp çalıştır
|
|
644
638
|
}
|
|
645
639
|
if (!v) {
|
|
646
640
|
refresh();
|