Zian-anson/dsh-prompt-seed ↗★ 1

dsh-prompt-seed

将单行种子文本优化展开为具体提示词 适合需要一键扩写、优化提示词并保持语义不变的用户。

包名
dsh-prompt-seed
兼容性
待验证
版本
0.9.4
许可证
MIT
最近更新
2026年10月7日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Zian-anson/dsh-prompt-seed

Configuration

The row accepts a few optional keys; defaults are correct for almost everyone.

- insert:
    - id: prompt-seed
      name: dsh-prompt-seed
      config:
        route: /api/prompt-seed/optimize   # route path (this is the default)
        # provider: zai-coding-cn               # pin the model route (provider + model
        # model: glm-5.3-flash                  #   work as a pair; defaults to agentDefaultModel)
        # context: false                        # disable session-context injection (on by default)

Changing route requires editing src/client-plugin.js's ROUTE and rebuilding — the browser half is a compiled bundle, so the two must be changed together. A test asserts they match.

KeyDefaultMeaning
route/api/prompt-seed/optimizeroute path; changing it requires editing ROUTE in src/client-plugin.js and rebuilding
provider + modelhost defaultpin the rewrite/audit model (both keys together)
contexttruesession-context injection; now read on demand (short draft or anaphora only)
samples$DSH_HOME/prompt-seed/samples.jsonlevent log path; false disables logging entirely
templatestrueallow $DSH_HOME/prompt-seed/prompts/*.md to override the built-in prompts

Depth is a client-side setting (right-click the ✦ button): auto (from local feedback counts), light, standard, deep. It shapes how much a seed is unfolded — clarify and precise ignore it. It is not a row config key because it is per-user, not per-profile.

Prompt overrides: drop system.md, user.md, audit.md, signal.md, deictic.md or conversational.md into $DSH_HOME/prompt-seed/prompts/ to replace the built-in contract. They are re-read on every request, so an edit takes effect on the next click — no app restart.

Context injection sends the session's two most recent user turns (each truncated to 300 characters) to the rewrite and audit prompts as a reference-resolution-only block. The last assistant turn is read only to anchor bare-signal inference ("42" → which option?) and is never sent to the rewrite or audit prompts. It fails open at every step — no session id, no sessionQuery service, corrupt reads, or context: false all degrade silently to context-free optimization.

Model routing: rewriting rewards instruction-following over raw generation, but the floor is higher than "any flash will do". Measured across providers (v0.4.6): glm-5.2 passes every case class cleanly — including the two gray zones where both flash-tier models fail (procedural insertions into already-precise requests, and conversation narration leaking into reference resolution). Flash models are fine for the simple classes and cheaper, but the retry chain they trigger erases the latency win. The tested-good route is one config line: provider: zai-coding-cn, model: glm-5.2.