dsh-question-timeout-protection 0.1.1 → 0.1.3
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 -14
- package/README_en-US.md +21 -16
- package/dist/client.js +83 -15
- package/dist/index.mjs +3 -1
- package/package.json +19 -16
- package/src/translation/.example_zh-CN.ini +3 -3
- package/src/translation/en-US.ini +5 -5
- package/src/translation/zh-CN.ini +3 -3
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# dsh-question-timeout-protection
|
|
4
4
|
|
|
5
|
-
[](https://github.com/JularDepick/dsh-question-timeout-protection/releases)
|
|
6
6
|
[](./COPYRIGHT)
|
|
7
7
|
[](./LICENSE)
|
|
8
8
|
|
|
@@ -36,20 +36,18 @@ dsh 默认的提问是阻塞式的: 模型问完就一直等, 你离开一会儿
|
|
|
36
36
|
|
|
37
37
|
### 前置条件
|
|
38
38
|
|
|
39
|
-
- dsh 版本在 `>=0.2.1-rc.1
|
|
39
|
+
- dsh 版本在 `>=0.2.1-rc.1 <0.2.3-rc.1` 之内, 不满足会被安装与启动阶段拒绝
|
|
40
40
|
- Node.js >= 20
|
|
41
41
|
|
|
42
42
|
### 方式一: 从 npm 安装
|
|
43
43
|
|
|
44
|
-
dsh 原生支持从 npm
|
|
45
|
-
|
|
46
|
-
真正可用的前提是本项目发布到 npm 且 latest 指向正式版本. 到那时一条命令即可:
|
|
44
|
+
dsh 原生支持从 npm 安装插件:
|
|
47
45
|
|
|
48
46
|
```
|
|
49
47
|
dsh plugin --profile <profile> add dsh-question-timeout-protection
|
|
50
48
|
```
|
|
51
49
|
|
|
52
|
-
|
|
50
|
+
按包名安装默认取 npm 上 latest 标签指向的版本. 0.1.2 声明的 dsh 上限是 `0.2.2-rc.2`, 在 dsh `0.2.2-rc.3` 起的宿主上会被安装与启动阶段拒绝; 需要固定版本时用 `dsh plugin --profile <profile> add dsh-question-timeout-protection@<版本>`. 本版本 0.1.3 的上限是 `<0.2.3-rc.1`, 也可以按下面的方式二至方式四从源码或 tarball 安装.
|
|
53
51
|
|
|
54
52
|
### 方式二: 从源码构建后安装
|
|
55
53
|
|
|
@@ -58,10 +56,11 @@ dsh plugin --profile <profile> add dsh-question-timeout-protection
|
|
|
58
56
|
```
|
|
59
57
|
pnpm install
|
|
60
58
|
pnpm pack
|
|
61
|
-
dsh plugin --profile <profile> add
|
|
59
|
+
dsh plugin --profile <profile> add ./release/<tarball>
|
|
60
|
+
dsh plugin --profile <profile> add <绝对路径>
|
|
62
61
|
```
|
|
63
62
|
|
|
64
|
-
`pnpm pack` 会先构建, 完成后把 tarball
|
|
63
|
+
`pnpm pack` 会先构建, 完成后把 tarball 移入仓库根目录的 `release/`, 文件名形如 `dsh-question-timeout-protection-0.1.3.tgz`. 沙箱内生命周期脚本被拦截时改用 `pnpm run pack:release`, 产物相同. `add` 的路径要以 `./` 或 `../` 开头才会按你执行命令的目录解析, 不带前缀会被当成包名去查注册表.
|
|
65
64
|
|
|
66
65
|
### 方式三: 直接从 GitHub 源码安装
|
|
67
66
|
|
|
@@ -74,6 +73,8 @@ allowBuilds:
|
|
|
74
73
|
dsh-question-timeout-protection: true
|
|
75
74
|
```
|
|
76
75
|
|
|
76
|
+
`allowBuilds` 从 pnpm 10.26 起可用; 更早的 10.x 请把同一个包键写进 `onlyBuiltDependencies` 列表.
|
|
77
|
+
|
|
77
78
|
然后重新执行 `add`. 跳过这一步装上去没有构建产物, 插件不会工作.
|
|
78
79
|
|
|
79
80
|
### 方式四: 从 Release 的 tarball 安装
|
|
@@ -81,7 +82,8 @@ allowBuilds:
|
|
|
81
82
|
下载对应版本的 tarball 后直接:
|
|
82
83
|
|
|
83
84
|
```
|
|
84
|
-
dsh plugin --profile <profile> add
|
|
85
|
+
dsh plugin --profile <profile> add ./release/<tarball>
|
|
86
|
+
dsh plugin --profile <profile> add <绝对路径>
|
|
85
87
|
```
|
|
86
88
|
|
|
87
89
|
这种方式不需要构建, 也不受 pnpm 构建脚本拦截影响.
|
|
@@ -124,7 +126,7 @@ dsh plugin --profile <profile> add <tarball>
|
|
|
124
126
|
|
|
125
127
|
### 注入到上下文
|
|
126
128
|
|
|
127
|
-
这一项默认开启.
|
|
129
|
+
这一项默认开启. 客户端在作答期间始终把草稿快照上报给服务端(它读不到服务端配置), 由服务端按这一项决定是否取用: 开启时工具到期取用最新一份, 按题随 pending 结果带回模型上下文, 每道题带自己的已选与补充; 关闭时快照只留在服务端并在调用结束时清掉.
|
|
128
130
|
|
|
129
131
|
超时说明与草稿放在同一个结果里, 并明确要求模型在回复末尾告知你这次超时; 如果带回了草稿, 还要说明准备怎么处理它.
|
|
130
132
|
|
|
@@ -132,22 +134,24 @@ dsh plugin --profile <profile> add <tarball>
|
|
|
132
134
|
|
|
133
135
|
### 配置项
|
|
134
136
|
|
|
135
|
-
配置页在**插件详情页顶部**的插件级配置区块, 不在「包含的组件」里. 其中只有「注入到上下文」一个勾选可以调整, 勾选变化立即写入, 不需要保存或刷新.
|
|
137
|
+
配置页在**插件详情页顶部**的插件级配置区块, 不在「包含的组件」里. 其中只有「注入到上下文」一个勾选可以调整, 勾选变化立即写入, 不需要保存或刷新. 页面以固定行列出「界面保留草稿」与下面三项固定特性, 只作说明, 不提供开关.
|
|
136
138
|
|
|
137
139
|
| 配置项 | 取值 | 默认值 | 界面 | 说明 |
|
|
138
140
|
|:---:|:---:|:---:|:---:|:---:|
|
|
139
141
|
| `fallback` | `ui` / `context` / `both` | `both` | 可改一项 | 超时兜底. 界面只给「注入到上下文」勾选, 勾上写 `both`, 不勾写 `ui`. 界面保留草稿恒定开启, 所以不会出现 `context` |
|
|
140
|
-
| `cardEnhancements` | 布尔 | `true` | 固定特性 | 只管装饰:
|
|
142
|
+
| `cardEnhancements` | 布尔 | `true` | 固定特性 | 只管装饰: 倒计时与警示闪烁, 单选选项的方形标号填充底色, 提问气泡, 隐藏宿主自带的收起控件与等待文案. 关闭后装饰都不出现, 但超时收尾照常: 该收的卡片仍会被收起与锁定, 草稿仍会按配置上报 |
|
|
141
143
|
| `infiniteWait` | 布尔 | `true` | 固定特性 | 提供「无限等待」按钮与工具栏常开开关, 关闭后两者一并移除 |
|
|
142
144
|
| `draftFallback` | 布尔 | `true` | 固定特性 | 超时收尾开关. 关闭后客户端不再收尾卡片也不再上报草稿, 这一轮交还宿主; 提问仍由插件按时结算 |
|
|
143
145
|
| `warningSeconds` | 数字 | 5 | 不暴露 | 进入红字闪烁的剩余秒数, 取值 1 至 60 |
|
|
144
146
|
| `timeoutSeconds` | 数字 | 120 | 不暴露 | 模型没有显式传等待秒数时用的时长, 取值 1 至 2147483 |
|
|
145
147
|
|
|
148
|
+
最后两项不在界面暴露, 需要时在该 profile 的 `cordis.patch.yml` 里本插件行的 `config` 中写入, 例如把等待时长改成 300 秒: `config: { timeoutSeconds: 300 }`. 取值越界会在加载期报错. 三个固定特性同样只能经这条路径关闭, 例如 `config: { cardEnhancements: false }`; 该行的其余键必须一并重述, 不能只写改动的键.
|
|
149
|
+
|
|
146
150
|
## 兼容性
|
|
147
151
|
|
|
148
152
|
| 项目 | 版本 |
|
|
149
153
|
|:---:|:---:|
|
|
150
|
-
| dsh | `>=0.2.1-rc.1
|
|
154
|
+
| dsh | `>=0.2.1-rc.1 <0.2.3-rc.1` |
|
|
151
155
|
| Node.js | >= 20 |
|
|
152
156
|
|
|
153
157
|
宿主 dsh 自身的 Node.js 要求以对应版本的发行说明为准.
|
|
@@ -190,7 +194,7 @@ dsh plugin --profile <profile> add <tarball>
|
|
|
190
194
|
|
|
191
195
|
**依赖宿主界面**
|
|
192
196
|
|
|
193
|
-
卡片与工具行靠宿主的类名后缀, `data-question-key`, `data-chat-call-id`, `aria-checked` 等特征定位,
|
|
197
|
+
卡片与工具行靠宿主的类名后缀, `data-question-key`, `data-chat-call-id`, `aria-checked` 等特征定位, 宿主控件按中英文标签识别(日文的「回答」与中文同形, 因此那一项也能命中); 结算后恢复宿主入口时还会按 `查看回答` / `View answers` / `回答を表示` 认出「查看回答」入口; 工具栏开关优先按模型选择控件的无障碍标签定位, 标签不匹配时退回工具栏容器内按结构定位, 再退回全文档查找, 定位失败时按原因各留一条 console.warn 而不是静默消失. 宿主改动这些结构或文案时对应增强会失效, 识别标签与选择器集中在源码的常量文件里.
|
|
194
198
|
|
|
195
199
|
**依赖宿主提问投影**
|
|
196
200
|
|
|
@@ -220,6 +224,7 @@ dsh plugin --profile <profile> add <tarball>
|
|
|
220
224
|
- 宿主 0.2.2-rc.1 打开卡片时会预选带推荐标记的选项, 插件按投影里的选项原文剥掉这些预选值; 多选时点过任一选项后, 其余预选项按宿主自己的提交口径一并保留
|
|
221
225
|
- 只是点了「跳过」而没有选择与输入时, 草稿按空处理, 这次超时由插件关闭卡片
|
|
222
226
|
- 草稿按题合并三处来源, 优先级为宿主持久化记录, 当前显示题的实时值, 插件自己的快照; 读实时值时已选标签取的是宿主给读屏用的文案, 其中的「(推荐)」这类后缀可能被省略
|
|
227
|
+
- 桌面端(macOS)自 dsh 0.2.2-rc.2 起只在带 `data-window-drag` 的页头行内允许拖动窗口, 带 `data-window-drag-controls` 的容器里的控件由宿主自动排除拖动; 覆盖拖动行的自定义浮层要自身声明 `data-window-drag-exclude` 才可交互, 顶部还留了 `--dsh-frame-top-clearance` 的预留带. 插件的草稿浮层挂在 body 上, 既没有声明拖动排除也不读预留带, 因此桌面端贴近窗口顶部时可能落进预留带; 浮层内没有可点控件, 影响限于位置; 网页客户端不受影响
|
|
223
228
|
- 注入给模型的超时说明目前只有中文, 英文界面下模型收到的仍是中文说明
|
|
224
229
|
- 草稿超过单次上报上限 256 KiB 时界面显示「草稿过长, 未送达」, 这一条不计入连续失败次数; 连续失败三次后该轮判定通道不可用, 插件不再接管, 卡片交还宿主继续可作答
|
|
225
230
|
|
package/README_en-US.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# dsh-question-timeout-protection
|
|
4
4
|
|
|
5
|
-
[](https://github.com/JularDepick/dsh-question-timeout-protection/releases)
|
|
6
6
|
[](./COPYRIGHT)
|
|
7
7
|
[](./LICENSE)
|
|
8
8
|
|
|
@@ -36,20 +36,18 @@ This plugin adds three things: you can see how long is left, you can pause the w
|
|
|
36
36
|
|
|
37
37
|
### Requirements
|
|
38
38
|
|
|
39
|
-
- dsh within `>=0.2.1-rc.1
|
|
39
|
+
- dsh within `>=0.2.1-rc.1 <0.2.3-rc.1`; installation and startup refuse anything outside it
|
|
40
40
|
- Node.js >= 20
|
|
41
41
|
|
|
42
42
|
### Option A: install from npm
|
|
43
43
|
|
|
44
|
-
dsh installs plugins from npm natively
|
|
45
|
-
|
|
46
|
-
It becomes usable once this project is published to npm and latest points at a real release. At that point one command is all you need:
|
|
44
|
+
dsh installs plugins from npm natively:
|
|
47
45
|
|
|
48
46
|
```
|
|
49
47
|
dsh plugin --profile <profile> add dsh-question-timeout-protection
|
|
50
48
|
```
|
|
51
49
|
|
|
52
|
-
|
|
50
|
+
Installing by package name takes whatever the npm latest tag points at. Version 0.1.2 declares dsh support only up to `0.2.2-rc.2`, so installation and startup reject it on dsh `0.2.2-rc.3` and later; pin a version with `dsh plugin --profile <profile> add dsh-question-timeout-protection@<version>`. This version (0.1.3) supports up to `<0.2.3-rc.1`, and Options B to D below install it from source or a tarball.
|
|
53
51
|
|
|
54
52
|
### Option B: build from source
|
|
55
53
|
|
|
@@ -58,10 +56,11 @@ For using the plugin straight from this repository:
|
|
|
58
56
|
```
|
|
59
57
|
pnpm install
|
|
60
58
|
pnpm pack
|
|
61
|
-
dsh plugin --profile <profile> add
|
|
59
|
+
dsh plugin --profile <profile> add ./release/<tarball>
|
|
60
|
+
dsh plugin --profile <profile> add <absolute path>
|
|
62
61
|
```
|
|
63
62
|
|
|
64
|
-
`pnpm pack` builds first, then
|
|
63
|
+
`pnpm pack` builds first, then moves the tarball into `release/` at the repository root under a name like `dsh-question-timeout-protection-0.1.3.tgz`. Where a sandbox blocks lifecycle scripts, use `pnpm run pack:release` for the same artifact. A path passed to `add` is resolved against your current directory only when it starts with `./` or `../`; otherwise it is treated as a package name and looked up in the registry.
|
|
65
64
|
|
|
66
65
|
### Option C: install from the GitHub source
|
|
67
66
|
|
|
@@ -74,6 +73,8 @@ allowBuilds:
|
|
|
74
73
|
dsh-question-timeout-protection: true
|
|
75
74
|
```
|
|
76
75
|
|
|
76
|
+
`allowBuilds` is available from pnpm 10.26; on earlier 10.x put the same package key into an `onlyBuiltDependencies` list.
|
|
77
|
+
|
|
77
78
|
Then run `add` again. Without this step the install lands with no build output and the plugin does not work.
|
|
78
79
|
|
|
79
80
|
### Option D: install from a release tarball
|
|
@@ -81,7 +82,8 @@ Then run `add` again. Without this step the install lands with no build output a
|
|
|
81
82
|
Download the tarball for the version you want and install it directly:
|
|
82
83
|
|
|
83
84
|
```
|
|
84
|
-
dsh plugin --profile <profile> add
|
|
85
|
+
dsh plugin --profile <profile> add ./release/<tarball>
|
|
86
|
+
dsh plugin --profile <profile> add <absolute path>
|
|
85
87
|
```
|
|
86
88
|
|
|
87
89
|
No build is needed and the pnpm build-script policy does not apply.
|
|
@@ -124,7 +126,7 @@ The draft lives only in memory, so a page refresh loses the bubbles and their re
|
|
|
124
126
|
|
|
125
127
|
### Context injection
|
|
126
128
|
|
|
127
|
-
This is on by default. While you are answering, the
|
|
129
|
+
This is on by default. While you are answering, the client always reports draft snapshots to the server (it cannot read the plugin configuration); the server decides whether to use them. When on, expiry takes the latest snapshot and returns it to the model context through the tool's pending result, per question, each keeping its own selections and notes; when off, the snapshot stays on the server and is cleared when the call ends.
|
|
128
130
|
|
|
129
131
|
The timeout notice and the draft share that one result, and the model is explicitly told to report the timeout at the end of its reply, plus what it intends to do with the draft when one came back.
|
|
130
132
|
|
|
@@ -132,22 +134,24 @@ With this off, the plugin only withdraws the card and hands the model no draft.
|
|
|
132
134
|
|
|
133
135
|
### Configuration
|
|
134
136
|
|
|
135
|
-
The config page sits at the **top of the plugin detail view**, not inside "
|
|
137
|
+
The config page sits at the **top of the plugin detail view**, not inside "Components". Only "Inject into context" can be changed, and a toggle writes immediately without any save or refresh. The page lists "keep the draft in the UI" and the three fixed features below as fixed rows for reference; none of them has a switch.
|
|
136
138
|
|
|
137
139
|
| Option | Values | Default | UI | Description |
|
|
138
140
|
|:---:|:---:|:---:|:---:|:---:|
|
|
139
|
-
| `fallback` | `ui` / `context` / `both` | `both` | One switch | Timeout fallback. The page only offers "Inject into
|
|
140
|
-
| `cardEnhancements` | boolean | `true` | Fixed | Decoration only: countdown and warning blink,
|
|
141
|
+
| `fallback` | `ui` / `context` / `both` | `both` | One switch | Timeout fallback. The page only offers "Inject into context": checked writes `both`, unchecked writes `ui`. Keeping the draft in the UI is always on, so `context` never appears |
|
|
142
|
+
| `cardEnhancements` | boolean | `true` | Fixed | Decoration only: countdown and warning blink, a background fill on the square marker of the selected single-choice option, the question bubble, and hiding the host's collapse controls and wait text. When off no decoration appears, while the timeout wrap-up still runs: the card that should be withdrawn is still withdrawn and locked, and the draft is still reported per the configuration above |
|
|
141
143
|
| `infiniteWait` | boolean | `true` | Fixed | Provides the "Wait indefinitely" button and the toolbar switch; turning it off removes both |
|
|
142
144
|
| `draftFallback` | boolean | `true` | Fixed | Timeout wrap-up switch. When off the client neither withdraws the card nor reports the draft and hands that question back to the host; the plugin still settles the wait on time |
|
|
143
145
|
| `warningSeconds` | number | 5 | Not exposed | Seconds remaining when the red warning starts, from 1 to 60 |
|
|
144
146
|
| `timeoutSeconds` | number | 120 | Not exposed | Wait seconds used when the model does not pass one explicitly, from 1 to 2147483 |
|
|
145
147
|
|
|
148
|
+
The last two are not exposed in the UI; write them into this plugin's row under `config` in the profile's `cordis.patch.yml`, for example `config: { timeoutSeconds: 300 }` for a 300-second wait. Out-of-range values fail loudly at load time. The three fixed features are switched off the same way, for example `config: { cardEnhancements: false }`; restate every key that row needs rather than only the changed one.
|
|
149
|
+
|
|
146
150
|
## Compatibility
|
|
147
151
|
|
|
148
152
|
| Item | Version |
|
|
149
153
|
|:---:|:---:|
|
|
150
|
-
| dsh | `>=0.2.1-rc.1
|
|
154
|
+
| dsh | `>=0.2.1-rc.1 <0.2.3-rc.1` |
|
|
151
155
|
| Node.js | >= 20 |
|
|
152
156
|
|
|
153
157
|
The Node.js requirement of the host dsh itself follows the release notes of the matching version.
|
|
@@ -160,7 +164,7 @@ Not on this page. At the timeout the plugin keeps your selections and typed text
|
|
|
160
164
|
|
|
161
165
|
**Can the model see what I typed**
|
|
162
166
|
|
|
163
|
-
It depends on the "Inject into
|
|
167
|
+
It depends on the "Inject into context" checkbox. When checked the draft reaches the model context with the tool result; when unchecked it stays in the UI only.
|
|
164
168
|
|
|
165
169
|
**Why did the card disappear**
|
|
166
170
|
|
|
@@ -190,7 +194,7 @@ No. A timeout never selects an option and never submits a draft as a formal answ
|
|
|
190
194
|
|
|
191
195
|
**Depends on the host UI**
|
|
192
196
|
|
|
193
|
-
Cards and tool rows are located through host class-name suffixes, `data-question-key`, `data-chat-call-id` and `aria-checked`; host controls are recognised by their Chinese or English labels
|
|
197
|
+
Cards and tool rows are located through host class-name suffixes, `data-question-key`, `data-chat-call-id` and `aria-checked`; host controls are recognised by their Chinese or English labels (the Japanese `回答` is identical to the Chinese one, so that entry matches too); when restoring the host entry after settlement the plugin also recognises `查看回答` / `View answers` / `回答を表示`. The toolbar switch prefers the model selector's accessible name, falls back to structural placement inside the composer toolbar, then to a document-wide lookup, and logs one console.warn per reason instead of failing silently. If the host changes those structures or labels the matching enhancement stops working; the recognition labels and selectors live in the source constants file.
|
|
194
198
|
|
|
195
199
|
**Depends on the host question projection**
|
|
196
200
|
|
|
@@ -220,6 +224,7 @@ dsh 0.2.2-rc.1 ships eight UI languages while the plugin recognises Chinese and
|
|
|
220
224
|
- dsh 0.2.2-rc.1 pre-selects recommended options when a card opens, and the plugin strips those presets by matching the original option labels from the projection; in multiple choice, once you click any option the remaining presets are kept under the host's own submit semantics
|
|
221
225
|
- Skipping every question without any selection or typed text counts as an empty draft, so that timeout closes the card
|
|
222
226
|
- The draft is merged per question from three sources in this order: the host's persisted record, the live value of the question on screen, then the plugin's own snapshot; when the live value is read, selected labels come from the host's screen-reader text, which may drop suffixes such as "(Recommended)"
|
|
227
|
+
- On the macOS desktop app, dsh 0.2.2-rc.2 allows window dragging only inside header rows carrying `data-window-drag`, and the host automatically excludes drag on controls inside a `data-window-drag-controls` container; a custom overlay covering a drag row must declare `data-window-drag-exclude` to stay interactive, and `--dsh-frame-top-clearance` reserves a strip at the top. The plugin's draft panel is attached to the body and declares neither, so near the top of the window it may fall into the reserved strip. The panel holds no clickable controls, so the effect is positional only; the web client is unaffected
|
|
223
228
|
- The timeout notice injected for the model is Chinese-only, so on an English UI the model still receives Chinese text
|
|
224
229
|
- A draft over the 256 KiB per-report limit makes the UI read "Draft too large; not delivered", which does not count towards consecutive failures; after three consecutive failures that question is judged channel-unavailable, the plugin stops taking it over and the card returns to the host and stays answerable
|
|
225
230
|
|
package/dist/client.js
CHANGED
|
@@ -74,7 +74,7 @@ const AUTO_INFINITE_LABEL_ZH = "问答自动无限等待";
|
|
|
74
74
|
const AUTO_INFINITE_LABEL_EN = "Auto wait indefinitely";
|
|
75
75
|
/** 常开开关的悬停提示(中文与英文) */
|
|
76
76
|
const AUTO_INFINITE_TITLE_ZH = "开启后每次提问都自动进入无限等待, 关闭后回到插件的计时行为";
|
|
77
|
-
const AUTO_INFINITE_TITLE_EN = "When on, every question
|
|
77
|
+
const AUTO_INFINITE_TITLE_EN = "When on, every question enters indefinite wait automatically; when off, the plugin countdown applies";
|
|
78
78
|
/** 常开开关按钮的类名与状态属性 */
|
|
79
79
|
const AUTO_INFINITE_BUTTON_CLASS = "dqtp-auto-infinite";
|
|
80
80
|
const AUTO_INFINITE_STATE_ATTRIBUTE = "data-dqtp-auto-infinite";
|
|
@@ -110,6 +110,11 @@ const ASK_REOPEN_LABELS = [
|
|
|
110
110
|
];
|
|
111
111
|
/** 隐藏宿主控件时附加的类名 */
|
|
112
112
|
const HIDDEN_CONTROL_CLASS = "dqtp-host-control-hidden";
|
|
113
|
+
/**
|
|
114
|
+
* 被插件按文案隐藏的宿主节点标记。
|
|
115
|
+
* 还原时只认这个标记, 不再复判当前文案: 宿主复用同一节点改写文案时也能还原。
|
|
116
|
+
*/
|
|
117
|
+
const HIDDEN_WAIT_ATTRIBUTE = "data-dqtp-host-wait";
|
|
113
118
|
/** 提问工具调用行的选择器(宿主 tool 行根节点) */
|
|
114
119
|
const ASK_ROW_SELECTOR = "div[data-tool=\"ask_user_question\"]";
|
|
115
120
|
/** 工具调用行的 callId 属性(宿主 ToolCall 包裹层) */
|
|
@@ -372,6 +377,16 @@ function parseRemainingSeconds(text) {
|
|
|
372
377
|
if (matched !== null) return Number(matched[1]);
|
|
373
378
|
}
|
|
374
379
|
}
|
|
380
|
+
function hostStillWaiting(card) {
|
|
381
|
+
for (const element of Array.from(card.querySelectorAll(WAIT_STATUS_SELECTOR))) {
|
|
382
|
+
const text = (element.textContent ?? "").trim();
|
|
383
|
+
if (text === "") continue;
|
|
384
|
+
if (parseRemainingSeconds(text) !== void 0) return true;
|
|
385
|
+
if (PAUSED_TEXT_PATTERNS.some((pattern) => pattern.test(text))) return true;
|
|
386
|
+
if (HOST_WAIT_PATTERNS.some((pattern) => text.includes(pattern))) return true;
|
|
387
|
+
}
|
|
388
|
+
return false;
|
|
389
|
+
}
|
|
375
390
|
function readAutoInfinite() {
|
|
376
391
|
try {
|
|
377
392
|
return window.localStorage.getItem(AUTO_INFINITE_STORAGE_KEY) === "on";
|
|
@@ -533,7 +548,9 @@ function mergeDrafts(host, live, snapshot, count, liveIndex) {
|
|
|
533
548
|
const merged = [];
|
|
534
549
|
for (let i = 0; i < count; i += 1) {
|
|
535
550
|
const hostItem = host?.[i];
|
|
536
|
-
|
|
551
|
+
const liveItem = live?.[i];
|
|
552
|
+
const liveUsable = i === liveIndex && liveItem !== void 0 && hasItemContent(liveItem);
|
|
553
|
+
if (hostItem !== void 0 && !(liveUsable && !hasItemContent(hostItem))) {
|
|
537
554
|
merged.push({
|
|
538
555
|
selected: [...hostItem.selected],
|
|
539
556
|
custom: hostItem.custom,
|
|
@@ -541,8 +558,7 @@ function mergeDrafts(host, live, snapshot, count, liveIndex) {
|
|
|
541
558
|
});
|
|
542
559
|
continue;
|
|
543
560
|
}
|
|
544
|
-
|
|
545
|
-
if (i === liveIndex && liveItem !== void 0 && hasItemContent(liveItem)) {
|
|
561
|
+
if (liveUsable && liveItem !== void 0) {
|
|
546
562
|
merged.push({
|
|
547
563
|
selected: [...liveItem.selected],
|
|
548
564
|
custom: liveItem.custom,
|
|
@@ -706,6 +722,7 @@ function installQuestionTimeoutAdapter(ctx, source) {
|
|
|
706
722
|
const callActive = /* @__PURE__ */ new Set();
|
|
707
723
|
const callTouchedAt = /* @__PURE__ */ new Map();
|
|
708
724
|
const draftTooLarge = /* @__PURE__ */ new Set();
|
|
725
|
+
const draftTooLargeAt = /* @__PURE__ */ new Map();
|
|
709
726
|
const callSessions = /* @__PURE__ */ new Map();
|
|
710
727
|
const readLiveSelected = (card, callId) => {
|
|
711
728
|
const index = readProgress(card)?.index ?? 0;
|
|
@@ -747,6 +764,7 @@ function installQuestionTimeoutAdapter(ctx, source) {
|
|
|
747
764
|
for (const id of deferred.keys()) ids.add(id);
|
|
748
765
|
for (const id of draftSyncFailures.keys()) ids.add(id);
|
|
749
766
|
for (const id of draftTooLarge.keys()) ids.add(id);
|
|
767
|
+
for (const id of draftTooLargeAt.keys()) ids.add(id);
|
|
750
768
|
for (const id of dismissedCallIds.keys()) ids.add(id);
|
|
751
769
|
for (const id of optionInteractions.keys()) ids.add(id);
|
|
752
770
|
return [...ids];
|
|
@@ -771,6 +789,7 @@ function installQuestionTimeoutAdapter(ctx, source) {
|
|
|
771
789
|
callActive.delete(callId);
|
|
772
790
|
callTouchedAt.delete(callId);
|
|
773
791
|
draftTooLarge.delete(callId);
|
|
792
|
+
draftTooLargeAt.delete(callId);
|
|
774
793
|
dismissedCallIds.delete(callId);
|
|
775
794
|
lastDrafts.delete(callId);
|
|
776
795
|
};
|
|
@@ -832,6 +851,12 @@ function installQuestionTimeoutAdapter(ctx, source) {
|
|
|
832
851
|
actions.insertBefore(element, actions.firstChild);
|
|
833
852
|
return element;
|
|
834
853
|
};
|
|
854
|
+
let countdownWarned = false;
|
|
855
|
+
const warnCountdownOnce = () => {
|
|
856
|
+
if (countdownWarned) return;
|
|
857
|
+
countdownWarned = true;
|
|
858
|
+
console.warn("[question-timeout-protection] 卡片右上角找不到操作区, 无法插入倒计时, 这张卡片保持宿主原样");
|
|
859
|
+
};
|
|
835
860
|
const ensureInfiniteButton = (card, countdown) => {
|
|
836
861
|
const actions = card.querySelector(HEADER_ACTIONS_SELECTOR);
|
|
837
862
|
if (!(actions instanceof HTMLElement)) return void 0;
|
|
@@ -994,8 +1019,10 @@ function installQuestionTimeoutAdapter(ctx, source) {
|
|
|
994
1019
|
card.classList.add(HIDDEN_CONTROL_CLASS);
|
|
995
1020
|
};
|
|
996
1021
|
const restoreCard = (card) => {
|
|
1022
|
+
if (card.getAttribute(CARD_DISMISSED_ATTRIBUTE) !== null) return;
|
|
997
1023
|
card.classList.remove(HIDDEN_CONTROL_CLASS);
|
|
998
1024
|
for (const element of Array.from(card.querySelectorAll("." + HIDDEN_CONTROL_CLASS))) element.classList.remove(HIDDEN_CONTROL_CLASS);
|
|
1025
|
+
for (const element of Array.from(card.querySelectorAll("[data-dqtp-host-wait]"))) element.removeAttribute(HIDDEN_WAIT_ATTRIBUTE);
|
|
999
1026
|
for (const element of Array.from(card.querySelectorAll("[data-dqtp-countdown], button.dqtp-infinite-wait"))) element.remove();
|
|
1000
1027
|
restoreDisabled(card);
|
|
1001
1028
|
card.classList.remove(CARD_LOCKED_CLASS);
|
|
@@ -1018,6 +1045,7 @@ function installQuestionTimeoutAdapter(ctx, source) {
|
|
|
1018
1045
|
if (text === "" || text.length > 40) continue;
|
|
1019
1046
|
if (!HOST_WAIT_PATTERNS.some((pattern) => text.includes(pattern))) continue;
|
|
1020
1047
|
element.classList.add(HIDDEN_CONTROL_CLASS);
|
|
1048
|
+
element.setAttribute(HIDDEN_WAIT_ATTRIBUTE, "");
|
|
1021
1049
|
}
|
|
1022
1050
|
}
|
|
1023
1051
|
const decorateCard = (card, identity) => {
|
|
@@ -1056,10 +1084,15 @@ function installQuestionTimeoutAdapter(ctx, source) {
|
|
|
1056
1084
|
return;
|
|
1057
1085
|
}
|
|
1058
1086
|
restoredCards.delete(card);
|
|
1087
|
+
const countdown = ensureCountdown(card, key);
|
|
1088
|
+
if (countdown === void 0) {
|
|
1089
|
+
warnCountdownOnce();
|
|
1090
|
+
restoreCardOnce(card, key, "no-countdown");
|
|
1091
|
+
return;
|
|
1092
|
+
}
|
|
1059
1093
|
hideHostWaitStatus(card);
|
|
1060
1094
|
hideHostWaitText(card);
|
|
1061
1095
|
hideHostControls(card);
|
|
1062
|
-
const countdown = ensureCountdown(card, key);
|
|
1063
1096
|
if (countdown !== void 0) {
|
|
1064
1097
|
let remainingMs;
|
|
1065
1098
|
if (frozen !== void 0) remainingMs = frozen;
|
|
@@ -1266,6 +1299,13 @@ function installQuestionTimeoutAdapter(ctx, source) {
|
|
|
1266
1299
|
const button = findHostReopen(row);
|
|
1267
1300
|
if (button !== void 0) button.classList.remove(HIDDEN_CONTROL_CLASS);
|
|
1268
1301
|
};
|
|
1302
|
+
const showHostWaitText = (row) => {
|
|
1303
|
+
for (const element of Array.from(row.querySelectorAll("[data-dqtp-host-wait]"))) {
|
|
1304
|
+
if (!(element instanceof HTMLElement)) continue;
|
|
1305
|
+
element.classList.remove(HIDDEN_CONTROL_CLASS);
|
|
1306
|
+
element.removeAttribute(HIDDEN_WAIT_ATTRIBUTE);
|
|
1307
|
+
}
|
|
1308
|
+
};
|
|
1269
1309
|
const decoratedRows = /* @__PURE__ */ new WeakMap();
|
|
1270
1310
|
const decorateRow = (row) => {
|
|
1271
1311
|
const callId = resolveCallId(row);
|
|
@@ -1273,7 +1313,10 @@ function installQuestionTimeoutAdapter(ctx, source) {
|
|
|
1273
1313
|
const plain = !timedOut.has(callId) && !passive.has(callId) && !drafts.has(callId);
|
|
1274
1314
|
const signature = callId + (row.querySelector("button.dqtp-question-bubble") !== null ? "1" : "0") + (timedOut.has(callId) ? "T" : "-") + (passive.has(callId) ? "P" : "-");
|
|
1275
1315
|
if (plain && decoratedRows.get(row) === signature) return;
|
|
1276
|
-
if (!timedOut.has(callId))
|
|
1316
|
+
if (!timedOut.has(callId)) {
|
|
1317
|
+
showHostReopen(row);
|
|
1318
|
+
showHostWaitText(row);
|
|
1319
|
+
}
|
|
1277
1320
|
const button = ensureBubble(row);
|
|
1278
1321
|
if (button === void 0) return;
|
|
1279
1322
|
if (passive.has(callId)) {
|
|
@@ -1324,8 +1367,13 @@ function installQuestionTimeoutAdapter(ctx, source) {
|
|
|
1324
1367
|
if (Date.now() - ignoredAt < DRAFT_IGNORED_RETRY_MS) return;
|
|
1325
1368
|
draftIgnored.delete(identity.callId);
|
|
1326
1369
|
}
|
|
1370
|
+
const tooLargeAt = draftTooLargeAt.get(identity.callId);
|
|
1371
|
+
if (tooLargeAt !== void 0) {
|
|
1372
|
+
if (Date.now() - tooLargeAt < 5e3) return;
|
|
1373
|
+
draftTooLargeAt.delete(identity.callId);
|
|
1374
|
+
}
|
|
1327
1375
|
if (timedOut.has(identity.callId) || passive.has(identity.callId)) return;
|
|
1328
|
-
if (!callActive.has(identity.callId)) return;
|
|
1376
|
+
if (!callActive.has(identity.callId) && !hostStillWaiting(card)) return;
|
|
1329
1377
|
rememberCallSession(identity);
|
|
1330
1378
|
const progress = readProgress(card);
|
|
1331
1379
|
const projected = projectedCounts.get(identity.callId) ?? 1;
|
|
@@ -1354,6 +1402,7 @@ function installQuestionTimeoutAdapter(ctx, source) {
|
|
|
1354
1402
|
draftIgnored.set(callId, Date.now());
|
|
1355
1403
|
return;
|
|
1356
1404
|
}
|
|
1405
|
+
draftTooLargeAt.delete(callId);
|
|
1357
1406
|
if (draftTooLarge.delete(callId)) {
|
|
1358
1407
|
const card = findCard(identity);
|
|
1359
1408
|
if (card !== void 0) decorateCard(card, identity);
|
|
@@ -1362,6 +1411,7 @@ function installQuestionTimeoutAdapter(ctx, source) {
|
|
|
1362
1411
|
}
|
|
1363
1412
|
if (settled) return;
|
|
1364
1413
|
if (reply.reason === "too-large") {
|
|
1414
|
+
draftTooLargeAt.set(identity.callId, Date.now());
|
|
1365
1415
|
if (!draftTooLarge.has(identity.callId)) {
|
|
1366
1416
|
draftTooLarge.add(identity.callId);
|
|
1367
1417
|
console.warn("[question-timeout-protection] 草稿快照超过通道上限, 本次未能送达");
|
|
@@ -1426,7 +1476,13 @@ function installQuestionTimeoutAdapter(ctx, source) {
|
|
|
1426
1476
|
const evaluateProjection = (sessionId, snapshot) => {
|
|
1427
1477
|
if (typeof snapshot !== "object" || snapshot === null) return;
|
|
1428
1478
|
const active = snapshot.active;
|
|
1429
|
-
if (!Array.isArray(active))
|
|
1479
|
+
if (!Array.isArray(active)) {
|
|
1480
|
+
if (!evaluateWarned.has(sessionId)) {
|
|
1481
|
+
evaluateWarned.add(sessionId);
|
|
1482
|
+
console.warn("[question-timeout-protection] 提问投影结构不符, 该会话的超时接管可能不会生效");
|
|
1483
|
+
}
|
|
1484
|
+
return;
|
|
1485
|
+
}
|
|
1430
1486
|
const live = /* @__PURE__ */ new Set();
|
|
1431
1487
|
for (const row of active) {
|
|
1432
1488
|
if (typeof row.callId !== "string") continue;
|
|
@@ -1525,9 +1581,16 @@ function installQuestionTimeoutAdapter(ctx, source) {
|
|
|
1525
1581
|
subscriptionSeen.delete(oldestSession);
|
|
1526
1582
|
const evictedSession = oldestSession;
|
|
1527
1583
|
polledSessions.set(evictedSession, () => {
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1584
|
+
try {
|
|
1585
|
+
const face = resolveProjectionFace(ctx, evictedSession);
|
|
1586
|
+
if (face === void 0) return;
|
|
1587
|
+
evaluateProjection(evictedSession, face.getSnapshot?.());
|
|
1588
|
+
} catch (error) {
|
|
1589
|
+
if (!evaluateWarned.has(evictedSession)) {
|
|
1590
|
+
evaluateWarned.add(evictedSession);
|
|
1591
|
+
console.warn("[question-timeout-protection] 评估提问投影时出错, 该会话的兜底可能受影响", error);
|
|
1592
|
+
}
|
|
1593
|
+
}
|
|
1531
1594
|
});
|
|
1532
1595
|
subscriptionSeen.set(evictedSession, Date.now());
|
|
1533
1596
|
enforcePolledLimit();
|
|
@@ -1639,7 +1702,7 @@ function installQuestionTimeoutAdapter(ctx, source) {
|
|
|
1639
1702
|
}
|
|
1640
1703
|
subscriptionSeen.set(identity.sessionId, Date.now());
|
|
1641
1704
|
ensureSubscription(identity.sessionId);
|
|
1642
|
-
if (enhancementOn && callActive.has(identity.callId)) {
|
|
1705
|
+
if (enhancementOn && (callActive.has(identity.callId) || hostStillWaiting(element))) {
|
|
1643
1706
|
const previous = lastDrafts.get(identity.callId);
|
|
1644
1707
|
const progress = readProgress(element);
|
|
1645
1708
|
const count = Math.max(progress?.count ?? 1, previous?.length ?? 1);
|
|
@@ -1652,6 +1715,11 @@ function installQuestionTimeoutAdapter(ctx, source) {
|
|
|
1652
1715
|
}
|
|
1653
1716
|
if (enhancementOn) {
|
|
1654
1717
|
for (const root of roots) for (const row of Array.from(root.querySelectorAll(ASK_ROW_SELECTOR))) if (row instanceof HTMLElement) decorateRow(row);
|
|
1718
|
+
} else for (const root of roots) for (const row of Array.from(root.querySelectorAll(ASK_ROW_SELECTOR))) {
|
|
1719
|
+
if (!(row instanceof HTMLElement)) continue;
|
|
1720
|
+
showHostReopen(row);
|
|
1721
|
+
showHostWaitText(row);
|
|
1722
|
+
for (const bubble of Array.from(row.querySelectorAll("button.dqtp-question-bubble"))) bubble.remove();
|
|
1655
1723
|
}
|
|
1656
1724
|
repositionPanel();
|
|
1657
1725
|
};
|
|
@@ -1740,7 +1808,7 @@ const ZH = {
|
|
|
1740
1808
|
fixedKeepLabel: "界面保留草稿",
|
|
1741
1809
|
fixedKeepDesc: "超时后把已选选项与已输入内容记入提问气泡, 可在气泡里只读查看",
|
|
1742
1810
|
cardEnhancementsLabel: "卡片增强",
|
|
1743
|
-
cardEnhancementsDesc: "右上角倒计时与警示闪烁,
|
|
1811
|
+
cardEnhancementsDesc: "右上角倒计时与警示闪烁, 单选选项的方形标号填充底色, 提问标识气泡; 只影响界面装饰",
|
|
1744
1812
|
infiniteWaitLabel: "无限等待",
|
|
1745
1813
|
infiniteWaitDesc: "倒计时右侧新增「无限等待」按钮, 点击后本次问答倒计时暂停, 直到用户提交",
|
|
1746
1814
|
draftFallbackLabel: "超时草稿兜底",
|
|
@@ -1754,13 +1822,13 @@ const EN = {
|
|
|
1754
1822
|
fallbackSection: "Timeout fallback",
|
|
1755
1823
|
fallbackNote: "What happens to the content the user already typed once the wait expires",
|
|
1756
1824
|
injectLabel: "Inject into context",
|
|
1757
|
-
injectDesc: "The draft snapshot is sent to the server before the timeout
|
|
1825
|
+
injectDesc: "The draft snapshot is sent to the server before the timeout; on expiry it comes back with the tool result per question and enters the model context, so the model can decide whether to ask again",
|
|
1758
1826
|
fixedSection: "Fixed features",
|
|
1759
1827
|
fixedNote: "Follows the plugin's enabled state and cannot be turned off separately",
|
|
1760
1828
|
fixedKeepLabel: "Keep the draft in the UI",
|
|
1761
1829
|
fixedKeepDesc: "At timeout, records the selected options and typed text into the question bubble, where they can be viewed read-only",
|
|
1762
1830
|
cardEnhancementsLabel: "Card enhancements",
|
|
1763
|
-
cardEnhancementsDesc: "Top-right countdown with warning
|
|
1831
|
+
cardEnhancementsDesc: "Top-right countdown with warning flash, a background fill on the square marker of the selected single-choice option, and the question bubble; affects decoration only",
|
|
1764
1832
|
infiniteWaitLabel: "Wait indefinitely",
|
|
1765
1833
|
infiniteWaitDesc: "Adds a \"Wait indefinitely\" button next to the countdown; clicking it pauses the countdown of this question until the user submits",
|
|
1766
1834
|
draftFallbackLabel: "Draft fallback at timeout",
|
package/dist/index.mjs
CHANGED
|
@@ -136,6 +136,7 @@ function markCallSettled(callId) {
|
|
|
136
136
|
if (oldest.done) break;
|
|
137
137
|
settledCalls.delete(oldest.value);
|
|
138
138
|
}
|
|
139
|
+
sweepTrackedCalls();
|
|
139
140
|
}
|
|
140
141
|
function sleep(ms) {
|
|
141
142
|
return new Promise((resolve) => {
|
|
@@ -310,13 +311,14 @@ function handleStateRequest(request, response) {
|
|
|
310
311
|
reason: "too-large"
|
|
311
312
|
}));
|
|
312
313
|
chunks.length = 0;
|
|
313
|
-
request.destroy();
|
|
314
314
|
}
|
|
315
315
|
});
|
|
316
316
|
request.on("error", (error) => {
|
|
317
|
+
if (oversized) return;
|
|
317
318
|
console.warn("[question-timeout-protection] 状态上报请求体读取失败, 本次上报已丢弃", String(error));
|
|
318
319
|
});
|
|
319
320
|
request.on("aborted", () => {
|
|
321
|
+
if (oversized) return;
|
|
320
322
|
console.warn("[question-timeout-protection] 状态上报请求被客户端中断, 本次上报已丢弃");
|
|
321
323
|
});
|
|
322
324
|
request.on("end", () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-question-timeout-protection",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "dsh提问超时保护插件: 一旦模型提问超时,将你的回答草稿保留在UI或上下文中,而不是直接丢弃。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "JularDepick",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
},
|
|
12
12
|
"engines": {
|
|
13
13
|
"node": ">=20",
|
|
14
|
-
"dsh": ">=0.2.1-rc.1
|
|
14
|
+
"dsh": ">=0.2.1-rc.1 <0.2.3-rc.1"
|
|
15
15
|
},
|
|
16
16
|
"main": "./dist/index.mjs",
|
|
17
17
|
"types": "./dist/index.d.mts",
|
|
@@ -25,6 +25,9 @@
|
|
|
25
25
|
},
|
|
26
26
|
"./package.json": "./package.json"
|
|
27
27
|
},
|
|
28
|
+
"publishConfig": {
|
|
29
|
+
"access": "public"
|
|
30
|
+
},
|
|
28
31
|
"files": [
|
|
29
32
|
"dist",
|
|
30
33
|
"COPYRIGHT",
|
|
@@ -48,23 +51,23 @@
|
|
|
48
51
|
},
|
|
49
52
|
"peerDependencies": {
|
|
50
53
|
"@deepseek-ai/cordis": "~4.0.5 || ~4.1.0",
|
|
51
|
-
"@deepseek-ai/dsh-agent": ">=0.2.1-rc.1
|
|
52
|
-
"@deepseek-ai/dsh-tools": ">=0.2.1-rc.1
|
|
53
|
-
"@deepseek-ai/dsh-user-questions": ">=0.2.1-rc.1
|
|
54
|
+
"@deepseek-ai/dsh-agent": ">=0.2.1-rc.1 <0.2.3-rc.1",
|
|
55
|
+
"@deepseek-ai/dsh-tools": ">=0.2.1-rc.1 <0.2.3-rc.1",
|
|
56
|
+
"@deepseek-ai/dsh-user-questions": ">=0.2.1-rc.1 <0.2.3-rc.1"
|
|
54
57
|
},
|
|
55
58
|
"devDependencies": {
|
|
56
59
|
"@deepseek-ai/cordis": "~4.1.0",
|
|
57
|
-
"@deepseek-ai/dsh-agent": "0.2.2-rc.
|
|
58
|
-
"@deepseek-ai/dsh-client-locale": "0.2.2-rc.
|
|
59
|
-
"@deepseek-ai/dsh-client-ui-conversation": "0.2.2-rc.
|
|
60
|
-
"@deepseek-ai/dsh-client-ui-primitives": "0.2.2-rc.
|
|
61
|
-
"@deepseek-ai/dsh-client-ui-renderer": "0.2.2-rc.
|
|
62
|
-
"@deepseek-ai/dsh-client-ui-settings": "0.2.2-rc.
|
|
63
|
-
"@deepseek-ai/dsh-client-ui-slots": "0.2.2-rc.
|
|
64
|
-
"@deepseek-ai/dsh-llm": "0.2.2-rc.
|
|
65
|
-
"@deepseek-ai/dsh-session": "0.2.2-rc.
|
|
66
|
-
"@deepseek-ai/dsh-tools": "0.2.2-rc.
|
|
67
|
-
"@deepseek-ai/dsh-user-questions": "0.2.2-rc.
|
|
60
|
+
"@deepseek-ai/dsh-agent": "0.2.2-rc.3",
|
|
61
|
+
"@deepseek-ai/dsh-client-locale": "0.2.2-rc.3",
|
|
62
|
+
"@deepseek-ai/dsh-client-ui-conversation": "0.2.2-rc.3",
|
|
63
|
+
"@deepseek-ai/dsh-client-ui-primitives": "0.2.2-rc.3",
|
|
64
|
+
"@deepseek-ai/dsh-client-ui-renderer": "0.2.2-rc.3",
|
|
65
|
+
"@deepseek-ai/dsh-client-ui-settings": "0.2.2-rc.3",
|
|
66
|
+
"@deepseek-ai/dsh-client-ui-slots": "0.2.2-rc.3",
|
|
67
|
+
"@deepseek-ai/dsh-llm": "0.2.2-rc.3",
|
|
68
|
+
"@deepseek-ai/dsh-session": "0.2.2-rc.3",
|
|
69
|
+
"@deepseek-ai/dsh-tools": "0.2.2-rc.3",
|
|
70
|
+
"@deepseek-ai/dsh-user-questions": "0.2.2-rc.3",
|
|
68
71
|
"@types/node": "^26.2.0",
|
|
69
72
|
"@types/react": "^18.3.31",
|
|
70
73
|
"react": "^18.2.0",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
[meta]
|
|
2
|
-
for=v0.1.
|
|
2
|
+
for=v0.1.3
|
|
3
3
|
lang=zh-CN
|
|
4
4
|
name=简体中文
|
|
5
|
-
endtime=2026-11-
|
|
5
|
+
endtime=2026-11-12 18:50:00+08:00
|
|
6
6
|
|
|
7
7
|
[translation]
|
|
8
8
|
settings.settingsSummary=提问超时保护
|
|
@@ -15,7 +15,7 @@ settings.fixedNote=随插件启用状态生效, 不可单独关闭
|
|
|
15
15
|
settings.fixedKeepLabel=界面保留草稿
|
|
16
16
|
settings.fixedKeepDesc=超时后把已选选项与已输入内容记入提问气泡, 可在气泡里只读查看
|
|
17
17
|
settings.cardEnhancementsLabel=卡片增强
|
|
18
|
-
settings.cardEnhancementsDesc=右上角倒计时与警示闪烁,
|
|
18
|
+
settings.cardEnhancementsDesc=右上角倒计时与警示闪烁, 单选选项的方形标号填充底色, 提问标识气泡; 只影响界面装饰
|
|
19
19
|
settings.infiniteWaitLabel=无限等待
|
|
20
20
|
settings.infiniteWaitDesc=倒计时右侧新增「无限等待」按钮, 点击后本次问答倒计时暂停, 直到用户提交
|
|
21
21
|
settings.draftFallbackLabel=超时草稿兜底
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
[meta]
|
|
2
|
-
for=v0.1.
|
|
2
|
+
for=v0.1.3
|
|
3
3
|
lang=en-US
|
|
4
4
|
name=English (US)
|
|
5
|
-
endtime=2026-11-
|
|
5
|
+
endtime=2026-11-12 19:20:00+08:00
|
|
6
6
|
|
|
7
7
|
[translation]
|
|
8
8
|
settings.settingsSummary=Question timeout protection
|
|
9
9
|
settings.fallbackSection=Timeout fallback
|
|
10
10
|
settings.fallbackNote=What happens to the content the user already typed once the wait expires
|
|
11
11
|
settings.injectLabel=Inject into context
|
|
12
|
-
settings.injectDesc=The draft snapshot is sent to the server before the timeout
|
|
12
|
+
settings.injectDesc=The draft snapshot is sent to the server before the timeout; on expiry it comes back with the tool result per question and enters the model context, so the model can decide whether to ask again
|
|
13
13
|
settings.fixedSection=Fixed features
|
|
14
14
|
settings.fixedNote=Follows the plugin's enabled state and cannot be turned off separately
|
|
15
15
|
settings.fixedKeepLabel=Keep the draft in the UI
|
|
16
16
|
settings.fixedKeepDesc=At timeout, records the selected options and typed text into the question bubble, where they can be viewed read-only
|
|
17
17
|
settings.cardEnhancementsLabel=Card enhancements
|
|
18
|
-
settings.cardEnhancementsDesc=Top-right countdown with warning
|
|
18
|
+
settings.cardEnhancementsDesc=Top-right countdown with warning flash, a background fill on the square marker of the selected single-choice option, and the question bubble; affects decoration only
|
|
19
19
|
settings.infiniteWaitLabel=Wait indefinitely
|
|
20
20
|
settings.infiniteWaitDesc=Adds a "Wait indefinitely" button next to the countdown; clicking it pauses the countdown of this question until the user submits
|
|
21
21
|
settings.draftFallbackLabel=Draft fallback at timeout
|
|
@@ -31,7 +31,7 @@ control.infiniteWait=Wait indefinitely
|
|
|
31
31
|
control.autoInfiniteLabel=Auto wait indefinitely
|
|
32
32
|
control.autoInfiniteOn=On
|
|
33
33
|
control.autoInfiniteOff=Off
|
|
34
|
-
control.autoInfiniteTitle=When on, every question
|
|
34
|
+
control.autoInfiniteTitle=When on, every question enters indefinite wait automatically; when off, the plugin countdown applies
|
|
35
35
|
bubble.draftLabel=Question · timed-out draft
|
|
36
36
|
draft.selected=Selected: {items}
|
|
37
37
|
draft.custom=Additional: {text}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
[meta]
|
|
2
|
-
for=v0.1.
|
|
2
|
+
for=v0.1.3
|
|
3
3
|
lang=zh-CN
|
|
4
4
|
name=简体中文
|
|
5
|
-
endtime=2026-11-
|
|
5
|
+
endtime=2026-11-12 18:50:00+08:00
|
|
6
6
|
|
|
7
7
|
[translation]
|
|
8
8
|
settings.settingsSummary=提问超时保护
|
|
@@ -15,7 +15,7 @@ settings.fixedNote=随插件启用状态生效, 不可单独关闭
|
|
|
15
15
|
settings.fixedKeepLabel=界面保留草稿
|
|
16
16
|
settings.fixedKeepDesc=超时后把已选选项与已输入内容记入提问气泡, 可在气泡里只读查看
|
|
17
17
|
settings.cardEnhancementsLabel=卡片增强
|
|
18
|
-
settings.cardEnhancementsDesc=右上角倒计时与警示闪烁,
|
|
18
|
+
settings.cardEnhancementsDesc=右上角倒计时与警示闪烁, 单选选项的方形标号填充底色, 提问标识气泡; 只影响界面装饰
|
|
19
19
|
settings.infiniteWaitLabel=无限等待
|
|
20
20
|
settings.infiniteWaitDesc=倒计时右侧新增「无限等待」按钮, 点击后本次问答倒计时暂停, 直到用户提交
|
|
21
21
|
settings.draftFallbackLabel=超时草稿兜底
|