編集者注

提示词润色

A dual-face DeepSeek Harness plugin that adds a ✨ button next to the composer send control. Click it to rewrite the current draft into a clearer, more structured prompt without changing the original intent.

これは DeepSeek Harness(DSH)プラグインです。当サイトは GitHub README、インストール情報、メンテナンス状況、公開セキュリティシグナルをまとめています。

dsh-prompt-polish

Demo | English | 简体中文

Topic: dsh-plugin License: MIT DSH surface: web

A dual-face DeepSeek Harness plugin that adds a ✨ button next to the composer send control. Click it to rewrite the current draft into a clearer, more structured prompt without changing the original intent.

Demo

dsh-prompt-polish demo — click the ✨ button to polish the current draft

Type a draft in the composer, click the ✨ button next to Send, and the polished prompt replaces the draft in place. / 在输入框写下草稿,点击发送按钮旁的 ✨,润色结果会原地替换草稿。

English

Features

  • One-click polish — a star button sits immediately before Send / Stop in the Web composer.
  • Fast mode by default — polish requests disable deep thinking when the selected model supports it (measured ~10s → ~1s on typical models); uncheck it in settings for high-effort rewrites.
  • 🧠 Keeps the original intent — the default system prompt asks the model to stay in the user's language, add only necessary structure, and return the polished prompt with no preamble.
  • ⚙️ Settings page — choose provider, model, and the polish system prompt under Settings → 提示词润色.
  • 💾 Persistent config — values are stored in $DSH_HOME/prompt-polish.json and survive restarts.
  • 🔁 Default model fallback — leave provider / model empty to use the current session default (agentDefaultModel).

Drafts that already contain composer references (occurrences) are skipped, because those attachments cannot be rewritten safely.

Install

This package is a standard DSH bundle: package.json declares dsh.bundle, so dsh plugin installs the dependency and activates the layer automatically. No hand-edited composition is required.

From GitHub:

dsh plugin --profile web add github:SkySheep1999/polish-prompts

From a local checkout:

dsh plugin --profile web add /path/to/polish-prompts

Verify the composed config without booting:

dsh --profile web --dump-config

You should see a # == dsh-prompt-polish layer and a prompt-polish row. Restart dsh web afterwards. The ✨ button appears to the left of Send; the settings section is in the Web settings panel.

To remove:

dsh plugin --profile web remove dsh-prompt-polish

Use

  1. Type a draft in the Web composer.
  2. Click ✨ (or wait if the star is spinning).
  3. The polished text replaces the draft in place.

Open Settings → 提示词润色 to:

  • pick provider / model from the live catalog dropdowns (leave blank to use the session default)
  • toggle 快速润色(关闭深度思考) — checked by default; disable it when the polish quality of complex drafts matters more than speed
  • edit the polish system prompt
  • save or restore the built-in defaults

How it works

