@workerdeck/core 2.3.0 → 2.5.0
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/build/index.mjs +14 -0
- package/build/index.mjs.map +1 -1
- package/package.json +3 -3
package/build/index.mjs
CHANGED
|
@@ -1873,7 +1873,21 @@ var AiSdkRunner = class {
|
|
|
1873
1873
|
this.#turnChain = run.then(() => void 0, () => void 0);
|
|
1874
1874
|
await run;
|
|
1875
1875
|
}
|
|
1876
|
+
#cancelPendingApprovals(message) {
|
|
1877
|
+
for (const [requestId, { timer }] of this.#pendingApprovals) {
|
|
1878
|
+
clearTimeout(timer);
|
|
1879
|
+
this.#emit({
|
|
1880
|
+
type: "permission_resolved",
|
|
1881
|
+
requestId,
|
|
1882
|
+
behavior: "deny",
|
|
1883
|
+
resolvedBy: "client",
|
|
1884
|
+
message
|
|
1885
|
+
});
|
|
1886
|
+
}
|
|
1887
|
+
this.#pendingApprovals.clear();
|
|
1888
|
+
}
|
|
1876
1889
|
async interrupt() {
|
|
1890
|
+
this.#cancelPendingApprovals("interrupted");
|
|
1877
1891
|
if (this.#abort) this.#abort.abort();
|
|
1878
1892
|
else if (this.#pendingToolCalls.size > 0) {
|
|
1879
1893
|
const accum = this.#turnAccum ?? {
|