dsh-quick-phrases 0.3.3 → 0.3.4

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
@@ -2,6 +2,7 @@
2
2
 
3
3
  [![CI](https://github.com/pengtang1024/dsh-quick-phrases/actions/workflows/ci.yml/badge.svg)](https://github.com/pengtang1024/dsh-quick-phrases/actions/workflows/ci.yml)
4
4
  [![Release](https://img.shields.io/github/v/release/pengtang1024/dsh-quick-phrases)](https://github.com/pengtang1024/dsh-quick-phrases/releases)
5
+ [![npm](https://img.shields.io/npm/v/dsh-quick-phrases?logo=npm)](https://www.npmjs.com/package/dsh-quick-phrases)
5
6
  [![License: MIT](https://img.shields.io/github/license/pengtang1024/dsh-quick-phrases)](LICENSE)
6
7
 
7
8
  给 DeepSeek Harness(DSH)的输入框加一排快捷短语按钮:`继续`、`提交`、`推送`、`发版` 这类天天要打的字,点一下就送进输入框或直接发出。按钮上显示的**名称**和真正发出的**内容**分开编辑,所以按钮可以很短,话可以很长。
@@ -20,17 +21,31 @@
20
21
 
21
22
  ## 安装
22
23
 
23
- 前置:DSH 桌面端或 Web 端(0.2.2 及以上)。插件是本地目录 bundle,无需构建、无需 `npm install`。
24
+ 前置:DSH 桌面端或 Web 端(0.2.2 及以上)。插件没有运行时依赖,也没有构建步骤。
24
25
 
25
- **方式 A(图形界面)**:Plugins → Add plugin → 选择本仓库目录。
26
+ **方式 A(npm,推荐)**
26
27
 
27
- **方式 B(命令行)**:让 DSH 里的 agent 执行
28
+ ```bash
29
+ dsh plugin --profile <你的 profile> add dsh-quick-phrases
30
+ ```
31
+
32
+ 装完重启 DSH(或在会话页按 `Ctrl+R`)。包已发布到 npm:[dsh-quick-phrases](https://www.npmjs.com/package/dsh-quick-phrases),升级时把 `add` 换成 `update dsh-quick-phrases` 即可。
33
+
34
+ **方式 B(插件市场)**
35
+
36
+ 在 DSH 里打开 **Plugins → Discover → Index sources**,添加本仓库的索引地址:
28
37
 
29
38
  ```
30
- plugin_manager install_bundle target=/path/to/dsh-quick-phrases
39
+ https://cdn.jsdelivr.net/gh/pengtang1024/dsh-quick-phrases@main/index.json
31
40
  ```
32
41
 
33
- 安装后需要让渲染进程重新加载:**重启 DSH 桌面端**,或在会话页按 `Ctrl+R`。用 `link:` 方式安装时(本机开发就是这样),改完 `client.js` 也只需重载页面,不必重装。
42
+ 之后在 Discover 里搜索「快捷短语」即可看到本插件与版本,点安装走的就是 `plugin_manager`。
43
+
44
+ **方式 C(本地目录)**
45
+
46
+ Plugins → Add plugin → 选择本仓库目录;或让 DSH 里的 agent 执行 `plugin_manager install_bundle target=/path/to/dsh-quick-phrases`。本地目录安装是 `link:` 方式,改完 `client.js` 只需重载页面、不必重装。
47
+
48
+ > 三种方式装的是同一个 bundle,不要同时装两份:用 npm 或市场装过之后,先把本地 `link:` 那份卸掉再换。
34
49
 
35
50
  ## 使用
36
51
 
@@ -13,8 +13,9 @@ DSH 的插件是「bundle」:一个 npm 包 + 一行 Cordis patch。本仓库
13
13
  | `client.js` | 客户端插件:`window.__ModuleLoader__.load({ id, factory })` |
14
14
  | `locale/{zh,en}.json` | 插件管理器详情页的标题 / 描述 / 详情文档路径 |
15
15
  | `icon.svg` | 插件列表图标 |
16
+ | `index.json` | 插件市场索引(format 1),让 Discover 能搜到并安装本插件 |
16
17
 
17
- `package.json` 里声明 `dsh.client.platform = "web"`、`immediately: true`、`inject: ["@deepseek-ai/dsh-client-ui-conversation"]`;`dsh.bundle.patch` 指向 patch 文件。没有构建步骤,改完 `client.js` 让渲染进程重载即可。
18
+ `package.json` 里声明 `dsh.client.platform = "web"`、`immediately: true`、`inject: ["@deepseek-ai/dsh-client-ui-conversation"]`;`dsh.bundle.patch` 指向 patch 文件。`engines.dsh` 声明兼容的 DSH 版本,市场索引与 `plugin_manager` 用它判断可装性。没有构建步骤,改完 `client.js` 让渲染进程重载即可。
18
19
 
19
20
  ## 客户端入口
20
21
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-quick-phrases",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "description": "DSH 快捷短语:输入框旁一排短语按钮,点按即发送;管理页可增删改、拖动排序,显示名称与发送内容分离,显示位置可选。",
5
5
  "license": "MIT",
6
6
  "author": {