@henryqw/pi-auto-compact 2.0.3 → 2.0.4
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 +11 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
# `@henryqw/pi-auto-compact`
|
|
2
2
|
|
|
3
|
-
Compact context
|
|
3
|
+
Compact Pi context at your chosen threshold, then continue the interrupted task automatically.
|
|
4
4
|
|
|
5
5
|
## Why
|
|
6
6
|
|
|
7
|
-
- **Created for**:
|
|
8
|
-
- **Advantage**:
|
|
7
|
+
- **Created for**: Long Pi sessions that need predictable context headroom.
|
|
8
|
+
- **Advantage**: Compact early through a shared model route, without making users restart the task.
|
|
9
9
|
|
|
10
10
|
## Install
|
|
11
11
|
|
|
12
|
+
Install the required Task Models extension first:
|
|
13
|
+
|
|
12
14
|
```bash
|
|
13
15
|
pi install npm:@henryqw/pi-task-models
|
|
14
16
|
pi install npm:@henryqw/pi-auto-compact
|
|
15
17
|
```
|
|
16
18
|
|
|
19
|
+
Run `/task-models` and configure the `fast` profile. Open `/task-models` again to verify that `fast` no longer says `not configured`.
|
|
20
|
+
|
|
17
21
|
Disable Pi's built-in auto-compaction in `~/.pi/agent/settings.json`:
|
|
18
22
|
|
|
19
23
|
```json
|
|
@@ -24,11 +28,13 @@ Disable Pi's built-in auto-compaction in `~/.pi/agent/settings.json`:
|
|
|
24
28
|
}
|
|
25
29
|
```
|
|
26
30
|
|
|
27
|
-
Restart Pi after install or settings changes. Trusted
|
|
31
|
+
Restart Pi after install or settings changes. Trusted `.pi/settings.json` files must not set `compaction.enabled` back to `true`.
|
|
32
|
+
|
|
33
|
+
Run `/auto-compact`, enter a threshold, and expect `Auto-compact threshold set to <value>%.`
|
|
28
34
|
|
|
29
35
|
## With
|
|
30
36
|
|
|
31
|
-
This package requires `@henryqw/pi-task-models` for shared compaction routes.
|
|
37
|
+
This package requires [`@henryqw/pi-task-models`](https://pi.henry.wang/extensions/pi-task-models) for shared compaction routes.
|
|
32
38
|
|
|
33
39
|
`~/.pi/agent/config/pi-task-models/config.json` is shared and owned by `@henryqw/pi-task-models`. The local `pi-auto-compact/autoCompact` declaration defaults to `fast`. A task entry is an explicit user override.
|
|
34
40
|
|