@klarkxy/dsh-current-title 0.2.1 → 0.2.3

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.md CHANGED
@@ -1,50 +1,37 @@
1
- # @klarkxy/dsh-current-title
1
+ # Auto Title
2
2
 
3
3
  <!-- release-state-note -->
4
- The [repository registry](../../README.md#plugin-lifecycle) tracks Draft → Testing → Published, moving forward only. Fixes, testing and version updates keep published packages Published; each update still passes release checks. First publication explicitly selects Testing packages and records Published only after npm archive verification. See the [release guide](../../RELEASING.md).
5
-
6
- Keeps a DSH session title on the task you are working on right now, and leaves a name you set by hand alone.
7
4
 
8
5
  [简体中文](docs/README.zh-CN.md)
9
6
 
10
- Migrated from [`dsh-plugins/dsh-current-title`](https://github.com/klarkxy/dsh-plugins/tree/main/plugins/dsh-current-title). Title type labels stay bilingual (`功能` / `Feature`, and the rest of the fixed vocabulary). Generation calls the host `llm` service directly, one call per title, with no retry.
7
+ Keeps each DeepSeek Harness session title on the task you are working on. A title you rename by hand is never overwritten.
11
8
 
12
- The bundle insert is enabled after installation. It does not permanently turn off the built-in first-prompt title provider: this entry claims the native `sessionTitle` slot only while it is active, and disabling it restores that owner when this package still owns the slot and the displaced loader entry is unchanged. The plugin page holds an optional title instruction and an optional model. An empty instruction uses the built-in prompt; an empty model follows the live session model and then the host default chat model. The type label still follows the host language.
9
+ ```text
10
+ 0903 | Fix | Login callback fails
11
+ ```
13
12
 
14
13
  ## Install
15
14
 
16
- Requires Node.js ≥22 and DSH `0.1.7-rc.2`. The **Auto Title** entry starts enabled and can be disabled in plugin settings. Native title storage and scheduling come from the host `sessionTitle`; generation uses the host `llm` service. Install the published package into the target profile:
17
-
18
15
  ```sh
19
16
  dsh plugin --profile web add @klarkxy/dsh-current-title
20
17
  ```
21
18
 
22
- Replace `web` with your profile name. To uninstall, run `dsh plugin --profile web remove @klarkxy/dsh-current-title`.
23
-
24
- Hosts that bundle this feature usually enable it by default; where the host supports live plugin switching, the switch under Settings → Plugins takes effect without a restart. Installation or removal may require a restart when the host asks for one.
19
+ Replace `web` with your profile name and restart it if DSH asks. Auto Title is enabled after installation and can be turned off in the plugin list.
25
20
 
26
- ## Host RPC
21
+ ## Use
27
22
 
28
- Channel `/dsh-current-title` requires the host authorization policy.
29
-
30
- - `status` — current settings, slot support and ownership, and per-session title state (title, source kind, generating, pinned) when `sessionId` is given.
31
- - `settings` — update the stored prompt and model with compare-and-swap (`{ prompt?, model?, expectedRevision }`). An empty prompt keeps the built-in instruction. An empty model follows the live session model and then the host default chat model. The type-label locale stays `auto`.
32
- - `regenerate` — regenerate one session's title (`{ sessionId }`); fails with `not-found` for an unknown session and `unavailable` while the title provider is inactive.
33
-
34
- ## Title shape
35
-
36
- ```text
37
- 0903 | 修复 | 登录回调失败
38
- ```
23
+ Titles update automatically. Under **Plugins → Auto Title** you can:
39
24
 
40
- Month and day, type label, task summary. The label comes from a fixed bilingual vocabulary, and the summary follows the language of the recent messages. Only recent real human `user/message` events feed a title; plugin auxiliary messages are ignored.
25
+ - choose whether titles follow every message or only the first one;
26
+ - add your own title instruction;
27
+ - pick a title model (empty follows the current session model);
28
+ - regenerate the title of the open session.
41
29
 
42
- ## Boundaries
30
+ ## Limits
43
31
 
44
- - A manual rename is kept by native title storage.
45
- - A failed generation writes no new title, so the session keeps the title it already has.
46
- - Disabling cancels work in progress and drops late results.
32
+ - Each title costs one model call; failed generations keep the existing title.
33
+ - Turning the plugin off hands titles back to the built-in DSH title feature.
47
34
 
48
35
  ## License
49
36
 
50
- [SATA License 2.1](LICENSE), including attribution for the original `dsh-plugins` sources.
37
+ [SATA License 2.1](LICENSE)
@@ -1,50 +1,37 @@
1
- # @klarkxy/dsh-current-title
1
+ # 自动标题
2
2
 
3
3
  <!-- release-state-note -->
4
- 插件生命周期见[仓库状态清单](../../../README.zh-CN.md#插件生命周期):草稿 → 测试中 → 已发布,只向前推进。已发布插件的修复、测试和升版保持已发布;每次更新仍须通过发布检查。首次发布须明确选择测试中的包,并在 npm 归档验证成功后登记。详见[发布规则](../../../RELEASING.zh-CN.md)。
5
-
6
- 让会话标题跟着你手头的任务走;你手动改过的名字不会被覆盖。
7
4
 
8
5
  [English](../README.md)
9
6
 
10
- 从 [`dsh-plugins/dsh-current-title`](https://github.com/klarkxy/dsh-plugins/tree/main/plugins/dsh-current-title) 迁入。类型标签保持中英双语(`功能` / `Feature` 及其余固定词表)。生成直接调用宿主 `llm` 服务,一个标题一次调用,不重试。
7
+ 让 DeepSeek Harness 的会话标题跟着你手头的任务走。你手动改过的名字不会被覆盖。
11
8
 
12
- 安装后 bundle 插入项默认启用。启用期间占用原生 `sessionTitle` 槽位;关闭时若槽位仍由本包持有,且被让出的加载项身份未变,则交还原所有者。安装不会永久停用宿主自带的标题插件。插件页可以填写标题提示词,并选择标题模型。提示词留空使用内置说明;模型留空先跟随当前会话模型,再回落到宿主默认对话模型。类型标签仍跟随宿主语言。
9
+ ```text
10
+ 0903 | 修复 | 登录回调失败
11
+ ```
13
12
 
14
13
  ## 安装
15
14
 
16
- 需要 Node.js ≥22 与 DSH `0.1.7-rc.2`。「自动标题」默认启用,可在插件设置中关闭。标题写入宿主 `sessionTitle`,由宿主调度;生成使用宿主 `llm` 服务。把已发布包装进目标 profile:
17
-
18
15
  ```sh
19
16
  dsh plugin --profile web add @klarkxy/dsh-current-title
20
17
  ```
21
18
 
22
- 把 `web` 换成你的 profile 名。卸载用 `dsh plugin --profile web remove @klarkxy/dsh-current-title`。
23
-
24
- 部分宿主会预装并默认启用本功能;宿主支持热切换时,通过「设置 → 插件」开关无需重启。宿主提示需要重启时,安装或移除后重启。
19
+ 把 `web` 换成你的 profile 名,DSH 提示时重启。安装后默认启用,可在插件列表中关闭。
25
20
 
26
- ## 宿主 RPC
21
+ ## 使用
27
22
 
28
- 频道 `/dsh-current-title`,走宿主授权策略。
29
-
30
- - `status` — 当前设置、槽位支持与归属;传入 `sessionId` 时附带该会话的标题状态(标题、来源类型、是否生成中、是否被手动固定)。
31
- - `settings` — 按比较并交换修订号更新提示词和模型(`{ prompt?, model?, expectedRevision }`)。提示词留空使用内置说明;模型留空先跟随当前会话模型,再回落到宿主默认对话模型。类型标签语言保持 `auto`。
32
- - `regenerate` — 重新生成单个会话的标题(`{ sessionId }`);会话不存在报 `not-found`,标题服务未就绪报 `unavailable`。
33
-
34
- ## 标题形状
35
-
36
- ```text
37
- 0903 | 修复 | 登录回调失败
38
- ```
23
+ 标题会自动更新。在「插件 → 自动标题」里可以:
39
24
 
40
- 月日、类型标签、任务摘要。标签取自固定的中英双语词表,摘要语言跟随最近几条消息。只有最近真实的人工 `user/message` 事件参与生成,插件辅助消息不参与。
25
+ - 选择标题跟随每条消息,还是只看第一条消息;
26
+ - 填写自己的标题提示词;
27
+ - 选择标题模型(留空跟随当前会话模型);
28
+ - 重新生成当前会话的标题。
41
29
 
42
- ## 边界
30
+ ## 限制
43
31
 
44
- - 手动改过的标题由原生标题存储保留。
45
- - 生成失败时不写入新标题,会话保留原有标题。
46
- - 关闭插件会取消在途生成并丢弃迟到结果。
32
+ - 每次生成标题会调用一次模型;生成失败时保留原标题。
33
+ - 关闭插件后,标题交还给 DSH 自带的标题功能。
47
34
 
48
35
  ## 许可证
49
36
 
50
- [SATA License 2.1](../LICENSE),保留原 `dsh-plugins` 出处。
37
+ [SATA License 2.1](../LICENSE)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@klarkxy/dsh-current-title",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "Auto Title: keep session titles following the latest task; names you set by hand stay put.",
5
5
  "icon": "./icon.svg",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -73,8 +73,8 @@
73
73
  "test": "vitest run --root ../.. --config vitest.editor-plugins.config.ts --maxWorkers=2 plugins/dsh-current-title/src"
74
74
  },
75
75
  "dependencies": {
76
- "@klarkxy/dsh-model-route": "0.2.0",
77
- "@klarkxy/dsh-plugin-kit": "0.3.0",
76
+ "@klarkxy/dsh-model-route": "0.2.2",
77
+ "@klarkxy/dsh-plugin-kit": "0.3.2",
78
78
  "zod": "^4.1.5"
79
79
  },
80
80
  "peerDependencies": {
@@ -125,6 +125,6 @@
125
125
  "registry": "https://registry.npmjs.org/"
126
126
  },
127
127
  "dshRelease": {
128
- "contentHash": "479020928ba50f93d5a22c13100d496c485a49c5ec2d6185f91f3d2652ebf18a"
128
+ "contentHash": "c215c7160bb1aeccb6afe8e5dc5dfd660a87dcb2c49763894086af26f819b4f9"
129
129
  }
130
130
  }