DeepSeek Harness Plugin Hub

Publish and manage complete Harness Profiles. Discover Plugins for your next setup.

Explore

PluginsPresetsDocsNews

Community

Publish a pluginContactReport an issue

Resources

Plugin Hub on GitHubDeepSeek HarnessSystem statusPrivacy notice
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

Independent and unofficial. Not affiliated with, authorized by, or endorsed by DeepSeek.

Ui Prompt Optimizer — DSH Plugin for DeepSeek Harness
DeepSeek Harness Plugin Hub
ProfilesPluginsCategoriesNewsDocsSign inManage Profiles
ProfilesPluginsCategoriesNewsDocsSign in
← Plugins
U

@dsh-external/ui-prompt-optimizer

Ui Prompt Optimizer

Composer button to optimize the pending prompt and undo it

The plugin will be installed here. Keep web if you are unsure.

npx -y @deepseek-ai/dsh plugin --profile web add github:xiyue718/dsh-ui-prompt-optimizer#418381cb397b494748a9132e316c9a68453e9c2f
READMECompatibilityVersions

Compatibility and provenance

Ui Prompt Optimizer is published as @dsh-external/ui-prompt-optimizer and currently resolves to version 0.1.2. The Hub verifies its manifest and preserves the exact installation source for reproducible installs.

DSH compatibility
*
Runtime surfaces
web
Release source
github
Registry updated
9/20/2026

Versions

0.1.2stable
9/20/2026
0.1.0stable
9/20/2026

Related plugins

Loading related plugins…

Latest
0.1.2
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
Unavailable
Files
Unavailable
Surface
web
License
BSD-3-Clause
Source
github
GitHub
★ 0
Weekly downloads
0
Last push
9/20/2026
View source ↗
README badge

Click the badge to copy Markdown for your README.

Do you maintain this Plugin?Claim benefit · Priority security scan

Verify the GitHub repository declared in package.json to manage this listing. After you claim it, Hub will prioritize a security scan of the current version and publish the result when it passes.

Claim this Plugin →
Report an issue

Related plugins

More verified plugins in ui-customization.

Web App@deepseek-ai/dsh-web-appThe dsh browser-surface bundle: the web patch layer over dsh-base plus the runtime glue plugin (frontend dist serving, web-surface prompt, bash runtime variables, URL line)Experimental Agent Team Web Profile@deepseek-ai/dsh-experimental-agent-team-web-profileExperimental Web profile layer for Agent Teams Remote and UI pluginsRemote Web Ui@linxin666/dsh-remote-web-uiScan-to-pair remote access for the dsh web GUI that shares one official interface: a QR beside the settings button pairs phones and PCs into the same Web GUI (a portrait-touch adaptation layer for phones, full desktop on PCs) through one-time tokens and rClient Ui Task Board@linxin666/dsh-client-ui-task-boardHost-authoritative task board for the DSH Web GUI with real session execution, Host cron scheduling, and optional cross-platform idle-sleep protection; mounted without DSH source changes.

README

中文 | English

@dsh-external/ui-prompt-optimizer

介绍

ui-prompt-optimizer 是 DSH Web 客户端的“优化提示词”插件。它在会话聊天输入区添加一个仅图标的按钮,点击后把当前未发送的草稿发送到本插件的 host API,由当前默认模型优化后替换聊天框中的原文;按钮同时变成“撤回”图标,再次点击会恢复原始提示词。

本插件是 Web 客户端插件,只对 DSH 的浏览器界面生效。TUI、ACP、headless 等非 Web 客户端不会显示该按钮,也不会加载浏览器侧 UI。

安装

dsh 命令安装(项目官方方式)

如果你已安装 dsh CLI,可以按项目官方教程使用 dsh plugin 命令安装:

# 从本地插件目录安装
dsh plugin --profile web add C:/Users/<user>/.dsh/plugins/ui-prompt-optimizer

# 或从 GitHub 仓库安装
dsh plugin --profile web add github:xiyue718/dsh-ui-prompt-optimizer

安装后启动:

dsh --profile web

查看组合配置:

dsh --profile web --dump-config

详细命令说明见项目文档:docs/user/develop/basic/publish.md。

构建产物:host 为自包含的 lib/index.js,client 为 lib/client.js,打包文件为 dsh-external-ui-prompt-optimizer-0.1.2.tgz。

安装前先构建一次:DSH_CHECKOUT=<dsh 源码 checkout> bash scripts/build.sh。官方渠道把插件装进 profile 后,宿主只从插件自身目录解析运行期依赖,所以 host 半由 tsdown 打包成自包含模块(内联 schemastery、zod 与 @deepseek-ai/dsh-* helper);未打包的 lib/index.js 会让该行以 failed to import 停用。

使用

  1. 启动 DSH Web 客户端并进入一个会话。
  2. 在聊天框输入尚未发送的提示词。
  3. 点击输入区工具行中的“优化提示词”图标(无文字,形似魔法棒/星形)。
  4. 等待模型返回;聊天框内容会被替换为优化后的提示词。
  5. 如果对结果不满意,点击变成“撤回”图标的按钮,恢复原始提示词。
  6. 确认后正常发送即可。

功能

  • 按钮位置:会话聊天输入区的 composer 工具行,无文字,只有 SVG 图标。
  • 初始状态:有非空草稿且未在发送时可用,点击后调用模型优化。
  • 优化状态:按钮显示动态旋转的加载图标并禁用,避免重复点击。
  • 优化完成:草稿被替换为优化后的提示词,按钮变成“撤回”图标。
  • 撤回:点击后恢复点击优化时保存的原始提示词,按钮回到“优化”图标。
  • 保护:优化请求返回前如果用户修改了草稿,则不会用结果覆盖用户新内容。
  • 自动复位:发送消息或清空草稿后,按钮回到初始状态。
  • 运行依赖:DSH Web 客户端正在运行;已配置默认模型(agent-default-model);已配置对应模型的 API Key;Host 侧服务可用(webServer、llm、agentDefaultModel)。

Host API

插件内部使用以下接口,普通用户不需要直接调用:

POST /@dsh-external/ui-prompt-optimizer/api/optimize
Content-Type: application/json

请求体:

{ "prompt": "要优化的提示词" }

成功响应:

{ "optimized": "优化后的提示词" }

失败响应示例:

{ "error": "no default model is configured" }

原理

插件由 host 和 client 两部分组成。

Client 侧在聊天输入区的 composer 工具行添加“优化提示词”按钮。点击后,client 保存当前原始草稿并调用 Host API;请求期间按钮显示动态加载图标并禁用;返回成功后替换聊天框内容并切换到“撤回”状态;点击“撤回”时恢复保存的原始草稿。

Host 侧暴露 POST /@dsh-external/ui-prompt-optimizer/api/optimize。收到请求后,它通过 agentDefaultModel.currentSelection() 获取当前默认模型,使用固定的系统提示词(“你是一个提示词优化助手……”),调用 ctx.llm.stream 生成优化结果,并关闭推理、使用较低温度以得到更稳定、简洁的输出。若模型未配置或返回空文本,接口会返回明确错误。