xiex16070-jpg/dsh-prompt-enhance ↗★ 0
dsh-prompt-enhance
一键将草稿改写为结构化提示词的工具 适合需要利用当前模型快速优化、润色和结构化输入草稿的用户。
同名包的其他仓库
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:xiex16070-jpg/dsh-prompt-enhance说明文档
阅读完整 README ↗五、安装、启用与配置
5.1 安装
DSH 的插件是 npm 包:装进 profile 的 node_modules,并在 profile 的 package.json 里登记为 bundle。profile 默认在 ~/.dsh/profiles//(本机是 desktop)。
方式 A:官方命令(推荐)
### 5.3 配置
配置是**可选的**:默认值即可用。用户层写在 `$DSH_HOME/prompt-enhance/config.json`(默认 `~/.dsh/prompt-enhance/config.json`),**每次请求都重新读取**——所以改完立刻生效,不需要重启。
| 键 | 默认 | 含义 |
|---|---|---|
| `enabled` | `true` | 关掉后所有改写请求返回 `disabled` |
| `mode` | `structured` | 默认改写模式:`structured` / `concise` / `detailed` / `translate-en` / `spec` |
| `language` | `auto` | 输出语言:`auto`(跟随草稿)/ `zh` / `en` |
| `temperature` | `0.3` | 改写任务,故意压低 |
| `timeoutMs` | `45000` | 单次改写超时 |
| `maxDraftChars` | `8000` | 草稿上限,超了拒绝而非截断 |
| `maxOutputChars` | `12000` | 输出上限,超了丢弃(判为没按指令改写) |
| `offerUndo` | `true` | 写回后是否显示「撤销」 |
| `showModeMenu` | `true` | 芯片是否显示 `▾` 模式菜单 |
| `systemPrompt` | `""` | 非空则**整体替换**内置系统提示词(高级用法) |
示例:
```json
{
"mode": "spec",
"language": "zh",
"temperature": 0.2,
"maxDraftChars": 4000
}
写坏了也不要紧:JSON 解析失败会退回默认值而不是让插件报错。