@xiangyixie/dsh-superagent 0.18.2 → 0.18.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.
Files changed (2) hide show
  1. package/lib/client.js +9 -0
  2. package/package.json +1 -1
package/lib/client.js CHANGED
@@ -576,6 +576,15 @@ window.__ModuleLoader__.load({
576
576
  const others = model.approvals.filter(entry => entry.id !== approval.id)
577
577
  return { ...model, approvals: [...others, approval], unread: (model.unread ?? 0) + 1 }
578
578
  }
579
+ if (frame.action === 'expired' && frame.id) {
580
+ // The card must not vanish silently: the tool call it guarded is
581
+ // already cancelled, and the user should know why.
582
+ return {
583
+ ...model,
584
+ approvals: model.approvals.filter(entry => entry.id !== frame.id),
585
+ toast: { kind: 'err', text: '这个审批已超时,工具调用已取消' },
586
+ }
587
+ }
579
588
  if (frame.id) {
580
589
  return { ...model, approvals: model.approvals.filter(entry => entry.id !== frame.id) }
581
590
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xiangyixie/dsh-superagent",
3
- "version": "0.18.2",
3
+ "version": "0.18.3",
4
4
  "description": "长周期自主执行插件:一个目标拆成可并行的子任务,交付一份合并报告,重启后仍可继续。",
5
5
  "author": "Admire (LittleChenLiya)",
6
6
  "type": "module",