rongxingda/dsh-prompt-enhance0

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.

包名
dsh-prompt-enhance
版本
0.1.0
许可证
Apache-2.0
最近更新
2026年8月29日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:rongxingda/dsh-prompt-enhance

Usage

Composer button / shortcut — type (or leave) a draft, hit ✨ or Ctrl+Alt+E:

  1. 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.
  2. The preview panel opens with a cancellable spinner. Your draft stays untouched — the hint says so.
  3. 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.
  4. 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.

FieldDefaultDescription
enabledtrueMaster switch; off hides the button and disables every trigger
provider + modelemptyExplicit route override; must be filled as a pair (or both empty to follow the current session model)
temperature0.3Low temperature keeps the rewrite faithful to the original
maxOutputTokens2048Output token budget of one enhancement call
maxInputChars12000Input character cap; over-limit drafts are rejected, never truncated
timeoutMs60000End-to-end deadline of one call
systemPromptbuilt-in strategyReplace the whole enhancement strategy if you prefer your own
shortcutctrl+alt+eGlobal 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.