dsh-client-ui-connection-status
开发工具 活跃维护

dsh-client-ui-connection-status

liangsheng999/dsh-client-ui-connection-status

轻量级Web客户端插件,可在操作界面角落展示实时连接状态,基于npm包分发,安装后无需额外配置即可直观呈现当前网络连接是否正常,方便开发者快速排查连接问题

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
JavaScript
主要语言
MIT
开源协议
4 KB
仓库大小
3 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:liangsheng999/dsh-client-ui-connection-status
git clone https://github.com/liangsheng999/dsh-client-ui-connection-status.git
git clone git@github.com:liangsheng999/dsh-client-ui-connection-status.git
README.md main

dsh-client-ui-connection-status

A client plugin for the DeepSeek Harness Web UI that shows a small corner pill
with the live connection state:

State Pill Meaning
🟢 已连接 green Event streams open, host reachable
🔴 已断开 red Connection lost (server restart, tailnet drop, offline)
🟡 连接中… amber Page just loaded, not yet connected

It observes ctx.connection.hostDescription — the app's own readiness signal
(published on every successful readiness handshake, cleared the moment the
streams are lost) — so the pill reflects exactly what the app experiences.
Works on desktop and mobile. The pill is pointer-events: none and never
interferes with the UI.

Requires a dsh installation with the web profile (0.1.0-rc.6 or newer).

Install into a dsh web profile

# 1) install the package into the profile (forwards to pnpm; a local path or
#    an npm package name both work)
dsh plugin --profile web add dsh-client-ui-connection-status

# 2) register the client plugin row in the profile patch layer. Append to
#    $DSH_HOME/profiles/web/cordis.patch.yml — it MUST be an INSERT list;
#    a plain {id, name} patch only overrides an existing row and is silently
#    skipped for a new plugin:
- insert:
    - id: ui-connection-status
      name: dsh-client-ui-connection-status

# 3) restart the web process (stop and start `dsh web`; on Windows the logon
#    task or your service manager will do this on reboot)

After the restart, the node half scans the Loader entry, serves
/plugins/dsh-client-ui-connection-status/client.js, and the shell loads it
on the next page refresh — the pill appears in the bottom-right corner.

Verify it works

  • Open the app and look for the corner pill: it should settle on 🟢 已连接
    shortly after load (🟡 连接中… → 🟢 已连接).
  • In Settings → Plugins, the row ui-connection-status should be listed and
    enabled.
  • curl http://<your-host>:3080/plugins/dsh-client-ui-connection-status/client.js
    should return 200.

Uninstall

dsh plugin --profile web remove dsh-client-ui-connection-status
# and remove the insert block you added to cordis.patch.yml, then restart the web

Publish a new version (maintainers)

npm version patch    # or minor / major
npm publish          # requires npm auth; 2FA token or --otp as configured

The package is dependency-free and self-contained (lib/client.js is the
client bundle; no build step required). The published tarball contains exactly
package.json, lib/client.js, lib/index.js, README.md, LICENSE.

License

MIT