One-click prompt enhancement: an independent LLM call rewrites your rough draft in the composer, fully undoable.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:Fishsb/dsh-prompt-enhancer
GitHub-sourced plugins run build scripts on your machine at install time. Only install sources you trust, and pin a commit (github:owner/repo#sha).
README
A prompt-enhancement plugin for DeepSeek Harness (DSH): type a rough prompt, click ✨, and an independent LLM call rewrites it into a stronger prompt — directly in the composer, fully undoable.
Features
- ✨ One-click enhance — independent LLM call replaces the draft in place
- ↩️ Undo anytime — restore the original with one click; manually editing the draft exits undo (undo also clears the previous memory pair)
- ⏹️ True cancel — click during enhancement aborts and restores the draft (AbortSignal propagated)
- 🛡️ Guards — empty input / slash commands / submitting states are handled;
/cmd bodyoptimizes only the body, keeping the prefix - 🌐 i18n — follows the DSH interface language (中文 / English)
- 🎛️ 4 modes (v2.2.0) — Basic (direct, fastest) / Lite (local rule analysis) / Standard (rules + workspace & session retrieval injection) / Smart (LLM task-progress analysis + full retrieval)
- 🧠 Independent memory switch (v2.2.0) — available in every mode; when on, the previous optimization pair is injected into the next round (first run falls back to Lite automatically); when off, memory is never read or written; memory is written while on and cleared on undo
- 🔀 Combined stacking — mode context block + memory block can inject together (memory takes budget first, ≤1200 chars; the mode block uses the remainder)
- 🔄 Automatic config migration — v2.1
mode:'memory'/autoMemorymigrate tomode:'lite'+memory:true; an explicitmemoryfield takes precedence (includingfalse) - 🧪 Unit-tested — host pure-function tests (node:test, 38/38 passing) slice the PURE section, so tests run the very code that is shipped
- 🚀 Version check & one-click update (v2.4.0) — a new card at the top of the plugin-management page checks any public GitHub repo (default: this one) against the local version (remote tags are the source of truth); when a newer version exists, pull the 6 release files into a target directory with one click (default
<workspace>/dsh-prompt-enhancer-<tag>/, configurable & persisted), then apply via the on-screen instructions (bundledsh plugin update/ dynamic re-define / script copy). A running plugin cannot replace itself — pull ≠ apply - 🔤 Composer font parity (v2.4.0) — the ✨ button's idle / busy / undo text is explicitly anchored at 13px/500/20px, matching the composer model selector; the distribution copy has been upgraded (it previously lagged at v2.1.0)
Install
Option 1: bundle one-click install (recommended)
dsh plugin --profile web add github:Fishsb/dsh-prompt-enhancer
Restart DSH (dsh web) after installing — the ✨ button appears in the composer toolbar. Update with dsh plugin --profile web update dsh-prompt-enhancer, remove with dsh plugin --profile web remove dsh-prompt-enhancer.
Option 2: dynamic Cordis install
Dynamic Cordis plugin (host + client halves), installed inside a DSH session via the cordis toolchain:
- Ask the agent in a DSH session to read
plugin-host.js(host half) andplugin-client.js(client half) from this repo - Define the plugin with
cordis_define: fillcode.hostwith plugin-host.js andcode.clientwith plugin-client.js (new plugin:plugin.kind: 'new'); it returnspluginId/packageId - Run it with
cordis_run(mode:run) - The first client-half run requires browser approval
- After approval, the ✨ button appears in the composer toolbar
Note: the dynamic client half is attached to the page connection active at activation time; a page refresh unloads it — just
cordis_runagain to restore.
Quick-install snippet (paste into any DSH session)
Install the dsh-prompt-enhancer plugin for me:
1. Read plugin-host.js and plugin-client.js from https://github.com/Fishsb/dsh-prompt-enhancer
2. Define it with cordis_define: code.host = plugin-host.js, code.client = plugin-client.js, plugin.kind = new
3. cordis_run the returned pluginId/packageId (mode: run)
4. Wait for me to approve in the browser
Bundle distribution (
dsh plugin addone-click install) is supported — see Option 1 above.
Usage
- Type any non-empty, non-slash-command text
- Click the ✨ button (or press Enter while focused)
- Wait for the independent LLM call; the draft is replaced with the enhanced version
- Not satisfied? Click ✓ Optimized · Undo to restore the original
Configuration
Settings → "Models & plugins" → "Optimization" tab:
| Setting | Description |
|---|---|
| Optimization mode | Basic (default, direct) / Lite / Standard / Smart; switching takes effect immediately and persists |
| Memory | On / Off; when on, the next round receives the previous optimization pair (first run falls back to Lite); when off, nothing is read or written |
| Context budget | 0 / 2000 / 4000 / 8000 chars; 0 = no context injection (equivalent to Basic); the memory block is budget-constrained too |
| Timeout / Max tokens / Output limit | Request parameters |
| Template | Built-in / custom template text |
The model chain lives in the "Models" tab: tried in order, reorderable, per-entry thinking toggle & level, inline connectivity test, restore defaults.
Privacy
- Mode context: on demand, injects "recent session messages + relevant workspace file snippets + related session fragments", bounded by the budget; sensitive files (.env / keys / credentials / logs, etc.) are hard-filtered and never injected
- Memory: only a boolean seen-marker lives in browser localStorage (
dsh.enhance.seen.*, no content); the memory pair itself lives only in the current page's memory; turning the switch off stops all reads/writes - The plugin itself records or reports nothing; diagnostics logs contain only metadata (mode, latency, etc.)
- Enhanced results come from an external LLM — verify before sending; after cancellation the underlying request may still run briefly on the provider side
Compatibility
- Depends on DSH runtime-injected APIs (
llm/slots/harness/inputActions/sessionQuery/fs), which may change across DSH releases - Use a recent DeepSeek Harness
License
Links
More in this category
zhu1090093659/dsh-web-ui★ 1866
Plugin and skin collection for the DSH Web UI: task board, Git graph, right-side panel, remote mobile UI, pet, live token stats, and a skin center.
ccch1mneyyy/dsh-TUI★ 869
Claude Code-style full-screen terminal UI: pixel-whale header, live status line, and streaming thought expansion.
omdsh-dev/DSH-better-sidebar★ 731
Full sidebar workbench with file rendering and editing, terminal, Git, and subagents; third-party plugins can register new tabs.
huiliyi37/dsh-tianshu-tui★ 132
A terminal UI (TUI) for DeepSeek Harness.
omdsh-dev/dsh-at-file★ 126
Codex-style `@file` mentions: search workspace files in the composer and attach their contents to prompts.
Nagi-ovo/dsh-visualize★ 82
In-conversation generative UI: the model renders interactive HTML cards into the chat stream, with streaming preview and sandboxed rendering.