baosfeng/my-dsh-plugins--plugins-dsh-my-context ↗★ 11

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). 适合需要监控API成本、防止Token超额消耗的用户。

Package
dsh-my-context
Compatibility
Unverified
Version
0.1.6
License
MIT
Last updated
Oct 10, 2026

Install

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

配置

插件行的 config: 块,均可省略:

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

预算与阈值也可在侧边栏面板中动态修改(POST /context/api/budget、POST /context/api/overflow)。