dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
DeepSeek Harness(DSH)桌面端会话列表「标记未读」插件:行首蓝点 + 会话菜单开关,宿主账本跨重启,打开会话自动清除。无外部依赖。
给 DeepSeek Harness(DSH)桌面端左侧会话列表补一个手动标记未读:标记后行首亮一个蓝点,会话「…」菜单里可随时切换
「标记为未读 / 标记为已读」,打开该会话时自动清除。标记保存在宿主账本($DSH_HOME/chat-unread.json),
应用重启后仍然在。
An unread-mark plugin for the DeepSeek Harness (DSH) desktop sidebar session list. Marks live in a host-side ledger, survive restarts, and clear when the session is opened.
| 位置 | 行为 |
|---|---|
| 会话行行首(主状态为「闲置」时) | 未读时显示蓝色小圆点 |
| 会话行悬浮(鼠标移上去) | 出现一个小圆点按钮:点击即切换未读/已读 |
| 会话行「…」菜单 | 多一项「标记为未读」/「标记为已读」,点击切换 |
| 悬浮卡(停留在会话行 0.8 秒) | 未读时多一行「● 已标记为未读」 |
| 打开会话 | 从别的会话切入该会话时,自动清掉它的未读 |
说明:
git clone https://github.com/nmglyx-hub/dsh-chat-unread.git
CLI="/Applications/DeepSeek Harness.app/Contents/Resources/runtime/cli/bin/dsh"
"$CLI" plugin --profile desktop add link:"$PWD/dsh-chat-unread"
宿主半区由 DSH 的 HMR 热加载;浏览器半区通过 /plugins/events 的 graph 帧自动挂载。
实测:安装后无需重启应用(宿主路由与浏览器 bundle 自动生效);若界面未出现,按 ⌘R 刷新一次即可。
dsh plugin --profile desktop add github:nmglyx-hub/dsh-chat-unread
该写法依赖 pnpm 的 git 依赖解析;如果本机 CLI 的
github:简写不可用,请用方式一 clone 后link:安装。
卸载:
"$CLI" plugin --profile desktop remove dsh-chat-unread
账本文件不会被自动删除;不需要时可手动删除 $DSH_HOME/chat-unread.json(默认 ~/.dsh/chat-unread.json)。
$DSH_HOME/chat-unread.json,结构 { version, updatedAt, ids: [...] },只存会话 id,不存标题、正文或任何案件内容。/api/chat-unread/*(list / mark / clear / toggle / ping / hello)。
只接受回环地址 + 同源请求;sessionId 只接受 [A-Za-z0-9._:-]{1,200};账本最多 5000 条。npm install # 仅测试用(react / react-dom)
npm test # 宿主 21 项 + 浏览器 21 项
运行中实例的自检(端口换成当前 DSH 实际端口):
curl -s http://127.0.0.1:57197/api/chat-unread/ping
ping 返回里的 clientGraph.registered 表示浏览器 bundle 已进客户端模块表;
clientHello 是浏览器半区实际加载后回传的自检(含四个扩展槽的注册状态),可用来确认 UI 真的跑起来了。
| 半边 | 文件 | 职责 |
|---|---|---|
| 宿主 | lib/index.js | /api/chat-unread/*:list / mark / clear / toggle / ping / hello;账本原子落盘到 $DSH_HOME/chat-unread.json |
| 浏览器 | lib/client.js | 手写 window.__ModuleLoader__ bundle:订阅 ctx.sessions.list 判断主视图切换;向 sidebar.session.row.leading、sidebar.session.row.hover、sidebar.workspaces.session.row.action、sidebar.workspaces.session.menu.item 四个官方扩展槽注册组件 |
| 清单 | package.json / cordis.patch.yml | dsh.bundle.patch + dsh.client(platform: web)声明,双面插件随 profile 装载 |
--port 0 申请随机端口,页面 origin 随端口变化,
浏览器存储会在重启后失效;「标记未读」本身是为了下次回来看,所以改为宿主账本,跨重启保留。MIT