wormclaude 1.0.103 → 1.0.105
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/cli.js +26 -9
- package/dist/inlinetools.js +2 -1
- package/dist/theme.js +1 -1
- package/dist/tools.js +9 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -466,6 +466,7 @@ function App() {
|
|
|
466
466
|
const [ctxTokens, setCtxTokens] = useState(0);
|
|
467
467
|
const [started, setStarted] = useState(false);
|
|
468
468
|
const [trustSel, setTrustSel] = useState(0); // 0=Evet, 1=Hayir
|
|
469
|
+
const [wsInput, setWsInput] = useState(''); // açılışta yazılan çalışma klasörü (boş=mevcut cwd)
|
|
469
470
|
const [lang, setLangState] = useState(() => loadLang()); // null → dil sor
|
|
470
471
|
const [langSel, setLangSel] = useState(0); // 0=tr 1=en
|
|
471
472
|
const chooseLang = (l) => { setLang(l); saveLang(l); setLangState(l); };
|
|
@@ -497,22 +498,37 @@ function App() {
|
|
|
497
498
|
else if (key.escape)
|
|
498
499
|
exit();
|
|
499
500
|
});
|
|
500
|
-
// Klasör güven sorusu
|
|
501
|
+
// Klasör güven sorusu + çalışma klasörü yazma (Enter=onayla, farklı yol yazılabilir)
|
|
501
502
|
useInput((inp, key) => {
|
|
502
503
|
if (lang === null || started)
|
|
503
504
|
return;
|
|
504
|
-
if (key.upArrow
|
|
505
|
+
if (key.upArrow)
|
|
505
506
|
setTrustSel(0);
|
|
506
|
-
else if (key.downArrow
|
|
507
|
+
else if (key.downArrow)
|
|
507
508
|
setTrustSel(1);
|
|
509
|
+
else if (key.escape)
|
|
510
|
+
exit();
|
|
508
511
|
else if (key.return) {
|
|
509
|
-
if (trustSel ===
|
|
510
|
-
setStarted(true);
|
|
511
|
-
else
|
|
512
|
+
if (trustSel === 1) {
|
|
512
513
|
exit();
|
|
514
|
+
return;
|
|
515
|
+
}
|
|
516
|
+
const tgt = wsInput.trim().replace(/^["']|["']$/g, '');
|
|
517
|
+
if (tgt) {
|
|
518
|
+
try {
|
|
519
|
+
const abs = path.isAbsolute(tgt) ? tgt : path.resolve(process.cwd(), tgt);
|
|
520
|
+
fs.mkdirSync(abs, { recursive: true });
|
|
521
|
+
process.chdir(abs);
|
|
522
|
+
setBashCwd(abs);
|
|
523
|
+
}
|
|
524
|
+
catch { /* geçersiz yol → mevcut cwd ile devam */ }
|
|
525
|
+
}
|
|
526
|
+
setStarted(true);
|
|
513
527
|
}
|
|
514
|
-
else if (key.
|
|
515
|
-
|
|
528
|
+
else if (key.backspace || key.delete)
|
|
529
|
+
setWsInput((s) => s.slice(0, -1));
|
|
530
|
+
else if (inp && inp.length === 1 && inp >= ' ' && !key.ctrl && !key.meta)
|
|
531
|
+
setWsInput((s) => s + inp);
|
|
516
532
|
});
|
|
517
533
|
// Soru dialogu (AskUserQuestion / plan onayı)
|
|
518
534
|
useInput((inp, key) => {
|
|
@@ -1067,7 +1083,8 @@ function App() {
|
|
|
1067
1083
|
React.createElement(Box, { flexDirection: "column", marginTop: 1, paddingX: 1 },
|
|
1068
1084
|
React.createElement(Text, { color: theme.redBright, bold: true }, t('trust.accessing')),
|
|
1069
1085
|
React.createElement(Text, null, " "),
|
|
1070
|
-
React.createElement(Text, { color: theme.
|
|
1086
|
+
React.createElement(Text, { color: theme.grey }, getLang() === 'en' ? 'Working folder (Enter = use it, or type another path):' : 'Çalışma klasörü (Enter = bu klasör, ya da farklı yol yaz):'),
|
|
1087
|
+
React.createElement(Text, { color: theme.white }, '❯ ' + (wsInput || process.cwd())),
|
|
1071
1088
|
React.createElement(Text, null, " "),
|
|
1072
1089
|
t('trust.check').split('\n').map((line, i) => React.createElement(Text, { key: i, color: theme.grey }, line)),
|
|
1073
1090
|
React.createElement(Text, null, " "),
|
package/dist/inlinetools.js
CHANGED
|
@@ -73,7 +73,8 @@ function extractTopLevelJsonObjects(text) {
|
|
|
73
73
|
* (<tool_call>, ```json) veya mesajın TAMAMI tek JSON çağrısıysa onu alır. */
|
|
74
74
|
export function recoverInlineToolCalls(text) {
|
|
75
75
|
const t = (text || '').trim();
|
|
76
|
-
|
|
76
|
+
// JSON-temelli çağrı yoksa VE prose-AskUserQuestion da yoksa erken çık.
|
|
77
|
+
if (!t || (!t.includes('"name"') && !t.includes('"tool"') && !t.includes('"function"') && !/AskUserQuestion/i.test(t)))
|
|
77
78
|
return [];
|
|
78
79
|
const out = [];
|
|
79
80
|
const seen = new Set();
|
package/dist/theme.js
CHANGED
package/dist/tools.js
CHANGED
|
@@ -587,11 +587,19 @@ const computerToolSchemas = [
|
|
|
587
587
|
{ type: 'function', function: { name: 'Key', description: 'Ozel tus / kombinasyon gonderir. Orn: "Enter", "Tab", "Ctrl+C", "Alt+F4".', parameters: { type: 'object', properties: { keys: { type: 'string' } }, required: ['keys'] } } },
|
|
588
588
|
{ type: 'function', function: { name: 'Scroll', description: 'Fare tekerlegiyle kaydirir.', parameters: { type: 'object', properties: { direction: { type: 'string', enum: ['up', 'down'] }, amount: { type: 'number', description: 'Varsayilan 3' } }, required: ['direction'] } } },
|
|
589
589
|
];
|
|
590
|
+
// Yerel 32B model çok sayıda + orchestration aracıyla (Skill/Agent/PlanMode/TodoWrite)
|
|
591
|
+
// karşılaşınca araç çağrısı yerine "plan"ı DÜZ-METİN döküyor (saçma çıktı + donma).
|
|
592
|
+
// Bu yüzden modele YALNIZ sade, build+güvenlik çekirdeğini veriyoruz → araçları gerçekten
|
|
593
|
+
// çağırıp işi yapar, planı ekrana basmaz. (Gerekirse buraya yeni araç eklenir.)
|
|
594
|
+
const CORE_TOOLS = new Set([
|
|
595
|
+
'Bash', 'PowerShell', 'Read', 'Write', 'Edit', 'Glob', 'Grep',
|
|
596
|
+
'WebFetch', 'WebSearch', 'AskUserQuestion', 'Sleep',
|
|
597
|
+
]);
|
|
590
598
|
export function allToolSchemas() {
|
|
591
599
|
const sk = skillToolSchema();
|
|
592
600
|
const all = [...toolSchemas, ...computerToolSchemas, ...getMcpToolSchemas(), ...(sk ? [sk] : [])];
|
|
593
601
|
const excluded = new Set(getExcludedTools());
|
|
594
|
-
return
|
|
602
|
+
return all.filter((t) => CORE_TOOLS.has(t.function.name) && !excluded.has(t.function.name));
|
|
595
603
|
}
|
|
596
604
|
const TOOL_META = {
|
|
597
605
|
Read: { readOnly: true, concurrencySafe: true },
|