miao-pa-si-wutao/dsh-think-strip ↗★ 0
dsh-think-strip
Strip historical reasoning blocks and oversized tool outputs out of DeepSeek Harness context; archive the originals to disk with a searchable index and leave one-line stubs behind. Two per-session switches (thinking / tools). 适合需要精简上下文、节省Token并保留原始思考记录的用户。
Install
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:miao-pa-si-wutao/dsh-think-stripREADME
Read the full README ↗Configuration
Set it in the profile's cordis.patch.yml, overriding by id:
- id: dsh-think-strip
config:
enabled: true
archiveDir: ''
archive: true
summaryMode: first-line
summaryMaxChars: 100
minReasoningChars: 0
keepSummary: true
reasoningDefault: true
toolsDefault: true
toolStripChars: 4000
toolHeadChars: 1200
toolTailChars: 400
trace: true
| Field | Default | Meaning |
|---|---|---|
enabled | true | Master switch. Off stops processing new turns; already-committed records still apply |
archiveDir | '' | Archive root; empty means /think-archive |
archive | true | Write originals to disk. Off strips without archiving (not recommended: items that fail to archive are not projected) |
summaryMode | first-line | first-line takes the first line of the reasoning; none leaves only a [reasoning archived] stub |
summaryMaxChars | 100 | Maximum summary length |
minReasoningChars | 0 | Reasoning shorter than this is left alone |
keepSummary | true | Insert a summary line where content was stripped |
reasoningDefault | true | Default for sessions with no override |
toolsDefault | true | Default for sessions with no override |
toolStripChars | 4000 | Compress plain-text tool results longer than this; 0 compresses all |
toolHeadChars | 1200 | Head characters kept after compressing |
toolTailChars | 400 | Tail characters kept after compressing |
trace | true | Write one line per turn to plugin.log — this is how you debug "why did nothing happen" |