@hncode/hncode 0.5.0 → 0.5.1
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 +4 -2
- package/src/colors.js +478 -387
- package/src/config.js +38 -11
- package/src/doctor.js +209 -11
- package/src/memory-profile.js +247 -0
- package/src/row-cache.js +147 -142
- package/src/session-hub.js +1 -0
- package/src/settings-schema.js +301 -0
- package/src/tool-result.js +264 -236
- package/src/tools/edit.js +1 -1
- package/src/tui.js +544 -80
- package/src/web.js +3 -1
package/package.json
CHANGED
package/src/agent.js
CHANGED
|
@@ -702,8 +702,10 @@ export class Agent {
|
|
|
702
702
|
// first, so it stays recoverable.
|
|
703
703
|
//
|
|
704
704
|
// Trigger: the request reached `trimThreshold` (50% by default) of the window.
|
|
705
|
-
// Target: keep `trimKeepRatio` (30% by default) of the tool-result TEXT,
|
|
706
|
-
//
|
|
705
|
+
// Target: keep `trimKeepRatio` (30% by default) of the tool-result TEXT, newest
|
|
706
|
+
// first. A different denominator from the trigger on purpose: the trigger asks
|
|
707
|
+
// about the window, this asks about the removable output. Skipped while a
|
|
708
|
+
// compaction just ran (that already shrank
|
|
707
709
|
// things) and above the compaction trigger (compaction is the right tool by
|
|
708
710
|
// then, and the two must not fight over the same history).
|
|
709
711
|
const trimThreshold = Number.isFinite(this.cfg.trimThreshold) ? this.cfg.trimThreshold : DEFAULT_TRIM_THRESHOLD;
|