dsh-plugin-choice-refresh 0.1.3 → 0.1.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/CHANGELOG.md +20 -0
- package/README.en.md +117 -0
- package/README.md +16 -2
- package/docs/choice-buttons.png +0 -0
- package/docs/choice-more-options.png +0 -0
- package/package.json +12 -3
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [0.1.4] - 2026-08-29
|
|
4
|
+
|
|
5
|
+
- 文档:兼容性补实测版本声明(DSH 0.1.1-rc.2);
|
|
6
|
+
- 元数据:description 加「生态唯一」钩子,keywords 10 → 16;
|
|
7
|
+
- 新增英文版 README.en.md 与双语切换行;CHANGELOG.md 纳入 npm files。
|
|
8
|
+
## [0.1.3] - 2026-08-25
|
|
9
|
+
|
|
10
|
+
- 相关插件段新增 dsh-plugin-windows-guard(Windows 环境防坑守则 skill 插件,互相引流)。
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## [0.1.2] - 2026-08-21
|
|
14
|
+
|
|
15
|
+
- README 新增「相关插件」互相引用段(列出同系列已发布插件,npm / GitHub 链接 + 一句话说明),互相引流。
|
|
16
|
+
|
|
17
|
+
## [0.1.1] - 2026-08-19
|
|
18
|
+
|
|
19
|
+
- 首发:选择增强(「重新生成选项」/「更多选项」按钮),纯前端实现,支持文字与图片选项卡。
|
|
20
|
+
- 发布 npm、GitHub topics、dsh-market 收录(issue #40)。
|
package/README.en.md
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
[中文](./README.md) | **English**
|
|
2
|
+
|
|
3
|
+
# dsh-plugin-choice-refresh
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+

|
|
7
|
+

|
|
8
|
+
|
|
9
|
+
**The only choice-enhancement plugin in the dsh plugin market**: it adds two buttons to the choice cards of `ask_user_question` / `ask_user_choice` —
|
|
10
|
+
not happy with any of the options? One click has the model come back with a completely different batch. Too few options? One click has the model add more.
|
|
11
|
+
|
|
12
|
+
| Button | Scenario | Effect |
|
|
13
|
+
| --- | --- | --- |
|
|
14
|
+
| 🔄 **Regenerate options** (「重新生成选项」) | None of the offered options works for you | One click has the model re-ask with a completely different batch of options (new angle / style / dimension, 5–8 options) |
|
|
15
|
+
| ➕ **More options** (「更多选项」) | Too few options to choose from | One click has the model re-ask while keeping the original options and adding new ones (6–10 options in total) |
|
|
16
|
+
|
|
17
|
+
Purely client-side interaction, **registers no new tools and modifies no core packages**; works on both native text option cards and the
|
|
18
|
+
[dsh-plugin-image-tools](https://github.com/Pasumao/dsh-plugin-image-tools) image option cards (image cards are rendered directly by this plugin, reusing its image routes).
|
|
19
|
+
|
|
20
|
+
## Screenshot
|
|
21
|
+
|
|
22
|
+

|
|
23
|
+
|
|
24
|
+
Two extra buttons appear automatically at the bottom of the card:
|
|
25
|
+
|
|
26
|
+

|
|
27
|
+
|
|
28
|
+
After clicking "➕ More options": the model keeps the original options, adds new ones up to 6–10 total, and re-asks.
|
|
29
|
+
|
|
30
|
+
> Real Web GUI screenshots.
|
|
31
|
+
|
|
32
|
+
## Features
|
|
33
|
+
|
|
34
|
+
- 🔄 **Regenerate options**: when none of the options offered by `ask_user_question` / `ask_user_choice` works for you, one click cancels the current question and has the model re-ask with a completely different batch of options (new angle / style / dimension, 5–8 options);
|
|
35
|
+
- ➕ **More options**: when the options are too few to choose from, one click has the model keep the original options and add new ones (6–10 in total);
|
|
36
|
+
- Purely client-side interaction, **registers no new tools and modifies no core packages**;
|
|
37
|
+
- Works on native text option cards and `dsh-plugin-image-tools` image option cards alike;
|
|
38
|
+
- Compatible with the `plan-review` plan review card, without affecting the native flow.
|
|
39
|
+
|
|
40
|
+
## Configuration
|
|
41
|
+
|
|
42
|
+
No configuration needed — install and it works:
|
|
43
|
+
|
|
44
|
+
- Reads no environment variables, needs no API key / token, writes no config files;
|
|
45
|
+
- Button labels follow `ctx.locale` (zh / en bilingual), with no extra setup;
|
|
46
|
+
- Behavior is driven by the `【系统 · 选项刷新】` (system · option refresh) / `【系统 · 更多选项】` (system · more options) messages injected by the buttons; the model re-asks according to those instructions.
|
|
47
|
+
|
|
48
|
+
## Installation
|
|
49
|
+
|
|
50
|
+
```powershell
|
|
51
|
+
# npm (recommended)
|
|
52
|
+
dsh plugin --profile web add dsh-plugin-choice-refresh
|
|
53
|
+
# or GitHub
|
|
54
|
+
dsh plugin --profile web add github:Pasumao/dsh-plugin-choice-refresh
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Install from source (local development / debugging):
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
git clone https://github.com/Pasumao/dsh-plugin-choice-refresh.git
|
|
61
|
+
cd dsh-plugin-choice-refresh
|
|
62
|
+
npm install # or pnpm install
|
|
63
|
+
# Mount into the profile via link:, see 设计说明.md (design notes) for details
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Once installed, refresh the browser and it takes effect (hot-reloads automatically when the profile already has dsh-client-hmr — no restart needed).
|
|
67
|
+
For local development, you can mount the plugin via `link:` instead — see `设计说明.md` (design notes) for details.
|
|
68
|
+
|
|
69
|
+
## Usage
|
|
70
|
+
|
|
71
|
+
When the model asks a question as usual via `ask_user_question` / `ask_user_choice` (e.g. following the novel-* skills), two extra buttons — **Regenerate options** and **More options** — appear at the bottom of the choice card:
|
|
72
|
+
|
|
73
|
+
- Click **Regenerate options**: the current question is cancelled, and a `【系统 · 选项刷新】` user message is injected for the model, which immediately re-asks with a fresh set of options;
|
|
74
|
+
- Click **More options**: same as above — a `【系统 · 更多选项】` message is injected, and the model keeps the original options and adds more.
|
|
75
|
+
|
|
76
|
+
> The injected message stays short (one or two lines) and remains in the session as a user message so the model can understand the instruction;
|
|
77
|
+
> the UI displays it verbatim.
|
|
78
|
+
|
|
79
|
+
> Note: the refresh / top-up is done by the model, which re-invokes the question tool after reading the instruction — this is a "soft" enhancement, and the model may occasionally adjust the question itself. If you are still not satisfied with the result, click the button again or simply type what you want.
|
|
80
|
+
|
|
81
|
+
## Self-check
|
|
82
|
+
|
|
83
|
+
```powershell
|
|
84
|
+
# In the plugin directory (local dev clone / link mount)
|
|
85
|
+
npm run smoke # selfcheck + smoke-client
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Compatibility
|
|
89
|
+
|
|
90
|
+
- Tested on DSH `0.1.1-rc.2`; requires the DSH web GUI (an entry in the `conversation.composer` chain, priority -300).
|
|
91
|
+
- Directly compatible with the image cards of a co-installed `dsh-plugin-image-tools`; without it, plain text options work as usual.
|
|
92
|
+
- `plan-review` intents (plan review cards) are passed through to the native `PlanReviewPanel`, unaffected.
|
|
93
|
+
- Depends on the client services `slots` / `locale` / `sessions` / `remote`.
|
|
94
|
+
|
|
95
|
+
## Related plugins
|
|
96
|
+
|
|
97
|
+
This plugin is part of **Pasumao's dsh plugin ecosystem**; the other published plugins in the series pair well with it:
|
|
98
|
+
|
|
99
|
+
| Plugin (npm) | GitHub | Description |
|
|
100
|
+
|---|---|---|
|
|
101
|
+
| [dsh-notify](https://www.npmjs.com/package/dsh-notify) | [GitHub repo](https://github.com/Pasumao/dsh-plugin-notify) | Native Windows notifications + system tray |
|
|
102
|
+
| [dsh-plugin-dev-kb](https://www.npmjs.com/package/dsh-plugin-dev-kb) | [GitHub repo](https://github.com/Pasumao/dsh-plugin-dev-kb) | Plugin development knowledge base (full mirror of the official docs + skill) |
|
|
103
|
+
| [dsh-plugin-image-tools](https://www.npmjs.com/package/dsh-plugin-image-tools) | [GitHub repo](https://github.com/Pasumao/dsh-plugin-image-tools) | Image choice cards + inline images in replies + image handoff for text-only models |
|
|
104
|
+
| [dsh-plugin-table-zoom](https://www.npmjs.com/package/dsh-plugin-table-zoom) | [GitHub repo](https://github.com/Pasumao/dsh-plugin-table-zoom) | Floating-window viewer for long chat tables + one-click Markdown copy |
|
|
105
|
+
| [dsh-plugin-windows-guard](https://www.npmjs.com/package/dsh-plugin-windows-guard) | [GitHub repo](https://github.com/Pasumao/dsh-plugin-windows-guard) | Windows environment guard: rule skills + mojibake detection / dangerous-write blocking / encoding diagnostics & repair |
|
|
106
|
+
| [dsh-plugin-workbench](https://www.npmjs.com/package/dsh-plugin-workbench) | [GitHub repo](https://github.com/Pasumao/dsh-plugin-workbench) | VS Code-style file explorer + editable preview |
|
|
107
|
+
|
|
108
|
+
> For the rest of the series, see [Pasumao · dsh plugins](https://github.com/Pasumao); if you find them useful, a ⭐ on GitHub is always appreciated.
|
|
109
|
+
|
|
110
|
+
## AI generation disclosure
|
|
111
|
+
|
|
112
|
+
Code and documentation are AI-assisted (DeepSeek Harness), all human-reviewed and verified on a live install
|
|
113
|
+
(`npm run smoke`: selfcheck + fake-client smoke test).
|
|
114
|
+
|
|
115
|
+
## License
|
|
116
|
+
|
|
117
|
+
[MIT](./LICENSE)
|
package/README.md
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|

|
|
5
5
|

|
|
6
6
|
|
|
7
|
+
[**中文**](./README.md) | [English](./README.en.md)
|
|
8
|
+
|
|
7
9
|
**dsh 插件市场里唯一的选择增强插件**:给 `ask_user_question` / `ask_user_choice` 的选择卡加上两个按钮——
|
|
8
10
|
选项都不满意?一键让模型换一批完全不同的。选项太少?一键让模型补充。
|
|
9
11
|
|
|
@@ -16,6 +18,18 @@
|
|
|
16
18
|
[dsh-plugin-image-tools](https://github.com/Pasumao/dsh-plugin-image-tools) 的
|
|
17
19
|
图片选项卡都生效(图片卡由本插件直接渲染,复用其图片路由)。
|
|
18
20
|
|
|
21
|
+
## 效果图
|
|
22
|
+
|
|
23
|
+

|
|
24
|
+
|
|
25
|
+
选择卡底部自动多出两个按钮:
|
|
26
|
+
|
|
27
|
+

|
|
28
|
+
|
|
29
|
+
点「➕ 更多选项」后:模型保留原选项、补充到 6~10 个并重新提问。
|
|
30
|
+
|
|
31
|
+
> 真实 Web GUI 截图。
|
|
32
|
+
|
|
19
33
|
## 功能
|
|
20
34
|
|
|
21
35
|
- 🔄 **重新生成选项**:`ask_user_question` / `ask_user_choice` 给出的选项都不满意时,
|
|
@@ -78,7 +92,7 @@ npm run smoke # selfcheck + smoke-client
|
|
|
78
92
|
|
|
79
93
|
## 兼容性
|
|
80
94
|
|
|
81
|
-
-
|
|
95
|
+
- 实测于 DSH `0.1.1-rc.2`;需要 DSH web GUI(`conversation.composer` 链条目,priority -300)。
|
|
82
96
|
- 与 `dsh-plugin-image-tools` 共存的图片卡直接兼容;未安装时纯文字选项照常。
|
|
83
97
|
- `plan-review` 意图(计划审阅卡)放行给原生 `PlanReviewPanel`,不受影响。
|
|
84
98
|
- 依赖客户端服务:`slots` / `locale` / `sessions` / `remote`。
|
|
@@ -93,7 +107,7 @@ npm run smoke # selfcheck + smoke-client
|
|
|
93
107
|
| [dsh-plugin-dev-kb](https://www.npmjs.com/package/dsh-plugin-dev-kb) | [GitHub 仓库](https://github.com/Pasumao/dsh-plugin-dev-kb) | 插件开发知识库(官方文档完整镜像 + 技能) |
|
|
94
108
|
| [dsh-plugin-image-tools](https://www.npmjs.com/package/dsh-plugin-image-tools) | [GitHub 仓库](https://github.com/Pasumao/dsh-plugin-image-tools) | 图片选择卡 + 回复内嵌图片 + 盲模型收图 |
|
|
95
109
|
| [dsh-plugin-table-zoom](https://www.npmjs.com/package/dsh-plugin-table-zoom) | [GitHub 仓库](https://github.com/Pasumao/dsh-plugin-table-zoom) | 聊天长表格浮窗查看 + 一键复制 Markdown |
|
|
96
|
-
| [dsh-plugin-windows-guard](https://www.npmjs.com/package/dsh-plugin-windows-guard) | [GitHub 仓库](https://github.com/Pasumao/dsh-plugin-windows-guard) | Windows
|
|
110
|
+
| [dsh-plugin-windows-guard](https://www.npmjs.com/package/dsh-plugin-windows-guard) | [GitHub 仓库](https://github.com/Pasumao/dsh-plugin-windows-guard) | Windows 环境防坑:守则技能 + 乱码检测 / 危险写拦截 / 编码诊断修复 |
|
|
97
111
|
| [dsh-plugin-workbench](https://www.npmjs.com/package/dsh-plugin-workbench) | [GitHub 仓库](https://github.com/Pasumao/dsh-plugin-workbench) | VS Code 风格文件浏览器 + 可编辑预览 |
|
|
98
112
|
|
|
99
113
|
> 本系列其余插件见 [Pasumao · dsh 插件](https://github.com/Pasumao);觉得好用欢迎到 GitHub 点 ⭐。
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-plugin-choice-refresh",
|
|
3
|
-
"description": "DSH
|
|
4
|
-
"version": "0.1.
|
|
3
|
+
"description": "DSH 选择增强插件(生态唯一):给 ask_user_question / ask_user_choice 的选择卡加「重新生成选项 / 更多选项」两个按钮——选项都不满意一键换一批(换角度/维度,5~8 个),选项太少一键补充到 6~10 个。纯前端交互实现,不改核心包、不新增工具,原生文字卡与图片选择卡通吃。",
|
|
4
|
+
"version": "0.1.4",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"exports": {
|
|
@@ -12,8 +12,11 @@
|
|
|
12
12
|
"files": [
|
|
13
13
|
"lib",
|
|
14
14
|
"scripts",
|
|
15
|
+
"docs",
|
|
15
16
|
"cordis.patch.yml",
|
|
16
17
|
"README.md",
|
|
18
|
+
"README.en.md",
|
|
19
|
+
"CHANGELOG.md",
|
|
17
20
|
"LICENSE",
|
|
18
21
|
"设计说明.md"
|
|
19
22
|
],
|
|
@@ -45,7 +48,13 @@
|
|
|
45
48
|
"plugin",
|
|
46
49
|
"choice",
|
|
47
50
|
"refresh",
|
|
48
|
-
"regenerate",
|
|
51
|
+
"regenerate-options",
|
|
52
|
+
"more-options",
|
|
53
|
+
"ask-user",
|
|
54
|
+
"question",
|
|
55
|
+
"ux",
|
|
56
|
+
"chat-ui",
|
|
57
|
+
"frontend",
|
|
49
58
|
"options"
|
|
50
59
|
],
|
|
51
60
|
"license": "MIT",
|