DSH HUB
HomePlugin StoreRankingsPublish Guide
Plugin source
Back to catalog

KeFan-J /

dsh-chat-link

Verified

Peer-to-peer conversation linking for DeepSeek Harness (DSH): @-mention any session, wake it up, chat across conversations. Type @ in the composer, pick a session, send — the target agent is woken via agent.send. Persistent message board, native-feel inbox panel, 5 chat_link_* tools. dsh-plugin.

★ 0 Stars0 Forks0 IssuesN/A Community rating0 Confirmed installs
View on GitHub
READMESource: main@5b679e13

dsh-chat-link · 会话联动

English | 中文

DeepSeek Harness (DSH) 多会话对等互聊插件 —— 让任意两个会话像 IM 一样直接对话,输入框打 @ 就能把消息发给另一个会话,对方会被自动唤醒并处理。

License: MIT DSH


✨ 它解决什么问题

DSH 本身只有「会话内」的多代理协作(subagent 父子关系)。dsh-chat-link 补齐了缺失的一环:对等的、跨会话的实时对话。

  • 会话 A 在输入框打 @B 帮我查一下今天的任务 → 会话 B 被自动唤醒,把消息作为任务处理;
  • B 回复时 A 又被唤醒 —— 两个会话真正互聊,不需要人当传话筒;
  • 消息持久化在本地文件(~/.dsh/chat-link/),重启 DSH 不丢。

🚀 功能特性

1. @ 会话引用(像调用技能一样)

  • 输入框直接打 @ → 弹出系统原生选择菜单(会话名 + 在线/未读状态,支持过滤);
  • 选中后输入框里出现蓝色 chip 标签(@会话名)—— 和 DSH 的技能引用/斜杠命令同一套机制;
  • 发送时 chip 自动投影为 @会话名 内容,由 Agent 转发给目标会话。

2. 唤醒投递

  • 目标会话在线 → 通过 DSH 原生 agent.send(message, 'next-turn', true) 立即唤醒处理;
  • 目标未打开 → 消息存在消息板,3 秒轮询兜底补投,对方打开会话即收到。

3. 原生质感收件箱

  • 侧边栏「⇄ 会话联动」入口(DOM 注入,与 dsh-ssh / 任务看板同款机制,React 重渲染自愈);
  • 点击后接管中间主内容区(非浮层),与 DSH 设计系统一致(--dsw-* 主题变量,跟随皮肤);
  • 未读消息卡片 + 会话列表双栏;点击任意消息/会话直接跳转到对应会话;
  • 打开会话自动清除未读红点;未读数在侧边栏入口实时角标。

4. 五个模型工具(所有会话可用)

工具 用途
chat_link_send 给指定会话发送联动消息(名称 / sessionId / 前缀寻址)
chat_link_inbox 查看并领取本会话未读联动消息
chat_link_history 查看本会话的联动消息往来
chat_link_roster 列出全部联动会话(名称/在线/未读)
chat_link_register 给本会话设置自定义联动名称

5. 命名实时同步

  • 联动名称实时派生自会话标题 —— 在工作区重命名会话,联动列表自动更新;
  • chat_link_register 可设置自定义名称(优先于标题)。

📦 安装

🚀 一键安装(推荐)

bash -c "$(curl -fsSL https://raw.githubusercontent.com/KeFan-J/dsh-chat-link/main/install.sh)"

脚本自动完成:克隆代码 → 安装依赖 → 挂载到 DSH web profile。完成后只需重启 DSH(Ctrl+C → npx @deepseek-ai/dsh web)并强制刷新浏览器(Cmd+Shift+R)。

自定义安装目录:bash -c "$(curl -fsSL <上面的URL>)" - /path/to/dir 更新插件:重新执行一键安装命令即可(自动 git pull)。

手动安装

前置要求

  • DeepSeek Harness 0.1.0-rc.6(npx @deepseek-ai/dsh web 启动的 Web GUI)
  • Node.js ≥ 22、pnpm(corepack enable 或 npm i -g pnpm)

