@noobdemon/noob-cli 1.10.16 → 1.10.17
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/package.json +1 -1
- package/src/agent.js +2 -4
package/package.json
CHANGED
package/src/agent.js
CHANGED
|
@@ -524,10 +524,8 @@ export async function runAgent({ history, model, signal, onTool, onStatus, onDel
|
|
|
524
524
|
|
|
525
525
|
const system = buildSystem(history, extraToolsDoc, goal, recentSessions);
|
|
526
526
|
const message = buildUserMessage(history);
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
tokenMeter?.setContext(countTokens(system) + countTokens(message));
|
|
530
|
-
tokenMeter?.addInput(countTokens(message));
|
|
527
|
+
tokenMeter?.addInput(countTokens(system) + countTokens(message));
|
|
528
|
+
tokenMeter?.setContext(tokenMeter.total);
|
|
531
529
|
onStatus?.("thinking");
|
|
532
530
|
onDelta?.({ type: "step-start" });
|
|
533
531
|
// Stream + auto-retry: bao lớp resilience cho lỗi stream cut / empty / network.
|