@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.
- package/lib/client.js +9 -0
- 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
|
}
|