步骤

# 1. 克隆本仓库
git clone https://github.com/KeFan-J/dsh-chat-link.git
cd dsh-chat-link

# 2. 安装依赖(仅 @deepseek-ai/dsh-tools)
pnpm install

# 3. 挂载到 DSH web profile(bundle 机制,自动加入插件层)
dsh plugin --profile web add link:$(pwd)

# 4. 重启 DSH
#    终端 Ctrl+C → 重新运行 npx @deepseek-ai/dsh web

# 5. 浏览器强制刷新页面(Cmd+Shift+R)

注:DSH 通过 ~/.dsh/vendor/plugins/ 加载插件。若你使用 vendor 目录部署模式,更新代码后需同步:

cp -r lib ~/.dsh/vendor/plugins/dsh-chat-link/

🎮 使用

方式一:输入框 @(推荐)

  1. 在任意会话的输入框打 @;
  2. 从菜单选择目标会话(或继续输入过滤);
  3. 输入内容并发送 —— 消息自动转发,对方被唤醒;
  4. 对方回复时,你也会被唤醒(侧边栏入口出现未读角标)。

方式二:收件箱面板

点击侧边栏底部「⇄ 会话联动」:

  • 查看未读消息,点击跳转到来源会话;
  • 会话列表点击跳转;「复制」按钮一键复制 @名称;
  • 「全部已读」清空未读。

方式三:直接跟 Agent 说

用 chat_link_roster 看看有哪些会话
给「XXX」发条消息说:……

🏗️ 架构

┌─────────────────────────────── 宿主进程 (Host) ───────────────────────────────┐
│  lib/index.js                                                                │
│   ├─ 消息板: ~/.dsh/chat-link/messages.jsonl + identity.json(磁盘持久化)      │
│   ├─ 5 个模型工具(全局注册,所有会话可调)                                       │
│   ├─ 唤醒投递: agent.send(msg, 'next-turn', true) + 3s 轮询补投               │
│   ├─ 会话打开即已读(agent/session-start)                                      │
│   └─ HTTP 路由: /api/dsh-chat-link/state · /mark-read                         │
└──────────────────────────────────────────────────────────────────────────────┘
                          ▲ fetch / 事件
┌─────────────────────────────── 浏览器 (Client) ───────────────────────────────┐
│  lib/client.js(ModuleLoader bundle)                                          │
│   ├─ '@' 输入触发器(框架标准 inputTriggers 协议,chip 引用)                    │
│   ├─ 侧边栏入口(DOM 注入 + MutationObserver 自愈)                              │
│   ├─ 收件箱面板(接管中间主内容区,--dsw-* 皮肤变量)                             │
│   └─ 与 dsh-ssh / 任务看板互斥(dsh-panel-activate 事件)                       │
└──────────────────────────────────────────────────────────────────────────────┘

🔒 数据与隐私

  • 所有数据仅存本机 ~/.dsh/chat-link/(消息板 + 会话身份映射);
  • 无任何云端依赖、无遥测、无外部请求;
  • 卸载插件(dsh plugin --profile web remove @linxin666/dsh-chat-link)不影响历史会话。

🧩 兼容与依赖

  • 依赖 @deepseek-ai/dsh-tools@^0.1.0-rc.6(运行时);
  • 通过 DSH 标准 bundle 机制挂载(dsh.bundle.patch + dsh.client 声明),无需修改 DSH 源码;
  • 与其他全家桶插件(dsh-ssh、任务看板、Git 图谱等)互不干扰。

📄 License

MIT © Jinkefan


Made for the DeepSeek Harness plugin community.

—/ 5

No ratings yet

Verified DSH bundle

Commit 5b679e13d66b

Community comments

No comments yet. Be the first to write one.

DSH HUB

A community index for DSH plugins. Not an official GitHub or DeepSeek AI product.

APIPublish GuideAbout