Skip to content

Commit 56cb054

Browse files
docs
1 parent 1c9ee65 commit 56cb054

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ When a new version is available, DCP will show a toast notification. Update by c
2121

2222
Restart OpenCode. The plugin will automatically start optimizing your sessions.
2323

24-
## Pruning Strategies
24+
## How Pruning Works
2525

26-
DCP implements two complementary strategies:
26+
DCP uses two complementary techniques:
2727

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.
2929

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`.
3131

3232
## Context Pruning Tool
3333

@@ -61,17 +61,17 @@ DCP uses its own config file (`~/.config/opencode/dcp.jsonc` or `.opencode/dcp.j
6161
| `pruning_summary` | `"detailed"` | `"off"`, `"minimal"`, or `"detailed"` |
6262
| `nudge_freq` | `10` | How often to remind AI to prune (lower = more frequent) |
6363
| `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` |
6666

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.
6868

6969
```jsonc
7070
{
7171
"enabled": true,
7272
"strategies": {
73-
"onIdle": ["deduplication", "ai-analysis"],
74-
"onTool": ["deduplication", "ai-analysis"]
73+
"onIdle": ["ai-analysis"],
74+
"onTool": ["ai-analysis"]
7575
},
7676
"protectedTools": ["task", "todowrite", "todoread", "prune"]
7777
}

lib/config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,12 @@ function createDefaultConfig(): void {
112112
"showModelErrorToasts": true,
113113
// Only run AI analysis with session model or configured model (disables fallback models)
114114
"strictModelSelection": false,
115-
// Pruning strategies: "deduplication", "ai-analysis" (empty array = disabled)
115+
// AI analysis strategies (deduplication runs automatically on every request)
116116
"strategies": {
117117
// Strategies to run when session goes idle
118-
"onIdle": ["deduplication", "ai-analysis"],
118+
"onIdle": ["ai-analysis"],
119119
// Strategies to run when AI calls prune tool
120-
"onTool": ["deduplication", "ai-analysis"]
120+
"onTool": ["ai-analysis"]
121121
},
122122
// Summary display: "off", "minimal", or "detailed"
123123
"pruning_summary": "detailed",

0 commit comments

Comments
 (0)