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
+13-95Lines changed: 13 additions & 95 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,23 +6,9 @@ Automatically reduces token usage in OpenCode by removing obsolete tool outputs
6
6
7
7
## What It Does
8
8
9
-
This plugin automatically optimizes token usage by identifying and removing redundant or obsolete tool outputs from your conversation history. It operates in two modes:
9
+
This plugin automatically optimizes token usage by identifying and removing redundant or obsolete tool outputs from your conversation history.
- Phase 1: Automatic duplicate removal (same as auto mode)
21
-
- Phase 2: AI analysis to identify obsolete outputs (superseded information, dead-end exploration, etc.)
22
-
- Maximum token savings
23
-
- Small LLM cost for analysis (reduced by deduplication first)
24
-
25
-
When your session becomes idle, the plugin analyzes your conversation and prunes tool outputs that are no longer relevant, saving tokens and reducing costs.
11
+

26
12
27
13
## Installation
28
14
@@ -39,10 +25,19 @@ Add to your OpenCode configuration:
39
25
}
40
26
```
41
27
28
+
> **Note:** OpenCode's `plugin` arrays are not merged between global and project configs—project config completely overrides global. If you have plugins in your global config and add a project config, include all desired plugins in the project config.
29
+
42
30
Restart OpenCode. The plugin will automatically start optimizing your sessions.
43
31
44
32
## Configuration
45
33
34
+
DCP uses its own configuration file, separate from OpenCode's `opencode.json`:
35
+
36
+
-**Global:**`~/.config/opencode/dcp.jsonc`
37
+
-**Project:**`.opencode/dcp.jsonc`
38
+
39
+
The global config is automatically created on first run. Create a project config to override settings per-project.
40
+
46
41
### Available Options
47
42
48
43
-**`enabled`** (boolean, default: `true`) - Enable/disable the plugin
0 commit comments