dsh-notify-tray 0.1.2 → 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 +2 -2
- package/README.zh-CN.md +2 -2
- package/lib/tracker.js +10 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -38,7 +38,7 @@ dsh plugin --profile desktop add dsh-notify-tray
|
|
|
38
38
|
# Or the web / CLI profile
|
|
39
39
|
dsh plugin --profile web add dsh-notify-tray
|
|
40
40
|
# Pin a specific version
|
|
41
|
-
dsh plugin --profile desktop add dsh-notify-tray@0.1.
|
|
41
|
+
dsh plugin --profile desktop add dsh-notify-tray@0.1.3
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
**Option 3 — from the Git repository** (latest unreleased code)
|
|
@@ -49,7 +49,7 @@ This route **requires Git**; without it you'll see `ERR_PNPM_GIT_RESOLVE_FAILED
|
|
|
49
49
|
|
|
50
50
|
Restart DSH after installing. The version on the plugin page is the one installed; the latest is listed on [npm](https://www.npmjs.com/package/dsh-notify-tray).
|
|
51
51
|
|
|
52
|
-
> **Got an older version?** When the official npm registry is unreachable, DSH falls back to the npmmirror registry, which syncs a little later, so a just-published release may not be there yet. Update again in a few minutes, or pin the version: `dsh plugin --profile desktop add dsh-notify-tray@0.1.
|
|
52
|
+
> **Got an older version?** When the official npm registry is unreachable, DSH falls back to the npmmirror registry, which syncs a little later, so a just-published release may not be there yet. Update again in a few minutes, or pin the version: `dsh plugin --profile desktop add dsh-notify-tray@0.1.3`.
|
|
53
53
|
|
|
54
54
|
To update: `dsh plugin --profile desktop update dsh-notify-tray`. To uninstall: `dsh plugin --profile desktop remove dsh-notify-tray`.
|
|
55
55
|
|
package/README.zh-CN.md
CHANGED
|
@@ -38,7 +38,7 @@ dsh plugin --profile desktop add dsh-notify-tray
|
|
|
38
38
|
# 或者 Web / 命令行 profile
|
|
39
39
|
dsh plugin --profile web add dsh-notify-tray
|
|
40
40
|
# 指定版本
|
|
41
|
-
dsh plugin --profile desktop add dsh-notify-tray@0.1.
|
|
41
|
+
dsh plugin --profile desktop add dsh-notify-tray@0.1.3
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
**方式三:从 Git 仓库装**(想用还没发版的最新代码时)
|
|
@@ -49,7 +49,7 @@ dsh plugin --profile desktop add dsh-notify-tray@0.1.2
|
|
|
49
49
|
|
|
50
50
|
装好后重启 DSH。插件页上显示的版本号就是装上的版本,最新版见 [npm](https://www.npmjs.com/package/dsh-notify-tray)。
|
|
51
51
|
|
|
52
|
-
> **装到的不是最新版?** 官方 npm 源连不上时,DSH 会退到 npmmirror(淘宝镜像)去装,镜像比官方源晚一点同步,刚发的新版可能还没到。等几分钟再更新,或指定版本 `dsh plugin --profile desktop add dsh-notify-tray@0.1.
|
|
52
|
+
> **装到的不是最新版?** 官方 npm 源连不上时,DSH 会退到 npmmirror(淘宝镜像)去装,镜像比官方源晚一点同步,刚发的新版可能还没到。等几分钟再更新,或指定版本 `dsh plugin --profile desktop add dsh-notify-tray@0.1.3`。
|
|
53
53
|
|
|
54
54
|
更新:`dsh plugin --profile desktop update dsh-notify-tray`。卸载:`dsh plugin --profile desktop remove dsh-notify-tray`。
|
|
55
55
|
|
package/lib/tracker.js
CHANGED
|
@@ -167,7 +167,7 @@ export class Tracker {
|
|
|
167
167
|
return
|
|
168
168
|
case 'approval/asked': {
|
|
169
169
|
const body = data.reason || `工具 ${data.toolName} 需要你批准`
|
|
170
|
-
entry.pending.set(`approval:${data.id}`, { kind: 'approval', text: body, since: this.now() })
|
|
170
|
+
entry.pending.set(`approval:${data.id}`, { kind: 'approval', text: body, since: this.now(), callId: data.callId })
|
|
171
171
|
this.emit('approval', entry, body)
|
|
172
172
|
break
|
|
173
173
|
}
|
|
@@ -183,8 +183,15 @@ export class Tracker {
|
|
|
183
183
|
break
|
|
184
184
|
}
|
|
185
185
|
case 'tool/result': {
|
|
186
|
-
|
|
187
|
-
|
|
186
|
+
// ToolResultMessage names the call it answers `toolCallId` (mirrored in `source.callId`).
|
|
187
|
+
const callId = data.message?.toolCallId ?? data.message?.source?.callId
|
|
188
|
+
if (callId === undefined) return
|
|
189
|
+
let cleared = entry.pending.delete(`question:${callId}`)
|
|
190
|
+
// An approval for this call is settled once the call has a result, even if `approval/decided` was missed.
|
|
191
|
+
for (const [key, wait] of entry.pending) {
|
|
192
|
+
if (wait.callId === callId) cleared = entry.pending.delete(key) || cleared
|
|
193
|
+
}
|
|
194
|
+
if (!cleared) return
|
|
188
195
|
break
|
|
189
196
|
}
|
|
190
197
|
case 'turn/end': {
|
package/package.json
CHANGED