@agimon-ai/po-workflow 0.0.0-alpha.110 → 0.0.0-alpha.112

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.
@@ -2605,24 +2605,26 @@ function stepTab(run, job, step, ownerSessionId = null) {
2605
2605
  workspace,
2606
2606
  runKey,
2607
2607
  job,
2608
- step
2608
+ step,
2609
+ knownSession: session
2609
2610
  })
2610
2611
  };
2611
2612
  }
2612
- function WorkflowStep({ sessionId, workspace, runKey, job, step, renderSessionTranscript, renderRunnerTerminal, setTransientTabSession, openSession, tabId }) {
2613
+ function WorkflowStep({ sessionId, workspace, runKey, job, step, renderSessionTranscript, renderRunnerTerminal, setTransientTabSession, openSession, tabId, knownSession }) {
2613
2614
  const run = useWorkflows(sessionId).runs.find((item) => item.workspace === workspace && (item.routeKey ?? item.runKey) === runKey);
2614
2615
  const steps = run?.jobs.find((item) => item.name === job)?.steps;
2615
2616
  const target = step === void 0 ? steps?.at(-1) : steps?.find((item) => item.name === step);
2616
2617
  const ref = target?.ref;
2617
- const session = ref?.kind === "session" ? ref.id : void 0;
2618
+ const session = target === void 0 ? knownSession : ref?.kind === "session" ? ref.id : void 0;
2618
2619
  const live = session !== void 0 && run?.stage === "running" && target?.status === "running";
2619
2620
  useEffect(() => {
2620
- setTransientTabSession?.(tabId, session, live);
2621
+ if (target !== void 0) setTransientTabSession?.(tabId, session, live);
2621
2622
  }, [
2622
2623
  setTransientTabSession,
2623
2624
  tabId,
2624
2625
  live,
2625
- session
2626
+ session,
2627
+ target
2626
2628
  ]);
2627
2629
  return /* @__PURE__ */ jsxs(View, {
2628
2630
  style: styles$4.screen,
@@ -2631,8 +2633,7 @@ function WorkflowStep({ sessionId, workspace, runKey, job, step, renderSessionTr
2631
2633
  children: [
2632
2634
  job,
2633
2635
  step === void 0 ? "" : ` › ${step}`,
2634
- " · ",
2635
- target?.status
2636
+ target === void 0 ? "" : ` · ${target.status}`
2636
2637
  ]
2637
2638
  }), session ? /* @__PURE__ */ jsxs(Fragment, { children: [renderSessionTranscript?.(session), /* @__PURE__ */ jsx(StepDynamicRuns, {
2638
2639
  stepSessionId: session,