@henryqw/pi-auto-compact 2.0.0 → 2.0.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/README.md CHANGED
@@ -50,14 +50,14 @@ Package-owned: `~/.pi/agent/config/pi-auto-compact/config.json`
50
50
 
51
51
  ```json
52
52
  {
53
- "autoCompactThreshold": 50
53
+ "autoCompactThreshold": 70
54
54
  }
55
55
  ```
56
56
 
57
- `autoCompactThreshold` is optional. It must be a number that is at least 25 and below 100. The default is `50`.
57
+ `autoCompactThreshold` is optional. It must be a number that is at least 25 and below 100. The default is `70`.
58
58
 
59
59
  Unknown fields are ignored. Legacy model fields are obsolete. `/auto-compact` writes this file.
60
60
 
61
- A missing file uses 50%. Reads do not create it. A malformed or invalid file fails visibly at session start, falls back to 50%, and stays unchanged.
61
+ A missing file uses 70%. Reads do not create it. A malformed or invalid file fails visibly at session start, falls back to 70%, and stays unchanged.
62
62
 
63
63
  Only `/auto-compact` writes this file. Its write is atomic.
@@ -29,7 +29,7 @@ type AgentMessage = Parameters<typeof estimateTokens>[0];
29
29
  * Pi's ctx.compact() aborts active low-level run internally. Mid-task
30
30
  * compaction sends a follow-up user message to resume work after summary.
31
31
  */
32
- const DEFAULT_COMPACT_THRESHOLD_PERCENT = 50;
32
+ const DEFAULT_COMPACT_THRESHOLD_PERCENT = 70;
33
33
  const MIN_COMPACT_THRESHOLD_PERCENT = 25;
34
34
  export const AUTO_COMPACT_TASK = {
35
35
  id: "pi-auto-compact/autoCompact",
@@ -287,7 +287,7 @@ export default function (pi: ExtensionAPI) {
287
287
  autoCompactThreshold = config.value.autoCompactThreshold;
288
288
  } catch {
289
289
  autoCompactThreshold = DEFAULT_COMPACT_THRESHOLD_PERCENT;
290
- ctx.ui.notify("Couldn't read pi-auto-compact config; using 50%.", "error");
290
+ ctx.ui.notify(`Couldn't read pi-auto-compact config; using ${DEFAULT_COMPACT_THRESHOLD_PERCENT}%.`, "error");
291
291
  }
292
292
 
293
293
  active = !SettingsManager.create(ctx.cwd, getAgentDir(), {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@henryqw/pi-auto-compact",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Proactively compact Pi context at a configurable threshold and resume the current task.",
5
5
  "keywords": [
6
6
  "pi-package",