@noobdemon/noob-cli 1.10.12 → 1.10.13
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 -2
package/package.json
CHANGED
package/src/agent.js
CHANGED
|
@@ -146,10 +146,10 @@ const MAX_STEPS = 10000;
|
|
|
146
146
|
// quá ngưỡng này → coi là bị kẹt, inject thông báo để model chuyển bước.
|
|
147
147
|
const LOOP_DETECT_WINDOW = 3;
|
|
148
148
|
const LOOP_DETECT_THRESHOLD = 2;
|
|
149
|
-
const MAX_PROMPT_CHARS =
|
|
149
|
+
const MAX_PROMPT_CHARS = 600000; // ~150k tokens (50% của 300k window) — allow compaction only at >50%
|
|
150
150
|
// Khi history vượt ngưỡng này, gọi model phụ tóm tắt các lượt cũ thay vì cắt cụt
|
|
151
151
|
// → giữ được "trí nhớ dài hạn" trong phiên mà không nổ context.
|
|
152
|
-
const SUMMARIZE_THRESHOLD_CHARS =
|
|
152
|
+
const SUMMARIZE_THRESHOLD_CHARS = 400000; // ~100k tokens (33% của 300k window) — start summarizing early
|
|
153
153
|
|
|
154
154
|
// HARD GOAL block (do /goal <text> set): chèn ngay sau memoryBlock, attention
|
|
155
155
|
// cao. Mục đích — chống 3 failure mode bài "dynamic workflows" của Anthropic
|