@user-mrz/dsh-system-prompt-studio 0.1.9 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +68 -1
- package/README.md +43 -9
- package/lib/client.js +129 -0
- package/lib/index.js +5 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -12,6 +12,71 @@ integration still targets the same DSH shapes, a major bump means it may not.
|
|
|
12
12
|
|
|
13
13
|
Nothing yet.
|
|
14
14
|
|
|
15
|
+
## [0.2.1] — 2026-11-12
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
|
|
19
|
+
- **The section-order table was one DSH release behind.** DSH `0.2.2-rc.2` added two entries to
|
|
20
|
+
`SECTION_ORDERS`: `TOOL_PTY_PANEL` (1710) and `TOOL_COMPUTER_USE` (3000). Neither was in this plugin's
|
|
21
|
+
hardcoded copy, so they were treated as unknown sections and given an interpolated order from their
|
|
22
|
+
neighbours. Nothing failed, but "Replace a section" could not select them and the panel's order column
|
|
23
|
+
drifted for them. Both are now recorded under the names they actually assemble as: `tool:pty-panel`
|
|
24
|
+
(registered by `dsh-terminal-panel`) and `computer-use:dsh-cua` (registered by `dsh-cua`).
|
|
25
|
+
|
|
26
|
+
- **The section listing behind "Replace everything" misjudged plugin sections in both directions.** It
|
|
27
|
+
decided ownership from a name prefix, which was wrong twice over. `dsh-m` registers its section as
|
|
28
|
+
`tool:dshm`, which looks first-party and was silently counted as such; `dsh-cua`'s
|
|
29
|
+
`computer-use:dsh-cua` does not start with a first-party prefix and would have been counted as a
|
|
30
|
+
plugin. The check is now a whitelist of the section names first-party packages actually register, so
|
|
31
|
+
anything not on it is reported as a plugin's. That errs toward over-reporting, which is the safe
|
|
32
|
+
direction: a user is sent to read the list, rather than having a plugin's silent failure hidden from
|
|
33
|
+
them. On a profile running `dsh-m`, the count now correctly includes `tool:dshm`.
|
|
34
|
+
|
|
35
|
+
### Changed
|
|
36
|
+
|
|
37
|
+
- Four new host checks pin the two `rc.2` order constants and their position relative to their
|
|
38
|
+
neighbours; five new client checks pin the whitelist, including that neither `tool:dshm` nor
|
|
39
|
+
`computer-use:dsh-cua` is on it.
|
|
40
|
+
|
|
41
|
+
### Note
|
|
42
|
+
|
|
43
|
+
No DSH surface this plugin uses changed shape in `0.2.2-rc.2`: `system-prompt/assemble` keeps its
|
|
44
|
+
`(assembly, context, next)` waterfall signature, `systemPrompt.section()` and the `PromptSection` fields
|
|
45
|
+
are unchanged, and the `agents` / `sessions` / `webServer` services are as before. The two order
|
|
46
|
+
constants were the only drift. `engines.dsh` still reads `>=0.2.2-0 <0.3.0-0`, which already admits
|
|
47
|
+
`0.2.2-rc.2`; no dependency range changed.
|
|
48
|
+
|
|
49
|
+
## [0.2.0] — 2026-11-10
|
|
50
|
+
|
|
51
|
+
### Added
|
|
52
|
+
|
|
53
|
+
- **"Replace everything" now lists what it will drop.** The panel already held the real assembled
|
|
54
|
+
section list, so "you are about to lose the first-party prompt" was a warning about something it could
|
|
55
|
+
actually enumerate. It now shows every section that will be discarded, with its character count, folds
|
|
56
|
+
the list after 24 entries, and calls out separately how many of those sections belong to **other
|
|
57
|
+
plugins**. That last number is the one that matters: a plugin's tool schema survives a `complete`
|
|
58
|
+
override, but the prose telling the model when and how to call it does not, so the tool stays installed
|
|
59
|
+
and unused with no error anywhere. It reads as "the model got dumber", never as "I turned a mode on".
|
|
60
|
+
- When the conversation has not assembled a prompt yet, the panel says it cannot list the sections
|
|
61
|
+
rather than inventing a count.
|
|
62
|
+
- Nine structural checks cover the new computation, including that it excludes the plugin's own
|
|
63
|
+
sections, that it folds past 24 entries, and that a disabled `allowComplete` suppresses the list
|
|
64
|
+
entirely.
|
|
65
|
+
|
|
66
|
+
### Changed
|
|
67
|
+
|
|
68
|
+
- The README's "Replace everything" warning now leads with the cross-plugin damage rather than only the
|
|
69
|
+
first-party guidance, documents the new per-section listing, and recommends `allowComplete: false` for
|
|
70
|
+
any profile running plugins that contribute prompt sections. Both languages updated, and the config
|
|
71
|
+
table marks that recommendation.
|
|
72
|
+
|
|
73
|
+
### Note
|
|
74
|
+
|
|
75
|
+
`allowComplete` still defaults to `true` in the plugin's own patch. This release adds information and
|
|
76
|
+
documentation, not a behaviour change: existing users keep the mode unless they turn it off. The
|
|
77
|
+
recommendation is in the README because whether to keep a whole-prompt override is the profile owner's
|
|
78
|
+
call, and silently removing a documented mode from under them would be worse than the risk it avoids.
|
|
79
|
+
|
|
15
80
|
## [0.1.9] — 2026-11-10
|
|
16
81
|
|
|
17
82
|
### Changed
|
|
@@ -166,7 +231,9 @@ scoped name unambiguous for anyone who arrives from GitHub.
|
|
|
166
231
|
- Read-only assembly observer listing the real section names, order and size.
|
|
167
232
|
- Loopback-only HTTP route for the panel; forged `Host` headers are refused.
|
|
168
233
|
|
|
169
|
-
[Unreleased]: https://github.com/user-Mrz/dsh-system-prompt-studio/compare/v0.1
|
|
234
|
+
[Unreleased]: https://github.com/user-Mrz/dsh-system-prompt-studio/compare/v0.2.1...HEAD
|
|
235
|
+
[0.2.1]: https://github.com/user-Mrz/dsh-system-prompt-studio/compare/v0.2.0...v0.2.1
|
|
236
|
+
[0.2.0]: https://github.com/user-Mrz/dsh-system-prompt-studio/compare/v0.1.9...v0.2.0
|
|
170
237
|
[0.1.9]: https://github.com/user-Mrz/dsh-system-prompt-studio/compare/v0.1.8...v0.1.9
|
|
171
238
|
[0.1.8]: https://github.com/user-Mrz/dsh-system-prompt-studio/compare/v0.1.7...v0.1.8
|
|
172
239
|
[0.1.7]: https://github.com/user-Mrz/dsh-system-prompt-studio/compare/v0.1.6...v0.1.7
|
package/README.md
CHANGED
|
@@ -31,7 +31,7 @@ session, effective immediately.
|
|
|
31
31
|
|---|---|
|
|
32
32
|
| **Append** (default) | Keeps every first-party section, adds yours at the end. Safest. |
|
|
33
33
|
| **Replace a section** | Shadows one named first-party section, e.g. `deployment:persona-suffix`. |
|
|
34
|
-
| **Replace everything** | Your text becomes the entire system prompt. Highest risk — see below. |
|
|
34
|
+
| **Replace everything** | Your text becomes the entire system prompt. Highest risk: drops first-party guidance **and every other plugin's sections** — see below. |
|
|
35
35
|
|
|
36
36
|
- **Applies on the next model request.** No restart, no reload.
|
|
37
37
|
- **Persists per session**, and a **global default** applies to new conversations automatically.
|
|
@@ -46,8 +46,26 @@ That mode removes **all** first-party guidance — tool instructions, structured
|
|
|
46
46
|
policy. Tool-calling quality can drop noticeably. Runtime context (working directory, sandbox policy,
|
|
47
47
|
approval policy) is still sent as a user-side snapshot and is **not** replaced by your text.
|
|
48
48
|
|
|
49
|
+
**It also removes every section other plugins registered.** This is the part that bites quietly. A
|
|
50
|
+
plugin's tool schema still ships, but the prose that tells the model *when and how* to call it is gone,
|
|
51
|
+
so the tool stays installed and unused — and nothing errors. The failure looks like "the model got
|
|
52
|
+
dumber", not like "I turned something off". If you run a plugin that registers prompt sections
|
|
53
|
+
(`plugin:ssh`, `plugin:task-board`, `team:policy`, and so on), Replace everything disables all of them
|
|
54
|
+
at once for that conversation.
|
|
55
|
+
|
|
56
|
+
The panel lists exactly what will be dropped before you save: every section name with its character
|
|
57
|
+
count, plus a separate line naming how many of them belong to other plugins. If the conversation has
|
|
58
|
+
not assembled a prompt yet, it says it cannot list them rather than guessing.
|
|
59
|
+
|
|
60
|
+
**Consider turning the mode off entirely.** Set `allowComplete: false` in the plugin row's config and
|
|
61
|
+
the mode becomes unavailable — the panel greys it out, and saving one is rejected with
|
|
62
|
+
`COMPLETE_BLOCKED`. Any `complete` override already in the state file stops applying and the prompt
|
|
63
|
+
falls back to the first-party default (the data is kept, not deleted). This is the recommended setting
|
|
64
|
+
for any profile running third-party plugins that contribute prompt sections.
|
|
65
|
+
|
|
49
66
|
Also: assembly allows only one active `complete` section. If another plugin registers one in the same
|
|
50
|
-
session, assembly fails with `multiple complete prompt sections
|
|
67
|
+
session, assembly fails with `multiple complete prompt sections` — and then **every** model request in
|
|
68
|
+
that conversation fails, while the user only sees "request failed". Switch back to Append or Replace to
|
|
51
69
|
recover.
|
|
52
70
|
|
|
53
71
|
---
|
|
@@ -71,7 +89,7 @@ dsh plugin --profile <profile> add @user-mrz/dsh-system-prompt-studio
|
|
|
71
89
|
From GitHub, which tracks the default branch and therefore needs a ref if you want a fixed version:
|
|
72
90
|
|
|
73
91
|
```bash
|
|
74
|
-
dsh plugin --profile <profile> add github:user-Mrz/dsh-system-prompt-studio#v0.1
|
|
92
|
+
dsh plugin --profile <profile> add github:user-Mrz/dsh-system-prompt-studio#v0.2.1
|
|
75
93
|
```
|
|
76
94
|
|
|
77
95
|
Replace `<profile>` with your profile name — for the Web build that is usually `web`.
|
|
@@ -80,7 +98,7 @@ Replace `<profile>` with your profile name — for the Web build that is usually
|
|
|
80
98
|
changes what you install next time:
|
|
81
99
|
|
|
82
100
|
```bash
|
|
83
|
-
dsh plugin --profile <profile> add @user-mrz/dsh-system-prompt-studio@0.1
|
|
101
|
+
dsh plugin --profile <profile> add @user-mrz/dsh-system-prompt-studio@0.2.1
|
|
84
102
|
```
|
|
85
103
|
|
|
86
104
|
<details>
|
|
@@ -215,7 +233,7 @@ Edit the row in `cordis.patch.yml` or override it in your profile patch. The mos
|
|
|
215
233
|
|---|---|---|
|
|
216
234
|
| `enabled` | `true` | Master switch; when off, no section is registered and the API reports why |
|
|
217
235
|
| `defaultMode` | `append` | Mode used by the global default |
|
|
218
|
-
| `allowComplete` | `true` | Set `false` to disable "replace everything" entirely |
|
|
236
|
+
| `allowComplete` | `true` | Set `false` to disable "replace everything" entirely. **Recommended when other plugins register prompt sections** — see the warning above. |
|
|
219
237
|
| `appendOrder` | `10500` | Sort order of the appended section, clamped to `[10201, 20000]` |
|
|
220
238
|
| `maxChars` | `200000` | Max body length; oversize is **rejected**, never truncated |
|
|
221
239
|
| `globalDefaultScope` | `roots` | Whether the global default also applies to subagents (`all` to include) |
|
|
@@ -324,8 +342,24 @@ DSH 本身只提供配置文件级的人设前后缀:改一次要重启,且
|
|
|
324
342
|
|
|
325
343
|
**⚠️ 关于「完全替换」**:它会移除第一方的全部指引(工具使用说明、结构化输出规则、计划模式策略),
|
|
326
344
|
工具调用质量可能明显下降。运行时上下文(工作目录 / 沙箱 / 审批策略)仍会作为用户侧快照发送,
|
|
327
|
-
|
|
328
|
-
|
|
345
|
+
不会被你的文本替换。
|
|
346
|
+
|
|
347
|
+
**它同时会移除其它插件注册的全部段落,这一点最容易在不知不觉中出问题。** 插件的工具 schema 还在,
|
|
348
|
+
但告诉模型「何时调用、怎么调用」的那段说明没了,于是工具装着却用不上,而且不报任何错——看起来像
|
|
349
|
+
「模型变笨了」,而不是「我关掉了什么」。如果你装了会注册提示词段的插件(`plugin:ssh`、
|
|
350
|
+
`plugin:task-board`、`team:policy` 之类),「完全替换」会把它们在该对话里一次性全部停用。
|
|
351
|
+
|
|
352
|
+
面板在保存前会逐条列出到底会丢掉什么:每个段名与字符数,并单独点明其中有多少个属于其它插件。
|
|
353
|
+
若该对话还没装配过提示词,面板会如实说无法列举,而不是猜一个数字。
|
|
354
|
+
|
|
355
|
+
**建议直接把这个模式关掉。** 在插件那一行的配置里设 `allowComplete: false`,该模式即不可用——
|
|
356
|
+
面板会把选项置灰,强行保存会被 `COMPLETE_BLOCKED` 拒绝。状态文件里已有的 `complete` 覆盖会停止
|
|
357
|
+
生效,提示词回到第一方默认(数据保留,不删除)。**只要 profile 里装了会贡献提示词段的第三方插件,
|
|
358
|
+
就推荐这么设。**
|
|
359
|
+
|
|
360
|
+
另外装配只允许一个生效的 `complete` 段,若同会话内有别的插件也注册了一个,装配会报
|
|
361
|
+
`multiple complete prompt sections` —— 那时该对话的**每一次**模型请求都会失败,而用户只会看到
|
|
362
|
+
「请求失败」。改回「追加」或「替换」即可恢复。
|
|
329
363
|
|
|
330
364
|
**安装**
|
|
331
365
|
|
|
@@ -343,13 +377,13 @@ dsh plugin --profile <profile> add @user-mrz/dsh-system-prompt-studio
|
|
|
343
377
|
或从 GitHub(跟随默认分支,建议锁 tag):
|
|
344
378
|
|
|
345
379
|
```bash
|
|
346
|
-
dsh plugin --profile <profile> add github:user-Mrz/dsh-system-prompt-studio#v0.1
|
|
380
|
+
dsh plugin --profile <profile> add github:user-Mrz/dsh-system-prompt-studio#v0.2.1
|
|
347
381
|
```
|
|
348
382
|
|
|
349
383
|
锁定版本,保证装到的是一份确定的代码:
|
|
350
384
|
|
|
351
385
|
```bash
|
|
352
|
-
dsh plugin --profile <profile> add @user-mrz/dsh-system-prompt-studio@0.1
|
|
386
|
+
dsh plugin --profile <profile> add @user-mrz/dsh-system-prompt-studio@0.2.1
|
|
353
387
|
```
|
|
354
388
|
|
|
355
389
|
`prepare` 脚本只校验入口文件存在,不做编译。若被 pnpm 拦下,把 `pnpm-workspace.yaml` 里
|
package/lib/client.js
CHANGED
|
@@ -56,6 +56,11 @@ window.__ModuleLoader__.load({
|
|
|
56
56
|
modeCompleteHint: '只发你写的内容。第一方的工具使用说明、结构化输出指引等提示词全部消失,可能明显影响工具调用质量。',
|
|
57
57
|
modeCompleteRisk: '运行时上下文(工作目录 / 沙箱 / 审批策略)仍会随请求发送,不会被这段替换。',
|
|
58
58
|
modeCompleteAck: '我已了解:这会丢掉第一方全部提示词',
|
|
59
|
+
completeDrops: '本次会丢弃以下段(共 {n} 个,{chars} 字符):',
|
|
60
|
+
completeDropsMore: '…以及另外 {n} 个段',
|
|
61
|
+
completeDropsUnknown: '该对话还没有装配过提示词,所以现在无法列出会被丢弃的段。发一条消息后再打开这里,就能看到真实清单。',
|
|
62
|
+
completeDropsPlugins: '注意:其中包含其它插件注册的段({n} 个)。丢掉它们之后,那些插件的工具会「装着但模型不知道该怎么用」。',
|
|
63
|
+
completeDropAll: '全部丢弃',
|
|
59
64
|
target: '目标段',
|
|
60
65
|
targetHint: '该对话跑过请求后,下拉框就是真实段名;手动填不存在的段名会变成新增段。',
|
|
61
66
|
body: '正文',
|
|
@@ -118,6 +123,11 @@ window.__ModuleLoader__.load({
|
|
|
118
123
|
modeCompleteHint: 'Only your text is sent. First-party guidance such as tool instructions and structured-output rules disappears, which can degrade tool use.',
|
|
119
124
|
modeCompleteRisk: 'Runtime context (working directory, sandbox, approval policy) is still sent as a user-side snapshot.',
|
|
120
125
|
modeCompleteAck: 'I understand this drops every first-party prompt.',
|
|
126
|
+
completeDrops: 'This will drop these sections ({n} of them, {chars} characters):',
|
|
127
|
+
completeDropsMore: '…and {n} more section(s)',
|
|
128
|
+
completeDropsUnknown: 'This conversation has not assembled a prompt yet, so the sections that would be dropped cannot be listed. Send a message, then reopen this panel to see the real list.',
|
|
129
|
+
completeDropsPlugins: 'Note: {n} of them are registered by other plugins. Dropping those leaves their tools installed but unexplained, so the model will not know how to call them.',
|
|
130
|
+
completeDropAll: 'Drop all',
|
|
121
131
|
target: 'Target section',
|
|
122
132
|
targetHint: 'After this conversation has run a request, the list holds real section names.',
|
|
123
133
|
body: 'Body',
|
|
@@ -580,6 +590,77 @@ window.__ModuleLoader__.load({
|
|
|
580
590
|
const disabled = blocked.off || blocked.noService || blocked.noAgents || busy
|
|
581
591
|
const completeOk = !blocked.complete && (mode !== 'complete' || ack)
|
|
582
592
|
|
|
593
|
+
/**
|
|
594
|
+
* 「完全替换」会丢掉的段:清单里除了 studio 自己那条以外的全部。
|
|
595
|
+
*
|
|
596
|
+
* 之所以算得出来而不只是警告:面板本来就持有真实装配清单(sections),
|
|
597
|
+
* 所以「你会丢掉什么」不是修辞,是这一屏就能列出来的事实。之前只有一个
|
|
598
|
+
* 通用勾选框,用户点下去并不知道自己损失的是 3 段还是 20 段,更不知道
|
|
599
|
+
* 里面有没有别的插件注册的段 —— 那些插件会「装着但模型不知道怎么用」。
|
|
600
|
+
*
|
|
601
|
+
* sections 为 null 表示这个对话还没装配过(冷会话),此时如实说明无法列举,
|
|
602
|
+
* 而不是编一个数字出来。
|
|
603
|
+
*/
|
|
604
|
+
const droppedSections = (() => {
|
|
605
|
+
if (mode !== 'complete' || !Array.isArray(sections)) return null
|
|
606
|
+
// 自己注册的段不算「丢掉的第一方内容」,它正是用户要保留的那一段。
|
|
607
|
+
const own = new Set(['studio:complete', 'studio:append'])
|
|
608
|
+
const kept = sections.filter((row) => own.has(row.name))
|
|
609
|
+
const dropped = sections.filter((row) => !own.has(row.name))
|
|
610
|
+
const chars = dropped.reduce((sum, row) => sum + (typeof row.chars === 'number' ? row.chars : 0), 0)
|
|
611
|
+
/**
|
|
612
|
+
* 第三方插件注册的段。
|
|
613
|
+
*
|
|
614
|
+
* 用**前缀白名单**而不是「非第一方即插件」的反向判定:反向判定会把所有
|
|
615
|
+
* 没见过的名字都算成插件,而第一方段的命名空间并不是全封闭的 ——
|
|
616
|
+
* 0.2.2-rc.2 的 dsh-cua 就注册了一个 `computer-use:dsh-cua`,它不是
|
|
617
|
+
* `tool:` 前缀却属于第一方随包发布的插件。反过来,`tool:` 前缀也不保证
|
|
618
|
+
* 第一方:dsh-m 就把自己的段注册成 `tool:dshm`。
|
|
619
|
+
*
|
|
620
|
+
* 所以这里只认「确实是第一方内置包注册的段名」这份白名单,其余一律
|
|
621
|
+
* 计入插件侧 —— 宁可多报一个(提示用户去看清单),也不要漏报一个让
|
|
622
|
+
* 插件静默失效。
|
|
623
|
+
*/
|
|
624
|
+
const FIRST_PARTY = new Set([
|
|
625
|
+
'harness:identity',
|
|
626
|
+
'harness:source',
|
|
627
|
+
'deployment:persona-prefix',
|
|
628
|
+
'deployment:persona-suffix',
|
|
629
|
+
'plan:policy',
|
|
630
|
+
'team:policy',
|
|
631
|
+
'ptc:only',
|
|
632
|
+
'context:file-reference',
|
|
633
|
+
'tool:bash',
|
|
634
|
+
'tool:pwsh',
|
|
635
|
+
'tool:read',
|
|
636
|
+
'tool:write',
|
|
637
|
+
'tool:edit',
|
|
638
|
+
'tool:apply_patch',
|
|
639
|
+
'tool:glob',
|
|
640
|
+
'tool:grep',
|
|
641
|
+
'tool:jobs',
|
|
642
|
+
'tool:pty',
|
|
643
|
+
'tool:web_search',
|
|
644
|
+
'tool:web_fetch',
|
|
645
|
+
'tool:lsp',
|
|
646
|
+
'tool:session_query',
|
|
647
|
+
'tool:goal',
|
|
648
|
+
'tool:schedule',
|
|
649
|
+
'tool:workflow',
|
|
650
|
+
'tool:ralph',
|
|
651
|
+
'tool:subagent',
|
|
652
|
+
'tool:subagent_fork',
|
|
653
|
+
'tool:report',
|
|
654
|
+
'mcp-resource-servers',
|
|
655
|
+
'tools:sdk',
|
|
656
|
+
'ui:deliverable-file-references',
|
|
657
|
+
'structured-output',
|
|
658
|
+
'app:web-surface',
|
|
659
|
+
])
|
|
660
|
+
const plugins = dropped.filter((row) => !FIRST_PARTY.has(String(row.name ?? '')))
|
|
661
|
+
return { dropped, chars, plugins, kept }
|
|
662
|
+
})()
|
|
663
|
+
|
|
583
664
|
const onSave = async () => {
|
|
584
665
|
if (text.trim() === '' && enabled) {
|
|
585
666
|
setNotice({ kind: 'error', text: t('emptyText') })
|
|
@@ -818,6 +899,54 @@ window.__ModuleLoader__.load({
|
|
|
818
899
|
'div',
|
|
819
900
|
{ key: 'risk', style: { display: 'flex', flexDirection: 'column', gap: 8 } },
|
|
820
901
|
h('div', { 'data-sps': 'warn' }, t('modeCompleteRisk')),
|
|
902
|
+
|
|
903
|
+
// 会丢掉哪些段:清单可读时逐条列出,读不到时如实说无法列举。
|
|
904
|
+
blocked.complete
|
|
905
|
+
? null
|
|
906
|
+
: h(
|
|
907
|
+
'div',
|
|
908
|
+
{ 'data-sps': 'drops', style: { display: 'flex', flexDirection: 'column', gap: 4 } },
|
|
909
|
+
droppedSections === null
|
|
910
|
+
? h('div', { 'data-sps': 'muted' }, t('completeDropsUnknown'))
|
|
911
|
+
: h(
|
|
912
|
+
'div',
|
|
913
|
+
null,
|
|
914
|
+
h(
|
|
915
|
+
'div',
|
|
916
|
+
{ 'data-sps': 'warn' },
|
|
917
|
+
t('completeDrops')
|
|
918
|
+
.replace('{n}', String(droppedSections.dropped.length))
|
|
919
|
+
.replace('{chars}', String(droppedSections.chars)),
|
|
920
|
+
),
|
|
921
|
+
h(
|
|
922
|
+
'ul',
|
|
923
|
+
{ 'data-sps': 'droplist', style: { margin: '4px 0 0', paddingLeft: 18, maxHeight: 140, overflowY: 'auto' } },
|
|
924
|
+
droppedSections.dropped.slice(0, 24).map((row) =>
|
|
925
|
+
h(
|
|
926
|
+
'li',
|
|
927
|
+
{ key: row.name, 'data-sps': 'dropitem' },
|
|
928
|
+
`${row.name} · ${row.chars}`,
|
|
929
|
+
),
|
|
930
|
+
),
|
|
931
|
+
droppedSections.dropped.length > 24
|
|
932
|
+
? h(
|
|
933
|
+
'li',
|
|
934
|
+
{ key: '__more', 'data-sps': 'dropmore' },
|
|
935
|
+
t('completeDropsMore').replace('{n}', String(droppedSections.dropped.length - 24)),
|
|
936
|
+
)
|
|
937
|
+
: null,
|
|
938
|
+
),
|
|
939
|
+
// 第三方插件的段被丢掉,是「装了却用不上」的来源,单独点名。
|
|
940
|
+
droppedSections.plugins.length > 0
|
|
941
|
+
? h(
|
|
942
|
+
'div',
|
|
943
|
+
{ 'data-sps': 'error', style: { marginTop: 4 } },
|
|
944
|
+
t('completeDropsPlugins').replace('{n}', String(droppedSections.plugins.length)),
|
|
945
|
+
)
|
|
946
|
+
: null,
|
|
947
|
+
),
|
|
948
|
+
),
|
|
949
|
+
|
|
821
950
|
blocked.complete
|
|
822
951
|
? h('div', { 'data-sps': 'error' }, t('completeBlocked'))
|
|
823
952
|
: h(
|
package/lib/index.js
CHANGED
|
@@ -67,6 +67,8 @@ const KNOWN_ORDERS = {
|
|
|
67
67
|
'tool:grep': 1500,
|
|
68
68
|
'tool:jobs': 1600,
|
|
69
69
|
'tool:pty': 1700,
|
|
70
|
+
// 0.2.2-rc.2 新增:dsh-terminal-panel 注册的终端面板段,紧跟在 tool:pty 之后。
|
|
71
|
+
'tool:pty-panel': 1710,
|
|
70
72
|
'tool:web_search': 2000,
|
|
71
73
|
'tool:web_fetch': 2100,
|
|
72
74
|
'tool:lsp': 2200,
|
|
@@ -77,6 +79,9 @@ const KNOWN_ORDERS = {
|
|
|
77
79
|
'tool:ralph': 2700,
|
|
78
80
|
'tool:subagent': 2800,
|
|
79
81
|
'tool:report': 2900,
|
|
82
|
+
// 0.2.2-rc.2 新增:dsh-cua 注册的段名是 `computer-use:dsh-cua`,不是 `tool:` 前缀,
|
|
83
|
+
// 所以第一方前缀判定认不出它;顺序常量仍按官方的 TOOL_COMPUTER_USE = 3000。
|
|
84
|
+
'computer-use:dsh-cua': 3000,
|
|
80
85
|
'mcp-resource-servers': 3100,
|
|
81
86
|
'tools:sdk': 5000,
|
|
82
87
|
'ui:deliverable-file-references': 9000,
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@user-mrz/dsh-system-prompt-studio",
|
|
3
3
|
"displayName": "System prompt studio",
|
|
4
4
|
"description": "Per-conversation system prompt control for DeepSeek Harness: append a section, shadow-replace one named section, or replace the whole prompt. Applies on the next model request, persists per session, and inherits along fork lineage.",
|
|
5
|
-
"version": "0.1
|
|
5
|
+
"version": "0.2.1",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "lib/index.js",
|
|
8
8
|
"exports": {
|