
Xilin3/dsh-prompt-persona
41Last commit Aug 13, 2026
dsh-prompt-persona DSH plugin
This plugin adds a visual editor for the `deployment:persona` section of the system prompt in the DSH Web settings page. It supports three injection modes (replace, append, off), real-time preview of the full assembled prompt, and optimistic concurrency control for saving. The persona text supports template variables like `{{model}}`, `{{cwd}}`, and `{{provider}}`.
How to install the dsh-prompt-persona DSH plugin
dsh plugin --profile web add github:xilin3/dsh-prompt-personaCopying does not run this command. Review the repository and version before installing the dsh-prompt-persona DSH plugin.
dsh-prompt-persona DSH plugin data source
dsh-prompt-persona DSH plugin snapshot date: Aug 16, 2026
discovered
What the dsh-prompt-persona DSH plugin can do
- Visual editing of persona text in the settings page with a dedicated section.
- Three injection modes: replace (default), append, and off.
- Real-time preview of the current full system prompt and the effect of a draft before saving.
- Optimistic concurrency save with revision-based conflict detection (HTTP 409 on conflict).
- Template variable interpolation: `{{model}}`, `{{cwd}}`, `{{provider}}` with strict checking.
Where the dsh-prompt-persona DSH plugin fits
- Customize the system prompt for a DSH Web deployment without editing configuration files manually.
- Quickly switch between replacing, appending, or disabling the persona section.
- Preview how the persona will affect the final assembled prompt before applying changes.
- Avoid overwriting concurrent edits from other users via revision-based conflict detection.
- Use template variables to inject dynamic context like model name or working directory.
Who the dsh-prompt-persona DSH plugin is for
- DSH Web profile users who want to manage system prompts through a GUI.
- Deployment authors who need to iterate on persona content without restarting the server for every change.
dsh-prompt-persona DSH plugin limitations
- Only works with the Web profile of DSH (`$DSH_HOME/profiles/web/`).
- Frontend/Host changes do not hot-reload; the `dsh web` process must be restarted and the browser refreshed.
- Depends on peer packages provided by the DSH host (e.g., `@deepseek-ai/dsh-settings`, `@deepseek-ai/dsh-system-prompt`).
- Template variables are strictly interpolated; unknown variables cause an error.
dsh-prompt-persona DSH plugin: from the repository README
Quoted from the Xilin3/dsh-prompt-persona README, the upstream source of the dsh-prompt-persona DSH plugin. Copyright remains with the original authors.
一个 **DeepSeek Harness(DSH)插件**:在 Web 设置页里可视化编辑系统提示词(`deployment:persona`),并实时预览改动效果。即「给 Harness 加系统提示词」的**方法 1 —— 改部署 persona**。 > 在 Harness 的系统提示词组装模型里,`deployment:persona` 是唯一一段「由配置/部署作者撰写」的片段(order `0`)。本插件接管这段片段,把它变成设置页里可直接编辑、可预览、可持久化的内容,而无需改动 Harness 本体或手写 `cordis.patch.yml`。 --- ## 特性 - 🎛️ **可视化编辑**:设置页新增「系统提示词」区块,直接写 persona 文本。 - 🔀 **三种注入模式**:`replace`(替换)/ `append`(追加)/ `off`(关闭)。 - 👁️ **当前提示词**:实时显示当前生效的**完整系统提示词**(persona + harness 身份 + 工具引导等所有 section)。 - ✨ **添加效果(预览)**:把草稿应用到一份副本上,点「预览效果」即可看到**保存后的完整提示词**,不落盘、不污染当前状态。 - 💾 **乐观并发保存**:基于 settings revision 的冲突检测(`SETTINGS_CONFLICT` → HTTP 409),避免覆盖他人同时的修改。 - 🧩 **模板变量**:persona 支持 `{{model}}` / `{{cwd}}` / `{{provider}}` 严格插值。 --- ## 界面 设置页(Settings)里会多出一个「系统提示词」section,包含: | 区块 | 说明 | | --- | --- | | 注入模式 | 下拉选择 替换 / 追加 / 关闭 | | 自定义提示词 | 多行文本域,persona 内容,支持模板变量 | | 保存并应用 / 预览效果 | 持久化到 `settings.yaml`;或仅预览草稿效果 | | 当前提示词 | 当前生效的完整系统提示词(只读) | | 添加效果(预览) | 草稿应用后的完整提示词(点击「预览效果」后出现) | --- ## 工作原理 ```text settings.yaml HTTP 路由 prompt-persona ──────────────► /_dsh/prompt-persona/settings │ (persona, mode) ▲ ▼ │ GET snapshot / POST previ
Read the full READMERepository license: MIT
dsh-prompt-persona DSH plugin questions
How do I install the prompt-persona plugin?
Run `dsh plugin --profile web add github:xilin3/dsh-prompt-persona` in your terminal, then add `@xilin3/dsh-prompt-persona` to the `dsh.profile.bundles` array in your profile's `package.json`. Finally, run `pnpm install` and restart `dsh web`.
What injection modes are available and how do they work?
Three modes: `replace` (default) replaces the entire deployment:persona section; `append` adds the persona text after the existing one; `off` disables injection entirely. You can switch modes via the dropdown in the settings page.
Can I preview my changes before saving?
Yes. Click the 'Preview Effect' button to see the full assembled system prompt with your draft applied, without saving or affecting the current state. The preview is only visible in the UI.
Why do I get a 'settings-conflict' error when saving?
This error occurs when another user has modified the same settings namespace since you last loaded the page. The plugin uses optimistic concurrency control with a revision number. Reload the page to get the latest revision, then re-apply your changes and save again.
Does the plugin support hot reload?
No. Because this is a frontend/Host plugin, changes to the plugin code or settings require a restart of the `dsh web` process and a browser refresh to take effect.