← 返回列表
D

@huanlin/dsh-plugin-auto-blame

v0.1.0 · 4 天前发布

Auto-blame: when a turn closes, asks an LLM for three cynical follow-up prompts and shows them as click-to-send bubbles above the composer. Host-gated master toggle in the settings page.

dsh-plugin

README

dsh-auto-blame

!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
  • 版本兼容矩阵

    DSH 版本状态说明
    dsh@0.1.0-rc.6 ✅ 兼容 cordis patch ✅
    dsh@0.1.0 ✅ 兼容 标准 patch ✅
    dsh@0.2.0 ⚠️ 待验证 待实测(API 可能在变)
    dsh@0.3.0+ ❓ 未知 尚未发布

    💡 兼容矩阵每周末自动跑实测,欢迎 PR 修正

    元数据

    License
    AGPL-3.0
    npm
    @huanlin/dsh-plugin-auto-blame
    Repo
    Engines
    {"node":">=22.0.0"}
    Weekly DL
    0
    Monthly DL
    0
    dsh.bundle
    {"bundle":{"patch":"./cordis.patch.yml"},"client":{"inject":["@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-connection","@deepseek-ai/dsh-client-ui-slots","@deepseek-ai/dsh-client-ui-conversation","@deepseek-ai/dsh-client-ui-settings"],"platform":"web"}}