baosfeng/my-dsh-plugins--plugins-dsh-my-context5

dsh-my-context

DSH 上下文透镜 + 成本治理插件:token 用量可视化(每次请求的上下文构成、KV 缓存命中率)+ 每轮/每会话预算控制(超限提醒/拦截)。DSH web plugin: context lens (token usage visualization, KV cache hit rate) + cost governance (per-turn / per-session budget with warn/deny).

包名
dsh-my-context
版本
0.1.4
最近更新
2026年9月12日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:baosfeng/my-dsh-plugins#cc837f22ecaa841de7d263346073dc44c55d50ee&path:plugins/dsh-my-context

配置

插件配置(cordis.ymlmy-context 行的 config: 块,均可省略):

配置项默认值说明
perTurn0每轮 token 上限(0 = 不限制)
perSession0每会话 token 上限(0 = 不限制)
mode'warn'超限行为:warn 提醒 / deny 拦截
warnThreshold0.8溢出预警阈值(80%,进度条变色)
alertThreshold0.9溢出告警阈值(90%,面板告警;95% 固定为严重)

也可在侧边栏面板「预算设置」「溢出阈值」中动态修改(POST /context/api/budgetPOST /context/api/overflow)。