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
+8-7Lines changed: 8 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
5
5
Automatically reduces token usage in OpenCode by removing obsolete tool outputs from conversation history.
6
6
7
-

7
+

8
8
9
9
## Installation
10
10
@@ -13,7 +13,7 @@ Add to your OpenCode config:
13
13
```jsonc
14
14
// opencode.jsonc
15
15
{
16
-
"plugin": ["@tarquinen/opencode-dcp"],
16
+
"plugin": ["@tarquinen/opencode-dcp@0.4.2"],
17
17
"experimental": {
18
18
"primary_tools": ["prune"]
19
19
}
@@ -22,7 +22,9 @@ Add to your OpenCode config:
22
22
23
23
The `experimental.primary_tools` setting ensures the `prune` tool is only available to the primary agent (not subagents).
24
24
25
-
DCP automatically checks for new versions in the background. You'll see a toast notification when an update is available. To enable automatic background updates, set `"autoUpdate": true` in your DCP config.
25
+
When a new version is available, DCP will show a toast notification. Update by changing the version number in your config.
26
+
27
+
> **Note:** Using `@latest` (e.g. `@tarquinen/opencode-dcp@latest`) does not reliably force the latest update in Opencode. Please use specific version numbers (e.g. `@0.4.2`).
26
28
27
29
Restart OpenCode. The plugin will automatically start optimizing your sessions.
28
30
@@ -63,15 +65,14 @@ DCP uses its own config file (`~/.config/opencode/dcp.jsonc` or `.opencode/dcp.j
63
65
|`model`| (session) | Model for analysis (e.g., `"anthropic/claude-haiku-4-5"`) |
64
66
|`showModelErrorToasts`|`true`| Show notifications on model fallback |
65
67
|`showUpdateToasts`|`true`| Show notifications when a new version is available |
66
-
|`autoUpdate`|`false`| Automatically download new versions (restart to apply) |
67
68
|`strictModelSelection`|`false`| Only run AI analysis with session or configured model (disables fallback models) |
68
69
|`pruning_summary`|`"detailed"`|`"off"`, `"minimal"`, or `"detailed"`|
69
70
|`nudge_freq`|`10`| How often to remind AI to prune (lower = more frequent) |
70
-
|`protectedTools`|`["task", "todowrite", "todoread", "prune", "batch", "edit", "write"]`| Tools that are never pruned |
71
+
|`protectedTools`|`["task", "todowrite", "todoread", "prune"]`| Tools that are never pruned |
71
72
|`strategies.onIdle`|`["ai-analysis"]`| Strategies for automatic pruning |
72
73
|`strategies.onTool`|`["ai-analysis"]`| Strategies when AI calls `prune`|
73
74
74
-
**Strategies:**`"ai-analysis"` uses LLM to identify prunable outputs. Empty array disables that trigger. Deduplication always runs automatically. More strategies coming soon.
75
+
**Strategies:**`"ai-analysis"` uses LLM to identify prunable outputs. Empty array disables that trigger. Deduplication runs automatically on every request.
75
76
76
77
```jsonc
77
78
{
@@ -80,7 +81,7 @@ DCP uses its own config file (`~/.config/opencode/dcp.jsonc` or `.opencode/dcp.j
0 commit comments