songoao25/dsh-auto-compact ↗★ 3

dsh-auto-compact

DSH 智能体预设自动压缩上下文优化插件 当估算的上下文占用达到设定比例时,自动触发历史会话压缩,并保留最新比例的对话。适合需要频繁进行长对话、防止超出模型上下文窗口限制的用户。

套件
dsh-auto-compact
相容性
待驗證
版本
0.1.0
授權
MIT
最近更新
2026年8月30日

同名套件的其他儲存庫

安裝

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:songoao25/dsh-auto-compact

Configuration

All values live in scripts/inject.mjs (the CONFIG_BLOCK). Edit them before running ./install.sh if you want different thresholds. Preview with:

node scripts/inject.mjs --dry-run
KeyDefaultMeaning
thresholdRatio0.75Trigger compaction when estimated usage reaches this fraction of the model context window
retainRatio0.20Keep the most recent fraction of the window verbatim
modelPolicies–Per provider/model overrides