Preface¶
When chatting with models in DSH (DeepSeek Harness) Web, the text in the input box is often a colloquial draft: it may contain verbal tics, repetitions, and disordered logic, but the meaning is already there. Having to manually rewrite every sentence into a more fluent expression interrupts the flow of sending; meanwhile, handing the entire conversation history to the model to “write for you” easily crosses the line into speaking on your behalf or sending out context that shouldn’t be included.
The dsh-draft-polish introduced below is a client-side Web plugin released by the maintainer WanchunLian: it provides a “Polish” entry on the right side of the input box. By default, it takes a fast path to generate only one version of the “core meaning.” After confirmation, it writes back to the input box via the official draft channel, allowing you to delete, modify, and then send it. The design principle is AI only helps you express your point precisely, never speaks for you.
What is this¶
- Name:
dsh-draft-polish(npm package name, current version 0.1.0) - Type: DSH Web client plugin (
dsh.client.platform: web); the browser side injects the UI, while the host side provides the fenced API. - Repository: https://github.com/WanchunLian/dsh-draft-polish (MIT)
- Community Directory: https://www.skillhub.cn/plugins/WanchunLian/dsh-draft-polish (Independent community site, with no official affiliation to DeepSeek / High-Flyer)
In one sentence: It one-clicks your un-sent colloquial drafts into more professional and fluent expressions; after replacing it back into the input box, you still confirm before sending.
Core Features¶
Default Fast Path: Only Output One Version of Core Meaning¶
Under the lightweight design, clicking “Polish” defaults to generating only one version of the Core Meaning (calling POST /draft-polish/api/polish/one with roleId as core), avoiding the long wait for 8 segments at once. When other expression styles are needed, expand them on demand in the compact 560px panel via “More Styles” and generate them one by one.
Panel and Replacement¶
- The main card provides “Replace with this version”; 7 additional perspectives are collapsed in a secondary entry, not stealing the main focus.
- Expanded perspective cards allow checking “Merge”; when ≥2 are checked, “Merge N versions to replace” appears, concatenating multiple versions of content according to
【Perspective】titles. - Replacement goes through the official
setDraftchannel, supporting Ctrl+Z to undo back to the original draft.
Colloquial Cleanup and Boundaries¶
- The polishing side emphasizes removing verbal tics, repetitions, and disordered logic, restoring the factual backbone, and not fabricating facts the user did not say.
- The draft length limit is 2000 characters (
MAX_DRAFT_CHARS). Exceeding this returnsDRAFT_TOO_LONGfrom the interface; you need to simplify and try again. - The default timeout for a single LLM generation is 30000 ms (
DEFAULT_TIMEOUT_MS).
Privacy and Degradation¶
- Send draft snapshot only: The input box snapshot is locked (
lockedRef) at the moment “Polish” is clicked. Content you continue to type or conversation history while the panel is open will not enter any LLM request. The request body whitelist only allows fields likedraft,roleId,timeoutMs; smugglingsessionId,conversation,history, etc., will result in 400 UNEXPECTED_FIELD. - Polishing failure does not block sending: If the LLM is unavailable or times out, a toast prompts “Polishing is temporarily unavailable, you can send as is,” and the input box remains unchanged; during sending (submitting/adjudicating), the polish button is greyed out to prevent accidental touches.
The full 8-segment interface POST /draft-polish/api/polish is retained for compatibility, but the frontend no longer uses it by default.
Installation and Activation¶
Prerequisites¶
- Node.js 20+ (README tested with v22.22.2)
@deepseek-ai/dsh(Documented as 0.1.1-rc.2, can be started withnpx @deepseek-ai/dsh web)- DSH profile directory (Windows example:
C:\Users\<you>\.dsh\profiles\web)
Steps (link development/local installation)¶
The deployment method in the materials is npm link: installed into the profile. Changes to lib/*.js take effect in real-time; changes to cordis.yml / package.json bundle declarations require restarting dsh web.
-
Enter the plugin project root directory (path depends on your local clone or download location).
-
Execute link installation in the profile directory:
cd C:\Users\wanch\.dsh\profiles\web
npm install link:D:\mycode\dsh\dsh-draft-polish
-
Confirm that
profiles\web\package.jsondependencies includedsh-draft-polish: link:...; ifdsh.profile.bundleslacks the bundle registration, refer to the official bundle syntax on the same machine to add the package name. -
Start the Web:
npx @deepseek-ai/dsh web
Open the browser to http://127.0.0.1:3456. A “✨ Polish” button should appear on the right side of the input box’s toolbar.
Typical Usage¶
- Write: Type or voice-transcribe a paragraph in the input box (colloquial, with verbal tics is fine).
- Click: Click “✨ Polish”, wait a moment for the “Polish Result” to pop up, which already contains a version of the core meaning by default.
- Replace: If suitable, click “Replace with this version” → return to the input box to check, delete, or modify → then click send.
If other styles are needed: In the panel “Want other styles?” → select a perspective “Generate this version”, you can replace with a single version, or check multiple versions and “Merge N versions to replace”. If no results are needed, close the panel (Esc or click the mask), and the input box remains as is.
Applicable Scenarios and Notes¶
Suitable for: Developers or daily users who often type colloquial drafts in DSH Web first and want to quickly refine them into professional expressions before sending; scenarios that care about “polishing only the current draft without conversation context”.
Notes:
- The plugin runs with the DSH process. Before installation, please review the GitHub Source Code and the MIT license yourself to ensure compliance with your environment and regulatory requirements.
- The host routing has fences like loopback / same-origin. LLM calls are completed on the host side; the browser does not connect directly to
ctx.llm. - The project provides
npm test(node --test test/polish-core.test.mjs) to regress context red lines and whitelists; the README records the V2 lightweight update (2026-09-04) and several Playwright / real model milestones. Refer to the repository documentation for details.
Conclusion¶
dsh-draft-polish turns “the final touch on wording before sending” into a one-click capability next to the input box: the fast path outputs only the core meaning, multi-style and multi-version merging are expanded on demand, and sending remains possible as-is even upon failure. To learn more, you can view the introduction on the community directory page, or read the full README, docs/design.md, and API contracts on GitHub.
- Directory Page: https://www.skillhub.cn/plugins/WanchunLian/dsh-draft-polish
- Source Code: https://github.com/WanchunLian/dsh-draft-polish