dsh-prompt 0.1.6 → 0.1.7
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 +181 -53
- package/lib/client.js +1000 -234
- package/lib/client.js.map +1 -1
- package/lib/index.js +343 -5
- package/package.json +18 -2
package/README.md
CHANGED
|
@@ -1,107 +1,235 @@
|
|
|
1
|
-
|
|
1
|
+
<h1 align="center">dsh-prompt</h1>
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<div align="center">
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**中文** · [English](docs/README.en.md)
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
[](https://github.com/deepseek-ai/DeepSeek-Harness)
|
|
7
|
+
**别再复制粘贴——点一下,模板进对话。**
|
|
8
|
+
24 条深度模板,`/prompt` 与智能推荐主动兜底。<br>
|
|
9
|
+
装好即用,可自定义。
|
|
11
10
|
|
|
12
|
-
|
|
11
|
+
你的 ⭐ 是我夜空中最亮的星。
|
|
13
12
|
|
|
14
|
-
|
|
13
|
+
*Stop copy-pasting — one click, template in chat.*
|
|
15
14
|
|
|
16
|
-
[](https://www.npmjs.com/package/dsh-prompt) [](https://www.npmjs.com/package/dsh-prompt) [](https://github.com/FeatherHunter/dsh-prompt/commits/main) [](https://github.com/FeatherHunter/dsh-prompt/graphs/commit-activity) [](LICENSE) [](https://github.com/FeatherHunter/dsh-prompt/blob/main/src/client/templates.ts) [](https://github.com/FeatherHunter/dsh-prompt) [](https://github.com/FeatherHunter/dsh-prompt/issues)
|
|
17
16
|
|
|
18
|
-
|
|
17
|
+
</div>
|
|
19
18
|
|
|
20
|
-
|
|
19
|
+
<h2 align="center"><sub>INSTALL</sub><br>安装</h2>
|
|
21
20
|
|
|
22
|
-
|
|
21
|
+
<div align="center">
|
|
23
22
|
|
|
24
|
-
[
|
|
23
|
+
前置要求:[DSH](https://www.npmjs.com/package/@deepseek-ai/dsh)(DeepSeek Harness)。<br>
|
|
24
|
+
在 DSH 里,你下指令、AI 干活。<br>
|
|
25
|
+
dsh-prompt 把常用提示词变成随手可点的模板。
|
|
25
26
|
|
|
26
|
-
|
|
27
|
+
</div>
|
|
27
28
|
|
|
28
|
-
|
|
29
|
+
```bash
|
|
30
|
+
# ① 安装 DSH CLI(已装跳过)
|
|
31
|
+
npm install -g @deepseek-ai/dsh
|
|
32
|
+
|
|
33
|
+
# ② 安装 dsh-prompt —— --profile 必填:装进你实际使用的 DSH 入口对应的 profile
|
|
34
|
+
# (装错 profile 等于没装,重启多少次都不会加载)
|
|
35
|
+
dsh plugin --profile web add dsh-prompt # 用自启 web 服务(dsh web)
|
|
36
|
+
# 或者
|
|
37
|
+
dsh plugin --profile desktop add dsh-prompt # 用 DSH Desktop 桌面应用
|
|
38
|
+
# 锁定最新版更稳(当前 0.1.7):
|
|
39
|
+
dsh plugin --profile web add dsh-prompt@0.1.7 --registry https://registry.npmjs.org
|
|
40
|
+
# 或者
|
|
41
|
+
dsh plugin --profile desktop add dsh-prompt@0.1.7 --registry https://registry.npmjs.org
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
<div align="center">
|
|
29
45
|
|
|
30
|
-
|
|
46
|
+
装完**重启一次对应入口**即生效。<br>
|
|
47
|
+
桌面端完全退出重开,web 端重启后刷新页面。<br>
|
|
48
|
+
零配置:装了即用,卸了即走。
|
|
31
49
|
|
|
50
|
+
**👇 装完重启,输入框左侧多出这枚按钮就是成功。**
|
|
32
51
|
|
|
33
|
-
|
|
52
|
+
<img src="assets/readme/01-install-ready.png" width="720" alt="安装成功后输入框左侧的 Prompt 按钮" style="border:1px solid #30363d;border-radius:6px">
|
|
34
53
|
|
|
35
|
-
|
|
54
|
+
</div>
|
|
36
55
|
|
|
37
|
-
|
|
56
|
+
<details>
|
|
57
|
+
<summary>进阶安装:免全局、更新不生效、交给 AI</summary>
|
|
38
58
|
|
|
39
|
-
|
|
59
|
+
下面命令以 web profile 为例——**DSH Desktop 桌面应用用户请把所有 `--profile web` 换成 `--profile desktop`**。
|
|
40
60
|
|
|
41
61
|
```bash
|
|
42
|
-
|
|
62
|
+
# 免全局安装(想更稳,像上面一样锁版本)
|
|
63
|
+
npx --yes @deepseek-ai/dsh plugin --profile web add dsh-prompt
|
|
64
|
+
|
|
65
|
+
# 更新被静默忽略时,显式指定官方源
|
|
66
|
+
dsh plugin --profile web add dsh-prompt@latest --registry https://registry.npmjs.org
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
复制下面这段发给你的 AI,它会确认 profile、检查环境并按需安装:
|
|
70
|
+
|
|
71
|
+
```text
|
|
72
|
+
请帮我安装 DeepSeek Harness 插件 dsh-prompt。先读仓库 README:https://github.com/FeatherHunter/dsh-prompt
|
|
73
|
+
先确认我实际使用的 DSH 入口对应哪个 profile(DSH Desktop 桌面应用 → desktop;自启 web 服务 → web),把插件装进正确的 profile;
|
|
74
|
+
然后自行检查环境并按需安装(已装的跳过),完成后简要汇报结果。
|
|
43
75
|
```
|
|
44
76
|
|
|
45
|
-
|
|
77
|
+
</details>
|
|
78
|
+
|
|
79
|
+
升级 · 卸载(desktop profile 用户把 `--profile web` 换成 `--profile desktop`):
|
|
46
80
|
|
|
47
81
|
```bash
|
|
48
|
-
dsh plugin --profile web
|
|
82
|
+
dsh plugin --profile web update dsh-prompt # 升级
|
|
83
|
+
dsh plugin --profile web remove dsh-prompt # 卸载
|
|
49
84
|
```
|
|
50
85
|
|
|
51
|
-
|
|
86
|
+
<h2 align="center"><sub>PROMPT BUTTON</sub><br>入口一 · Prompt 按钮</h2>
|
|
87
|
+
|
|
88
|
+
<div align="center">
|
|
89
|
+
|
|
90
|
+
鼠标移到输入框左侧的 ⚡Prompt 按钮,面板自动展开(点一下也行)。<br>
|
|
91
|
+
阶段 tabs + 领域筛选 + 搜索,点一条,正文进输入框。<br>
|
|
92
|
+
最常用的沉在底部,离按钮最近。
|
|
93
|
+
|
|
94
|
+
**👇 按钮一点,面板长这样。**
|
|
95
|
+
|
|
96
|
+
<img src="assets/readme/02-panel-button.png" width="640" alt="Prompt 按钮悬浮面板:阶段筛选与模板列表" style="border:1px solid #30363d;border-radius:6px">
|
|
97
|
+
|
|
98
|
+
</div>
|
|
99
|
+
|
|
100
|
+
<h2 align="center"><sub>TRIGGER</sub><br>入口二 · /prompt 触发源</h2>
|
|
101
|
+
|
|
102
|
+
<div align="center">
|
|
103
|
+
|
|
104
|
+
键盘党的最爱:输入框敲 `/prompt`,候选实时过滤。<br>
|
|
105
|
+
每行写清“名称 + 标签·阶段 — 正文前 42 字”。<br>
|
|
106
|
+
只记得半个名也行:`/prompt 复盘`。
|
|
107
|
+
|
|
108
|
+
**👇 输一半,候选自动收窄。**
|
|
109
|
+
|
|
110
|
+
<img src="assets/readme/03-trigger-prompt.png" width="640" alt="/prompt 触发源:输入过滤后的候选列表" style="border:1px solid #30363d;border-radius:6px">
|
|
111
|
+
|
|
112
|
+
</div>
|
|
113
|
+
|
|
114
|
+
<h2 align="center"><sub>SMART CARD</sub><br>入口三 · 智能悬浮卡</h2>
|
|
115
|
+
|
|
116
|
+
<div align="center">
|
|
52
117
|
|
|
53
|
-
|
|
118
|
+
你不用找模板,模板来找你。<br>
|
|
119
|
+
输入框里正常描述任务,命中关键词自动推荐。<br>
|
|
120
|
+
默认开启,设置页可关;只看本地词表,不联网。
|
|
54
121
|
|
|
55
|
-
|
|
122
|
+
</div>
|
|
56
123
|
|
|
57
|
-
|
|
124
|
+
<h2 align="center"><sub>TEMPLATES</sub><br>模板一览</h2>
|
|
58
125
|
|
|
59
|
-
|
|
126
|
+
<div align="center">
|
|
60
127
|
|
|
61
|
-
|
|
128
|
+
随包 24 条预制模板,覆盖四大领域与三个阶段。<br>
|
|
129
|
+
只读,删不掉改不坏,放心点。<br>
|
|
130
|
+
想改哪条,复制为自定义再改。
|
|
62
131
|
|
|
63
|
-
|
|
132
|
+
**👇 24 条全貌在设置页一次看完。**
|
|
64
133
|
|
|
65
|
-
|
|
134
|
+
<img src="assets/readme/05-templates-gallery.png" width="640" alt="模板一览:设置页中的 24 条预制模板" style="border:1px solid #30363d;border-radius:6px">
|
|
66
135
|
|
|
67
|
-
|
|
136
|
+
</div>
|
|
68
137
|
|
|
69
|
-
|
|
138
|
+
<h2 align="center"><sub>CUSTOM</sub><br>自定义与管理</h2>
|
|
70
139
|
|
|
71
|
-
|
|
140
|
+
<div align="center">
|
|
72
141
|
|
|
73
|
-
|
|
142
|
+
自己的话术存成模板:设置页一点新增,标题 + 正文写好即存。<br>
|
|
143
|
+
常用置顶(最多 5 条),删除一次确认。<br>
|
|
144
|
+
自定义与预制分开存,升级不丢。
|
|
74
145
|
|
|
75
|
-
|
|
146
|
+
**👇 新增弹窗长这样,填完点添加。**
|
|
76
147
|
|
|
77
|
-
|
|
148
|
+
<img src="assets/readme/06-custom-manage.png" width="640" alt="自定义管理:新增自定义模板弹窗" style="border:1px solid #30363d;border-radius:6px">
|
|
78
149
|
|
|
79
|
-
|
|
150
|
+
</div>
|
|
80
151
|
|
|
81
|
-
|
|
152
|
+
<h2 align="center"><sub>PRIVACY</sub><br>隐私</h2>
|
|
82
153
|
|
|
83
|
-
|
|
154
|
+
<div align="center">
|
|
84
155
|
|
|
85
|
-
|
|
156
|
+
只存本地浏览器,零网络上报。<br>
|
|
157
|
+
删插件即删数据。
|
|
158
|
+
|
|
159
|
+
</div>
|
|
160
|
+
|
|
161
|
+
<h2 align="center"><sub>FAQ</sub><br>常见问题</h2>
|
|
162
|
+
|
|
163
|
+
<details open>
|
|
164
|
+
<summary>更新之后还是旧版本?</summary>
|
|
165
|
+
|
|
166
|
+
先显式指定官方源装一次(desktop 用户把 `--profile web` 换成 `--profile desktop`):
|
|
86
167
|
|
|
87
168
|
```bash
|
|
88
|
-
|
|
89
|
-
npm run build # 完整构建
|
|
169
|
+
dsh plugin --profile web add dsh-prompt@latest --registry https://registry.npmjs.org
|
|
90
170
|
```
|
|
91
171
|
|
|
92
|
-
|
|
172
|
+
装完重启对应入口。<br>
|
|
173
|
+
桌面端完全退出重开,web 端重启后刷新页面(Ctrl+F5)。
|
|
174
|
+
|
|
175
|
+
</details>
|
|
176
|
+
|
|
177
|
+
<details>
|
|
178
|
+
<summary>装完没看到 Prompt 按钮?</summary>
|
|
179
|
+
|
|
180
|
+
先确认插件装进了当前入口对应的 profile(装错等于没装)。<br>
|
|
181
|
+
桌面应用对应 `--profile desktop`,web 服务对应 `--profile web`。<br>
|
|
182
|
+
确认无误后重启一次再看。
|
|
183
|
+
|
|
184
|
+
</details>
|
|
185
|
+
|
|
186
|
+
<details>
|
|
187
|
+
<summary>自定义模板与用量存在哪?会上传吗?</summary>
|
|
188
|
+
|
|
189
|
+
存在本地浏览器,不上传。<br>
|
|
190
|
+
换浏览器或清数据会丢,常用模板备一份正文。
|
|
191
|
+
|
|
192
|
+
</details>
|
|
193
|
+
|
|
194
|
+
<details>
|
|
195
|
+
<summary>有英文文档吗?截图为什么是中文?</summary>
|
|
196
|
+
|
|
197
|
+
有,见 [English](docs/README.en.md)。
|
|
198
|
+
截图首版中英共用一套,后续补英文截图。
|
|
199
|
+
|
|
200
|
+
</details>
|
|
201
|
+
|
|
202
|
+
<h2 align="center"><sub>MORE</sub><br>作者的其他作品</h2>
|
|
203
|
+
|
|
204
|
+
<div align="center">
|
|
205
|
+
|
|
206
|
+
喜欢这个插件的话,这些可能你也用得上:
|
|
207
|
+
|
|
208
|
+
**[dsh-opencode-palette](https://github.com/FeatherHunter/dsh-opencode-palette)** —— 34 款 opencode 经典配色一键换装 DSH,即点即换,重启不丢
|
|
209
|
+
|
|
210
|
+
**[dsh-plugin-ui-debug](https://github.com/FeatherHunter/dsh-plugin-ui-debug)** —— 用真实 Chrome 无头浏览器,给 DSH 插件 UI 做闭环调试
|
|
211
|
+
|
|
212
|
+
**[dsh-mattpocock-skills-deck](https://github.com/FeatherHunter/dsh-mattpocock-skills-deck)** —— 25 个工程技能包,面板上直接调用,无需手动装技能
|
|
213
|
+
|
|
214
|
+
**[dsh-chinese-skill-patch](https://github.com/FeatherHunter/dsh-chinese-skill-patch)** —— 让 DSH 直接用中文技能名,技能不必改英文名
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
有问题、有想法?[提交 ISSUE](https://github.com/FeatherHunter/dsh-prompt/issues),用法交流、新模板点子、需求与 Bug 都欢迎
|
|
93
219
|
|
|
94
|
-
|
|
220
|
+
个人作品,与 DeepSeek Harness 官方没有关系。
|
|
221
|
+
MIT © FeatherHunter
|
|
95
222
|
|
|
96
|
-
|
|
223
|
+
</div>
|
|
97
224
|
|
|
98
|
-
|
|
99
|
-
- [**dsh-mattpocock-skills-deck**](https://github.com/FeatherHunter/dsh-mattpocock-skills-deck) —— 25 个工程技能包,粘贴一段安装 Prompt 即用。
|
|
225
|
+
<h2 align="center"><sub>THANKS</sub><br>致谢</h2>
|
|
100
226
|
|
|
101
|
-
|
|
227
|
+
<div align="left">
|
|
102
228
|
|
|
103
|
-
|
|
229
|
+
感谢每一位点星、提 Issue 的朋友,是你们让这个工具箱一点点变好。
|
|
104
230
|
|
|
105
|
-
|
|
231
|
+
dsh-prompt 还在等第一位外部贡献者。<br>
|
|
232
|
+
提交 Issue、PR 或分享自定义模板,你的名字就会出现在这里。<br>
|
|
233
|
+
已经做过的朋友,请直接告诉我。
|
|
106
234
|
|
|
107
|
-
|
|
235
|
+
</div>
|