Khorsheed/dsh-plugins--packages-context-guard ↗★ 0
@khorsheed/dsh-context-guard
在上下文占用过高时提供压缩提醒按钮 适合需要防止请求超出模型上下文窗口限制的重度对话任务。
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Khorsheed/dsh-plugins#548eeabe331c121621b2d08deab4278ad81d6312&path:packages/context-guard说明文档
阅读完整 README ↗配置
一个可调项,在 GUI 里改且实时生效,无需重启——0.1.5:设置 → 插件配置 →「压缩提醒时机 / Compaction reminder timing」;0.1.6-alpha.2 起:插件管理页 → 本包详情页的配置区。
| 键 | 默认值 | 含义 |
|---|---|---|
thresholdRatio | 0.8 | 压缩按钮出现时的上下文占用比例(限制在 (0, 1])。想更早收到提醒就调低——provider 拒绝墙在 100% 占用之下(见「实现原理」)。 |
plugins:
context-guard:
thresholdRatio: 0.65
该字段只影响按钮出现的时机——真实压缩时机仍由官方压缩引擎自己的 thresholdRatio / auto 配置决定。