huaguoxingkong/dsh-prompt-rewriter

AI Engineering

Rewrites a draft prompt in place inside DeepSeek Harness, adding goal, format and limits without sending it.

195
1
JavaScript
MIT
3 days old

This is a DeepSeek Harness plugin that adds a button next to the composer. Clicking it turns a short draft into a fuller task instruction — adding things like goal, output format and boundaries — and puts the result back into the same editable box. It never sends the message, so a wrong result is one Ctrl+Z away.

What changes in the workflow

A draft like "help me write a scraper for Douban movies" comes back with a target (Top 250 titles, ratings, links), a format (CSV), and boundaries (respect robots.txt, wait between requests, back off on rate limits). Those additions are inferred from the sentence, not typed by the user, and remain editable because the text lands in the composer. The button shows four states — idle, spinning while running, an undo arrow when done, and a red retry icon with the failure reason. A second click while running cancels and leaves the draft untouched.

Two mechanisms are worth knowing. First, a context toggle: a small dot on the button means the rewrite will also read earlier turns, which costs tokens and is slower on long chats; the default is on, and can be turned off in settings. Second, only images currently in the composer can be referenced (off by default); images from earlier messages are never read by design. The plugin can also pin a separate model for rewriting instead of following the session's model, and offers an optional keyboard shortcut (off by default).

Requirements and setup

It requires DeepSeek Harness and node >= 22, and Harness must be restarted after installing because the plugin has no hot reload. Installation is via dsh plugin from npm (choose the web or desktop profile you actually run), from GitHub source, or from a release zip; installing from source runs a build and may ask for approval, which should only be granted to trusted packages. See the install instructions and npm package.

Rewriting is a real model call, so latency depends on the selected model, and a model without configured credentials will fail with a "No credentials configured" error — the button simply does nothing if the composer is empty or a fixed model is enabled with none picked.

Documented limits

Replacement is non-streaming: the button animates until the full rewrite arrives. Rewrites only edit the draft and cannot change already-sent messages. Operational ceilings (draft length 8000 chars, output 12000 chars, 2000 output tokens, 90s timeout, history budget and caps) are configurable but not exposed in the UI. The settings dropdown depends on the host's model catalogue surface and says so explicitly when that is unavailable. Unit tests are not published because they depend on private host packages and machine-specific layouts.

Licence

Code is MIT. The whale-tail artwork is MIT with its notice retained; the DeepSeek brand mark has no found licence and is explicitly excluded from the MIT grant. This is an unofficial community project, not affiliated with or endorsed by DeepSeek; attribution details are in NOTICE.md and terms in LICENSE.

Written by AI from the project's README, updated October 31, 2026. The project's own docs are the source of truth.