HuanLinOTO/dsh-plugin-auto-blame 预览 preview

HuanLinOTO/dsh-plugin-auto-blame

插件Plugin 原生Native ⭐ 10 NOASSERTION

模型回合结束后,LLM生成3条批判性跟进建议,以点击即发送的标签形式展示。

项目介绍Project Overview

dsh-auto-blame 是一个 DSH Web UI 插件,在模型结束一轮对话后,自动以 fire-and-forget 方式调用 LLM,基于最后 3 条消息生成 3 条批判性跟进建议,作为气泡淡入显示在输入框上方,点击即发送。建议通过非 surface 事件下发,不进入 model-visible 历史,不干扰 agent loop。LLM 或解析失败时静默,不展示任何气泡,新一轮开始时旧气泡立即归零。安装后需重启 dsh web 并硬刷新浏览器。

dsh-auto-blame is a DSH Web UI plugin that, after a model turn ends, fires a non-blocking LLM call using the last three messages to generate three critical follow-up suggestions. They fade in as bubbles above the composer and send on click, going through the same InputBar path. Suggestions are delivered as a non-surface event, so they never enter the model-visible history or disturb the agent loop. LLM or parse failures are silent: no event is appended and no bubble is shown. New turns clear the previous projection immediately. After install, restart dsh web and hard-refresh the browser to load the patched bundle.

或使用命令行安装(适合开发者)Or use CLI install (for developers)

命令行安装CLI Install

dsh plugin --profile web add @huanlin/dsh-plugin-auto-blame

HuanLinOTO/dsh-plugin-auto-blame 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-plugin-auto-blame card

dsh-auto-blame

npm version

preview

当模型完成当前轮次对话后,将最后 3 条消息发送给 LLM,生成 3 条批判性跟进请求,显示在输入框上方作为可选项,点击直接发送。生成期间"领导视野"标签带 DeepSeek 蓝色流光扫过(同 Deep diving... 特效),建议到达后气泡依次淡入。

工作原理

[host] agent/turn-stopping 触发
  → fire-and-forget 调 ctx.llm.stream() 生成 3 条毒舌跟进
  → session.append('auto-blame/suggestions', { turn, suggestions })
  → projection unit 折叠该事件 → session/projection 推送帧
  ↓
[client] useProjection('autoBlame') 收到值
  → conversation.composer.dock 渲染 3 个气泡
  → 点击 → inputActions.setDraft(text) + submit()
  • fire-and-forget:LLM 调用不阻塞 turn 关闭,建议晚几百 ms 出现
  • 非 surface 事件auto-blame/suggestions 不进入 model-visible 历史,不干扰 agent loop
  • 失败静默:LLM 失败 / 解析失败 → 不 append 事件,不显示气泡
  • 点击发送:走 InputBar 同一路径(inputActions.setDraft + submit
  • 下一轮清空:新 turn 开始时 projection 归零,旧气泡立即消失

开发

pnpm run typecheck    # tsc --noEmit
pnpm test             # vitest run(28 个单测)
pnpm run build        # tsc + tsdown → lib/index.js, lib/invariant.js, lib/client.js
pnpm run bundle:client # 只构建 client bundle

依赖链接(sibling dsh checkout)

本插件依赖 @deepseek-ai/dsh-* workspace 包。开发时需要手动 Junction 链接到 sibling dsh checkout:

$dest = 'node_modules\@deepseek-ai'
New-Item -ItemType Directory -Path $dest -Force
# 参考 dsh-spur 的 node_modules 结构创建 Junction

或从 dsh-spur 复制 node_modules(含 typescript / tsdown / vitest / @types/* / cordis / @deepseek-ai/dsh-client-*),再补建 dsh-agent / dsh-llm / dsh-session / dsh-session-projection 的 Junction。

运行

# 从 npm 安装(推荐)
dsh plugin --profile web add @huanlin/dsh-plugin-auto-blame

# 本地开发(热更新)
dsh plugin --profile web add "link:D:/Projects/deepseek-harness/dsh-auto-blame"

安装后重启 dsh web + 浏览器硬刷新(Ctrl+Shift+R)。

检查

  • 零源码 patch
  • package.json 声明 dsh.bundle.patch
  • cordis.patch.yml insert 行 id/name/config 齐全
  • fileslib/ + cordis.patch.yml
  • peerDependencies 含 cordis + @deepseek-ai/*
  • typecheck / test / build script 齐全
  • 预构建策略(lib/ 入库,无 prepare 脚本)
  • 不导出 default
  • 测试分层(Unit)
上一个 Prev dsh-mini-tui 下一个 Next dsh-record-replay