dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
Host CPU / memory rings under the DeepSeek Harness composer, with a one-minute trend panel on click.
在 DeepSeek Harness(dsh)输入卡片正下方显示本机 CPU / 内存 的圆环水位,点一下展开一分钟走势与明细。
English | 中文
… 费用明细 本会话 ¥0.5181 · 命中 98.8% │ CPU ◔ 26% │ 内存 ◕ 56% │ ◯ 28%
└── 本插件 ──┘


CPU ◔ 26% + 内存 ◕ 56% 两个小圆环 + 百分比。圆环几何照抄宿主自带的上下文用量圆圈
(ContextMeter):14px 视框、半径 5.5、2px 描边、底环 --dsw-alias-border-l3、从 -90° 顺时针画。--dsw-alias-state-warn-primary)、≥90% 转红(--dsw-alias-state-error-primary),环和数字一起变色。node:os / node:fs,不装任何第三方包,不起子进程。从 GitHub 直接装(web 换成你的 profile 名):
dsh plugin --profile web add github:hehf21/dsh-sysmon
装完刷新页面。卸载:
dsh plugin --profile web remove dsh-sysmon
桌面版(Electron)的 profile 由应用独占,CLI 装不了——改在侧栏 插件 页里安装/启用/停用。
注意:浏览器半边改动关一下插件再开就重新组合、刷新即见;宿主半边(index.js)是进程内 ESM 模块,
改了必须重启 dsh 才换代。
浏览器 client.js 宿主进程 index.js
┌─────────────────────┐ GET ┌──────────────────────────────┐
│ conversation │ ──────────► │ /sysmon/stats(精确路由) │
│ .composer.dock │ ◄────────── │ ├ node:os cpus() 时间片差 │
│ 两个圆环 + 点开面板 │ JSON │ ├ node:os totalmem/freemem │
└─────────────────────┘ │ ├ node:fs statfs 磁盘 │
│ └ 1s 采样 → 60 格走势窗口 │
└──────────────────────────────┘
| 文件 | 作用 |
|---|---|
index.js | 宿主半边:1s 采样 CPU 时间片差、内存占用、每 15s 采一次磁盘,维护 60 格走势窗口,注册 GET /sysmon/stats。 |
client.js | 浏览器半边:window.__ModuleLoader__.load 注册工厂,ctx.slots.inject('conversation.composer.dock', …) 挂条目,轮询渲染。 |
cordis.patch.yml | 插入宿主插件行 sysmon;行 id 决定浏览器半边的加载地址 /plugins/sysmon/client.js。 |
os.cpus() 累计时间片之差,1 - idleΔ/totalΔ,跨全部核心加权;采样间隔内没有新时间片时保留上一次读数,避免曲线出现假谷底。(totalmem - freemem) / totalmem。Windows 上 freemem 是「可用」内存,与任务管理器「使用中」同口径。fs.promises.statfs(<用户主目录所在盘>),Windows 上即 C:\;读取失败时该行不显示。conversation.composer.dock 的渲染条件是会话已存在,欢迎页(新会话空态)不显示。/sysmon/stats 不在 /api 前缀下,因此不走连接插件的浏览器信任栅栏:能打开本机页面的本机进程都能读到
这几个数字(CPU/内存/磁盘占用率,无敏感信息)。dsh 桌面版只绑 127.0.0.1;如需收紧,在 index.js
的 handle() 里加 Host / Origin 白名单。SAMPLE_MS、客户端 POLL_MS。同类开源实现另有 hnmrxz/dsh-plugin-sysmon(同槽位的状态胶囊)、
AKS1st/dsh-sysmon(右下角悬浮窗)、
Small-Miao/dsh-statusbar(shell.overlay 整条底栏)。
本插件的磁盘 / 点击刷新 / 双语思路参考了第一个。
Host CPU / memory rings under the dsh composer, with a one-minute trend panel on click.
node:os / node:fs only — no third-party packages, no subprocesses.Install (replace web with your profile name):
dsh plugin --profile web add github:hehf21/dsh-sysmon
Then refresh the page. The Electron desktop profile is managed by the app, so install it from the sidebar Plugins page instead. Client-half changes reload by toggling the plugin; host-half changes need a dsh restart (the host module is an in-process ES module cached by URL).
MIT