rongxingda/dsh-prompt-enhance ↗★ 0
dsh-prompt-enhance
Prompt enhancement for the dsh web GUI: rewrite the composer draft into a well-structured prompt through the harness LLM service, preview the before/after, then fill back, copy, or undo. Original draft is always preserved.
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:rongxingda/dsh-prompt-enhance说明文档
阅读完整 README ↗Usage
Composer button / shortcut — type (or leave) a draft, hit ✨ or Ctrl+Alt+E:
- Local guards run first: empty drafts, over-length drafts (never auto-truncated — that would change your meaning), images-only drafts, and drafts containing command or file-reference chips are refused with a clear message. Chips are rejected because filling back would destroy them.
- The preview panel opens with a cancellable spinner. Your draft stays untouched — the hint says so.
- The result phase shows both texts side by side. Apply fills the enhanced text back and raises the undo bar; Copy puts it on the clipboard; Cancel (or
Esc, or clicking the overlay) discards everything. - The undo bar sits above the composer: one click restores the original. If you keep typing after applying, the bar quietly retires itself so stale text can never overwrite newer edits.
/enhance — rewrite any text from the slash menu. The result renders in the command plane (copyable) and never enters the conversation history or the model's context. To enhance the composer draft itself, use the button or shortcut — the draft lives in the browser.
Language consistency is guaranteed by the rewrite strategy: Chinese in, Chinese out; English in, English out.
Configuration
Everything lives in the prompt-enhance settings namespace, edited from the web GUI's Settings → 插件配置 page. Changes apply to the very next call — no restart.
| Field | Default | Description |
|---|---|---|
enabled | true | Master switch; off hides the button and disables every trigger |
provider + model | empty | Explicit route override; must be filled as a pair (or both empty to follow the current session model) |
temperature | 0.3 | Low temperature keeps the rewrite faithful to the original |
maxOutputTokens | 2048 | Output token budget of one enhancement call |
maxInputChars | 12000 | Input character cap; over-limit drafts are rejected, never truncated |
timeoutMs | 60000 | End-to-end deadline of one call |
systemPrompt | built-in strategy | Replace the whole enhancement strategy if you prefer your own |
shortcut | ctrl+alt+e | Global shortcut spec (modifiers + one alphanumeric/function key); empty disables it |
Model routing precedence: explicit settings pair → the route recorded in the current session's request header → the harness-wide default model (agent-default-model). If none of them names a route (e.g. a fresh session with no default model), the plugin fails with an actionable message instead of guessing.