Skip to content

Commit 7ddc25c

Browse files
committed
docs: simplify README, add note about plugin array config behavior
1 parent 21e2262 commit 7ddc25c

File tree

1 file changed

+4
-93
lines changed

1 file changed

+4
-93
lines changed

README.md

Lines changed: 4 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,7 @@ Automatically reduces token usage in OpenCode by removing obsolete tool outputs
66

77
## What It Does
88

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:
10-
11-
### Pruning Modes
12-
13-
**Auto Mode** (`"auto"`): Fast, deterministic duplicate removal
14-
- Removes duplicate tool calls (same tool + identical parameters)
15-
- Keeps only the most recent occurrence of each duplicate
16-
- Zero LLM inference costs
17-
- Instant, predictable results
18-
19-
**Smart Mode** (`"smart"`): Comprehensive intelligent pruning (recommended)
20-
- 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.
9+
This plugin automatically optimizes token usage by identifying and removing redundant or obsolete tool outputs from your conversation history.
2610

2711
## Installation
2812

@@ -39,6 +23,8 @@ Add to your OpenCode configuration:
3923
}
4024
```
4125

26+
> **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.
27+
4228
Restart OpenCode. The plugin will automatically start optimizing your sessions.
4329

4430
## Configuration
@@ -76,91 +62,16 @@ Example configuration:
7662

7763
The global config is automatically created on first run. Create project configs manually to override settings per-project:
7864

79-
```bash
80-
mkdir -p .opencode
81-
cat > .opencode/dcp.jsonc << 'EOF'
82-
{
83-
"debug": true,
84-
"pruningMode": "auto"
85-
}
86-
EOF
87-
```
88-
8965
After modifying configuration, restart OpenCode for changes to take effect.
9066

91-
### Choosing a Pruning Mode
92-
93-
**Use Auto Mode (`"auto"`) when:**
94-
- Minimizing costs is critical (zero LLM inference for pruning)
95-
- You have many repetitive tool calls (file re-reads, repeated commands)
96-
- You want predictable, deterministic behavior
97-
- You're debugging or testing and need consistent results
98-
99-
**Use Smart Mode (`"smart"`) when:**
100-
- You want maximum token savings (recommended for most users)
101-
- Your workflow has both duplicates and obsolete exploration
102-
- You're willing to incur small LLM costs for comprehensive pruning
103-
- You want the plugin to intelligently identify superseded information
104-
105-
**Example notification formats:**
106-
107-
**Detailed mode** (default):
108-
109-
Auto mode:
110-
```
111-
🧹 DCP: Saved ~1.2K tokens (5 duplicate tools removed)
112-
113-
read (3 duplicates):
114-
~/project/src/index.ts (2× duplicate)
115-
~/project/lib/utils.ts (1× duplicate)
116-
117-
bash (2 duplicates):
118-
Run tests (2× duplicate)
119-
```
120-
121-
Smart mode:
122-
```
123-
🧹 DCP: Saved ~3.4K tokens (8 tools pruned)
124-
125-
📦 Duplicates removed (5):
126-
read:
127-
~/project/src/index.ts (3×)
128-
~/project/lib/utils.ts (2×)
129-
bash:
130-
Run tests (2×)
131-
132-
🤖 LLM analysis (3):
133-
grep (2):
134-
pattern: "old.*function"
135-
pattern: "deprecated"
136-
list (1):
137-
~/project/temp
138-
```
139-
140-
**Minimal mode** (`"pruning_summary": "minimal"`):
141-
```
142-
🧹 DCP: Saved ~3.4K tokens (8 tools pruned)
143-
```
144-
145-
**Off mode** (`"pruning_summary": "off"`):
146-
```
147-
(No notification displayed - silent pruning)
148-
```
149-
150-
To check the latest available version:
151-
152-
```bash
153-
npm view @tarquinen/opencode-dcp version
154-
```
155-
15667
### Version Pinning
15768

15869
If you want to ensure a specific version is always used or update your version, you can pin it in your config:
15970

16071
```json
16172
{
16273
"plugin": [
163-
"@tarquinen/opencode-dcp@0.2.7"
74+
"@tarquinen/opencode-dcp@0.3.10"
16475
]
16576
}
16677
```

0 commit comments

Comments
 (0)