@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hncode/hncode",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "hncode — A cyan-blue TUI AI coding agent with zero runtime dependencies.",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
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
- // newest first. Skipped while a compaction just ran (that already shrank
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;