composer ✨ ──POST /dsh-polish/run──► host ──ctx.llm.stream──► chosen model
settings UI ──GET/POST /dsh-polish/*──► host ──$DSH_HOME/prompt-polish.json
  • Host (index.js) injects webServer and llm, registers four same-origin JSON routes, and persists config.
  • Client (client.js) is a Web dsh.client bundle in the product loader format (window.__ModuleLoader__.load). It injects:
    • conversation.input.right — the ✨ button
    • conversation.input.overlay — transient status toasts
    • settings.section — the settings form
RouteMethodBodyResult
/dsh-polish/runPOST{ text }{ ok, text } or { ok: false, error }
/dsh-polish/configGET{ config, defaults }
/dsh-polish/set-configPOST{ config }{ ok: true }
/dsh-polish/resetPOST{ ok: true }

error values include empty, no-model, empty-result, model-error, model-aborted, bad-request, and internal.

Project layout

index.js                  Host half: /dsh-polish/* API + config persistence
client.js                 Browser half: composer button, overlay, settings
cordis.patch.yml          Bundle patch inserted by dsh plugin add
package.json              dsh.bundle + dsh.client manifest
.github/assets/demo.gif   Animated demo shown in this README

Plain JavaScript only. There is no build step, so a git install does not need a prepare script or allowBuilds entry.

Compatibility

  • DeepSeek Harness Web profile (dsh web)
  • Host services: webServer, llm; optional agentDefaultModel
  • Client services: slots, timer

Discoverability

This repository is tagged with the dsh-plugin topic, so it appears alongside the rest of the community plugins.

License

MIT — see LICENSE.


简体中文

DeepSeek Harness Web 输入框增加一颗 ✨ 按钮:点击后用指定模型把当前草稿润色成更清晰、更结构化的提示词,并尽量保持原意与原语言。

功能

  • 一键润色:星星按钮紧挨发送 / 停止按钮。
  • 默认快速模式:润色请求默认关闭深度思考(所选模型支持时),典型耗时从约 10 秒降到约 1 秒;可在设置页取消勾选以对复杂文本启用思考。
  • 🧠 保持原意:默认系统提示要求沿用用户语言、只补充必要结构,并直接输出润色后的提示词。
  • ⚙️ 设置页:在 设置 → 提示词润色 中指定提供商、模型和润色系统提示词。
  • 💾 配置持久化:写入 $DSH_HOME/prompt-polish.json,重启后仍在。
  • 🔁 回退默认模型:提供商 / 模型留空时,使用当前会话的默认模型。

如果草稿里已经带了输入框引用(occurrences),插件会拒绝润色,避免破坏附件引用。

安装

本包声明了 dsh.bundle,用官方命令安装后会自动成为 profile 层,不必手改 composition。

从 GitHub 安装:

dsh plugin --profile web add github:SkySheep1999/polish-prompts

从本地 checkout 安装:

dsh plugin --profile web add /path/to/polish-prompts

不启动服务,先核对组合结果:

dsh --profile web --dump-config

应能看到 # == dsh-prompt-polish 层和 prompt-polish 行。然后重启 dsh web。输入框发送按钮左侧会出现 ✨,设置面板里会出现「提示词润色」。

卸载:

dsh plugin --profile web remove dsh-prompt-polish

使用

动图演示见文首 Demo 一节。

  1. 在 Web 输入框写下草稿。
  2. 点击 ✨(旋转中表示正在润色)。
  3. 润色结果会直接替换当前草稿。

设置 → 提示词润色 可以:

  • 用下拉框选择 provider / model(留空则用会话默认模型)
  • 勾选/取消「快速润色(关闭深度思考)」——默认勾选;复杂草稿更看重润色质量时可取消
  • 编辑润色系统提示词
  • 保存,或恢复内置默认值

工作原理

Host 端注册同源 JSON API,Client 端通过 Slot 挂到输入框和设置页。配置文件在 $DSH_HOME/prompt-polish.json。仓库是纯 JS,没有构建步骤,从 git 安装时也不需要 prepareallowBuilds

发现

本仓库已加上 dsh-plugin 话题,会出现在社区插件列表里。

许可证

MIT,见 LICENSE

REPOSITORY SIGNALS

セキュリティとインストールエビデンス

このスコアは公開リポジトリメタデータと当サイトに登録されたインストールエビデンスのみに基づくもので、コードセキュリティ監査とは異なります。

出所の追跡可能性

公開プラグインカタログから取得し、公開 GitHub リポジトリにリンクしています。

ライセンス

リポジトリは MIT ライセンスを宣言しています。

メンテナンス活動

過去180日以内にコードの更新があります。

インストールエビデンス

再現可能な正確なインストールメタデータはまだ登録されていません。リポジトリの説明に従って手動で確認してください。

インストールライフサイクルスクリプト

確認したパッケージメタデータにインストールライフサイクルスクリプトは宣言されていません。