输入框提示词一键增强:模型选择器旁的按钮把草稿经一次辅助模型调用改写后直接写回输入框,输入框撤销不受影响;/prompt-enhance 命令把改写结果以命令结果行显示、不改动草稿;可在 profile 补丁里为增强调用单独固定 provider 和模型;改写忠实原文,保留意图、语言与信息量,代码、命令与路径原样保留,不编造事实、不输出占位文字。
安装
# npm 包(预构建)
dsh plugin --profile web add @jianyiagi/dsh-prompt-enhancer
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:JianYiAG/dsh-prompt-enhancer#path:/dsh-prompt-enhancer
装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。
README
简体中文 | English
DSH(DeepSeek Harness)插件。在输入框写提示词,点一下按钮,模型改写后替换输入框内容。
安装
桌面端:
- 左侧栏进「插件」页
- 安装 bundle,填
@jianyiagi/dsh-prompt-enhancer - 完全退出应用后重新打开
CLI / Web 端:
dsh plugin --profile <profile> add @jianyiagi/dsh-prompt-enhancer
CLI 安装后若未生效,在「插件」页勾选该插件,或把包名加入 profile package.json 的 dsh.profile.bundles,然后重启应用。
使用
- 在输入框输入提示词
- 点模型选择器左侧的按钮
- 按钮停止转动后,输入框内容已替换为改写结果,原按钮被回退按钮取代
- 点击回退按钮可恢复增强前的提示词;手动改动草稿或发送消息后,回退按钮消失、按钮回来
输入框为空时两个按钮都不显示。增强成功后只显示回退按钮——两个按钮不会同时出现,避免误点造成二次增强。
过短或不含任务目标的输入(例如只有「你我」两个字的片段、或「嗯。」这类只带句号的短句)不会被增强:要么在调用模型前就被拒绝,要么由模型原样透传后识别。两种情况都只在按钮旁显示一行错误提示,草稿保持原样。
指代型提示词(如「按照你的建议去执行修改」「按上面的方案执行」)会被正常增强:工具会把指代写成显式表述并补全执行顺序。但增强是一次性调用、不携带对话历史,所以它只知道「有一个此前给出的建议」,不知道建议的具体内容——如果那几条建议很关键,把它们写进草稿会更准。若模型仍然原样返回,提示会明确说明是「指代指向上一轮内容,看不到对话历史」,而不是笼统地说缺少任务目标。
也可输入 /prompt-enhance 提示词,结果以命令结果行显示,不写回输入框。
装了
@jianyiagi/dsh-plugin-ui-boost(需要带__uiBoostAuxReport钩子的版本,当前为 0.5.2+)时,增强调用的次数与用途会以「增强」单独统计,不混进对话用量。缓存命中场景下的输入 token 数值以 ui-boost 的口径为准,可能偏低。
已知限制
- 回退仅当次会话有效:回退点存在页面状态里,刷新页面或重启应用后失效。
- 手动改动过草稿后回退按钮消失(避免覆盖你的编辑);连续增强只保留最近一次的回退点。
- 斜杠命令
/prompt-enhance的结果不写回输入框,因此没有回退按钮。 - 过短输入(剥掉标点后 4 个字符以内且无动词特征)会被直接拒绝,「嗯。」这类只带句号的短句也算;这是启发式判断,可能误杀极短的有效提示词(如单个动词),补上对象即可增强。
- 草稿里带
@文件引用时增强会被拒绝:替换草稿的通道会剥掉引用占位符,引用无法保留。请先发送,或把文件写成文字描述。 - 长草稿有输出上限:改写结果最多约 16384 token(草稿约 8192 中文字时达到上限)。超过约 4000 字的草稿若被模型大幅扩写,仍可能触发「增强结果超出长度上限」,此时请分段增强。
- 增强结果会以命令结果行的形式留在会话里:原文不会写进命令入参记录,但改写后的全文仍会写入会话日志。含敏感内容的草稿请勿用于增强。
配置
默认使用当前会话的模型。可在 profile 补丁中指定固定模型:
- insert:
- id: prompt-enhancer
name: '@jianyiagi/dsh-prompt-enhancer'
config:
provider: <provider-id>
model: <model-id>
两个字段需同时提供;删除 config 即恢复使用会话模型。
1.1.2 起只有一个模式:点一次增强,插件按草稿的完成度与风险决定改写深度,没有需要选择的开关。旧的 framework / skill 配置键仍接受但不再生效。
卸载
桌面端在「插件」页卸载;CLI:
dsh plugin --profile <profile> remove @jianyiagi/dsh-prompt-enhancer
English
DSH (DeepSeek Harness) plugin. Type a prompt in the composer, click the button, and the model rewrites it in place.
Install
Desktop app
- Open the Plugins page in the left sidebar
- Install bundle, enter
@jianyiagi/dsh-prompt-enhancer - Quit the app completely, then start it again
CLI / Web
dsh plugin --profile <profile> add @jianyiagi/dsh-prompt-enhancer
If it does not take effect after a restart, tick the plugin on the Plugins page, or add the package name to dsh.profile.bundles in the profile package.json, then restart the app.
Usage
- Type a prompt in the composer
- Click the button to the left of the model selector
- When the button stops spinning, the draft has been replaced with the rewritten prompt and a rollback button appears next to it
- Click the rollback button to restore the prompt from before the enhancement; it disappears once you edit the draft by hand or send the message
The button is hidden while the composer is empty.
Drafts that are too short or carry no task goal (for example a bare fragment like 你我, or a short sentence that only adds a full stop like 嗯。) are never enhanced: they are either rejected before the model call or passed through by the model and detected afterwards. Both cases only flash an error next to the button and leave the draft untouched.
Reference-only drafts (such as "按照你的建议去执行修改" / "do what you suggested") are enhanced normally: the tool spells the reference out and fills in the execution order. The enhancement is a single-shot call with no conversation history, though, so it only knows that a suggestion exists earlier — not what it said. If those details matter, paste them into the draft. Should the model still echo the draft, the message now says the reference points at an earlier turn the call cannot see, instead of the misleading "no task goal".
You can also type /prompt-enhance <prompt>; the result appears as a command result line and is not written back to the composer.
With
@jianyiagi/dsh-plugin-ui-boostinstalled (needs a build exposing the__uiBoostAuxReporthook — 0.5.2+), enhancement calls and purpose are counted separately underprompt-enhanceinstead of blending into chat usage. When the provider reports cache hits, the input-token figure follows ui-boost's own accounting and may read low.
Known limitations
- Rollback lasts for the current session only: the restore point lives in page state and is lost on refresh or restart.
- The rollback button disappears once you edit the draft by hand (so it never overwrites your edits); consecutive enhancements keep only the most recent restore point.
- The
/prompt-enhanceslash command does not write back to the composer, so it has no rollback button. - Drafts of four characters or fewer without verb characters are rejected outright, even when they carry a full stop; this heuristic can block a valid very short prompt (a single verb), which can be enhanced once its object is added.
- A draft containing
@filereferences is refused: the draft-replacement channel strips reference placeholders, so the reference cannot survive. Send it first, or describe the file in words. - Long drafts hit an output budget: the rewritten result is capped at about 16 384 tokens (reached at roughly 8 192 Chinese characters of draft). A draft over ~4 000 characters that the model expands substantially can still end in "enhancement result exceeds the length limit" — enhance it in parts.
- The enhancement result stays in the session as a command result line:
recordInput: falseonly keeps the original out of the command input record; the rewritten text is still written to the session log (the command registry is the plugin's only client-to-host channel). Do not enhance drafts that contain secrets.
Configuration
By default the current session model is used. To pin a model, add this to the profile patch:
- insert:
- id: prompt-enhancer
name: '@jianyiagi/dsh-prompt-enhancer'
config:
provider: <provider-id>
model: <model-id>
Both fields are required; remove config to use the session model again.
Uninstall
Untick it on the Plugins page, or:
dsh plugin --profile <profile> remove @jianyiagi/dsh-prompt-enhancer
MIT | Repository: https://github.com/JianYiAG/dsh-prompt-enhancer
链接
同类插件
zhu1090093659/dsh-web#packages/dsh-task-board★ 10696
侧边栏多列任务看板:卡片交给真实 DSH 智能体会话执行,支持 cron 定时(Host 侧到点执行,关浏览器也生效)。
zhu1090093659/dsh-web#packages/dsh-web-all★ 10696
DSH Web UI 插件与皮肤合集:任务看板、git 图、右侧面板、远程移动端 UI、桌宠、实时 token 统计与皮肤中心。
ccch1mneyyy/dsh-TUI★ 8484
Claude Code 风格全屏终端 UI:像素鲸鱼顶栏、实时工作状态行、思考流式展开。
MeteorNOX/DeepSeek-Balance-Whale-Widget★ 7509
右下角常驻的小鲸鱼挂件:余额、今日已用与每轮对话消耗(含峰谷价),余额预警与今日预算的泡泡内容都可编辑;泡泡点击序列模块化自定义,支持并列加权 A/B、随机台词与随机图片;内置 30+ 厂商模板(OpenAI / OpenRouter / Kimi / 硅基流动 / 方舟 / 智谱 / MiniMax 等),按模型查余额与订阅额度;另有任务结束音效、导入音频、自定义角色与资源管理。数据全在本机,无遥测。
omdsh-dev/DSH-better-sidebar★ 5395
侧边栏完整工作台:内置文件渲染编辑、终端、Git 与子代理,支持三方插件注册新 Tab。
omdsh-dev/dsh-genui★ 1082
助手回复内渲染交互式 UI 组件:布局、图表、表单、测验、mermaid、3D 场景与回传事件循环。
社区评论
评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。