rangercd67/dsh-prompt-polish ↗★ 0

dsh-prompt-polish

调用LLM服务将输入框草稿润色为高质量提示词并支持预览对比。 适合需要优化提示词质量以获得更佳模型回复效果的用户。

套件
dsh-prompt-polish
相容性
待驗證
Harness 依賴範圍
>=0.2.0-rc.2
版本
1.0.0
授權
Apache-2.0
最近更新
2026年10月12日

同名套件的其他儲存庫

安裝

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

Configuration

All sixteen fields live in the prompt-enhance settings namespace. Edit them on the Plugins page: find this plugin's row and use its configure control (the row key is dsh-prompt-polish#prompt-enhance, registered by this package — no companion plugin is needed). On a profile that also bundles the harness' own settings surface, the same namespace appears under Settings → 插件配置. Changes apply to the very next call; no restart.

Every polish is one billable LLM call. maxOutputTokens bounds the cost of one call, and maxConcurrent / rateLimitPerMinute bound how often calls can be made.

FieldDefaultDescription
enabledtrueMaster switch; off hides the composer button and disables every trigger
provider(empty)Explicit route override; must be filled together with model (or leave both empty to follow the current session model)
model(empty)Explicit route override; must be filled together with provider
temperature0.3Sampling temperature (0–1). Low keeps the rewrite faithful to the original
strategyModereplace-defaultHow a custom systemPrompt combines with the built-in strategy: replace-default swaps it out entirely (the built-in hard rules — preserve intent, never fabricate, body-only output, language mirroring — are not retained and must be carried into your own text); extend-default appends your text after the built-in strategy, keeping those rules in force
systemPrompt(empty → built-in strategy)Custom strategy text; blank uses the built-in concise strategy
shortcutctrl+alt+eGlobal shortcut spec (at least one of ctrl/alt/meta plus one alphanumeric or function key; bare keys are ignored so normal typing can never be swallowed); empty disables it
maxOutputTokens6000Output token budget of one polish call (256–32768); it bounds that call's cost
maxInputChars12000Input character cap (200–200000), counted in Unicode code points — an emoji is one character. Over-length drafts are rejected, never truncated
timeoutMs60000End-to-end deadline of one call (5000–600000 ms)
maxConcurrent2Concurrency cap within a single host process (1–16); extra requests answer 429 (concurrency-limit). The browser UI admits exactly one in-flight request (a single preview panel), so this cap mainly protects the /enhance command plane and multi-client callers
rateLimitPerMinute10Sliding-window rate cap per minute within a single host process (1–600), counting successful calls only — failures never consume the window, so a run of failures cannot rate-limit you out; extra requests answer 429 (rate-limit) with a Retry-After in seconds
streamingtrueShow the model's output in the panel as it streams instead of waiting for the whole rewrite — display-only: the applied text is still the normalized full result, and the client falls back to the one-shot JSON route when the host or network does not support text/event-stream
contextAwaretrueGround the rewrite in the current conversation's recent history (resolve pronouns, fill in stated constraints, mirror the established stack and terminology). With no session, no history, or this switch off, the call degrades to the plain single-prompt polish. Privacy: the assembled snippet is sent to the configured provider alongside the draft — see Security & privacy
contextMaxMessages8Context breadth: how many recent user/assistant turns may ground the rewrite (0–50); 0 admits none
contextMaxChars4000Context depth: character budget of the assembled history snippet (0–100000), spent newest-first so the most recent turns win when the budget is tight; 0 admits none

provider / model values match the harness settings: each key under the harness' provider settings (for example zhipu, muyuu) is a provider and each models[].id under it (for example glm-5.3-flash) is a model. example pair: provider: zhipu + model: glm-5.3-flash.

Model routing precedence: the explicit settings pair → the route recorded in the current session's request header → the harness-wide default model. If none of the three names a route (a fresh session with no default model, say), the plugin fails with an actionable message instead of guessing.