DSH-Prompt-Enhancer: One-click Rewrite of Drafts into Sendable Prompts in the DSH Input Box

Preface

When conversing with models in DeepSeek Harness (DSH), a common scenario is that you know exactly what you want to do, yet the input box only contains a vague draft—missing context, multiple goals mixed together, or incomplete premises. If sent directly, the model often ends up guessing your intent.

The community plugin dsh-prompt-enhancer hands the step of “making things clear” over to the default model of the current session: it reads the draft, fills in obviously necessary but unstated information, and returns only a single rewritten prompt. It does not alter your intent, nor does it answer questions for you. Below is an introduction to what it is, how to install it, how to use it, and its boundary behaviors.

What is this

dsh-prompt-enhancer is maintained by Xyvanlabs and categorized under “Model Reasoning” in the SkillHub directory. The current version in package.json is 0.1.0, and the license is MIT.

It adds a Prompt Enhancer button to the bottom right of the DSH session input box (to the left of the send button, and to the left of the model selector): you write down the rough idea, click it, and the draft is replaced by a clearer, more specific prompt. If unsatisfied, you can cancel an ongoing request; if the result is bad, you can use the restore function to revert to the original draft. The interaction specifications refer to the tri-state button of the same name in WorkBuddy 5.8.3; when the draft is empty, the button still occupies space (semi-transparent), which differs slightly from the original “do not render” behavior to make the feature discoverable.

Core Features

Enhance and Restore

  1. Write a draft in the input box (a single sentence is enough).
  2. Click the star icon (tooltip: “Enhance Prompt”). During the request, the button spins (“Enhancing… (Click to cancel)”). The content in the input box remains unchanged until the result is returned, and you can still view or modify it.
  3. After the result is returned, the entire draft is replaced by the enhanced version, and the button turns into a restore arrow (“Restore Original”). You can continue editing or send it directly.
  4. Click the restore arrow, or manually change the content of the input box (the backup is voided, returning to the idle state), to revert to the logic of the original draft.

Enhancement uses the default model of the current session (agentDefaultModel.currentSelection()). The plugin itself does not provide a model selector; every click constitutes an independent model call.

Tri-state and Boundaries

There is only one button at the same location, with four behaviors sharing one control:

State Click Behavior
Idle (Star) Initiate enhancement
Enhancing (Spinner) Abort request
Enhanced (Restore Arrow) Write back original draft
Error (Red Star) Re-enhance; reason in tooltip, disappears after ~6 seconds

Typical boundaries specified in the documentation include:

  • Empty draft: Prompt “Please enter content before enhancing”, no request sent.
  • Over 12,000 characters: Prompt “Content is too long, please keep it within 12,000 characters”.
  • Modify draft while enhancing: Result is discarded, prompt “Input content has changed, enhancement result has been discarded”.
  • Input box in sending/queuing phase (adjudicating / submitting / frozen): Button is greyed out.
  • No available default model: Prompt “Enhancement failed: No default model available, please select a model in settings first”.

The host-side route /prompt-enhancer/enhance only accepts access from loopback addresses; the client does not touch model credentials and only calls the local route.

Installation and Activation

Prerequisites

Dependency Requirement
DSH >=0.1.1-rc.2 <0.3.0 (dsh.engines.dsh in package.json)
Node.js ^22.19.0 \|\| >=24.0.0
Host Capabilities webServer, llm, agentDefaultModel (provided by DSH)

The plugin is in bundle form: cordis.patch.yml inserts a line into the loader configuration; the client loads lib/client.js via dsh-client-modules.

Installation Methods

Method 1 (Recommended): Open the DSH Plugin Manager, select “Install Local Directory / Install Bundle”, point to the absolute path of this repository, and install into the target profile (usually desktop). It registers as a link, so source code changes are visible to the host side; the client bundle needs to be reloaded according to the README instructions.

Method 2: In a DSH session, ask the agent to execute:

plugin_manager { action: 'install_bundle', target: '<absolute path to this repo>' }

On success, it returns application: 'restart-required'.

Method 3 (Command Line):

dsh plugin add link:<absolute path to this repo> --profile desktop

If dsh is not in the PATH, use the first two methods.

Must Restart DSH After Installation

The loader line for the bundle is only parsed at startup. After restarting, you can verify as suggested in the README: check that the occupants of slot conversation.input.right contains id: prompt-enhancer; the star button appears in the UI; curl http://127.0.0.1:<port>/prompt-enhancer/status returns configured: true and the current provider / model.

Typical Usage and Effects

The README provides four tested examples (provider aliyun, model deepseek-v4.1-flash-1017, taking about 1~2 seconds per call). Running the same draft again may result in different wording; language, constraint preservation, and general length remain relatively stable. Length is a soft constraint in the prompt (around 800 characters, usually not exceeding twice the original draft length); the code does not truncate, so short drafts sometimes grow to 2~3 times the original length. You can click again to rewrite or manually trim.

Vague Deliverable (Chinese)

Input:

Help me organize this week's work into a weekly report. It's mainly for the boss to see, don't be too wordy, just show that I did some work

Testing showed that it translates “don’t be too wordy” and “show that work was done” into actionable requirements (bullet points, actions, and results), without forcing a chapter structure that was not mentioned.

English Draft

When the input is a complaining English draft, the output remains in English without embedding tags like Language: English, and expands “don’t know what to write” into a list of elements for a bug report.

Verbose Chinese

Repetitive expressions are compressed, while constraints like CSV / Excel / time ranges are preserved; for drafts like “add a feature”, it may add a sentence explaining the solution and code change type deliverable requirements.

Already Clear Instructions

For example, a null pointer check specifying files and line numbers will, without expanding into a tutorial, concretize “list them out” into line numbers, snippets, and trigger conditions.

Use Cases and Notes

Who it is for: Developers who frequently hand-write the first version of prompts in DSH and want to send them after only a few rounds of editing; users who need a “in-input box enhancement” experience similar to WorkBuddy but are running on DSH.

Operation and Trust: The plugin runs with the permissions of the current DSH process and initiates streaming calls to the local llm (temperature: 0.5, maxTokens: 1400, timeout 120 seconds). Please read the Source Code and License before installation to ensure it complies with your environment policies.

Known Limitations (excerpted from README): Depends on useInput / inputActions of the conversation.input.right slot; one button at a time, single session state, switching sessions aborts ongoing requests; does not support selecting a model separately, does not do streaming echo; failed calls may also incur billing.

Ecology Note: DSH advocates “Everything is a plugin”; the SkillHub Directory Page is a community collection site and has no official affiliation with DeepSeek / High-Flyer.

Conclusion

dsh-prompt-enhancer keeps the “write clear prompts” step right before sending: one button, cancellable, restorable, using the session default model to rewrite drafts without replacing your intent. For installation packages or details, please refer to the directory page and the repository README.

  • Directory Page: https://www.skillhub.cn/plugins/Xyvanlabs/dsh-prompt-enhancer
  • GitHub: https://github.com/Xyvanlabs/dsh-prompt-enhancer
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye