Composer prompt enhancement for DeepSeek Harness: a button beside the model selector rewrites the draft through one auxiliary LLM call and writes the result back in place, with composer undo left intact; a /prompt-enhance slash command returns the rewritten prompt as a command result line without touching the draft; the enhancement call can be pinned to its own fast provider and model in the profile patch; the rewrite policy is faithful - original intent, language and information are kept, code, commands and paths are preserved verbatim, and nothing is invented or padded with placeholder text.
Install
# from npm (prebuilt)
dsh plugin --profile web add @jianyiagi/dsh-prompt-enhancer
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:JianYiAG/dsh-prompt-enhancer#path:/dsh-prompt-enhancer
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
This plugin publishes its README in Chinese only.
简体中文 | 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
Links
More in this category
zhu1090093659/dsh-web#packages/dsh-task-board★ 10696
Task board for the dsh web GUI: a sidebar multi-column kanban whose cards run in real DSH agent sessions and can also be scheduled with cron expressions, executed host-side even with the browser closed.
zhu1090093659/dsh-web#packages/dsh-web-all★ 10696
Plugin and skin collection for the DSH Web UI: task board, Git graph, right-side panel, remote mobile UI, pet, live token stats, and a skin center.
ccch1mneyyy/dsh-TUI★ 8484
Claude Code-style full-screen terminal UI: pixel-whale header, live status line, and streaming thought expansion.
MeteorNOX/DeepSeek-Balance-Whale-Widget★ 7509
A fixed-corner whale widget for the DSH web GUI — balance, today's usage and per-turn cost with peak/off-peak pricing, editable balance-alert and daily-budget bubbles, a module-based custom bubble queue with A/B weighted choices and random lines or images, 30+ vendor templates (OpenAI, OpenRouter, Kimi, SiliconFlow, Ark, Zhipu, MiniMax and more) with per-model balance and subscription quota, plus task-end sound, imported audio, custom roles and a resource manager. Local-only, no telemetry.
omdsh-dev/DSH-better-sidebar★ 5395
Full sidebar workbench with file rendering and editing, terminal, Git, and subagents; third-party plugins can register new tabs.
omdsh-dev/dsh-genui★ 1082
Interactive UI components rendered inline in replies: layout, charts, forms, quizzes, mermaid, 3D scenes, and an action event loop back to the model.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.