zangxx66/dsh-prompt-setting

dsh-prompt-setting

DeepSeek Harness 默认 System Prompt 管理插件:在 Web GUI「设置」里浏览、检索并覆盖最终装配进每轮会话的系统提示词。

会话与消息deepseekdeepseek-harnessdeepseek-harness-plugin

dsh-prompt-setting

DSH(DeepSeek Harness)的系统提示词管理插件 —— 在 Web GUI 的「设置」里看得见、写得动、可回滚。
System Prompt management for DSH (DeepSeek Harness) — see it, write it, roll it back, from the Web GUI's Settings.

这是什么 / What it is

问题:DSH 每一轮会话都会注入一段由 @deepseek-ai/dsh-system-prompt 装配出来的基座系统提示词。 想改它,以前只有一条路 —— 去 pnpm 全局 node_modules 里硬改文件:升级就被覆盖、污染全局安装、 改了什么没法回溯,而且根本看不到最终拼出来的 prompt 到底长什么样。

The problem: every DSH turn is injected with a base system prompt assembled by
@deepseek-ai/dsh-system-prompt. The only way to change it used to be hand-editing the global pnpm
node_modules — overwritten by the next upgrade, globally polluted, no record of what changed, and
no way at all to see what the finally assembled prompt looks like.

这个插件把这件事搬进设置页:装配结果按段展开;你自己写的那部分单独成段、稳定排在最后; 其余内置段保持只读。改动有历史、可 diff、可导出 / 导入。全程不碰 DSH 安装包, 配置只写插件自己的数据目录,升级 / 重装 DSH 不会丢。

This plugin moves that into Settings: the assembly is laid out section by section; the text you
write is its own section, pinned to the end; every other built-in section stays read-only. Changes
come with history, diffs and export / import. Nothing in the DSH install is touched —
configuration is written only to the plugin's own data directory, so upgrading or reinstalling DSH
never loses it.

功能 / Features

设置页里会多出一栏 「Prompt settings」(id: prompt-setting),六个一级 tab:

  • 我的 Prompt / My Prompt —— 唯一写入口:写下你自己的系统级指令(选层 → 编辑 → 保存),

一键恢复默认。这段文本排在所有内置段之后。「查看范围」选择器就在这一面板内、标题之下(g-071 起): 它决定保存落到哪一层,改范围也只有这一处(面板内那行只读提示会重复告诉你当前写到哪)。 它只服务这一面板(g-073 起):其余 tab 各自解耦(见下)。 写入目标行下方是只读状态摘要(g-084):两行——最近一个关键节点的装配 / 送达结论,以及 「本层覆盖 N 条 · M 条未生效」;它跟随「查看范围」,全局范围显示「全局(不指定会话)」且不借用任何 会话的记录;「详情」会切到「高级」并把它的作用域同步成当前查看范围会话。摘要里没有装配开关 (开关只在「高级」),也不展开逐条原因。「恢复默认」只删除本层的「我的 Prompt」段,本层其他覆盖 保留;「高级」的「整层重置」才会连「我的 Prompt」一起清空,「清除全部覆盖」则保留它。

The only write surface: your own system-level instructions (pick a layer → edit → save), with a
one-click restore. The text is placed after every built-in section. The "View scope" selector is
inside this panel, under its title (since g-071): it decides which layer a save lands in, and it
is the only place the scope is changed (the panel repeats the current target as a read-only line).
It serves this panel alone (since g-073): every other tab is decoupled from it.
Below the write-target line sits a read-only status summary (g-084): two lines — the latest key
node's assembly / delivery verdicts, and "this layer: N override(s) · M not in effect". It follows
"View scope"; a global scope says "Global (no session)" and borrows no other session's record.
"Details" opens Advanced with its scope pinned to the summary's session. The summary has no
assembly switch (that stays in Advanced) and expands no per-entry reason. "Restore default" deletes
only this layer's My Prompt entry and keeps the layer's other overrides; Advanced's "Reset a whole
layer" clears My Prompt too, while "Clear all overrides" keeps it.
  • 我的预设 / My presets —— 你的常用文本库:把一段文本存成预设(新建 / 编辑 / 删除),再把它**应用到某个

工作区(写入该工作区的保留段),也可以取消应用——该工作区会精确还原为应用前的内容。删除一个 已被应用的预设会先取消它的应用:每个受影响的工作区都还原为应用前的内容,然后预设才从库里删除 (确认浮层会列出这些工作区)。预设库是全局的,不受「查看范围」影响(g-073 起)。 标签**(g-082):预设库有自己的标签集合,可以给一个预设套用 0–N 个标签,并按标签单选筛选; 标签在「管理标签」里新增 / 改名 / 删除,删除前会二次确认并说明将影响多少个预设——删除后这些预设 只是去掉该标签,其余标签与预设本身都保留。

