Introduction¶
When writing prompts in the DeepSeek Harness (DSH) web interface, drafts may already contain tasks, files, and goals, but still need to be organized into expressions better suited for model comprehension. Existing practices typically involve manually rewriting in another window or temporarily concatenating system prompts. dsh-prompt-polish brings this step into the composer: it adds a ✨ button to the web input toolbar. After selecting a rewriting style, it calls the currently connected LLM to rewrite the draft and replaces the original draft with the result, allowing for review before sending.
Plugin Positioning¶
This is a DSH client plugin maintained by JoukoPuro, licensed under MIT. It is designed for DSH Web profile scenarios, requiring the @deepseek-ai/dsh web profile to be running with a configured model adapter (e.g., a DeepSeek provider with an API key). The plugin operates within the DSH process and does not require deploying a separate service. Since it runs with the current dsh process permissions, you should review the source code and license before installation.
Core Features¶
- Adds a ✨ sparkle button to the web composer toolbar; the button displays only an icon, with full descriptions provided via tooltip.
- Offers four rewriting styles:
balanced,concise,detailed, andcode-oriented. - Menu text follows the browser language, supporting
zh, en, ja, ko, fr, de, es, pt, ru, it, tr, vi, with English as fallback. - Uses the currently connected model: when no explicit route is configured, it resolves
agentDefaultModel.currentSelection(); an explicitprovider/modelconfiguration can also be specified. - Registers the
POST /prompt-polishendpoint and performs a single LLM rewrite viactx.llmin streaming mode. - Replaces the draft with the rewritten result for review before sending.
Installation and Activation¶
-
Confirm that the current DSH web profile can already connect to a model, for example, by configuring a DeepSeek provider and API key.
-
In the plugin checkout directory or a directory containing
./dsh-prompt-polish, run:
dsh plugin --profile web add ./dsh-prompt-polish
- Restart the web service to allow the profile to load the new bundle:
dsh web
- Open the Web UI, enter a draft in the input field, click the ✨ button in the composer toolbar, and select your preferred rewriting style.
Optional Configuration¶
The plugin accepts optional settings for prompt-polish in the profile’s cordis.patch.yml. Confirmed configuration items include:
provider: Explicit routing, optional.model: Explicit model, must be paired withprovider.style: Default rewriting style, options arebalanced,concise,detailed,code-oriented.maxTokens: Output limit for rewriting calls.system: Custom rewriting instructions that replace the built-in style-based prompts.
If provider/model is not configured, the plugin uses agentDefaultModel.currentSelection(), which is the default model used by the current session. The specific provider and model names in the configuration examples must be filled in according to the current DSH environment; this document does not provide fixed values that are not present in verified facts.
How It Works¶
The plugin consists of a host side and a browser side.
- Host side
lib/index.js: RegistersPOST /prompt-polishon the web server side and performs a single LLM rewrite viactx.llmin streaming mode. - Browser side
lib/client.js: Registers the ✨ button in the composer toolbar, opens the style menu, submits the draft, and replaces the original draft with the polished text.
The browser side is a manually built closure-factory artifact, with external dependencies limited to react and @deepseek-ai/dsh-client-ui-primitives. The plugin’s peerDependencies include @deepseek-ai/cordis ^4.0.1, @deepseek-ai/dsh-llm ^0.1.0-rc.6, and @deepseek-ai/dsh-agent ^0.1.0-rc.6.
Local Verification¶
Before modifying the production profile, you can first verify plugin loading on a temporary port:
dsh web --port 3099
curl -s http://127.0.0.1:3099/plugins/dsh-prompt-polish/client.js | head
You can also directly call the rewriting endpoint to verify the request path and parameters:
curl -s -X POST http://127.0.0.1:3099/prompt-polish \
-H 'content-type: application/json' \
-d '{"text":"read a.csv and sort by b","style":"balanced"}'
The above commands are used to check whether /plugins/dsh-prompt-polish/client.js and POST /prompt-polish are available; the actual text and style should be filled with your own draft.
Use Cases and Cautions¶
Suitable for users who write or review prompts on the DSH Web side: those who already have a model adapter and want to quickly organize drafts before sending while retaining a review step. Not suitable for scenarios without a configured model adapter or where running completely outside the current dsh process permissions is required.
Before installation, note:
- The plugin runs with the current dsh process permissions; review the source code and license before installation.
- An explicit
modelmust be paired withprovider. - Licensed under MIT.
- The DSH community directory is an independent site with no official affiliation to DeepSeek / High-Flyer and should not be described as an official app store.
Conclusion¶
The value of dsh-prompt-polish lies in consolidating “rewriting prompts before sending” into a reviewable action within the composer toolbar: it uses the currently connected model, supports multiple styles, and replaces the draft with the rewritten result rather than sending it directly.
GitHub URL: https://github.com/JoukoPuro/dsh-prompt-polish
The verified materials do not provide a usable community directory page URL; if you need to look it up in the directory, please refer to the actual page on the directory site.