@agimon-ai/po-workflow 0.0.0-alpha.224 → 0.0.0-alpha.226
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.
|
@@ -1063,6 +1063,10 @@ function runSearchText(run) {
|
|
|
1063
1063
|
function isLive(run) {
|
|
1064
1064
|
return run.stage === "running" || run.waiting === true;
|
|
1065
1065
|
}
|
|
1066
|
+
/** True while a run is actively executing in the background (not stale, waiting for approval, or paused). */
|
|
1067
|
+
function isRunningInBackground(run) {
|
|
1068
|
+
return run.stage === "running" && run.stale !== true && run.waiting !== true && (run.executionState === void 0 || run.executionState === "running");
|
|
1069
|
+
}
|
|
1066
1070
|
/** The step session holding a pending approval request, if this run is waiting on a session step. */
|
|
1067
1071
|
function waitingStepSessionId(run) {
|
|
1068
1072
|
if (!run.waiting) return void 0;
|
|
@@ -4379,7 +4383,7 @@ var workflows_native_default = defineActivityGroup({
|
|
|
4379
4383
|
};
|
|
4380
4384
|
},
|
|
4381
4385
|
isActive(sessionId) {
|
|
4382
|
-
return workflows.select(workflows.store.state, sessionId).runs.some(
|
|
4386
|
+
return workflows.select(workflows.store.state, sessionId).runs.some(isRunningInBackground) || (dynamicWorkflows.select(dynamicWorkflows.store.state, sessionId)?.runs.some((run) => run.status === "running") ?? false);
|
|
4383
4387
|
}
|
|
4384
4388
|
}
|
|
4385
4389
|
});
|