Files
PaperClipAI/patches/@photon-ai__advanced-imessage@2.2.0.patch
T
DottaandPaperclip 7128495d1b feat(chat): hand Photon ingress to Cloud custody
Keep provider transport and receipt ownership in the Photon modules. Preserve current audit and notification writes inside the actual transaction. Name the public SDK event return type and keep prepared replacement and attachment IDs stable across async client calls.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-11-10 16:58:41 -06:00

31 lines
1.1 KiB
Diff

--- a/dist/chunk-5WYZRCOS.js
+++ b/dist/chunk-5WYZRCOS.js
@@ -7246,15 +7246,20 @@
// Lifecycle
// -------------------------------------------------------------------------
/** Signal the stream is done. Interrupts any pending iteration. */
- async close() {
- if (this._closed) {
- return;
- }
+ close() {
+ if (this._cleanupComplete) return Promise.resolve();
+ if (this._closeAttempt) return this._closeAttempt;
this._closed = true;
this._cancelResolve?.();
- if (this._cleanup) {
- await this._cleanup();
- }
+ let resolveCleanup, rejectCleanup;
+ const attempt = new Promise((resolve, reject) => { resolveCleanup = resolve; rejectCleanup = reject; });
+ this._closeAttempt = attempt;
+ try { Promise.resolve(this._cleanup?.()).then(resolveCleanup, rejectCleanup); }
+ catch (error) { rejectCleanup(error); }
+ void attempt.then(() => { this._cleanupComplete = true; }, () => {
+ if (this._closeAttempt === attempt) this._closeAttempt = undefined;
+ });
+ return attempt;
}
/** `Symbol.asyncDispose` -- enables `await using`. */
async [Symbol.asyncDispose]() {