@mastra/playground-ui 5.1.2-alpha.3 → 5.1.2-alpha.4

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/dist/index.cjs.js CHANGED
@@ -6389,7 +6389,7 @@ function MastraNetworkRuntimeProvider({
6389
6389
  console.log(messages);
6390
6390
  setIsRunning(false);
6391
6391
  } catch (error) {
6392
- console.error("Error occured in MastraRuntimeProvider", error);
6392
+ console.error("Error occurred in MastraRuntimeProvider", error);
6393
6393
  setIsRunning(false);
6394
6394
  }
6395
6395
  };
@@ -7787,7 +7787,8 @@ function WorkflowRunProvider({
7787
7787
  setResult,
7788
7788
  payload,
7789
7789
  setPayload,
7790
- clearData
7790
+ clearData,
7791
+ snapshot
7791
7792
  },
7792
7793
  children
7793
7794
  }
@@ -9597,8 +9598,9 @@ function WorkflowGraphInner({ workflow, onShowTrace }) {
9597
9598
 
9598
9599
  function WorkflowGraph({ workflowId, onShowTrace }) {
9599
9600
  const { workflow, isLoading } = useWorkflow(workflowId);
9601
+ const { snapshot } = React.useContext(WorkflowRunContext);
9600
9602
  if (isLoading) {
9601
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4", children: /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-[600px]" }) });
9603
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4", children: /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-full" }) });
9602
9604
  }
9603
9605
  if (!workflow) {
9604
9606
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid h-full place-items-center", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-2", children: [
@@ -9610,7 +9612,13 @@ function WorkflowGraph({ workflowId, onShowTrace }) {
9610
9612
  ] })
9611
9613
  ] }) });
9612
9614
  }
9613
- return /* @__PURE__ */ jsxRuntime.jsx(WorkflowNestedGraphProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(react$2.ReactFlowProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(WorkflowGraphInner, { workflow, onShowTrace }) }) });
9615
+ return /* @__PURE__ */ jsxRuntime.jsx(WorkflowNestedGraphProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(react$2.ReactFlowProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(
9616
+ WorkflowGraphInner,
9617
+ {
9618
+ workflow: snapshot?.serializedStepGraph ? { stepGraph: snapshot?.serializedStepGraph } : workflow,
9619
+ onShowTrace
9620
+ }
9621
+ ) }) }, snapshot?.runId ?? workflowId);
9614
9622
  }
9615
9623
 
9616
9624
  const WorkflowStatus = ({ stepId, status }) => {