wormclaude 1.0.122 → 1.0.123
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/tools.js +3 -1
- package/dist/tui.js +27 -1
- package/package.json +1 -1
package/dist/theme.js
CHANGED
package/dist/tools.js
CHANGED
|
@@ -605,8 +605,10 @@ const computerToolSchemas = [
|
|
|
605
605
|
// çağırıp işi yapar, planı ekrana basmaz. (Gerekirse buraya yeni araç eklenir.)
|
|
606
606
|
const CORE_TOOLS = new Set([
|
|
607
607
|
'Bash', 'PowerShell', 'Read', 'Write', 'Edit', 'Glob', 'Grep',
|
|
608
|
-
'WebFetch', 'WebSearch', '
|
|
608
|
+
'WebFetch', 'WebSearch', 'Sleep',
|
|
609
609
|
'TaskOutput', // uzun komutları arka planda çalıştırıp bitişini yoklamak için (run_in_background)
|
|
610
|
+
// AskUserQuestion KALDIRILDI: 32B nested options array'ini sağlıklı üretemiyor → degenere
|
|
611
|
+
// oluyor ({"name":"","arguments":""} tekrarı). Model artık makul varsayımla direkt kurar.
|
|
610
612
|
]);
|
|
611
613
|
export function allToolSchemas() {
|
|
612
614
|
const sk = skillToolSchema();
|
package/dist/tui.js
CHANGED
|
@@ -6,7 +6,9 @@
|
|
|
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 } from './tools.js';
|
|
9
|
+
import { allToolSchemas, executeToolCalls, executeTool, toolLabel, setToolConfig, setBashCwd } from './tools.js';
|
|
10
|
+
import * as path from 'node:path';
|
|
11
|
+
import * as fs from 'node:fs';
|
|
10
12
|
import { sanitizeOutput } from './errorsan.js';
|
|
11
13
|
import { itemAnsi, markdownAnsi } from './ansi.js';
|
|
12
14
|
import { theme, VERSION } from './theme.js';
|
|
@@ -83,6 +85,7 @@ export async function runTui() {
|
|
|
83
85
|
const displayItems = [{ kind: 'banner' }];
|
|
84
86
|
let inputBuf = '', inputCur = 0, busy = false, streamChars = 0, spin = 0;
|
|
85
87
|
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)
|
|
86
89
|
// 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.
|
|
87
90
|
const SPIN = ['·', '✢', '✳', '✶', '✻', '✽', '✶', '✳', '✢'];
|
|
88
91
|
// Canlı bağlam ölçer: son isteğin prompt_tokens'ı = o anki kullanılan bağlam (footer'da gösterilir).
|
|
@@ -448,6 +451,10 @@ export async function runTui() {
|
|
|
448
451
|
catch { }
|
|
449
452
|
process.stdout.write('\x1b[?25l'); // gerçek imleci gizle (kendi ▌ bloğumuzu çiziyoruz)
|
|
450
453
|
redrawAll();
|
|
454
|
+
// Açılış: çalışma klasörünü sor (ilk submit = klasör). Dosyalar buraya yazılır.
|
|
455
|
+
printItem({ kind: 'note', text: getLang() === 'en'
|
|
456
|
+
? `📁 Working folder? Type a path (a new folder is created if missing), or press Enter to use:\n ${process.cwd()}`
|
|
457
|
+
: `📁 Hangi klasörde çalışayım? Bir yol yaz (yoksa oluşturulur) ya da Enter ile şunu kullan:\n ${process.cwd()}` });
|
|
451
458
|
fetchAccount(config).then((a) => { if (a) {
|
|
452
459
|
account = a;
|
|
453
460
|
redrawAll();
|
|
@@ -616,6 +623,25 @@ export async function runTui() {
|
|
|
616
623
|
inputBuf = '';
|
|
617
624
|
inputCur = 0;
|
|
618
625
|
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
|
+
}
|
|
619
645
|
if (!v) {
|
|
620
646
|
refresh();
|
|
621
647
|
return;
|