@agimon-ai/po-workflow 0.0.0-alpha.16 → 0.0.0-alpha.18
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.
|
@@ -3508,9 +3508,15 @@ function createWorkflowServerRuntime(host, serverHost) {
|
|
|
3508
3508
|
let control;
|
|
3509
3509
|
let controlDisposers = [];
|
|
3510
3510
|
const disposeControl = () => {
|
|
3511
|
-
|
|
3512
|
-
control?.dispose();
|
|
3511
|
+
const owned = control;
|
|
3513
3512
|
control = void 0;
|
|
3513
|
+
const failures = [];
|
|
3514
|
+
for (const dispose of [...controlDisposers.splice(0), () => owned?.dispose()]) try {
|
|
3515
|
+
dispose();
|
|
3516
|
+
} catch (error) {
|
|
3517
|
+
failures.push(error);
|
|
3518
|
+
}
|
|
3519
|
+
if (failures.length) throw new AggregateError(failures, "Workflow control cleanup failed.");
|
|
3514
3520
|
};
|
|
3515
3521
|
let modeOwner;
|
|
3516
3522
|
const modeSelected = () => (host.context.selection.state?.["minor-mode"] ?? []).includes(WORKFLOW_MODE_ID);
|
|
@@ -4027,18 +4033,25 @@ function createWorkflowServerRuntime(host, serverHost) {
|
|
|
4027
4033
|
pendingCompletions.clear();
|
|
4028
4034
|
narrationReady = false;
|
|
4029
4035
|
narration = void 0;
|
|
4030
|
-
await
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4036
|
+
await (0, _agimon_ai_po_core_extensionFile.runCleanups)([
|
|
4037
|
+
() => ownedReadiness?.dispose(),
|
|
4038
|
+
disposeControl,
|
|
4039
|
+
() => lifecycle?.dispose(),
|
|
4040
|
+
() => stopReleaseRequests?.(),
|
|
4041
|
+
() => stopPeerReady?.(),
|
|
4042
|
+
() => {
|
|
4043
|
+
if (runsTimer !== void 0) clearTimeout(runsTimer);
|
|
4044
|
+
runsTimer = void 0;
|
|
4045
|
+
runsAfter = void 0;
|
|
4046
|
+
},
|
|
4047
|
+
() => launcher.dispose(),
|
|
4048
|
+
() => {
|
|
4049
|
+
const provider = runProvider;
|
|
4050
|
+
runProvider = void 0;
|
|
4051
|
+
provider?.dispose();
|
|
4052
|
+
},
|
|
4053
|
+
() => telemetry.shutdown()
|
|
4054
|
+
], "Workflow cleanup failed.");
|
|
4042
4055
|
}
|
|
4043
4056
|
};
|
|
4044
4057
|
}
|