DeepSeek Harness plugin

Dsh-Prompt-Enhancement

Standalone dsh web plugin: an input-area "Prompt Enhance" button that improves the current draft with GitHub prompt-engineering templates and fills it back after confirmation, with its own on/off

Jump to install

Source facts

Repository
Ackerman0/Dsh-Prompt-Enhancement
Latest update
Aug 16, 2026
Category
Tools & Capabilities
GitHub stars
1
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/Ackerman0/Dsh-Prompt-Enhancement
Plugin: Dsh-Prompt-Enhancement
Author: Ackerman0

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer3 files
README.mdSource · read only

dsh-prompt-enhancement

DeepSeek Harness(DSH)Web GUI 的独立「提示词增强」插件:在输入框底行、模型选择器左侧提供一个按钮, 点击后用提示词工程专家框架把你当前输入的草稿真正改写、补充成更清晰具体的提示词, 弹窗确认后由你决定是否替换输入框。宿主侧内置直连模型的快速增强接口(秒级),并带本地离线兜底。

> A standalone dsh web plugin: a Prompt-Enhance button next to the model selector that rewrites and > expands the current input draft through a prompt-engineering expert framework, with a confirm dialog, > a fast direct-model engine, an offline fallback, and its own on/off switch in Settings.

核心功能

  • 输入框按钮:注册于官方 conversation.input.right 槽位(模型选择器正左侧),与既有输入框逻辑无缝集成,

样式使用 shell 的 --dsw-* 设计令牌,与相邻控件(权限、模型选择器)字体与高度完全一致。

  • 真实改写(LLM 引擎):宿主侧注册回环 HTTP 路由 /api/prompt-enhance,用当前选定的模型做一次

直接补全(无 agent 回路、无工具调用),系统提示词采用 WorkBuddy 同款提示词工程专家框架: 明确目标、补充上下文、设定约束与输出格式、语言与输入保持一致、约 800 字以内、只输出增强后的提示词。

  • 离线兜底:智能体/网络不可用时,回退到本地意图改写引擎(17 类意图:打包发布、翻译、总结、修复、

测试、编程、写作、文生图、分析、计划、邮件、设计等),并按需拉取 GitHub 提示词工程资源 (f/awesome-chatgpt-prompts 模板库、dair-ai/Prompt-Engineering-Guide、GitHub Search API)用于来源展示; GitHub 亦不可达时使用内置模板。

  • 确认式交互:增强结果在弹窗中展示(可继续编辑),提供「复制 / 重新增强 / 关闭 / 替换输入框」;

「替换输入框」只回填草稿、绝不自动发送;「重新增强」始终读取输入框此刻的最新内容。

  • 独立设置版块:在「设置」导航栏注册独立的「提示词增强」版块,含开启/关闭开关;

关闭后按钮与智能体公告即时隐藏,状态持久化于 settings.yaml

  • 自诊断:插件把「注册了哪些槽位 / 挂载是否成功 / 渲染错误」写入 prompt-enhance.diagnostics 设置字段

(仅在有异常或每 5 分钟发布一次),便于远程排障。

安装

# 1. 把本目录链接进 web profile(等价于 pnpm add link:<本目录> 并登记 bundle)
dsh plugin --profile web add link:$(pwd)

# 2.(一次性)让 Web 设置界面能读写本插件的开关:
#    在 dsh 安装目录的 @deepseek-ai/dsh-host-apiproxy/lib/index.js 中,
#    把 "prompt-enhance" 加入 WEB_SETTINGS_NAMESPACES 数组,然后重启 dsh。
#    不做这一步时开关界面显示不可用,可改为直接编辑
#    ~/.dsh/settings.yaml 中的 prompt-enhance.enabled: true / false。

刷新 Web GUI 后:输入框底行出现「✨ 提示词增强」按钮;「设置」导航栏出现独立「提示词增强」版块。

使用指南

1. 在输入框写下草稿,点击「✨ 提示词增强」按钮; 2. 弹窗显示「正在分析并增强提示词…」,当前模型直连返回改写后的提示词(秒级); 3. 在弹窗里可继续编辑;若期间又改了输入框内容,点「重新增强」用最新内容重跑; 4. 点「替换输入框」回填草稿(不发送),或「复制」/「关闭」保持原输入不变; 5. 「设置 → 提示词增强」中的开关可随时停用/启用插件。

目录结构

cordis.patch.yml      组合补丁:插入 ui-prompt-enhance 插件行(node 半 + 浏览器半)
lib/index.js          宿主侧入口:智能体公告、设置命名空间、/api/prompt-enhance 快速 LLM 路由
lib/client.js         浏览器侧入口(ModuleLoader bundle):按钮、弹窗、意图改写引擎、设置版块
package.json          dsh 清单(dsh.bundle.patch / dsh.client 注入)、依赖与 files 白名单
README.md             本文档
LICENSE               MIT

技术栈与依赖

  • 宿主侧(Node / ESM):@deepseek-ai/dsh-settings(设置命名空间)、@deepseek-ai/dsh-llm(直连模型流式调用 + BlockAssembler)、

schemastery(配置校验);服务注入:systemPrompt / webServer / llm / agentDefaultModel

  • 浏览器侧:官方 client 槽位系统(conversation.input.rightsettings.section),React(peer react@^18.2

由 shell 注入),运行时 @deepseek-ai/dsh-client-runtime / @deepseek-ai/dsh-client-ui-settings

  • 增强引擎:当前选定的模型(agentDefaultModel.currentSelection(),直连 API,temperature 0.7、maxTokens 1200、60s 超时)。

配置方法

配置项位置说明
开启/关闭Web「设置 → 提示词增强」或 settings.yamlprompt-enhance.enabled关闭后按钮与公告即时隐藏
诊断记录settings.yamlprompt-enhance.diagnostics(只读)记录槽位注册、挂载与渲染错误,用于排障
增强模型全局模型选择器路由使用当前默认模型(provider/model/reasoningEffort)
API Key走 DSH 自身的模型凭据配置插件不接触、不存储任何密钥

常见问题(FAQ)

Q:重启后按钮/设置版块没出现? A:宿主只在启动时读取插件清单。请完全重启 dsh(出现「服务启动失败」页时点「重试」),并确认 index 响应带 cache-control: no-store(新版 dsh 已内置);若本机曾修改过 apiproxy 缓存头配置,请核对。

Q:点了按钮一直提示上一次的结果? A:弹窗里点「重新增强」即可用输入框当前内容重跑;直接点输入框旁的按钮也始终读取文本框实时内容。

Q:增强很慢? A:新版为直连模型单次调用(秒级)。若超过 60 秒会超时并自动回退本地改写,请检查模型网络或更换模型。

Q:设置里的开关显示「设置暂不可用」? A:宿主未暴露 prompt-enhance 命名空间。按「安装」第 2 步把 prompt-enhance 加入 apiproxy 的 WEB_SETTINGS_NAMESPACES,或直接编辑 settings.yamlprompt-enhance.enabled

Q:为什么有时会出现「GitHub 内容获取失败」提示? A:那是离线兜底路径的提示(LLM 引擎不可用时自动启用),表示本次使用本地模板完成了增强, 原始输入不受影响,可点「重新增强」重试。

模型体验

宿主侧仅在启用时注入一小段插件公告;浏览器侧数据流不进入模型请求(增强调用为独立的一次性补全)。

License

MIT