You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,13 +21,13 @@ When a new version is available, DCP will show a toast notification. Update by c
21
21
22
22
Restart OpenCode. The plugin will automatically start optimizing your sessions.
23
23
24
-
## Pruning Strategies
24
+
## How Pruning Works
25
25
26
-
DCP implements two complementary strategies:
26
+
DCP uses two complementary techniques:
27
27
28
-
**Deduplication** — Fast, zero-cost pruning that identifies repeated tool calls (e.g., reading the same file multiple times) and keeps only the most recent output. Runs instantly with no LLM calls.
28
+
**Automatic Deduplication** — Silently identifies repeated tool calls (e.g., reading the same file multiple times) and keeps only the most recent output. Runs on every request with zero LLM cost.
29
29
30
-
**AI Analysis** — Uses a language model to semantically analyze conversation context and identify tool outputs that are no longer relevant to the current task. More thorough but incurs LLM cost.
30
+
**AI Analysis** — Uses a language model to semantically analyze conversation context and identify tool outputs that are no longer relevant to the current task. More thorough but incurs LLM cost. Configurable via `strategies`.
31
31
32
32
## Context Pruning Tool
33
33
@@ -61,17 +61,17 @@ DCP uses its own config file (`~/.config/opencode/dcp.jsonc` or `.opencode/dcp.j
61
61
|`pruning_summary`|`"detailed"`|`"off"`, `"minimal"`, or `"detailed"`|
62
62
|`nudge_freq`|`10`| How often to remind AI to prune (lower = more frequent) |
63
63
|`protectedTools`|`["task", "todowrite", "todoread", "prune"]`| Tools that are never pruned |
64
-
|`strategies.onIdle`|`["deduplication", "ai-analysis"]`| Strategies for automatic pruning |
65
-
|`strategies.onTool`|`["deduplication", "ai-analysis"]`| Strategies when AI calls `prune`|
64
+
|`strategies.onIdle`|`["ai-analysis"]`| Strategies for automatic pruning |
65
+
|`strategies.onTool`|`["ai-analysis"]`| Strategies when AI calls `prune`|
66
66
67
-
**Strategies:**`"deduplication"`(fast, zero LLM cost) and `"ai-analysis"` (maximum savings). Empty array disables that trigger.
67
+
**Strategies:**`"ai-analysis"`uses LLM to identify prunable outputs. Empty array disables that trigger. Deduplication runs automatically on every request.
0 commit comments