@saltcorn/agents 0.8.2 → 0.8.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/agent-view.js +7 -7
- package/package.json +1 -1
package/agent-view.js
CHANGED
|
@@ -309,13 +309,13 @@ const run = async (
|
|
|
309
309
|
|
|
310
310
|
const initial_q = state.run_id ? undefined : state._q;
|
|
311
311
|
if (state.run_id) {
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
312
|
+
let run = prevRuns ? prevRuns.find((r) => r.id == state.run_id) : null;
|
|
313
|
+
if (!run)
|
|
314
|
+
run = await WorkflowRun.findOne({
|
|
315
|
+
trigger_id: action.id,
|
|
316
|
+
...(shared ? {} : { started_by: req.user?.id }),
|
|
317
|
+
id: state.run_id,
|
|
318
|
+
});
|
|
319
319
|
const interactMarkups = [];
|
|
320
320
|
if (run.context.html_interactions) {
|
|
321
321
|
interactMarkups.push(...run.context.html_interactions);
|