MDAwMg/dsh-user-prompt

MDAwMg★ 0JavaScript最后同步: 2026-08-16

在 GitHub 打开

A DeepSeek Harness (DSH) plugin: edit custom system prompt segments in the Web settings UI, assembled together with the default prompt. Multi-segment, custom order, drag-to-reorder.

README 摘要

dsh-user-prompt A DeepSeek Harness (DSH) plugin for writing your own system prompt segments in the Web settings UI. Each segment is appended to the default system prompt as a separate section; the default prompt itself is never modified. Supports multiple segments, custom order values, titles, drag-to-reorder and collapsible editors. 一个 DeepSeek Harness 插件,让你在 Web 设置界面里写自己的「自定义系统提示词」。写好的每段会作为独立段落,和 DSH 的默认系统提示词拼在一起发给模型,默认内容一点不动。 结构 文件 角色 lib/index.js 宿主半侧:注册 user-prompt settings 命名空间;把每段设置值作为 {{user prompt text N}} 提示词变量,贡献为 user:prompt 系统提示词段(默认 order 50,位于 persona 之后、工具引导之前) lib/client.js 浏览器半侧:在设置页注册「自定义提示词」分区( settings.section slot),文本域绑定 user-prompt 命名空间 package.json dsh.client 清单声明浏览器注入依赖 工作原理 - 用户文本走提示词变量( {{user prompt text N}} )注入,不走内联段落文本,所以文本里写 {{...}} 不会被当成提示词变量解析(renderPrompt 对替换值不再扫描)。 - 设置一改( scope.watch ),插件先卸掉旧段落再注册新段落,之后的模型请求立刻用上新内容。 - 关掉「启用」或清空文本,就不注册段落,系统提示词回到默认。 界面功能 设置页里每段提示词有独立的启用开关、顺序号和可折叠的文本编辑区,想加几段加几段。 单击段标题(或按 Enter/Space)会变成输入框,可以给段落起个自定义标题;Enter 或失焦提交,Esc 取消。标题留空就显示「提示词段 N」。标题只在界面上看,不会进系统提示词。 顺序号旁边有个 ⓘ,悬停(或键盘聚焦)会弹出各顺序区间的用途:-100 以下身份区(勿用)、-100 身份、-98 Web 表面层、0 人格、50 用户自定义(默认)、100–199 工具引导。 每段的展开/收起状态存在浏览器 localStorage 里,关掉设置页再打开,布局还在(首次默认展开第一段)。 段首的 ⠿ 把手…

在 GitHub 查看完整 README →
工具/开发cordisdeepseek-harnessdshdsh-plugin

分类