@jianyiagi/dsh-prompt-enhancer 1.0.1 → 1.0.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.md +19 -66
- package/client.js +1 -1
- package/cordis.patch.yml +1 -4
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,63 +1,42 @@
|
|
|
1
1
|
# @jianyiagi/dsh-prompt-enhancer
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
> 有内容时,模型选择器左侧出现一个闪光按钮;点一下,模型把提示词改写得更清晰、更可执行,结果直接替换输入框草稿。
|
|
5
|
-
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
## 功能
|
|
9
|
-
|
|
10
|
-
- **一键增强**:优化表达 + 结构化(自然段落优先),消除歧义与口语化,明确目标 / 对象 / 约束 / 期望输出
|
|
11
|
-
- **忠于原文**:保留原意与语言,不编造原文没有的信息;代码、命令、路径、变量名、字段名**原样保留**
|
|
12
|
-
- **无冗余**:不写「未指定 / 未提供」占位,各部分不重复,长度不明显超过原文
|
|
13
|
-
- **直接可用**:结果写回输入框,不满意可直接编辑器撤销
|
|
14
|
-
- **双语**:界面文案随 DSH 语言(中文 / English)
|
|
3
|
+
DSH(DeepSeek Harness)插件。在输入框写提示词,点一下按钮,模型改写后替换输入框内容。
|
|
15
4
|
|
|
16
5
|
---
|
|
17
6
|
|
|
18
7
|
## 安装
|
|
19
8
|
|
|
20
|
-
|
|
9
|
+
**桌面端**:
|
|
21
10
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
@jianyiagi/dsh-prompt-enhancer
|
|
26
|
-
```
|
|
11
|
+
1. 左侧栏进「插件」页
|
|
12
|
+
2. 安装 bundle,填 `@jianyiagi/dsh-prompt-enhancer`
|
|
13
|
+
3. 完全退出应用后重新打开
|
|
27
14
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
### CLI / Web 端
|
|
31
|
-
|
|
32
|
-
```powershell
|
|
33
|
-
dsh plugin --profile <你的profile> add @jianyiagi/dsh-prompt-enhancer
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
若 `dsh` 不在 PATH,用 DSH 安装目录下的 bin:
|
|
15
|
+
**CLI / Web 端**:
|
|
37
16
|
|
|
38
17
|
```powershell
|
|
39
|
-
|
|
18
|
+
dsh plugin --profile <profile> add @jianyiagi/dsh-prompt-enhancer
|
|
40
19
|
```
|
|
41
20
|
|
|
42
|
-
|
|
43
|
-
> 若装完没生效,说明包已安装但 **bundle 未被选中**:在「插件」页勾选它,或把包名加入 profile 的 `dsh.profile.bundles` 后重启。
|
|
21
|
+
CLI 安装后若未生效,在「插件」页勾选该插件,或把包名加入 profile `package.json` 的 `dsh.profile.bundles`,然后重启应用。
|
|
44
22
|
|
|
45
23
|
---
|
|
46
24
|
|
|
47
25
|
## 使用
|
|
48
26
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
27
|
+
1. 在输入框输入提示词
|
|
28
|
+
2. 点模型选择器左侧的按钮
|
|
29
|
+
3. 按钮停止转动后,输入框内容已替换为改写结果;不满意可在输入框内撤销
|
|
30
|
+
|
|
31
|
+
输入框为空时按钮不显示。
|
|
53
32
|
|
|
54
|
-
|
|
33
|
+
也可输入 `/prompt-enhance 提示词`,结果以命令结果行显示,不写回输入框。
|
|
55
34
|
|
|
56
35
|
---
|
|
57
36
|
|
|
58
|
-
##
|
|
37
|
+
## 配置
|
|
59
38
|
|
|
60
|
-
|
|
39
|
+
默认使用当前会话的模型。可在 profile 补丁中指定固定模型:
|
|
61
40
|
|
|
62
41
|
```yaml
|
|
63
42
|
- insert:
|
|
@@ -68,24 +47,13 @@ node "<dsh-app>\lib\bin.js" plugin --profile=<profile> add @jianyiagi/dsh-prompt
|
|
|
68
47
|
model: <model-id>
|
|
69
48
|
```
|
|
70
49
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
> 为什么建议固定:增强是**生成密集型**调用。实测同一段提示词,大模型需 25~48 秒,轻量模型仅 4~6 秒(约 6~12 倍)。输出很短,瓶颈完全在模型思考。
|
|
74
|
-
|
|
75
|
-
---
|
|
76
|
-
|
|
77
|
-
## 已知限制(不是 bug)
|
|
78
|
-
|
|
79
|
-
1. **每次增强会在对话流留一行** `prompt-enhance · <结果预览>`。原因:插件唯一的客户端→宿主通道是命令注册表,注册表强制记录 `command/run`/`command/done`,而 Chat 层的命令行展示是宿主内建行为、未开插件级隐藏接口。该行不影响模型历史、不计 token。
|
|
80
|
-
2. **引用芯片会退化为纯文本**:草稿里的 `@文件` 引用在整体替换后变成普通文本。
|
|
81
|
-
3. **直接替换、无预览**:不满意请用编辑器撤销。
|
|
82
|
-
4. **仅文本增强**:不改动附件;单次输入上限 24 KB,超时 60 秒。
|
|
50
|
+
两个字段需同时提供;删除 `config` 即恢复使用会话模型。
|
|
83
51
|
|
|
84
52
|
---
|
|
85
53
|
|
|
86
54
|
## 卸载
|
|
87
55
|
|
|
88
|
-
|
|
56
|
+
桌面端在「插件」页卸载;CLI:
|
|
89
57
|
|
|
90
58
|
```powershell
|
|
91
59
|
dsh plugin --profile <profile> remove @jianyiagi/dsh-prompt-enhancer
|
|
@@ -93,19 +61,4 @@ dsh plugin --profile <profile> remove @jianyiagi/dsh-prompt-enhancer
|
|
|
93
61
|
|
|
94
62
|
---
|
|
95
63
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
```
|
|
99
|
-
输入框草稿 → 按钮(会话作用域槽位 conversation.input.right)
|
|
100
|
-
→ ctx.remote.commands.execute("/prompt-enhance <草稿>")
|
|
101
|
-
→ 宿主命令用 ctx.llm.stream 调模型(凭据走你的账户登录态,插件不接触 API Key)
|
|
102
|
-
→ 结果经命令结果回传 → inputActions.setDraft(结果)
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
- 不读取、不存储、不上传任何 API Key
|
|
106
|
-
- 不发送除提示词本身以外的任何内容给模型
|
|
107
|
-
- 开源免费(MIT)
|
|
108
|
-
|
|
109
|
-
---
|
|
110
|
-
|
|
111
|
-
**版本**:1.0.1 | **仓库**:https://github.com/JianYiAG/dsh-prompt-enhancer | **维护者**:@jianyiagi
|
|
64
|
+
MIT | 仓库:https://github.com/JianYiAG/dsh-prompt-enhancer
|
package/client.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* returned text through the standard `inputActions.setDraft` face.
|
|
9
9
|
*/
|
|
10
10
|
window.__ModuleLoader__.load({
|
|
11
|
-
id: '@
|
|
11
|
+
id: '@jianyiagi/dsh-prompt-enhancer',
|
|
12
12
|
factory(require) {
|
|
13
13
|
const React = require('react');
|
|
14
14
|
const h = React.createElement;
|
package/cordis.patch.yml
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
# @jianyiagi/dsh-prompt-enhancer profile
|
|
2
|
-
# The host half (index.js) registers the /prompt-enhance command that runs the
|
|
3
|
-
# model-backed enhancement; the browser half (client.js) renders the one-click
|
|
4
|
-
# button in the composer tool row, immediately left of the model selector.
|
|
1
|
+
# @jianyiagi/dsh-prompt-enhancer 的 profile 补丁:插入插件行。
|
|
5
2
|
|
|
6
3
|
- insert:
|
|
7
4
|
- id: prompt-enhancer
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jianyiagi/dsh-prompt-enhancer",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"description": "DSH 提示词增强器:输入框一键优化提示词并写回草稿",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"icon": "./icon.svg",
|
|
7
7
|
"exports": {
|