cosmoliu2002/dsh-prompt-enhancer ↗★ 0
dsh-prompt-enhancer
Composer prompt enhancer for DeepSeek Harness: one ✨ button rewrites the draft into a structured prompt, flags open questions below the input, follows the current session model, and can undo the rewrite; /enhance does the same rewrite as a slash command. 适合需要优化输入质量、提升与大模型对话效果的用户。
같은 패키지 이름의 다른 저장소
설치
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:cosmoliu2002/dsh-prompt-enhancer配置项
配置写在 profile 的 cordis.patch.yml 中该插件行的 config 下;全部可选,非法值回退默认。默认不钉模型:增强调用跟随当前会话模型。
| 键 | 默认 | 含义 |
|---|---|---|
commandName | enhance | 文本命令名(需匹配 ^[a-z][a-z0-9_-]*$) |
quietCommandName | enhance-quiet | 内部 JSON 命令名 |
provider | 空 | 模型 route;与 model 成对出现才生效(省略即跟随会话) |
model | 空 | 模型 id;与 provider 成对 |
systemPrompt | 内置 | 要求模型只输出 {"prompt","gaps","added"} JSON 的系统提示词 |
template | Draft:\n>> | 用户消息模板,{{draft}} 会被草稿替换 |
maxInputChars | 4000 | 草稿字符上限 |
maxOutputTokens | 1024 | 单次输出 token 上限 |
timeoutMs | 60000 | 单次调用超时(毫秒) |
模型路由解析顺序(「跟随当前会话模型」= 第 2 步):
config.provider+config.model(成对显式指定时才有,优先级最高);- 当前会话模型:
modelSelection会话投影 —— 编辑器里刚切换、尚未发送的选择(pending)优先,其次是该会话最近一次请求实际使用的模型(last used); - 会话最近一次请求记录的 route(
session.requestHeader().config); - Agent 创建时的模型选项(
agent.options); ctx.agentDefaultModel.currentSelection()(设置里的默认模型)。
都没有时命令返回双语错误提示,不会静默失败。想在某个 profile 里固定用廉价模型,只在该 profile 的 patch 中给这行加 provider + model 成对配置即可。