Your catalogue of reusable texts: save a text as a preset (create / edit / delete), then apply it to
a workspace (it is written into that workspace layer's reserved section) or cancel the application,
which restores exactly what that workspace held before. Deleting an applied preset **cancels its
applications first**: every affected workspace is restored to what it held before, and only then is the
preset removed from the library (the confirmation names those workspaces). The library is global and
not affected by the "View scope" (since g-073). Tags (g-082): the library has its own tag
set; a preset may carry 0–N tags and the list filters by one tag at a time. Tags are created,
renamed and deleted under "Manage tags"; a deletion asks first and states how many presets lose
the tag — the presets keep their other tags (and themselves) and only that tag goes.
  • 提示词总览 / Prompt overview —— 纯只读:分段列表(状态标记 / 搜索 / 筛选 / 复制)、完整全文,

以及 base ↔ effective 对比,一眼看出你的改动究竟改变了什么。它有自己的作用域选择器(g-073 起): 按工作区分组、可选到具体会话,切换后按该作用域重新读取快照;页面「查看范围」不再影响它。

Read-only: the assembled section list (status marks / search / filters / copy), the full text, and a
base ↔ effective diff, so you can see exactly what your change did. It has its own scope
selector (since g-073), grouped by workspace and resolving down to a concrete session; changing it
re-reads the snapshot in that scope, and the page's "View scope" no longer affects it.
  • 版本历史 / Version history —— 历史列表(定高内滚 + 翻页,默认每页 50)与行级版本对比。

历史有自己的作用域选择器(工作区维度),与「我的 Prompt」里的「查看范围」互不影响:用户层历史是全局的, 不按会话过滤。

The history list (fixed-height, internally scrolling, paged) and line-level diffs. The log has its
own scope selector (workspace dimension), independent of the "View scope" selector in **My
Prompt**: the user layer's log is global and is never sliced by session.
  • 备份与恢复 / Backup & restore —— 全量备份导出下载(两层全部覆盖含冻结项、全部已注册工作区层、

预设库、偏好设置;不带页面作用域)、导入预览(先看变更计划,确认后才落盘;导入逐项校验格式 / 字段 / 路径,非法即整体拒绝、零写入)。

Export a full backup for download (every override of both layers, every registered workspace layer,
the preset library, the preferences; no page scope involved) and preview an import — the change plan
is shown before anything is written. An import validates the document field by field and refuses a bad
one whole, writing nothing.
  • 高级 / Advanced —— 旧版覆盖的只读列表、「清除全部覆盖」与「整层重置」两个二次确认按钮、

「检查更新」开关(默认开启;关闭后本插件完全不再联网)、「立即更新」(把提示条里的版本 交给宿主安装,装完需要你手动重启:命令行启动就重新运行 dsh web,官方桌面端就退出并重新 打开 DeepSeek Harness),以及完整状态区(挂载情况 / 构建戳 / 渲染器自检)。它有自己的工作区选择器 (g-073 起):两个清除按钮、旧版覆盖列表与装配状态都按所选工作区取数,不再跟随页面「查看范围」; 用户层是全局的(选择器上那句说明写着)。「装配状态提示」的完整块与开关仍只在这里;两个清除按钮的 文案(g-084)写明了删除范围:「整层重置」清空整层包括「我的 Prompt」,「清除全部覆盖」保留 「我的 Prompt」——按钮与请求都没有变化。

A read-only list of legacy overrides, two double-confirm buttons ("clear all overrides", "reset the
whole layer"), the "Check for updates" switch (on by default; off means this plugin makes **no
network request at all), an "Update now"** button (the host installs the version the banner named;
you restart yourself — re-run dsh web after a command-line start, or quit and reopen DeepSeek
Harness in the desktop app), and a full status area (mount state / build fingerprint / renderer
self-check). It has its own workspace selector (since g-073): both clears, the legacy override list
and the assembly status all read the workspace it names, and none of them follows the page's "View
scope" any more; the user layer is global (the sentence under the control says so). The complete
assembly-status block and its switch live here and only here; since g-084 each clear states its scope
in words — "Reset a whole layer" clears the layer including My Prompt, while "Clear all overrides"
keeps it. Neither button nor request changed.
面板顶部是「装配状态提示」(g-062 引入,g-065 起从「我的 Prompt」移到这里):新会话的第一次装配,
以及保存 Prompt 之后的下一个 run,会主动弹 toast 给出两层结论——装配层(本次 assembly 是否读到你的
Prompt)与送达层(该文本是否进入本次请求的 messages);同一条结论也保留在这个面板顶部的提示块里,供回查,
开关也在那里。
它不进入模型上下文、不占 token、不改变模型收到的 prompt;宿主未提供 Toast 组件、或未声明浮层插槽时,
不会注册任何浮层,页面会说明这一降级(data-assembly-toast-seat),功能其余部分不受影响。
口径与边界见 CONTRACT.md §21(例如:HTTP 是否真的发出在插件侧不可观测,本提示不作此声称;
后台标签页的计时器被浏览器节流,因此提示在回到页面时可见,不是实时通道)。