dsh-prompt-forge: DSH Desktop Prompt Optimization Plugin

Preface

The DeepSeek Harness (DSH) desktop version supports plugin extensions. Manually adjusting prompts is often inefficient. dsh-prompt-forge is a plugin that rewrites drafts into clearer, more executable instructions by adding a button next to the chat input box. It operates by reusing the host’s model channels and does not store its own API keys.

Core Features

  • One-click Optimization: Adds an “Optimize” button to the left of the input box. Clicking it calls the configured model channel.
  • Inline Panel: The panel floats above the input box without occupying layout space.
  • Side-by-side Comparison: Displays the original text on the left and the optimized version on the right. The result can be edited directly within the panel.
  • Streaming Output: Results appear character-by-character on the right side. The process can be “Stopped” at any time during the request.
  • Continue Fine-tuning: An input box is provided at the bottom of the panel to enter new requirements and continue optimizing based on the previous version.
  • Adopt and Copy: Click “Adopt” to write the result back to the input box (rejected during streaming output); one-click copy (available even while streaming).
  • Preset Switching: Presets can be switched within the panel. Switching triggers a re-run based on the new preset.
  • Settings Page: Supports plugin toggling, channel/model selection, temperature parameters, output token limits, main prompt configuration, and preset management (add, delete, modify).
  • Language Follow: Chinese input yields Chinese output; English input yields English output.

Installation and Activation

Run the following command in the terminal to install the plugin:

dsh plugin --profile web add github:zhaoxiagongsi001/dsh-prompt-forge

After installation, refresh the page. The “Optimize” button will appear in the input box toolbar (after the attachment button and permission dropdown).

Usage

  1. Enter a draft in the input box (either Chinese or English).
  2. Click the Optimize button in the input box toolbar.
  3. The panel floats above the input box, displaying the result in a stream on the right. You can modify it directly within the panel.
  4. Click “Adopt” to write it back to the input box once satisfied; if unsatisfied, the original text remains unchanged.

Notes

  • No Key Access: The plugin reuses providers configured in DSH and does not store any API keys itself.
  • Streaming Output Limitation: The “Adopt” button is disabled during generation. It must wait for the output to finish to avoid writing back partial text.
  • Interruption Handling: If a request is interrupted, you can use the “Copy” button to retrieve the existing content.
  • No Keyboard Shortcuts: Version 2 removes all keyboard shortcuts to avoid conflicts with the official input box’s default behavior.
  • Write-back Failure: If the session is recycled after the panel is opened, causing a write-back failure, the panel will not collapse automatically. The user must manually copy the content.
  • Draft Limitations: The button is disabled if the draft is empty, the plugin is turned off, or the text exceeds 20,000 characters.
  • Reasoning Models: The plugin discards the chain of thought from reasoning models.

Conclusion

By reusing the host LLM channels, this plugin achieves non-intrusive prompt optimization. Developers can adjust model parameters and prompt strategies in the plugin settings page.

羽毛球分组比赛记分
小程序二维码

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

Xiaoye