dsh-better-ask-user 0.3.0 → 0.3.1
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 +88 -72
- package/lib/client.js +1 -0
- package/package.json +11 -3
- package/src/client/index.ts +4 -3
package/README.md
CHANGED
|
@@ -1,72 +1,88 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<picture>
|
|
3
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/omdsh-dev/dsh-better-ask-user/main/docs/assets/banner-dark.svg">
|
|
4
|
+
<img src="https://raw.githubusercontent.com/omdsh-dev/dsh-better-ask-user/main/docs/assets/banner-light.svg" width="100%" alt="Part of Better DSH — dsh-better-ask-user">
|
|
5
|
+
</picture>
|
|
6
|
+
</p>
|
|
7
|
+
|
|
8
|
+
<h1 align="center">dsh-better-ask-user</h1>
|
|
9
|
+
|
|
10
|
+
<p align="center">让提问等待变得可见、可控、对移动端友好,同时守住必须由人做的决策。</p>
|
|
11
|
+
|
|
12
|
+
<p align="center">
|
|
13
|
+
<a href="https://www.npmjs.com/package/dsh-better-ask-user"><img src="https://img.shields.io/npm/v/dsh-better-ask-user.svg" alt="npm 版本"></a>
|
|
14
|
+
<a href="LICENSE"><img alt="Apache-2.0" src="https://img.shields.io/github/license/omdsh-dev/dsh-better-ask-user?color=blue"></a>
|
|
15
|
+
<a href="package.json"><img alt="DSH 0.2.2-rc.1" src="https://img.shields.io/badge/DSH-0.2.2--rc.1-4B32C3"></a>
|
|
16
|
+
<a href="https://github.com/omdsh-dev/dsh-better-dsh"><img alt="Part of Better DSH" src="https://img.shields.io/badge/part%20of-dsh--better--dsh-2F80B7"></a>
|
|
17
|
+
</p>
|
|
18
|
+
|
|
19
|
+
<p align="center">
|
|
20
|
+
<a href="https://github.com/omdsh-dev/dsh-better-dsh">Better DSH 插件集合</a> ·
|
|
21
|
+
<a href="#安装">安装</a> ·
|
|
22
|
+
<a href="#它拥有什么">它拥有什么</a> ·
|
|
23
|
+
<a href="#设置">设置</a> ·
|
|
24
|
+
<a href="#与-better-dsh-的关系">与 Better DSH 的关系</a>
|
|
25
|
+
</p>
|
|
26
|
+
|
|
27
|
+
## 它做什么
|
|
28
|
+
|
|
29
|
+
- `ask_user_question` 等待与输入续期
|
|
30
|
+
- 倒计时 / 进度 / 过期状态
|
|
31
|
+
- Markdown、移动端卡片与键盘操作
|
|
32
|
+
- 普通提问超时默认选择
|
|
33
|
+
|
|
34
|
+
<p align="center">
|
|
35
|
+
<picture>
|
|
36
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/omdsh-dev/dsh-better-ask-user/main/docs/assets/ownership-dark.svg">
|
|
37
|
+
<img src="https://raw.githubusercontent.com/omdsh-dev/dsh-better-ask-user/main/docs/assets/ownership-light.svg" width="100%" alt="dsh-better-ask-user 与 Better DSH 的装配关系">
|
|
38
|
+
</picture>
|
|
39
|
+
</p>
|
|
40
|
+
|
|
41
|
+
## 安装
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
# 只安装这个插件
|
|
45
|
+
dsh plugin --profile <profile> add dsh-better-ask-user@0.3.1 dsh-better-ptc@0.2.0
|
|
46
|
+
|
|
47
|
+
# 或安装 Better DSH(会自动带上所有独立插件)
|
|
48
|
+
dsh plugin --profile <profile> add dsh-better-dsh@0.10.0
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
> 安装 / 升级 / 换包后必须重启对应 profile;只刷新网页不够。
|
|
52
|
+
|
|
53
|
+
## 它拥有什么
|
|
54
|
+
|
|
55
|
+
| | |
|
|
56
|
+
|---|---|
|
|
57
|
+
| 稳定行 id | `dsh-better-ask-user` |
|
|
58
|
+
| 入口 / 工具 | `ask_user_question` · 问题卡片 / 等待时间线 · 提问设置页 |
|
|
59
|
+
| 设置 | 等待时长、输入续期、普通 / Goal 超时行为 |
|
|
60
|
+
| npm 包 | `dsh-better-ask-user@0.3.1` |
|
|
61
|
+
| 仓库 | https://github.com/omdsh-dev/dsh-better-ask-user |
|
|
62
|
+
|
|
63
|
+
## 设置
|
|
64
|
+
|
|
65
|
+
可以在 Plugins 页的 `dsh-better-ask-user` 行设置,也可以在 Better DSH 详情页的「集成设置」里打开同名页面。两个入口共用同一份配置和同一个设置组件,不会产生第二份存储。
|
|
66
|
+
|
|
67
|
+
- plan-review / approval 始终要求人工决策,不自动批准。
|
|
68
|
+
- 普通提问可配置超时默认选择;旧 goal 的提问配置会一次性迁移。
|
|
69
|
+
|
|
70
|
+
## 与 Better DSH 的关系
|
|
71
|
+
|
|
72
|
+
- **同一个稳定行**:独立安装或由 `dsh-better-dsh` 装配,行 id 和设置命名空间都不变。
|
|
73
|
+
- **旧入口兼容**:早期 Apollo 集成使用的行配置键仍然注册,指向同一份配置。
|
|
74
|
+
- **可以单独使用**:不安装 Better DSH 也能工作;只是不会得到工程预设、流程技能或后台 job 守卫。
|
|
75
|
+
- **Apache-2.0**:本仓库与 Better DSH 的其他仓库统一使用 Apache License 2.0。
|
|
76
|
+
|
|
77
|
+
## 开发
|
|
78
|
+
|
|
79
|
+
```sh
|
|
80
|
+
npm test # 单元 / 组件测试
|
|
81
|
+
npm run smoke # 如仓库提供运行时冒烟
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
实现与测试说明见 [docs/DEVELOPMENT.md](docs/DEVELOPMENT.md)。
|
|
85
|
+
|
|
86
|
+
## 许可
|
|
87
|
+
|
|
88
|
+
[Apache License 2.0](LICENSE)。
|
package/lib/client.js
CHANGED
|
@@ -2391,6 +2391,7 @@ function publishContinuedQuestions(ctx, cards) {
|
|
|
2391
2391
|
var SETTINGS_NS = "better-ask-user-settings";
|
|
2392
2392
|
var ROW_CONFIG_KEYS = Object.freeze([
|
|
2393
2393
|
"dsh-better-ask-user#dsh-better-ask-user",
|
|
2394
|
+
"dsh-better-dsh#dsh-better-ask-user",
|
|
2394
2395
|
"@menghuan1918/dsh-apollo#dsh-better-ask-user",
|
|
2395
2396
|
"dsh-apollo#dsh-better-ask-user"
|
|
2396
2397
|
]);
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-better-ask-user",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Independent ask_user_question plugin: configurable wait, input-extended countdown, markdown/mobile card, native or default timeout behavior, and PTC deadline exemption.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
|
-
"url": "git+https://github.com/
|
|
8
|
+
"url": "git+https://github.com/omdsh-dev/dsh-better-ask-user.git"
|
|
9
9
|
},
|
|
10
10
|
"type": "module",
|
|
11
11
|
"main": "src/index.js",
|
|
@@ -69,5 +69,13 @@
|
|
|
69
69
|
"README.md",
|
|
70
70
|
"LICENSE",
|
|
71
71
|
"NOTICE"
|
|
72
|
-
]
|
|
72
|
+
],
|
|
73
|
+
"homepage": "https://github.com/omdsh-dev/dsh-better-ask-user#readme",
|
|
74
|
+
"bugs": {
|
|
75
|
+
"url": "https://github.com/omdsh-dev/dsh-better-ask-user/issues"
|
|
76
|
+
},
|
|
77
|
+
"publishConfig": {
|
|
78
|
+
"registry": "https://registry.npmjs.org/",
|
|
79
|
+
"access": "public"
|
|
80
|
+
}
|
|
73
81
|
}
|
package/src/client/index.ts
CHANGED
|
@@ -378,11 +378,12 @@ function publishContinuedQuestions(ctx: ClientContext, cards: QuestionCards): ()
|
|
|
378
378
|
* @param ctx - client root context.
|
|
379
379
|
*/
|
|
380
380
|
const SETTINGS_NS = 'better-ask-user-settings'
|
|
381
|
-
// Standalone first, then the
|
|
382
|
-
// inserts the row from its bundle patch, so the Plugins page looks
|
|
383
|
-
// as '
|
|
381
|
+
// Standalone first, then Better DSH and the legacy Apollo integration aliases.
|
|
382
|
+
// The profile inserts the row from its bundle patch, so the Plugins page looks
|
|
383
|
+
// the page up as '<declaring bundle>#dsh-better-ask-user'.
|
|
384
384
|
const ROW_CONFIG_KEYS = Object.freeze([
|
|
385
385
|
'dsh-better-ask-user#dsh-better-ask-user',
|
|
386
|
+
'dsh-better-dsh#dsh-better-ask-user',
|
|
386
387
|
'@menghuan1918/dsh-apollo#dsh-better-ask-user',
|
|
387
388
|
'dsh-apollo#dsh-better-ask-user',
|
|
388
389
|
])
|