@mastra/playground-ui 7.0.0-beta.1 → 7.0.0-beta.2
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/CHANGELOG.md +14 -0
- package/dist/index.cjs.js +27 -8
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +27 -8
- package/dist/index.es.js.map +1 -1
- package/dist/src/domains/workflows/context/use-current-run.d.ts +2 -0
- package/dist/src/domains/workflows/workflow/workflow-step-action-bar.d.ts +2 -1
- package/package.json +7 -7
package/dist/index.es.js
CHANGED
|
@@ -4648,6 +4648,8 @@ function convertWorkflowRunStateToStreamResult(runState) {
|
|
|
4648
4648
|
status: result.status,
|
|
4649
4649
|
output: "output" in result ? result.output : void 0,
|
|
4650
4650
|
payload: "payload" in result ? result.payload : void 0,
|
|
4651
|
+
suspendPayload: "suspendPayload" in result ? result.suspendPayload : void 0,
|
|
4652
|
+
suspendOutput: "suspendOutput" in result ? result.suspendOutput : void 0,
|
|
4651
4653
|
resumePayload: "resumePayload" in result ? result.resumePayload : void 0,
|
|
4652
4654
|
error: "error" in result ? result.error : void 0,
|
|
4653
4655
|
startedAt: "startedAt" in result ? result.startedAt : Date.now(),
|
|
@@ -5326,7 +5328,9 @@ const useCurrentRun = () => {
|
|
|
5326
5328
|
status: value.status,
|
|
5327
5329
|
output: "output" in value ? value.output : void 0,
|
|
5328
5330
|
input: value.payload,
|
|
5329
|
-
resumeData: "resumePayload" in value ? value.resumePayload : void 0
|
|
5331
|
+
resumeData: "resumePayload" in value ? value.resumePayload : void 0,
|
|
5332
|
+
suspendOutput: "suspendOutput" in value ? value.suspendOutput : void 0,
|
|
5333
|
+
suspendPayload: "suspendPayload" in value ? value.suspendPayload : void 0
|
|
5330
5334
|
}
|
|
5331
5335
|
};
|
|
5332
5336
|
}, {});
|
|
@@ -5392,6 +5396,7 @@ const WorkflowStepActionBar = ({
|
|
|
5392
5396
|
input,
|
|
5393
5397
|
output,
|
|
5394
5398
|
resumeData,
|
|
5399
|
+
suspendOutput,
|
|
5395
5400
|
error,
|
|
5396
5401
|
mapConfig,
|
|
5397
5402
|
stepName,
|
|
@@ -5452,14 +5457,14 @@ const WorkflowStepActionBar = ({
|
|
|
5452
5457
|
/* @__PURE__ */ jsx("div", { className: "px-4 overflow-hidden", children: /* @__PURE__ */ jsx(CodeDialogContent, { data: resumeData }) })
|
|
5453
5458
|
] }) })
|
|
5454
5459
|
] }),
|
|
5455
|
-
output && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5460
|
+
(output ?? suspendOutput) && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5456
5461
|
/* @__PURE__ */ jsx(Button$1, { onClick: () => setIsOutputOpen(true), children: "Output" }),
|
|
5457
5462
|
/* @__PURE__ */ jsx(Dialog, { open: isOutputOpen, onOpenChange: setIsOutputOpen, children: /* @__PURE__ */ jsxs(DialogContent, { className: dialogContentClass, children: [
|
|
5458
5463
|
/* @__PURE__ */ jsxs(DialogTitle, { className: dialogTitleClass, children: [
|
|
5459
5464
|
stepName,
|
|
5460
5465
|
" output"
|
|
5461
5466
|
] }),
|
|
5462
|
-
/* @__PURE__ */ jsx("div", { className: "px-4 overflow-hidden", children: /* @__PURE__ */ jsx(CodeDialogContent, { data: output }) })
|
|
5467
|
+
/* @__PURE__ */ jsx("div", { className: "px-4 overflow-hidden", children: /* @__PURE__ */ jsx(CodeDialogContent, { data: output ?? suspendOutput }) })
|
|
5463
5468
|
] }) })
|
|
5464
5469
|
] }),
|
|
5465
5470
|
error && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -5639,7 +5644,7 @@ const Clock = ({ startedAt, endedAt }) => {
|
|
|
5639
5644
|
};
|
|
5640
5645
|
|
|
5641
5646
|
function WorkflowDefaultNode({ data, parentWorkflowName }) {
|
|
5642
|
-
const { steps
|
|
5647
|
+
const { steps } = useCurrentRun();
|
|
5643
5648
|
const {
|
|
5644
5649
|
label,
|
|
5645
5650
|
stepId,
|
|
@@ -5729,6 +5734,7 @@ function WorkflowDefaultNode({ data, parentWorkflowName }) {
|
|
|
5729
5734
|
input: step?.input,
|
|
5730
5735
|
resumeData: step?.resumeData,
|
|
5731
5736
|
output: step?.output,
|
|
5737
|
+
suspendOutput: step?.suspendOutput,
|
|
5732
5738
|
error: step?.error,
|
|
5733
5739
|
mapConfig,
|
|
5734
5740
|
status: step?.status
|
|
@@ -6038,6 +6044,7 @@ function WorkflowNestedNode({ data, parentWorkflowName }) {
|
|
|
6038
6044
|
input: step?.input,
|
|
6039
6045
|
resumeData: step?.resumeData,
|
|
6040
6046
|
output: step?.output,
|
|
6047
|
+
suspendOutput: step?.suspendOutput,
|
|
6041
6048
|
error: step?.error,
|
|
6042
6049
|
mapConfig,
|
|
6043
6050
|
onShowNestedGraph: () => showNestedGraph({ label, fullStep: fullLabel, stepGraph }),
|
|
@@ -7467,10 +7474,10 @@ function WorkflowTrigger({
|
|
|
7467
7474
|
setCancelResponse(response);
|
|
7468
7475
|
};
|
|
7469
7476
|
const streamResultToUse = result ?? streamResult;
|
|
7470
|
-
const suspendedSteps = Object.entries(streamResultToUse?.steps || {}).filter(([_, { status }]) => status === "suspended").map(([stepId, {
|
|
7477
|
+
const suspendedSteps = Object.entries(streamResultToUse?.steps || {}).filter(([_, { status }]) => status === "suspended").map(([stepId, { suspendPayload }]) => ({
|
|
7471
7478
|
stepId,
|
|
7472
7479
|
runId: innerRunId,
|
|
7473
|
-
suspendPayload
|
|
7480
|
+
suspendPayload,
|
|
7474
7481
|
isLoading: false
|
|
7475
7482
|
}));
|
|
7476
7483
|
useEffect(() => {
|
|
@@ -7581,11 +7588,23 @@ function WorkflowTrigger({
|
|
|
7581
7588
|
/* @__PURE__ */ jsx(Text, { variant: "secondary", className: "px-4 text-mastra-el-3", size: "xs", children: "Status" }),
|
|
7582
7589
|
/* @__PURE__ */ jsx("div", { className: "px-4 flex flex-col gap-4", children: Object.entries(workflowActivePaths).filter(([key, _]) => key !== "input" && !key.endsWith(".input")).map(([stepId, step]) => {
|
|
7583
7590
|
const { status } = step;
|
|
7584
|
-
let output =
|
|
7591
|
+
let output = void 0;
|
|
7592
|
+
let suspendOutput = void 0;
|
|
7593
|
+
if (step.status === "suspended") {
|
|
7594
|
+
suspendOutput = step.suspendOutput;
|
|
7595
|
+
}
|
|
7585
7596
|
if (step.status === "success") {
|
|
7586
7597
|
output = step.output;
|
|
7587
7598
|
}
|
|
7588
|
-
return /* @__PURE__ */ jsx(
|
|
7599
|
+
return /* @__PURE__ */ jsx(
|
|
7600
|
+
WorkflowStatus,
|
|
7601
|
+
{
|
|
7602
|
+
stepId,
|
|
7603
|
+
status,
|
|
7604
|
+
result: output ?? suspendOutput ?? {}
|
|
7605
|
+
},
|
|
7606
|
+
stepId
|
|
7607
|
+
);
|
|
7589
7608
|
}) })
|
|
7590
7609
|
] })
|
|
7591
7610
|
] })
|