wormclaude 1.0.100 → 1.0.101
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 +10 -0
- package/dist/theme.js +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -679,6 +679,7 @@ function App() {
|
|
|
679
679
|
let lastAnswer = ''; // modelin son (sentez) cevabı
|
|
680
680
|
let lastToolSig = '';
|
|
681
681
|
let sameToolCount = 0;
|
|
682
|
+
let taskIn = 0, taskOut = 0, taskCache = 0; // bu görevin GERÇEK token toplamı (tüm turlar; API usage'dan)
|
|
682
683
|
while (iter < MAX_TURNS) {
|
|
683
684
|
if (ac.signal.aborted) {
|
|
684
685
|
push({ kind: 'note', text: t('note.interrupted') });
|
|
@@ -732,6 +733,9 @@ function App() {
|
|
|
732
733
|
else if (ev.type === 'done') {
|
|
733
734
|
toolCalls = ev.toolCalls;
|
|
734
735
|
usage.record(config.model, ev.usage); // billing: token/maliyet kaydı
|
|
736
|
+
taskIn += ev.usage?.input || 0; // bu görevin gerçek token toplamı
|
|
737
|
+
taskOut += ev.usage?.output || 0;
|
|
738
|
+
taskCache += ev.usage?.cacheRead || 0; // havuz hafıza (prefix-cache) isabeti
|
|
735
739
|
}
|
|
736
740
|
}
|
|
737
741
|
setStreaming('');
|
|
@@ -832,6 +836,12 @@ function App() {
|
|
|
832
836
|
}
|
|
833
837
|
if (!done)
|
|
834
838
|
push({ kind: 'note', text: t('note.maxTurns', MAX_TURNS) });
|
|
839
|
+
// Bu görevin GERÇEK token maliyeti (tüm turların toplamı, API usage'dan)
|
|
840
|
+
if (taskIn + taskOut > 0) {
|
|
841
|
+
const tot = (taskIn + taskOut).toLocaleString();
|
|
842
|
+
const cacheStr = taskCache > 0 ? ` (${taskCache.toLocaleString()} havuz-önbellek)` : '';
|
|
843
|
+
push({ kind: 'note', text: `⎿ Bu istek: ↑${taskIn.toLocaleString()} giriş${cacheStr} · ↓${taskOut.toLocaleString()} çıkış · toplam ${tot} token` });
|
|
844
|
+
}
|
|
835
845
|
abortRef.current = null;
|
|
836
846
|
setCtxTokens(Math.round(JSON.stringify(historyRef.current).length / 4));
|
|
837
847
|
setBusy(false);
|
package/dist/theme.js
CHANGED