DeepSeek Harness 插件

MannixHu/dsh-statusbar-config

Star 数 ★ 0 分类 UI 增强 收录于 2026-09-03

用 ${变量} 显示模板自定义输入框下方的会话统计行——显示哪些统计段、单位文案怎么写,全部由模板决定。

安装

# Release 预构建包

dsh plugin --profile web add "https://github.com/MannixHu/dsh-statusbar-config/releases/latest/download/dsh-statusbar-config.tgz"

# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)

dsh plugin --profile web add github:MannixHu/dsh-statusbar-config

装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWEDERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yamlallowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。

README

English | 中文

DeepSeek Harness Web UI 插件:用模板完全自定义输入框下方的会话统计行——JS 模板字符串语法 ${变量},想要什么写什么,即时生效。

实现方式:以更低优先级影子化 conversation.composer.dock 槽位中官方的 stats 条目,数据与官方 StatsLine 同源同精度,显示内容完全由你的模板决定。

模板变量

变量 含义 示例值
${ttft} 首 token 平均秒数(纯数字) 5.8
${tps} 解码速度 tok/s(纯数字) 69
${cache} 缓存命中率(百分数,不带 %) 93
${input} 计费输入 token(紧凑格式) 63.7M
${output} 输出 token(紧凑格式) 178K
${turns} / ${steps} 轮数 / 步数 12 / 34
${llm} / ${tool} LLM / 工具调用累计时长(自带单位) 3m12s

单位、分隔符、任何文字都由你写在模板里;未知变量原样显示;暂无数据的变量渲染为空。

安装

dsh plugin --profile web add github:MannixHu/dsh-statusbar-config

然后重启 dsh web(加载器图在进程启动时冻结)。

配置

两种等价方式:

  • 界面里 — 设置 → 插件 → 状态栏模板 卡片:点变量芯片插入到光标处,回车保存,即时生效(推荐)。
  • ~/.dsh/settings.yamlstatus-bar-config 命名空间:
status-bar-config:
  enabled: true
  template: '首 token 平均 ${ttft}s · ${tps} tok/s | 缓存命中 ${cache}% | 输入 ${input} tok · 输出 ${output} tok'

渲染结果:

首 token 平均 5.8s · 69 tok/s | 缓存命中 93% | 输入 63.7M tok · 输出 178K tok

template 留空 = 默认统计行(与官方相同的全量段落);enabled: false = 整行隐藏。0.1 版的段落开关已被模板取代,旧的 yaml 布尔键会被忽略,升级后改用 template 即可。

迁移

从 0.1 的段落开关升级:0.2 起开关由模板取代。旧的 yaml 布尔键会被忽略,把原来的开关组合改写成一条 template: 即可,例如原来只开 ttft/throughput/cacheHit/input/output 时:

status-bar-config:
  enabled: true
  template: '首 token 平均 ${ttft}s · ${tps} tok/s | 缓存命中 ${cache}% | 输入 ${input} tok · 输出 ${output} tok'

从 leonardoxr/dsh-status-bar-config 迁移:本插件沿用同一命名空间 status-bar-config,settings.yaml 里的段落直接可读;但该插件依赖的 @deepseek-ai/dsh-client-runtime / dsh-client-ui-slots 已在 0.1.2-alpha 重组中移除,本插件按 alpha 后的包图重写,无需再打 inject 补丁。

兼容性

  • 需要 DSH 0.1.2-alpha+(客户端图依赖只声明了 alpha 重组后仍存在的包:dsh-client-localedsh-client-ui-rendererdsh-client-ui-settingsdsh-client-ui-conversation)。
  • 构建产物(lib/)随仓库提交,git 安装无需构建步骤,也不需要 onlyBuiltDependencies 白名单。

从源码构建

pnpm install
pnpm check   # 类型检查 + 构建(lib/index.js 宿主半,lib/client.js 浏览器半)

许可

MIT

内容来自项目 README(GitHub)↗

链接

同类插件

查看整个分类 →

社区评论

评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。