SiYue-ZO/dsh-prompt-polisher0

dsh-prompt-polisher

A safe, native prompt polishing button for the DeepSeek Harness composer.

包名
dsh-prompt-polisher
版本
0.1.0
许可证
MIT
最近更新
2026年8月18日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:SiYue-ZO/dsh-prompt-polisher

配置

安装后的 bundle 默认配置位于 cordis.patch.yml。如需覆盖,请在 profile 自己的 cordis.patch.yml 中按相同 row id prompt-polisher 提供完整 config(DSH 的后层 config 是整体替换,不是深合并)。

字段默认值说明
maxInputChars20000当前草稿字符上限;超限直接拒绝
maxOutputChars30000结果字符上限;超限不进入预览
maxOutputTokens2048辅助 LLM 输出 token 上限;截断结果视为失败
timeoutMs60000整轮请求超时
includeContextfalse是否发送受限的最近对话纯文本
contextMessages6最多上下文消息数,仅在上项开启时生效
contextMaxChars8000上下文总字符预算
customInstructions''部署级润色偏好,不应放密钥

完整覆盖示例:

- patch:
    id: prompt-polisher
    config:
      maxInputChars: 20000
      maxOutputChars: 30000
      maxOutputTokens: 2048
      timeoutMs: 60000
      includeContext: false
      contextMessages: 6
      contextMaxChars: 8000
      customInstructions: '优先把验收标准整理为清晰列表。'

本插件不接收或存储 API key。模型凭据、endpoint 和计费仍由 DSH adapter 配置决定。

使用方法

  • 空草稿或 DSH 输入状态不是 plain 时,按钮禁用。
  • 点击「润色」后可以继续编辑,也可再次点击按钮/面板中的「取消」。
  • 正常返回只进入预览,不自动写入。
  • 若草稿未变化,「应用」写回结果;若草稿变化,按钮明确改为「仍然替换」。
  • 「恢复原文」只在当前草稿仍等于刚应用结果、且 revision 未变化时可用,防止 ABA 编辑覆盖;原文也可单独复制。
  • 失败面板保留原文,支持重试或关闭。

能在未来 DSH 版本使用吗?

不作保证。DSH 仍处于 developer preview;升级后请先运行 CI、安装 smoke test 和 UI 验收。