xiaoliang2/dsh-compact-after-task

xiaoliang2★ 0JavaScript最后同步: 2026-08-21

在 GitHub 打开

设置dsh自动压缩阈值插件

README 摘要

dsh-compact-after-task A DSH (Cordis) plugin that auto-compacts a conversation after the current task finishes , whenever context pressure crosses a threshold you set (default 50% of the routed model's context window). Install it and stop manually clicking "compress" — and stop letting the context (and the bill) grow unchecked. The switch and the threshold are adjustable directly in Settings → Plugins (toggle + slider); changes apply immediately, no restart needed . The problem it solves In a long conversation the model re-receives the entire history on every turn . As the conversation grows, this bites harder and harder: - No compaction → exploding cost. The bigger the context, the more tokens each turn re-sends. Even with a provider KV cache (cheaper than fresh input, still not free), the history is re-transmitted and re-billed every single turn. Rolling from tens of thousands to hundreds of thousands of tokens quietly multiplies per-turn cost — the longer you talk, the more each reply costs, without you noticing. - Manual compaction is tedious and easy to forget. /compact or the UI compress button works, but you have to remember to use it — and people only remember once things a…

在 GitHub 查看完整 README →
工具/开发dshdsh-plugindsh-plugin-desktopdsh-plugin-marketdsh-plugins

分类