wormclaude 1.0.7 → 1.0.8
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 +35 -6
- package/dist/theme.js +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -57,7 +57,7 @@ import('./auth.js').then((a) => a.checkForUpdate(VERSION)).then((v) => { _update
|
|
|
57
57
|
process.on('exit', () => { if (_updateLatest)
|
|
58
58
|
process.stdout.write('\n Yeni surum var: ' + VERSION + ' -> ' + _updateLatest + '. Guncelle: wormclaude update\n'); });
|
|
59
59
|
setToolConfig(config); // Agent/alt-agent araçları aynı config'i kullanır
|
|
60
|
-
const MAX_TURNS = Number(process.env.WORMCLAUDE_MAX_TURNS) ||
|
|
60
|
+
const MAX_TURNS = Number(process.env.WORMCLAUDE_MAX_TURNS) || 50; // tur limiti
|
|
61
61
|
setLang(loadLang() ?? 'tr'); // kayıtlı dili yükle (yoksa tr)
|
|
62
62
|
loadSkills(); // .wormclaude/skills/*.md yükle
|
|
63
63
|
// FULLSCREEN (alternate screen) — WormClaude'un yöntemi: tüm ekranı ink yönetir,
|
|
@@ -245,16 +245,29 @@ function WormSpinner({ label, tokens }) {
|
|
|
245
245
|
" tokens") : null));
|
|
246
246
|
}
|
|
247
247
|
function StatusLine({ model, ctxTokens }) {
|
|
248
|
-
const
|
|
248
|
+
const max = Number(process.env.WORMCLAUDE_CTX) || 12288;
|
|
249
|
+
const pct = Math.min(100, Math.round((ctxTokens / max) * 100));
|
|
250
|
+
const filled = Math.round(pct / 10);
|
|
251
|
+
const bar = '█'.repeat(filled) + '░'.repeat(10 - filled);
|
|
252
|
+
const barColor = pct > 85 ? theme.errorRed : pct > 60 ? theme.redBright : theme.grey;
|
|
249
253
|
return (React.createElement(Box, null,
|
|
250
254
|
React.createElement(Text, { color: theme.greyDim },
|
|
251
255
|
' ',
|
|
256
|
+
"WormClaude "),
|
|
257
|
+
React.createElement(Text, { color: theme.red, bold: true },
|
|
258
|
+
"v",
|
|
259
|
+
VERSION),
|
|
260
|
+
React.createElement(Text, { color: theme.greyDim },
|
|
261
|
+
" \u00B7 ",
|
|
252
262
|
model,
|
|
253
|
-
" \u00B7
|
|
254
|
-
|
|
255
|
-
|
|
263
|
+
" \u00B7 "),
|
|
264
|
+
React.createElement(Text, { color: barColor }, bar),
|
|
265
|
+
React.createElement(Text, { color: theme.greyDim },
|
|
266
|
+
" ",
|
|
256
267
|
pct,
|
|
257
|
-
"%
|
|
268
|
+
"% \u00B7 ",
|
|
269
|
+
ctxTokens.toLocaleString(),
|
|
270
|
+
" tok")));
|
|
258
271
|
}
|
|
259
272
|
function App() {
|
|
260
273
|
const { exit } = useApp();
|
|
@@ -470,6 +483,8 @@ function App() {
|
|
|
470
483
|
let done = false;
|
|
471
484
|
let usedWeb = false; // bu turda web aracı kullanıldı mı (öğrenme için)
|
|
472
485
|
let lastAnswer = ''; // modelin son (sentez) cevabı
|
|
486
|
+
let lastToolSig = '';
|
|
487
|
+
let sameToolCount = 0;
|
|
473
488
|
while (iter < MAX_TURNS) {
|
|
474
489
|
if (ac.signal.aborted) {
|
|
475
490
|
push({ kind: 'note', text: t('note.interrupted') });
|
|
@@ -554,6 +569,20 @@ function App() {
|
|
|
554
569
|
done = true;
|
|
555
570
|
break;
|
|
556
571
|
}
|
|
572
|
+
// Takilma korumasi: ayni arac cagrisi 3 kez ust uste gelirse dur
|
|
573
|
+
const _sig = JSON.stringify(toolCalls.map((tc) => tc.name + ':' + (tc.args || '')));
|
|
574
|
+
if (_sig === lastToolSig) {
|
|
575
|
+
sameToolCount++;
|
|
576
|
+
}
|
|
577
|
+
else {
|
|
578
|
+
sameToolCount = 0;
|
|
579
|
+
lastToolSig = _sig;
|
|
580
|
+
}
|
|
581
|
+
if (sameToolCount >= 2) {
|
|
582
|
+
push({ kind: 'note', text: getLang() === 'en' ? 'Same step repeated 3x, stopping to avoid a loop.' : 'Ayni adim 3 kez tekrarlandi, dongu onlemek icin durduruldu.' });
|
|
583
|
+
done = true;
|
|
584
|
+
break;
|
|
585
|
+
}
|
|
557
586
|
// Paralel araç çalıştırma + izin onayı (yazanlar sıralı)
|
|
558
587
|
setThinking(false);
|
|
559
588
|
setPhase(toolCalls.length > 1 ? t('phase.toolsMulti', toolCalls.length) : t('phase.toolRun', toolCalls[0].name));
|
package/dist/theme.js
CHANGED