dsh-custom-mode 1.12.0 → 1.12.2

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/README.i18n.yaml CHANGED
@@ -1,5 +1,5 @@
1
1
  # 双语配对一致性记录:两侧在「上次确认一致」时的 git blob 哈希。
2
2
  # 两份文档权威相同——改完任意一侧,请把另一侧也改掉,然后重新记录:
3
3
  # node tools/verify-translation-pairing.mjs --write
4
- README.md: 242356173df2a98b55e929f18ffa0d2505c51d3e
5
- README.zh.md: 0bae340a594f7de448cbafe5c583a58fcebeb5f8
4
+ README.md: 3f1f06f1d3b0f1778291d8807a8d70d1002d00e9
5
+ README.zh.md: 6894c1478969a6bb5b04bb7a7675c06d6ea8395b
package/README.md CHANGED
@@ -9,11 +9,8 @@ role-play). · **中文**:DeepSeek Harness(dsh)自定义模式插件 —
9
9
 
10
10
  ![dsh-custom-mode — a settings page for dsh agent modes](https://raw.githubusercontent.com/BOWLUNA/dsh-custom-mode/main/docs/images/header.png)
11
11
 
12
- <!-- community badge row: required in every new repository (see the storefront template in the operator SOP/DSH Plugins folder) -->
13
-
14
12
  [![Star this repo](https://img.shields.io/badge/Star-this%20repo-1f2430?style=flat-square&logo=github&logoColor=white&labelColor=1f2430)](https://github.com/BOWLUNA/dsh-custom-mode/stargazers) [![npm](https://img.shields.io/npm/v/dsh-custom-mode?label=npm&style=flat-square&logo=npm&logoColor=white&labelColor=1f2430)](https://www.npmjs.com/package/dsh-custom-mode) [![CI](https://img.shields.io/github/actions/workflow/status/BOWLUNA/dsh-custom-mode/test.yml?label=CI&style=flat-square&logo=githubactions&logoColor=white&labelColor=1f2430)](https://github.com/BOWLUNA/dsh-custom-mode/actions/workflows/test.yml) [![license](https://img.shields.io/badge/license-MIT-97ca00?style=flat-square&logo=opensourceinitiative&logoColor=white&labelColor=1f2430)](LICENSE) [![dsh](https://img.shields.io/badge/dsh-%E2%89%A50.1.5--rc.2-4d6bfe?style=flat-square&logo=deepseek&logoColor=white&labelColor=1f2430)](https://github.com/BOWLUNA/dsh-custom-mode#readme)
15
13
 
16
- <!-- badge rows: same two-part structure (dark label + coloured value) in both rows; every new repo copies this block -->
17
14
  [![bilibili](https://img.shields.io/badge/bilibili-videos-%2300A1D6?style=flat-square&logo=bilibili&logoColor=white&labelColor=1f2430)](https://b23.tv/qJ4Ev0W) [![Douyin](https://img.shields.io/badge/Douyin-shorts-%23FE2C55?style=flat-square&logo=tiktok&logoColor=white&labelColor=1f2430)](https://v.douyin.com/VWh0M03Fa4Y/) [![RedNote](https://img.shields.io/badge/RedNote-notes-%23FF2442?style=flat-square&logo=xiaohongshu&logoColor=white&labelColor=1f2430)](https://xhslink.cn/o/A7QtXmePBBF) [![Discord](https://img.shields.io/badge/Discord-chat-%235865F2?style=flat-square&logo=discord&logoColor=white&labelColor=1f2430)](https://discord.gg/pz97SfAfSy) [![GitHub](https://img.shields.io/github/discussions/BOWLUNA/dsh-custom-mode?label=GitHub&style=flat-square&logo=github&logoColor=white&labelColor=1f2430)](https://github.com/BOWLUNA/dsh-custom-mode/discussions)
18
15
 
19
16
  A custom mode for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (dsh). Its
@@ -40,16 +37,18 @@ range, but they no longer get a CI leg of their own.
40
37
 
41
38
  The four official modes (`standard` / `ptc` / `minimal` / `cordis`) are untouched.
42
39
 
43
- | | |
44
- | --- | --- |
45
- | ![Mode name and base mode](https://raw.githubusercontent.com/BOWLUNA/dsh-custom-mode/main/docs/images/01-mode-switch.png) | ![Plugin switches](https://raw.githubusercontent.com/BOWLUNA/dsh-custom-mode/main/docs/images/02-plugin-switches.png) |
46
- | ![System prompt](https://raw.githubusercontent.com/BOWLUNA/dsh-custom-mode/main/docs/images/03-system-prompt.png) | ![Mode picker](https://raw.githubusercontent.com/BOWLUNA/dsh-custom-mode/main/docs/images/04-preset-picker.png) |
40
+ <p align="center">
41
+ <img src="https://raw.githubusercontent.com/BOWLUNA/dsh-custom-mode/main/docs/images/01-mode-switch.png" width="360" alt="Base mode and plugin switches">
42
+ <img src="https://raw.githubusercontent.com/BOWLUNA/dsh-custom-mode/main/docs/images/02-plugin-switches.png" width="360" alt="Plugin switches"><br>
43
+ <img src="https://raw.githubusercontent.com/BOWLUNA/dsh-custom-mode/main/docs/images/03-system-prompt.png" width="360" alt="System prompt">
44
+ <img src="https://raw.githubusercontent.com/BOWLUNA/dsh-custom-mode/main/docs/images/04-preset-picker.png" width="360" alt="Mode picker">
45
+ </p>
47
46
 
48
- The assistant manager, cropped to its own section. All five images are English, **all exactly 800x800**, and
49
- shot on a throwaway `DSH_HOME` with no sessions by `tools/screenshots/shoot-fresh.mjs` (the rendered page
50
- is what `tools/browser-verify.mjs` checks):
47
+ <p align="center">
48
+ <img src="https://raw.githubusercontent.com/BOWLUNA/dsh-custom-mode/main/docs/images/05-assistant-manager.png" width="360" alt="Assistants">
49
+ </p>
51
50
 
52
- ![Assistant manager](https://raw.githubusercontent.com/BOWLUNA/dsh-custom-mode/main/docs/images/05-assistant-manager.png)
51
+ The four views above are one 2×2 set. The assistant manager sits on its own, centered. Every file is English and exactly 800×800, shot on a throwaway `DSH_HOME` with no sessions.
53
52
 
54
53
  ## Install
55
54
 
@@ -57,7 +56,7 @@ One command installs everything — the settings-page plugin, and the preset it
57
56
  activation:
58
57
 
59
58
  ```sh
60
- dsh plugin --profile web add dsh-custom-mode@1.12.0 # pin the version to get this one for sure
59
+ dsh plugin --profile web add dsh-custom-mode@1.12.2 # pin the version to get this one for sure
61
60
  # A bare `add dsh-custom-mode` is subject to pnpm's release cooldown (`minimumReleaseAge`, 1 day by
62
61
  # default): for hours after a release it can silently install an OLDER version — measured: a bare
63
62
  # install 38 minutes after 1.3.0 shipped landed on 1.0.3. Check what you got with `npm ls
@@ -317,15 +316,8 @@ version CI installs and tests falls inside those ranges.
317
316
  point at since 2026-09-29, and the line the desktop app ships), the newest preview line
318
317
  (`0.2.1-alpha.1`, which npm's `alpha` points at) and the previous stable (`0.1.7-rc.2` — still inside
319
318
  the declared range, and what most existing installs run)** — declared as
320
- `>=0.1.5-rc.2 <0.2.0-0 || >=0.1.6-alpha.1 <0.2.0-0 || >=0.1.7-alpha.1 <0.2.0-0 || >=0.2.0-0 <0.3.0-0 || >=0.2.1-alpha.1 <0.3.0-0` (the extra clauses exist because
321
- semver only matches a pre-release inside a range that names its own `major.minor.patch`), and CI installs all three
322
- and runs the whole suite against each — the rendered gate runs on the **newest** line, because that is
323
- where the shell's own UI changes land first.
324
- **The newest preview line needs its own leg because the stable line's clause does *not* cover it**:
325
- `>=0.2.0-0 <0.3.0-0` reads like it covers all of `0.2.x`, but the pre-release gate only opens when some
326
- comparator in the set names the same `major.minor.patch`, and that comparator's tuple is `0.2.0` — so
327
- `0.2.1-alpha.1` is refused. A range that *looks* wide is therefore neither coverage of the preview line
328
- nor evidence that it was ever run.
319
+ `>=0.1.5-rc.2 <0.2.0-0 || >=0.1.6-alpha.1 <0.2.0-0 || >=0.1.7-alpha.1 <0.2.0-0 || >=0.2.0-0 <0.3.0-0 || >=0.2.1-alpha.1 <0.3.0-0`.
320
+ The official one-click installer reads `peerDependencies` and **lets prereleases match** (`semver.satisfies(version, range, { includePrerelease: true })` in `dsh-app-boot`). The current stable line `0.2.0-rc.2` and the preview line `0.2.1-alpha.1` both install. The range still names those prereleases because npm and pnpm's default comparison is stricter, so a marketplace using that comparison does not reject the preview line either. CI installs all three lines and runs the full suite on each. The render gate runs only on `0.2.0-rc.2`, where the shell's UI changes land first. Older `0.1.5` / `0.1.6` builds stay inside the peer range and no longer have their own CI leg.
329
321
  **The official desktop app (DeepSeek Harness Desktop) is covered too**: it is version-locked to dsh and now
330
322
  ships `0.2.0-rc.2`, i.e. the same combination this matrix pins. Install it from inside the app (sidebar →
331
323
  Plugins); the CLI is refused for that profile by dsh itself. On `0.2.0-rc.2` measured (2026-09-30, clean
@@ -397,36 +389,6 @@ what came out of the last one.
397
389
 
398
390
  MIT
399
391
 
400
- ---
401
-
402
- ## Built with
403
-
404
- | | |
405
- | --- | --- |
406
- | Model | DeepSeek V4.1 Flash (`deepseek-v4-flash`, provider `deepseek-official`) |
407
- | Runtime | Unit tests: `0.2.0-rc.2`, `0.2.1-alpha.1`, `0.1.7-rc.2`. The render gate runs only on `0.2.0-rc.2`. The token figures below are from an earlier `0.1.6-alpha.2` session |
408
- | Uncached input | 224,058 tok |
409
- | Cache reads | 125,638,016 tok |
410
- | Output | 425,539 tok |
411
-
412
- The whole project, research and dead ends included, cost the DSH client **126,287,613 tokens** at a
413
- **99.8%** cache hit rate (cache reads ÷ all input, 125,862,074).
414
-
415
- ### What the review-driven iterations cost
416
-
417
- Four external reviews turned into releases `1.4.0` … `1.9.0` (the stable-line picker fix, the Windows write
418
- races, the i18n leaks, the portability fixes, the two UI passes). Measured in the same client:
419
-
420
- | | |
421
- | --- | --- |
422
- | Uncached input | 3,973,904 tok |
423
- | Cache reads | 711,962,624 tok |
424
- | Output | 1,559,791 tok |
425
-
426
- That is **717,496,319 tokens** (3,973,904 + 711,962,624 + 1,559,791) at a **99.4%** cache hit rate
427
- (711,962,624 ÷ 715,936,528). Counting the first pass as well, the project stands at **843,783,932 tokens**,
428
- **99.5%** cached (837,600,640 ÷ 841,798,602).
429
-
430
392
  ## Updating
431
393
 
432
394
  The plugin lives in the profile's `node_modules` and the platform owns that installation, so updating means
@@ -434,7 +396,7 @@ installing again — your data is not touched:
434
396
 
435
397
  ```sh
436
398
  # the pinned form: what you ask for is what you get
437
- dsh plugin --profile web add dsh-custom-mode@1.12.0
399
+ dsh plugin --profile web add dsh-custom-mode@1.12.2
438
400
  # then restart the DSH process that serves the web profile
439
401
  ```
440
402
 
@@ -443,7 +405,7 @@ dsh plugin --profile web add dsh-custom-mode@1.12.0
443
405
  hours*. Measured on a clean machine while 1.9.0 was latest: the bare command installed **1.0.1**. Pinning the
444
406
  version bypasses the cooldown, which is why the command above carries `@`.
445
407
 
446
- **How to know what you are running**: the settings page shows the installed version at the bottom (`插件版本`).
408
+ **How to know what you are running**: the settings page shows the installed version at the bottom (Plugin version).
447
409
  Compare it with `npm view dsh-custom-mode version`.
448
410
 
449
411
  **What an update does not touch**: `$DSH_HOME/.agent-presets/<your assistants>/` — `prompt.md`, `preset.yml` and
package/README.zh.md CHANGED
@@ -8,11 +8,8 @@ base mode / plugin switches / multi-assistant / multi-persona。
8
8
 
9
9
  ![dsh-custom-mode —— 给 dsh 模式用的设置页](https://raw.githubusercontent.com/BOWLUNA/dsh-custom-mode/main/docs/images/header.png)
10
10
 
11
- <!-- 社区入口:第二排徽章在每个新仓库里都要加(见 SOP/DSH Plugins/仓库门面模板.md) -->
12
-
13
11
  [![Star this repo](https://img.shields.io/badge/Star-this%20repo-1f2430?style=flat-square&logo=github&logoColor=white&labelColor=1f2430)](https://github.com/BOWLUNA/dsh-custom-mode/stargazers) [![npm](https://img.shields.io/npm/v/dsh-custom-mode?label=npm&style=flat-square&logo=npm&logoColor=white&labelColor=1f2430)](https://www.npmjs.com/package/dsh-custom-mode) [![CI](https://img.shields.io/github/actions/workflow/status/BOWLUNA/dsh-custom-mode/test.yml?label=CI&style=flat-square&logo=githubactions&logoColor=white&labelColor=1f2430)](https://github.com/BOWLUNA/dsh-custom-mode/actions/workflows/test.yml) [![license](https://img.shields.io/badge/license-MIT-97ca00?style=flat-square&logo=opensourceinitiative&logoColor=white&labelColor=1f2430)](LICENSE) [![dsh](https://img.shields.io/badge/dsh-%E2%89%A50.1.5--rc.2-4d6bfe?style=flat-square&logo=deepseek&logoColor=white&labelColor=1f2430)](https://github.com/BOWLUNA/dsh-custom-mode#readme)
14
12
 
15
- <!-- 徽章:两排统一"深色标签 + 彩色值"的两段式;新仓库照抄这一块 -->
16
13
  [![bilibili](https://img.shields.io/badge/bilibili-视频-%2300A1D6?style=flat-square&logo=bilibili&logoColor=white&labelColor=1f2430)](https://b23.tv/qJ4Ev0W) [![抖音](https://img.shields.io/badge/抖音-短视频-%23FE2C55?style=flat-square&logo=tiktok&logoColor=white&labelColor=1f2430)](https://v.douyin.com/VWh0M03Fa4Y/) [![小红书](https://img.shields.io/badge/小红书-笔记-%23FF2442?style=flat-square&logo=xiaohongshu&logoColor=white&labelColor=1f2430)](https://xhslink.cn/o/A7QtXmePBBF) [![Discord](https://img.shields.io/badge/Discord-群组-%235865F2?style=flat-square&logo=discord&logoColor=white&labelColor=1f2430)](https://discord.gg/pz97SfAfSy) [![GitHub](https://img.shields.io/github/discussions/BOWLUNA/dsh-custom-mode?label=GitHub&style=flat-square&logo=github&logoColor=white&labelColor=1f2430)](https://github.com/BOWLUNA/dsh-custom-mode/discussions)
17
14
 
18
15
  [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)(dsh)用的自定义模式。它的系统提示词是一个普通文件,可以在 Web 设置页里编辑,**改完下一步模型调用即生效** —— 不用重启,也不用新建会话。
@@ -34,22 +31,25 @@ base mode / plugin switches / multi-assistant / multi-persona。
34
31
 
35
32
  官方四个模式(`standard` / `ptc` / `minimal` / `cordis`)不受影响。
36
33
 
37
- | | |
38
- | --- | --- |
39
- | ![模式名称与基础模式](https://raw.githubusercontent.com/BOWLUNA/dsh-custom-mode/main/docs/images/01-mode-switch.png) | ![插件开关](https://raw.githubusercontent.com/BOWLUNA/dsh-custom-mode/main/docs/images/02-plugin-switches.png) |
40
- | ![系统提示词](https://raw.githubusercontent.com/BOWLUNA/dsh-custom-mode/main/docs/images/03-system-prompt.png) | ![模式选择器](https://raw.githubusercontent.com/BOWLUNA/dsh-custom-mode/main/docs/images/04-preset-picker.png) |
34
+ <p align="center">
35
+ <img src="https://raw.githubusercontent.com/BOWLUNA/dsh-custom-mode/main/docs/images/01-mode-switch.png" width="360" alt="基础模式与插件开关">
36
+ <img src="https://raw.githubusercontent.com/BOWLUNA/dsh-custom-mode/main/docs/images/02-plugin-switches.png" width="360" alt="插件开关"><br>
37
+ <img src="https://raw.githubusercontent.com/BOWLUNA/dsh-custom-mode/main/docs/images/03-system-prompt.png" width="360" alt="系统提示词">
38
+ <img src="https://raw.githubusercontent.com/BOWLUNA/dsh-custom-mode/main/docs/images/04-preset-picker.png" width="360" alt="模式选择器">
39
+ </p>
41
40
 
42
- 多助手管理器(裁到它自己那一段)。五张图都是英文、**统一 800x800**,由一个**没有会话记录的**一次性
43
- `DSH_HOME` 拍出,脚本是 `tools/screenshots/shoot-fresh.mjs`(渲染后的页面由 `tools/browser-verify.mjs` 校验):
41
+ <p align="center">
42
+ <img src="https://raw.githubusercontent.com/BOWLUNA/dsh-custom-mode/main/docs/images/05-assistant-manager.png" width="360" alt="助手">
43
+ </p>
44
44
 
45
- ![助手管理器](https://raw.githubusercontent.com/BOWLUNA/dsh-custom-mode/main/docs/images/05-assistant-manager.png)
45
+ 上面四张是一组 2×2。助手管理器单独居中。五张都是英文,文件都是 800×800,用一个没有会话记录的一次性 `DSH_HOME` 拍出。
46
46
 
47
47
  ## 安装
48
48
 
49
49
  一条命令装完——设置页插件,以及它在首次激活时自动播种的 preset:
50
50
 
51
51
  ```sh
52
- dsh plugin --profile web add dsh-custom-mode@1.12.0 # 钉版本才能确定拿到这一版
52
+ dsh plugin --profile web add dsh-custom-mode@1.12.2 # 钉版本才能确定拿到这一版
53
53
  # 不带版本号会受 pnpm 的发布冷却期影响(`minimumReleaseAge`,默认一天):发布后数小时内按名安装
54
54
  # 可能**静默装到旧版** —— 实测 1.3.0 发布 38 分钟后按名安装装到了 1.0.3。用 profile 里的
55
55
  # `npm ls dsh-custom-mode` 核对实际装到的版本,或像上面那样钉版本。
@@ -68,7 +68,7 @@ dsh `0.1.6-alpha.2` 起有插件管理页:**侧边栏 → 插件 → 添加插
68
68
 
69
69
  | 输入 | 填什么 | 说明 |
70
70
  | --- | --- | --- |
71
- | **包名** | `dsh-custom-mode` | 受 pnpm 发布冷却期影响,可能装到旧版。要这一版请钉 `@1.12.0` |
71
+ | **包名** | `dsh-custom-mode` | 受 pnpm 发布冷却期影响,可能装到旧版。要这一版请钉 `@1.12.2` |
72
72
  | **GitHub 仓库地址** | `https://github.com/BOWLUNA/dsh-custom-mode` | 指向**仓库根**即可 |
73
73
  | **本地插件目录** | `<你 clone 的路径>` | 就是仓库根 —— 仓库根**本身**就是发布包 |
74
74
 
@@ -226,13 +226,8 @@ dsh 的系统提示词通常来自 preset 的 YAML,而官方 `@deepseek-ai/dsh
226
226
  **支持三条线:最新正式线(`0.2.0-rc.2`,npm 的 `latest` 与 `next` 自 2026-09-29 起都指向它,也是桌面端
227
227
  所在的那条线)、最新预览线(`0.2.1-alpha.1`,npm 的 `alpha` 指向它)与上一个正式版(`0.1.7-rc.2`,
228
228
  仍在声明范围内,现役安装大多在它上面)** —— 声明为
229
- `>=0.1.5-rc.2 <0.2.0-0 || >=0.1.6-alpha.1 <0.2.0-0 || >=0.1.7-alpha.1 <0.2.0-0 || >=0.2.0-0 <0.3.0-0 || >=0.2.1-alpha.1 <0.3.0-0`(多出来的三段是因为
230
- semver 只允许范围里**点名了** `major.minor.patch` 的预发布版本被匹配到),CI 会三条线各装一次并各跑一遍
231
- 完整测试 —— 其中**渲染闸门跑在最新线**上,因为壳自己的 UI 改动最先落在那里。
232
- 这里的策略是"只跟最新的几条":更早的线(`0.1.5-rc.3`、`0.1.6-alpha.*`)仍在 peer 范围内,但不单独占 CI 腿。
233
- ★ 最新**预览**线必须单独占一条腿,因为它**不会**被正式线的范围顺带覆盖:`>=0.2.0-0 <0.3.0-0` 读起来
234
- 覆盖整个 `0.2.x`,但预发布门只在**某个比较符点名了同 `major.minor.patch`** 时才放行,而那个比较符的
235
- 元组是 `0.2.0` ⇒ `0.2.1-alpha.1` 被拒。所以"声明看着宽"既不等于"预览线被覆盖",更不等于"跑过"。
229
+ `>=0.1.5-rc.2 <0.2.0-0 || >=0.1.6-alpha.1 <0.2.0-0 || >=0.1.7-alpha.1 <0.2.0-0 || >=0.2.0-0 <0.3.0-0 || >=0.2.1-alpha.1 <0.3.0-0`。
230
+ 官方一键安装读的是 `peerDependencies`,并且**预发布版参与比较**(`dsh-app-boot` 里的 `semver.satisfies(version, range, { includePrerelease: true })`)。因此当前稳定线 `0.2.0-rc.2` 与预览线 `0.2.1-alpha.1` 都能装上。范围里仍点名预发布版本,是因为 npm / pnpm 的默认比较更严,插件市场走那套语义时也不会把预览线拒掉。CI 对这三条线各装一次并跑完全部测试。渲染闸门只跑 `0.2.0-rc.2`,壳的界面改动先落在这条线上。更早的 `0.1.5` / `0.1.6` 仍在 peer 范围内,不再单独占一条 CI。
236
231
  **官方桌面端(DeepSeek Harness Desktop)也在覆盖范围内**:它与 dsh 同版本号,当前即为 `0.2.0-rc.2`,
237
232
  正是这条矩阵钉住的组合;在应用内(侧栏 → Plugins)安装即可,CLI 那条路 dsh 自己会拒。
238
233
  `0.2.0-rc.2` 实测(2026-09-30,干净的一次性 `DSH_HOME`):`dsh plugin --profile web add dsh-custom-mode`
@@ -299,43 +294,13 @@ node test/run.mjs # 15 个套件;自己解析出厂 preset 目录(0.1
299
294
 
300
295
  MIT
301
296
 
302
- ---
303
-
304
- ## 构建环境
305
-
306
- | | |
307
- | --- | --- |
308
- | 模型 | DeepSeek V4.1 Flash(`deepseek-v4-flash`,provider `deepseek-official`) |
309
- | 运行时 | 单元测试:`0.2.0-rc.2`、`0.2.1-alpha.1`、`0.1.7-rc.2`。渲染闸门只跑 `0.2.0-rc.2`。下面的用量数字来自更早的 `0.1.6-alpha.2` 那一轮 |
310
- | 未缓存输入 | 224,058 tok |
311
- | 缓存读取 | 125,638,016 tok |
312
- | 输出 | 425,539 tok |
313
-
314
- 整个项目(含调研与返工)由 DSH 客户端统计:**126,287,613 tok**,缓存命中率 **99.8%**
315
-
316
- ### 评审驱动的迭代轮次花了多少
317
-
318
- 四份外部审阅变成了 `1.4.0` … `1.9.0` 这些版本(稳定线选择器修复、Windows 写入竞争、i18n 泄漏、可移植性修复、
319
- 两轮 UI 改动)。同一个客户端里的实测:
320
-
321
- | | |
322
- | --- | --- |
323
- | 未缓存输入 | 3,973,904 tok |
324
- | 缓存读取 | 711,962,624 tok |
325
- | 输出 | 1,559,791 tok |
326
-
327
- 合计 **717,496,319 tokens**(3,973,904 + 711,962,624 + 1,559,791),缓存命中率 **99.4%**
328
- (711,962,624 ÷ 715,936,528)。连同第一遍一起,项目累计 **843,783,932 tokens**,缓存命中 **99.5%**
329
- (837,600,640 ÷ 841,798,602)。
330
- (缓存读取 ÷ 全部输入 125,862,074)。
331
-
332
297
  ## 更新
333
298
 
334
299
  插件装在 profile 的 `node_modules` 里,安装由平台负责,所以"更新"就是**再装一次** —— 你的数据不会被碰:
335
300
 
336
301
  ```sh
337
302
  # 钉版本的写法:要哪版就是哪版
338
- dsh plugin --profile web add dsh-custom-mode@1.12.0
303
+ dsh plugin --profile web add dsh-custom-mode@1.12.2
339
304
  # 然后重启为该 profile 提供服务的 DSH 进程
340
305
  ```
341
306
 
package/client.js CHANGED
@@ -61,7 +61,7 @@ try {
61
61
  const ZH = {
62
62
  "nav": "自定义模式",
63
63
  "assistant.heading": "助手",
64
- "assistant.hint": "每个助手即一个独立模式:独立的系统提示词、基础模式与插件开关。新建会话时在模式选择器中选用。",
64
+ "assistant.hint": "每个助手是一套独立模式,有自己的提示词、基础模式和插件开关。新建会话时在模式菜单里选用。",
65
65
  "assistant.empty": "还没有助手,用下面的输入框新建一个。",
66
66
  "assistant.loadingList": "正在读取助手列表…",
67
67
  "assistant.newPlaceholder": "新助手的名字(例如:写作助手)",
@@ -191,10 +191,10 @@ try {
191
191
  "cap.heading": "能力",
192
192
  "cap.expand": "展开能力",
193
193
  "cap.collapse": "收起能力",
194
- "cap.hint": "基础模式决定有哪些行;插件开关逐行生效。这两项从新建会话起生效。",
194
+ "cap.hint": "基础模式决定有哪些工具。开关逐行生效。这两项从下一次新建会话开始。",
195
195
  "rows.hint": "逐行控制本模式挂载的插件。未改动的行保持官方默认(含平台判断);手动设置后以手动值为准。",
196
196
  "prompt.heading": "系统提示词",
197
- "prompt.hint": "每次模型调用前重新读取:保存后下一步生效,仅影响使用本助手的会话。「导入」读文件进编辑器(保存前不写入);「导出」存为 .md;「恢复出厂提示词」填回出厂模板(同样需保存)。",
197
+ "prompt.hint": "保存后,下一次模型调用就会用这段文字。导入只进编辑器;导出为 Markdown。恢复出厂后仍要点保存。",
198
198
  "status.enabled": "已启用",
199
199
  "status.disabled": "已停用",
200
200
  "status.changed": "已改",
@@ -290,7 +290,7 @@ try {
290
290
  const EN = {
291
291
  "nav": "Custom mode",
292
292
  "assistant.heading": "Assistants",
293
- "assistant.hint": "Each assistant is an independent mode: its own system prompt, base mode and plugin switches. Pick one in the mode picker when you start a new session.",
293
+ "assistant.hint": "Each assistant is its own mode, with its own prompt, base mode and plugin switches. Pick one from the mode menu when you start a session.",
294
294
  "assistant.empty": "No assistants yet — create one with the field below.",
295
295
  "assistant.loadingList": "Loading assistants…",
296
296
  "assistant.newPlaceholder": "Name of the new assistant (e.g. Writing assistant)",
@@ -420,10 +420,10 @@ try {
420
420
  "cap.heading": "Capabilities",
421
421
  "cap.expand": "Show capabilities",
422
422
  "cap.collapse": "Hide capabilities",
423
- "cap.hint": "The base mode chooses the row set. Each switch applies to one row. Both take effect on the next new session.",
423
+ "cap.hint": "The base mode chooses the tools. Each switch applies to one row. Both start on the next new session.",
424
424
  "rows.hint": "Control row by row which plugins this mode mounts. Untouched rows keep the official default (platform conditions included); an explicit choice wins.",
425
425
  "prompt.heading": "System prompt",
426
- "prompt.hint": "This text is re-read before every model call, so a save applies on the next step and only affects sessions on this assistant. \"Import\" reads a file into the editor (nothing is written until you save); \"Export\" saves the current text as a .md file; \"Reset to factory prompt\" puts the shipped template back into the editor (also saved only when you save).",
426
+ "prompt.hint": "After you save, the next model step uses this text. Import only fills the editor. Export writes Markdown. Reset to factory still needs a save.",
427
427
  "status.enabled": "Enabled",
428
428
  "status.disabled": "Disabled",
429
429
  "status.changed": "changed",
@@ -528,14 +528,22 @@ try {
528
528
  }
529
529
 
530
530
  function activeLanguage(locale) {
531
+ let id = ""
531
532
  try {
532
533
  const snapshot = locale !== undefined && typeof locale.getLocale === "function" ? locale.getLocale() : undefined
533
- const id = snapshot !== undefined && typeof snapshot.active === "string" ? snapshot.active : ""
534
- if (id !== "") return id.toLowerCase().startsWith("zh") ? "zh" : "en"
534
+ if (snapshot !== undefined && typeof snapshot.active === "string") id = snapshot.active
535
535
  } catch (error) {
536
- /* a shell without a readable snapshot falls through to the default */
536
+ /* a shell without a readable snapshot falls through */
537
537
  }
538
- return "zh"
538
+ if (id === "" && typeof navigator !== "undefined" && typeof navigator.language === "string") id = navigator.language
539
+ const norm = id.toLowerCase()
540
+ if (norm.startsWith("zh")) return "zh"
541
+ if (norm.startsWith("en")) return "en"
542
+ const primary = norm.split("-")[0]
543
+ if (Object.prototype.hasOwnProperty.call(TRANSLATIONS, norm)) return norm
544
+ if (primary !== "" && Object.prototype.hasOwnProperty.call(TRANSLATIONS, primary)) return primary
545
+ // 壳目前内置 zh / en,语言包可以再注册别的 id。没有对应词典时用英文,避免整页中文或裸键。
546
+ return "en"
539
547
  }
540
548
 
541
549
  /**
@@ -713,7 +721,7 @@ try {
713
721
  * grids, the status line).
714
722
  */
715
723
  const CSS = [
716
- ".cpfe{--g:8px;display:flex;flex-direction:column;gap:24px;width:100%;max-width:900px;box-sizing:border-box;padding-bottom:16px}",
724
+ ".cpfe{--g:8px;display:flex;flex-direction:column;gap:24px;width:100%;max-width:900px;box-sizing:border-box;padding-bottom:16px;font:inherit;color:inherit}",
717
725
  // 分节标题:度量抄官方设置面板里的同类文本。
718
726
  // 实测(**0.1.7-rc.2 与 0.2.0-rc.2 各量一次,结论相同**):官方 `_title`(设置行标题)
719
727
  // 与 `groupTitle`(插件页分组标题)都是 14px/22px **w400**;官方唯一的 14px w500 是插件
@@ -730,7 +738,7 @@ try {
730
738
  ".cpfe-desc{box-sizing:border-box;min-height:56px;max-height:200px;resize:vertical;padding:8px 12px;border-radius:var(--dsw-radius-md);border:.5px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-base);color:var(--dsw-alias-label-primary);font:inherit;font-size:13px;line-height:20px;margin-bottom:8px}",
731
739
  ".cpfe-base-pending{color:var(--dsw-alias-state-warn-primary)}",
732
740
  ".cpfe-note{display:block;margin:8px 0 0;font-size:12px;line-height:18px;color:var(--dsw-alias-label-tertiary)}",
733
- ".cpfe-mono{display:block;margin:0;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;line-height:18px;color:var(--dsw-alias-label-secondary);overflow-wrap:anywhere}",
741
+ ".cpfe-mono{display:block;margin:0;font-family:var(--ds-font-family-code, ui-monospace, SFMono-Regular, Menlo, monospace);font-size:12px;line-height:18px;color:var(--dsw-alias-label-secondary);overflow-wrap:anywhere}",
734
742
  ".cpfe-pills{display:flex;flex-wrap:wrap;gap:6px;align-items:center}",
735
743
  ".cpfe-picker{display:flex;align-items:center;gap:8px;margin:2px 0 4px}",
736
744
  // 壳的菜单浮层靠一个独立的 backing 元素上色(实测在 0.1.7-rc.2 + headless 下那块是透明的,
@@ -767,7 +775,7 @@ try {
767
775
  ".cpfe-row{display:flex;gap:12px;align-items:center;box-sizing:border-box;min-height:0;padding:16px 0;border:0;border-radius:0;background:none}",
768
776
  ".cpfe-row-meta{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}",
769
777
  ".cpfe-row-badges{display:flex;align-items:center;gap:6px;flex-wrap:wrap;height:18px}",
770
- ".cpfe-editor{box-sizing:border-box;width:100%;min-height:240px;resize:vertical;padding:12px;border-radius:var(--dsw-radius-md);border:.5px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-base);color:var(--dsw-alias-label-primary);font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:13px;line-height:20px}",
778
+ ".cpfe-editor{box-sizing:border-box;width:100%;min-height:240px;resize:vertical;padding:12px;border-radius:var(--dsw-radius-md);border:.5px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-base);color:var(--dsw-alias-label-primary);font-family:var(--ds-font-family-code, ui-monospace, SFMono-Regular, Menlo, monospace);font-size:13px;line-height:20px}",
771
779
  ".cpfe-bar{display:flex;align-items:center;gap:var(--g);flex-wrap:wrap}",
772
780
  ".cpfe-savebar{position:sticky;bottom:0;z-index:2;padding:8px 0;background:var(--dsw-alias-bg-base)}",
773
781
  ".cpfe-cap-toggle{appearance:none;cursor:pointer;border:0;background:transparent;padding:0;font:inherit;font-size:14px;line-height:22px;color:var(--dsw-alias-label-primary)}",
@@ -779,7 +787,7 @@ try {
779
787
  ".cpfe-danger{color:var(--dsw-alias-state-error-primary)}",
780
788
  ".cpfe-meta-line{display:flex;flex-wrap:wrap;align-items:baseline;gap:8px;min-width:0}",
781
789
  ".cpfe-version{font-size:12px;line-height:18px;color:var(--dsw-alias-label-secondary);white-space:nowrap}",
782
- ".cpfe-path{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;line-height:18px;color:var(--dsw-alias-label-secondary);overflow-wrap:anywhere}",
790
+ ".cpfe-path{font-family:var(--ds-font-family-code, ui-monospace, SFMono-Regular, Menlo, monospace);font-size:12px;line-height:18px;color:var(--dsw-alias-label-secondary);overflow-wrap:anywhere}",
783
791
  // ── fallback-path controls (unused when the shell provides the atoms) ──
784
792
  ".cpfe-btn{appearance:none;cursor:pointer;padding:0 14px;height:36px;border-radius:var(--dsw-radius-md);border:.5px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-base);color:var(--dsw-alias-label-primary);font:inherit;font-size:14px}",
785
793
  ".cpfe-btn:disabled{opacity:.4;cursor:not-allowed}",
package/locales.mjs CHANGED
@@ -20,8 +20,7 @@ export const zh = {
20
20
 
21
21
  // ── 助手管理 ──────────────────────────────────────────────────────────────
22
22
  'assistant.heading': '助手',
23
- 'assistant.hint':
24
- '每个助手即一个独立模式:独立的系统提示词、基础模式与插件开关。新建会话时在模式选择器中选用。',
23
+ 'assistant.hint': '每个助手是一套独立模式,有自己的提示词、基础模式和插件开关。新建会话时在模式菜单里选用。',
25
24
  'assistant.empty': '还没有助手,用下面的输入框新建一个。',
26
25
  'assistant.loadingList': '正在读取助手列表…',
27
26
  'assistant.newPlaceholder': '新助手的名字(例如:写作助手)',
@@ -156,12 +155,11 @@ export const zh = {
156
155
  'cap.heading': '能力',
157
156
  'cap.expand': '展开能力',
158
157
  'cap.collapse': '收起能力',
159
- 'cap.hint': '基础模式决定有哪些行;插件开关逐行生效。这两项从新建会话起生效。',
158
+ 'cap.hint': '基础模式决定有哪些工具。开关逐行生效。这两项从下一次新建会话开始。',
160
159
  'rows.hint': '逐行控制本模式挂载的插件。未改动的行保持官方默认(含平台判断);手动设置后以手动值为准。',
161
160
 
162
161
  'prompt.heading': '系统提示词',
163
- 'prompt.hint':
164
- '每次模型调用前重新读取:保存后下一步生效,仅影响使用本助手的会话。「导入」读文件进编辑器(保存前不写入);「导出」存为 .md;「恢复出厂提示词」填回出厂模板(同样需保存)。',
162
+ 'prompt.hint': '保存后,下一次模型调用就会用这段文字。导入只进编辑器;导出为 Markdown。恢复出厂后仍要点保存。',
165
163
 
166
164
  'status.enabled': '已启用',
167
165
  'status.disabled': '已停用',
@@ -270,7 +268,7 @@ export const en = {
270
268
  // ── assistant management ──────────────────────────────────────────────────
271
269
  'assistant.heading': 'Assistants',
272
270
  'assistant.hint':
273
- 'Each assistant is an independent mode: its own system prompt, base mode and plugin switches. Pick one in the mode picker when you start a new session.',
271
+ 'Each assistant is its own mode, with its own prompt, base mode and plugin switches. Pick one from the mode menu when you start a session.',
274
272
  'assistant.empty': 'No assistants yet — create one with the field below.',
275
273
  'assistant.loadingList': 'Loading assistants…',
276
274
  'assistant.newPlaceholder': 'Name of the new assistant (e.g. Writing assistant)',
@@ -405,13 +403,13 @@ export const en = {
405
403
  'cap.heading': 'Capabilities',
406
404
  'cap.expand': 'Show capabilities',
407
405
  'cap.collapse': 'Hide capabilities',
408
- 'cap.hint': 'The base mode chooses the row set. Each switch applies to one row. Both take effect on the next new session.',
406
+ 'cap.hint': 'The base mode chooses the tools. Each switch applies to one row. Both start on the next new session.',
409
407
  'rows.hint':
410
408
  'Control row by row which plugins this mode mounts. Untouched rows keep the official default (platform conditions included); an explicit choice wins.',
411
409
 
412
410
  'prompt.heading': 'System prompt',
413
411
  'prompt.hint':
414
- 'This text is re-read before every model call, so a save applies on the next step and only affects sessions on this assistant. "Import" reads a file into the editor (nothing is written until you save); "Export" saves the current text as a .md file; "Reset to factory prompt" puts the shipped template back into the editor (also saved only when you save).',
412
+ 'After you save, the next model step uses this text. Import only fills the editor. Export writes Markdown. Reset to factory still needs a save.',
415
413
 
416
414
  'status.enabled': 'Enabled',
417
415
  'status.disabled': 'Disabled',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-custom-mode",
3
- "version": "1.12.0",
3
+ "version": "1.12.2",
4
4
  "description": "Custom modes and custom prompts for DeepSeek Harness (dsh): edit a mode's system prompt on the settings page (it takes effect on the next model step), pick its base mode, switch plugin rows one by one, and keep several assistants side by side — coding, chat or roleplay (RP) personas (multi-mode / multi-agent).",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -43,7 +43,11 @@
43
43
  "系统提示词",
44
44
  "提示词编辑",
45
45
  "多助手",
46
- "角色扮演"
46
+ "角色扮演",
47
+ "deepseek-desktop",
48
+ "agent-preset",
49
+ "persona-editor",
50
+ "dshpreset"
47
51
  ],
48
52
  "dsh": {
49
53
  "bundle": {