dsh-better-ask-user 0.3.5 → 0.3.6

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
@@ -12,7 +12,7 @@
12
12
  <p align="center">
13
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
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.2" src="https://img.shields.io/badge/DSH-0.2.2--rc.2-4B32C3"></a>
15
+ <a href="package.json"><img alt="DSH 0.2.2-rc.3" src="https://img.shields.io/badge/DSH-0.2.2--rc.3-4B32C3"></a>
16
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
17
  </p>
18
18
 
@@ -42,10 +42,10 @@
42
42
 
43
43
  ```sh
44
44
  # 只安装这个插件
45
- dsh plugin --profile <profile> add dsh-better-ask-user@0.3.5 dsh-better-ptc@0.2.1
45
+ dsh plugin --profile <profile> add dsh-better-ask-user@0.3.6 dsh-better-ptc@0.2.2
46
46
 
47
47
  # 或安装 Better DSH(会自动带上所有独立插件)
48
- dsh plugin --profile <profile> add dsh-better-dsh@0.11.5
48
+ dsh plugin --profile <profile> add dsh-better-dsh@0.11.7
49
49
  ```
50
50
 
51
51
  > 安装 / 升级 / 换包后必须重启对应 profile;Desktop 必须完全退出后重新打开,只刷新网页不够。
@@ -63,7 +63,7 @@ dsh plugin --profile <profile> add dsh-better-dsh@0.11.5
63
63
  | 稳定行 id | `dsh-better-ask-user` |
64
64
  | 入口 / 工具 | `ask_user_question` · 问题卡片 / 等待时间线 · 提问设置页 |
65
65
  | 设置 | 等待时长、输入续期、普通 / Goal 超时行为 |
66
- | npm 包 | `dsh-better-ask-user@0.3.5` |
66
+ | npm 包 | `dsh-better-ask-user@0.3.6` |
67
67
  | 仓库 | https://github.com/omdsh-dev/dsh-better-ask-user |
68
68
 
69
69
  ## 设置
package/lib/client.js CHANGED
@@ -595,9 +595,9 @@ function AskHistoryRow({
595
595
  const questions = questionList(argsRaw);
596
596
  const settled = useProjection("userQuestions", (view) => view?.settled.find((row) => row.callId === callId));
597
597
  const answers = settled?.answers ?? answerList(output) ?? [];
598
- const record = questions !== void 0 && phase === "result" ? { questions, answers } : void 0;
599
598
  const live = useQuestionPanelLive(callId, (present) => present === true);
600
599
  const errorCode = "kind" in block ? block.error?.code : void 0;
600
+ const record = questions !== void 0 && phase === "result" ? { questions, answers } : void 0;
601
601
  const status = live ? void 0 : errorCode === "ASK_ABORTED" || errorCode === "interrupted" ? t("history.interrupted") : errorCode === "ASK_CANCELLED" ? t("history.cancelled") : phase === "start" ? t("history.waiting") : void 0;
602
602
  const summary = questions?.[0]?.question.split("\n").find((line) => line.trim() !== "")?.trim() ?? t("history.title");
603
603
  const action = live ? () => revealPanel(callId) : record === void 0 ? void 0 : () => reviewPanel(callId, record);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-better-ask-user",
3
- "version": "0.3.5",
3
+ "version": "0.3.6",
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": {
@@ -16,7 +16,7 @@
16
16
  },
17
17
  "engines": {
18
18
  "node": ">=24.9.0",
19
- "dsh": "0.2.2-rc.2"
19
+ "dsh": ">=0.2.2-rc.2 <0.3.0"
20
20
  },
21
21
  "scripts": {
22
22
  "pretest": "node scripts/build-client.mjs",
@@ -25,16 +25,16 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "@deepseek-ai/schemastery": "~3.19.0",
28
- "dsh-better-ptc": "0.2.1"
28
+ "dsh-better-ptc": "0.2.2"
29
29
  },
30
30
  "peerDependencies": {
31
31
  "@deepseek-ai/cordis": "~4.1.0",
32
- "@deepseek-ai/dsh-agent": "0.2.2-rc.2",
33
- "@deepseek-ai/dsh-llm": "0.2.2-rc.2",
34
- "@deepseek-ai/dsh-session": "0.2.2-rc.2",
35
- "@deepseek-ai/dsh-system-prompt": "0.2.2-rc.2",
36
- "@deepseek-ai/dsh-tools": "0.2.2-rc.2",
37
- "@deepseek-ai/dsh-user-questions": "0.2.2-rc.2",
32
+ "@deepseek-ai/dsh-agent": ">=0.2.2-rc.2 <0.3.0",
33
+ "@deepseek-ai/dsh-llm": ">=0.2.2-rc.2 <0.3.0",
34
+ "@deepseek-ai/dsh-session": ">=0.2.2-rc.2 <0.3.0",
35
+ "@deepseek-ai/dsh-system-prompt": ">=0.2.2-rc.2 <0.3.0",
36
+ "@deepseek-ai/dsh-tools": ">=0.2.2-rc.2 <0.3.0",
37
+ "@deepseek-ai/dsh-user-questions": ">=0.2.2-rc.2 <0.3.0",
38
38
  "react": "^18.2.0"
39
39
  },
40
40
  "devDependencies": {
@@ -112,14 +112,17 @@ export function AskHistoryRow({
112
112
  // A late reply settles through the projection, not through a second tool result.
113
113
  const settled = useProjection('userQuestions', view => view?.settled.find(row => row.callId === callId))
114
114
  const answers = settled?.answers ?? answerList(output) ?? []
115
+ const live = useQuestionPanelLive(callId, present => present === true)
116
+ const errorCode = 'kind' in block ? block.error?.code : undefined
115
117
  // Every settled call with readable questions can be reviewed; an empty answer
116
- // batch still shows the question and its "no answer recorded" state.
118
+ // batch still shows the question and its "no answer recorded" state. The
119
+ // review is read-only, so an interrupted call must never expose "Open".
117
120
  const record: UserQuestionRecord | undefined = questions !== undefined && phase === 'result'
118
121
  ? { questions, answers }
119
122
  : undefined
120
- const live = useQuestionPanelLive(callId, present => present === true)
121
- const errorCode = 'kind' in block ? block.error?.code : undefined
122
123
  // A live card is the truth; a terminal label belongs only to the settled view.
124
+ // Before the client card arrives, keep the row honest: it is waiting for the
125
+ // question UI rather than silently offering nothing.
123
126
  const status = live
124
127
  ? undefined
125
128
  : errorCode === 'ASK_ABORTED' || errorCode === 'interrupted'