@mastra/playground-ui 5.1.13 → 5.1.14-alpha.0
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/{colors-BauMYA7t.js → colors-B25-HzLf.js} +3 -2
- package/dist/colors-B25-HzLf.js.map +1 -0
- package/dist/{colors-BjoU9dWU.cjs → colors-CD-k9ILs.cjs} +3 -2
- package/dist/colors-CD-k9ILs.cjs.map +1 -0
- package/dist/index.cjs.js +61 -46
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +61 -47
- package/dist/index.es.js.map +1 -1
- package/dist/src/domains/agents/components/agent-table/agent-table.d.ts +2 -2
- package/dist/src/domains/agents/components/agent-table/columns.d.ts +0 -12
- package/dist/src/domains/agents/components/agent-table/types.d.ts +1 -0
- package/dist/src/domains/agents/components/provider-map-icon.d.ts +12 -0
- package/dist/src/domains/agents/index.d.ts +1 -0
- package/dist/src/domains/networks/components/network-table/network-table.d.ts +2 -2
- package/dist/src/domains/tools/components/tool-list.d.ts +3 -1
- package/dist/src/domains/workflows/components/workflow-table/workflow-table.d.ts +2 -2
- package/dist/src/ds/tokens/colors.d.ts +1 -0
- package/dist/src/lib/framework.d.ts +3 -1
- package/dist/tokens.cjs.js +1 -1
- package/dist/tokens.es.js +1 -1
- package/package.json +3 -3
- package/dist/colors-BauMYA7t.js.map +0 -1
- package/dist/colors-BjoU9dWU.cjs.map +0 -1
package/dist/index.es.js
CHANGED
|
@@ -26,7 +26,7 @@ import { persist } from 'zustand/middleware';
|
|
|
26
26
|
import { format, formatDistanceToNow, isValid, formatDate } from 'date-fns';
|
|
27
27
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
28
28
|
import { AnimatePresence } from 'motion/react';
|
|
29
|
-
import { C as Colors } from './colors-
|
|
29
|
+
import { C as Colors } from './colors-B25-HzLf.js';
|
|
30
30
|
import * as SliderPrimitive from '@radix-ui/react-slider';
|
|
31
31
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
32
32
|
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
@@ -7297,6 +7297,22 @@ function Skeleton({ className, ...props }) {
|
|
|
7297
7297
|
return /* @__PURE__ */ jsx("div", { className: cn("animate-pulse rounded-md bg-muted/50", className), ...props });
|
|
7298
7298
|
}
|
|
7299
7299
|
|
|
7300
|
+
const LinkComponentContext = createContext({
|
|
7301
|
+
Link: forwardRef(() => null),
|
|
7302
|
+
navigate: () => {
|
|
7303
|
+
}
|
|
7304
|
+
});
|
|
7305
|
+
const LinkComponentProvider = ({ children, Link, navigate }) => {
|
|
7306
|
+
return /* @__PURE__ */ jsx(LinkComponentContext.Provider, { value: { Link, navigate }, children });
|
|
7307
|
+
};
|
|
7308
|
+
const useLinkComponent = () => {
|
|
7309
|
+
const ctx = useContext(LinkComponentContext);
|
|
7310
|
+
if (!ctx) {
|
|
7311
|
+
throw new Error("useLinkComponent must be used within a LinkComponentProvider");
|
|
7312
|
+
}
|
|
7313
|
+
return ctx;
|
|
7314
|
+
};
|
|
7315
|
+
|
|
7300
7316
|
const OpenaiChatIcon = (props) => /* @__PURE__ */ jsx("svg", { className: "h-3 w-3", viewBox: "0 0 320 320", xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", ...props, children: /* @__PURE__ */ jsx("path", { d: "m297.06 130.97c7.26-21.79 4.76-45.66-6.85-65.48-17.46-30.4-52.56-46.04-86.84-38.68-15.25-17.18-37.16-26.95-60.13-26.81-35.04-.08-66.13 22.48-76.91 55.82-22.51 4.61-41.94 18.7-53.31 38.67-17.59 30.32-13.58 68.54 9.92 94.54-7.26 21.79-4.76 45.66 6.85 65.48 17.46 30.4 52.56 46.04 86.84 38.68 15.24 17.18 37.16 26.95 60.13 26.8 35.06.09 66.16-22.49 76.94-55.86 22.51-4.61 41.94-18.7 53.31-38.67 17.57-30.32 13.55-68.51-9.94-94.51zm-120.28 168.11c-14.03.02-27.62-4.89-38.39-13.88.49-.26 1.34-.73 1.89-1.07l63.72-36.8c3.26-1.85 5.26-5.32 5.24-9.07v-89.83l26.93 15.55c.29.14.48.42.52.74v74.39c-.04 33.08-26.83 59.9-59.91 59.97zm-128.84-55.03c-7.03-12.14-9.56-26.37-7.15-40.18.47.28 1.3.79 1.89 1.13l63.72 36.8c3.23 1.89 7.23 1.89 10.47 0l77.79-44.92v31.1c.02.32-.13.63-.38.83l-64.41 37.19c-28.69 16.52-65.33 6.7-81.92-21.95zm-16.77-139.09c7-12.16 18.05-21.46 31.21-26.29 0 .55-.03 1.52-.03 2.2v73.61c-.02 3.74 1.98 7.21 5.23 9.06l77.79 44.91-26.93 15.55c-.27.18-.61.21-.91.08l-64.42-37.22c-28.63-16.58-38.45-53.21-21.95-81.89zm221.26 51.49-77.79-44.92 26.93-15.54c.27-.18.61-.21.91-.08l64.42 37.19c28.68 16.57 38.51 53.26 21.94 81.94-7.01 12.14-18.05 21.44-31.2 26.28v-75.81c.03-3.74-1.96-7.2-5.2-9.06zm26.8-40.34c-.47-.29-1.3-.79-1.89-1.13l-63.72-36.8c-3.23-1.89-7.23-1.89-10.47 0l-77.79 44.92v-31.1c-.02-.32.13-.63.38-.83l64.41-37.16c28.69-16.55 65.37-6.7 81.91 22 6.99 12.12 9.52 26.31 7.15 40.1zm-168.51 55.43-26.94-15.55c-.29-.14-.48-.42-.52-.74v-74.39c.02-33.12 26.89-59.96 60.01-59.94 14.01 0 27.57 4.92 38.34 13.88-.49.26-1.33.73-1.89 1.07l-63.72 36.8c-3.26 1.85-5.26 5.31-5.24 9.06l-.04 89.79zm14.63-31.54 34.65-20.01 34.65 20v40.01l-34.65 20-34.65-20z" }) });
|
|
7301
7317
|
|
|
7302
7318
|
const AnthropicChatIcon = (props) => /* @__PURE__ */ jsx("svg", { className: "h-3 w-3", viewBox: "0 0 320 320", xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", ...props, children: /* @__PURE__ */ jsx("path", { d: "m297.06 130.97c7.26-21.79 4.76-45.66-6.85-65.48-17.46-30.4-52.56-46.04-86.84-38.68-15.25-17.18-37.16-26.95-60.13-26.81-35.04-.08-66.13 22.48-76.91 55.82-22.51 4.61-41.94 18.7-53.31 38.67-17.59 30.32-13.58 68.54 9.92 94.54-7.26 21.79-4.76 45.66 6.85 65.48 17.46 30.4 52.56 46.04 86.84 38.68 15.24 17.18 37.16 26.95 60.13 26.8 35.06.09 66.16-22.49 76.94-55.86 22.51-4.61 41.94-18.7 53.31-38.67 17.57-30.32 13.55-68.51-9.94-94.51zm-120.28 168.11c-14.03.02-27.62-4.89-38.39-13.88.49-.26 1.34-.73 1.89-1.07l63.72-36.8c3.26-1.85 5.26-5.32 5.24-9.07v-89.83l26.93 15.55c.29.14.48.42.52.74v74.39c-.04 33.08-26.83 59.9-59.91 59.97zm-128.84-55.03c-7.03-12.14-9.56-26.37-7.15-40.18.47.28 1.3.79 1.89 1.13l63.72 36.8c3.23 1.89 7.23 1.89 10.47 0l77.79-44.92v31.1c.02.32-.13.63-.38.83l-64.41 37.19c-28.69 16.52-65.33 6.7-81.92-21.95zm-16.77-139.09c7-12.16 18.05-21.46 31.21-26.29 0 .55-.03 1.52-.03 2.2v73.61c-.02 3.74 1.98 7.21 5.23 9.06l77.79 44.91-26.93 15.55c-.27.18-.61.21-.91.08l-64.42-37.22c-28.63-16.58-38.45-53.21-21.95-81.89zm221.26 51.49-77.79-44.92 26.93-15.54c.27-.18.61-.21.91-.08l64.42 37.19c28.68 16.57 38.51 53.26 21.94 81.94-7.01 12.14-18.05 21.44-31.2 26.28v-75.81c.03-3.74-1.96-7.2-5.2-9.06zm26.8-40.34c-.47-.29-1.3-.79-1.89-1.13l-63.72-36.8c-3.23-1.89-7.23-1.89-10.47 0l-77.79 44.92v-31.1c-.02-.32.13-.63.38-.83l64.41-37.16c28.69-16.55 65.37-6.7 81.91 22 6.99 12.12 9.52 26.31 7.15 40.1zm-168.51 55.43-26.94-15.55c-.29-.14-.48-.42-.52-.74v-74.39c.02-33.12 26.89-59.96 60.01-59.94 14.01 0 27.57 4.92 38.34 13.88-.49.26-1.33.73-1.89 1.07l-63.72 36.8c-3.26 1.85-5.26 5.31-5.24 9.06l-.04 89.79zm14.63-31.54 34.65-20.01 34.65 20v40.01l-34.65 20-34.65-20z" }) });
|
|
@@ -7718,20 +7734,6 @@ const MistralIcon = (props) => /* @__PURE__ */ jsxs(
|
|
|
7718
7734
|
}
|
|
7719
7735
|
);
|
|
7720
7736
|
|
|
7721
|
-
const LinkComponentContext = createContext({
|
|
7722
|
-
Link: forwardRef(() => null)
|
|
7723
|
-
});
|
|
7724
|
-
const LinkComponentProvider = ({ children, Link }) => {
|
|
7725
|
-
return /* @__PURE__ */ jsx(LinkComponentContext.Provider, { value: { Link }, children });
|
|
7726
|
-
};
|
|
7727
|
-
const useLinkComponent = () => {
|
|
7728
|
-
const ctx = useContext(LinkComponentContext);
|
|
7729
|
-
if (!ctx) {
|
|
7730
|
-
throw new Error("useLinkComponent must be used within a LinkComponentProvider");
|
|
7731
|
-
}
|
|
7732
|
-
return ctx;
|
|
7733
|
-
};
|
|
7734
|
-
|
|
7735
7737
|
const providerMapToIcon = {
|
|
7736
7738
|
"openai.chat": /* @__PURE__ */ jsx(OpenaiChatIcon, {}),
|
|
7737
7739
|
"anthropic.chat": /* @__PURE__ */ jsx(AnthropicChatIcon, {}),
|
|
@@ -7744,6 +7746,7 @@ const providerMapToIcon = {
|
|
|
7744
7746
|
X_GROK: /* @__PURE__ */ jsx(XGroqIcon, {}),
|
|
7745
7747
|
MISTRAL: /* @__PURE__ */ jsx(MistralIcon, {})
|
|
7746
7748
|
};
|
|
7749
|
+
|
|
7747
7750
|
const NameCell = ({ row }) => {
|
|
7748
7751
|
const { Link } = useLinkComponent();
|
|
7749
7752
|
return /* @__PURE__ */ jsx(
|
|
@@ -7791,7 +7794,8 @@ const columns$2 = [
|
|
|
7791
7794
|
}
|
|
7792
7795
|
];
|
|
7793
7796
|
|
|
7794
|
-
function AgentsTable({ agents, isLoading,
|
|
7797
|
+
function AgentsTable({ agents, isLoading, computeLink }) {
|
|
7798
|
+
const { navigate } = useLinkComponent();
|
|
7795
7799
|
const projectData = useMemo(
|
|
7796
7800
|
() => Object.keys(agents).map((key) => {
|
|
7797
7801
|
const agent = agents[key];
|
|
@@ -7805,7 +7809,7 @@ function AgentsTable({ agents, isLoading, onClickRow }) {
|
|
|
7805
7809
|
repoUrl: void 0,
|
|
7806
7810
|
tools: agent.tools,
|
|
7807
7811
|
modelId: agent.modelId,
|
|
7808
|
-
link:
|
|
7812
|
+
link: computeLink(key)
|
|
7809
7813
|
};
|
|
7810
7814
|
}),
|
|
7811
7815
|
[agents]
|
|
@@ -7823,7 +7827,7 @@ function AgentsTable({ agents, isLoading, onClickRow }) {
|
|
|
7823
7827
|
}
|
|
7824
7828
|
return /* @__PURE__ */ jsx(ScrollableContainer, { children: /* @__PURE__ */ jsxs(Table, { children: [
|
|
7825
7829
|
/* @__PURE__ */ jsx(Thead, { className: "sticky top-0", children: ths.headers.map((header) => /* @__PURE__ */ jsx(Th, { style: { width: header.index === 0 ? "auto" : header.column.getSize() }, children: flexRender(header.column.columnDef.header, header.getContext()) }, header.id)) }),
|
|
7826
|
-
/* @__PURE__ */ jsx(Tbody, { children: rows.map((row) => /* @__PURE__ */ jsx(Row, { onClick: () =>
|
|
7830
|
+
/* @__PURE__ */ jsx(Tbody, { children: rows.map((row) => /* @__PURE__ */ jsx(Row, { onClick: () => navigate(row.original.link), children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx(React__default.Fragment, { children: flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id)) }, row.id)) })
|
|
7827
7831
|
] }) });
|
|
7828
7832
|
}
|
|
7829
7833
|
const AgentsTableSkeleton = () => /* @__PURE__ */ jsxs(Table, { children: [
|
|
@@ -7898,7 +7902,7 @@ const RuntimeContext = () => {
|
|
|
7898
7902
|
const formatted = await formatJSON(runtimeContextValue);
|
|
7899
7903
|
setRuntimeContextValue(formatted);
|
|
7900
7904
|
};
|
|
7901
|
-
return /* @__PURE__ */ jsxs("div", { children: [
|
|
7905
|
+
return /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsxs("div", { children: [
|
|
7902
7906
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between pb-2", children: [
|
|
7903
7907
|
/* @__PURE__ */ jsx(Txt, { as: "label", variant: "ui-md", className: "text-icon3", children: "Runtime Context (JSON)" }),
|
|
7904
7908
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
@@ -7923,7 +7927,7 @@ const RuntimeContext = () => {
|
|
|
7923
7927
|
}
|
|
7924
7928
|
),
|
|
7925
7929
|
/* @__PURE__ */ jsx("div", { className: "flex justify-end pt-2", children: /* @__PURE__ */ jsx(Button, { onClick: handleSaveRuntimeContext, children: "Save" }) })
|
|
7926
|
-
] });
|
|
7930
|
+
] }) });
|
|
7927
7931
|
};
|
|
7928
7932
|
const RuntimeContextWrapper = ({ children }) => {
|
|
7929
7933
|
const { Link } = useLinkComponent();
|
|
@@ -9582,7 +9586,8 @@ function WorkflowDefaultNode({
|
|
|
9582
9586
|
step?.status === "success" && "ring-2 ring-accent1",
|
|
9583
9587
|
step?.status === "failed" && "ring-2 ring-accent2",
|
|
9584
9588
|
step?.status === "suspended" && "ring-2 ring-accent3",
|
|
9585
|
-
step?.status === "waiting" && "ring-2 ring-accent5"
|
|
9589
|
+
step?.status === "waiting" && "ring-2 ring-accent5",
|
|
9590
|
+
step?.status === "running" && "ring-2 ring-accent6"
|
|
9586
9591
|
),
|
|
9587
9592
|
children: [
|
|
9588
9593
|
/* @__PURE__ */ jsxs("div", { className: cn("flex items-center gap-2 px-3", !description && "pb-2"), children: [
|
|
@@ -9591,7 +9596,7 @@ function WorkflowDefaultNode({
|
|
|
9591
9596
|
step?.status === "success" && /* @__PURE__ */ jsx(CheckIcon, { className: "text-accent1" }),
|
|
9592
9597
|
step?.status === "suspended" && /* @__PURE__ */ jsx(PauseIcon, { className: "text-accent3" }),
|
|
9593
9598
|
step?.status === "waiting" && /* @__PURE__ */ jsx(HourglassIcon, { className: "text-accent5" }),
|
|
9594
|
-
step?.status === "running" && /* @__PURE__ */ jsx(Loader2, { className: "text-
|
|
9599
|
+
step?.status === "running" && /* @__PURE__ */ jsx(Loader2, { className: "text-accent6 animate-spin" }),
|
|
9595
9600
|
!step && /* @__PURE__ */ jsx(CircleDashed, { className: "text-icon2" })
|
|
9596
9601
|
] }),
|
|
9597
9602
|
/* @__PURE__ */ jsxs(Txt, { variant: "ui-lg", className: "text-icon6 font-medium inline-flex items-center gap-1 justify-between w-full", children: [
|
|
@@ -9884,7 +9889,8 @@ function WorkflowNestedNode({
|
|
|
9884
9889
|
step?.status === "success" && "ring-2 ring-accent1",
|
|
9885
9890
|
step?.status === "failed" && "ring-2 ring-accent2",
|
|
9886
9891
|
step?.status === "suspended" && "ring-2 ring-accent3",
|
|
9887
|
-
step?.status === "waiting" && "ring-2 ring-accent5"
|
|
9892
|
+
step?.status === "waiting" && "ring-2 ring-accent5",
|
|
9893
|
+
step?.status === "running" && "ring-2 ring-accent6"
|
|
9888
9894
|
),
|
|
9889
9895
|
children: [
|
|
9890
9896
|
/* @__PURE__ */ jsxs("div", { className: cn("flex items-center gap-2 px-3", !description && "pb-2"), children: [
|
|
@@ -9893,7 +9899,7 @@ function WorkflowNestedNode({
|
|
|
9893
9899
|
step?.status === "success" && /* @__PURE__ */ jsx(CheckIcon, { className: "text-accent1" }),
|
|
9894
9900
|
step?.status === "suspended" && /* @__PURE__ */ jsx(PauseIcon, { className: "text-accent3" }),
|
|
9895
9901
|
step?.status === "waiting" && /* @__PURE__ */ jsx(HourglassIcon, { className: "text-accent5" }),
|
|
9896
|
-
step?.status === "running" && /* @__PURE__ */ jsx(Loader2, { className: "text-
|
|
9902
|
+
step?.status === "running" && /* @__PURE__ */ jsx(Loader2, { className: "text-accent6 animate-spin" }),
|
|
9897
9903
|
!step && /* @__PURE__ */ jsx(CircleDashed, { className: "text-icon2" })
|
|
9898
9904
|
] }),
|
|
9899
9905
|
/* @__PURE__ */ jsxs(Txt, { variant: "ui-lg", className: "text-icon6 font-medium inline-flex items-center gap-1 justify-between w-full", children: [
|
|
@@ -11124,7 +11130,8 @@ const columns$1 = [
|
|
|
11124
11130
|
}
|
|
11125
11131
|
];
|
|
11126
11132
|
|
|
11127
|
-
const NetworkTable = ({ legacyNetworks, networks, isLoading,
|
|
11133
|
+
const NetworkTable = ({ legacyNetworks, networks, isLoading, computeLink }) => {
|
|
11134
|
+
const { navigate } = useLinkComponent();
|
|
11128
11135
|
const allNetworks = useMemo(
|
|
11129
11136
|
() => [
|
|
11130
11137
|
...legacyNetworks?.map((network) => ({
|
|
@@ -11157,7 +11164,15 @@ const NetworkTable = ({ legacyNetworks, networks, isLoading, onClickRow }) => {
|
|
|
11157
11164
|
}
|
|
11158
11165
|
return /* @__PURE__ */ jsx(ScrollableContainer, { children: /* @__PURE__ */ jsxs(Table, { children: [
|
|
11159
11166
|
/* @__PURE__ */ jsx(Thead, { className: "sticky top-0", children: ths.headers.map((header) => /* @__PURE__ */ jsx(Th, { style: { width: header.index === 0 ? "auto" : header.column.getSize() }, children: flexRender(header.column.columnDef.header, header.getContext()) }, header.id)) }),
|
|
11160
|
-
/* @__PURE__ */ jsx(Tbody, { children: rows.map((row) => /* @__PURE__ */ jsx(
|
|
11167
|
+
/* @__PURE__ */ jsx(Tbody, { children: rows.map((row) => /* @__PURE__ */ jsx(
|
|
11168
|
+
Row,
|
|
11169
|
+
{
|
|
11170
|
+
onClick: () => navigate(computeLink(row.original.id, row.original.isVNext || false)),
|
|
11171
|
+
className: "cursor-pointer",
|
|
11172
|
+
children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx(React__default.Fragment, { children: flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id))
|
|
11173
|
+
},
|
|
11174
|
+
row.id
|
|
11175
|
+
)) })
|
|
11161
11176
|
] }) });
|
|
11162
11177
|
};
|
|
11163
11178
|
const NetworkTableEmpty = () => {
|
|
@@ -11239,13 +11254,17 @@ const EntityContent = ({ children, className }) => {
|
|
|
11239
11254
|
return /* @__PURE__ */ jsx("div", { className, children });
|
|
11240
11255
|
};
|
|
11241
11256
|
|
|
11242
|
-
const ToolList = ({ tools, agents, isLoading }) => {
|
|
11257
|
+
const ToolList = ({ tools, agents, isLoading, computeLink, computeAgentLink }) => {
|
|
11243
11258
|
const toolsWithAgents = useMemo(() => prepareAgents(tools, agents), [tools, agents]);
|
|
11244
11259
|
if (isLoading)
|
|
11245
11260
|
return /* @__PURE__ */ jsx("div", { className: "max-w-5xl w-full mx-auto px-4 pt-8", children: /* @__PURE__ */ jsx(ToolListSkeleton, {}) });
|
|
11246
|
-
return /* @__PURE__ */ jsx(ToolListInner, { toolsWithAgents });
|
|
11261
|
+
return /* @__PURE__ */ jsx(ToolListInner, { toolsWithAgents, computeLink, computeAgentLink });
|
|
11247
11262
|
};
|
|
11248
|
-
const ToolListInner = ({
|
|
11263
|
+
const ToolListInner = ({
|
|
11264
|
+
toolsWithAgents,
|
|
11265
|
+
computeLink,
|
|
11266
|
+
computeAgentLink
|
|
11267
|
+
}) => {
|
|
11249
11268
|
const [filteredTools, setFilteredTools] = useState(toolsWithAgents);
|
|
11250
11269
|
const [value, setValue] = useState("");
|
|
11251
11270
|
if (filteredTools.length === 0 && !value) return /* @__PURE__ */ jsx(ToolListEmpty, {});
|
|
@@ -11279,29 +11298,22 @@ const ToolListInner = ({ toolsWithAgents }) => {
|
|
|
11279
11298
|
] }),
|
|
11280
11299
|
filteredTools.length === 0 && /* @__PURE__ */ jsx(Txt, { as: "p", className: "text-icon3 py-2", children: "No tools found matching your search." })
|
|
11281
11300
|
] }),
|
|
11282
|
-
/* @__PURE__ */ jsx("div", { className: "grid md:grid-cols-2 xl:grid-cols-3 gap-4 max-w-5xl mx-auto py-8", children: filteredTools.map((tool) => /* @__PURE__ */ jsx(ToolEntity, { tool }, tool.id)) })
|
|
11301
|
+
/* @__PURE__ */ jsx("div", { className: "grid md:grid-cols-2 xl:grid-cols-3 gap-4 max-w-5xl mx-auto py-8", children: filteredTools.map((tool) => /* @__PURE__ */ jsx(ToolEntity, { tool, computeLink, computeAgentLink }, tool.id)) })
|
|
11283
11302
|
] });
|
|
11284
11303
|
};
|
|
11285
|
-
const ToolEntity = ({ tool }) => {
|
|
11304
|
+
const ToolEntity = ({ tool, computeLink, computeAgentLink }) => {
|
|
11286
11305
|
const linkRef = useRef(null);
|
|
11287
11306
|
const { Link } = useLinkComponent();
|
|
11288
11307
|
return /* @__PURE__ */ jsxs(Entity, { onClick: () => linkRef.current?.click(), children: [
|
|
11289
11308
|
/* @__PURE__ */ jsx(EntityIcon, { children: /* @__PURE__ */ jsx(ToolsIcon, { className: "group-hover/entity:text-[#ECB047]" }) }),
|
|
11290
11309
|
/* @__PURE__ */ jsxs(EntityContent, { children: [
|
|
11291
|
-
/* @__PURE__ */ jsx(EntityName, { children: /* @__PURE__ */ jsx(
|
|
11292
|
-
Link,
|
|
11293
|
-
{
|
|
11294
|
-
ref: linkRef,
|
|
11295
|
-
href: tool.agents.length > 0 ? `/tools/${tool.agents[0].id}/${tool.id}` : `/tools/all/${tool.id}`,
|
|
11296
|
-
children: tool.id
|
|
11297
|
-
}
|
|
11298
|
-
) }),
|
|
11310
|
+
/* @__PURE__ */ jsx(EntityName, { children: /* @__PURE__ */ jsx(Link, { ref: linkRef, href: computeLink(tool.id, tool.agents[0]?.id), children: tool.id }) }),
|
|
11299
11311
|
/* @__PURE__ */ jsx(EntityDescription, { children: tool.description }),
|
|
11300
11312
|
/* @__PURE__ */ jsx("div", { className: "inline-flex flex-wrap gap-2 pt-4", children: tool.agents.map((agent) => {
|
|
11301
11313
|
return /* @__PURE__ */ jsx(
|
|
11302
11314
|
Link,
|
|
11303
11315
|
{
|
|
11304
|
-
href:
|
|
11316
|
+
href: computeAgentLink(tool.id, agent.id),
|
|
11305
11317
|
onClick: (e) => e.stopPropagation(),
|
|
11306
11318
|
className: "group/link",
|
|
11307
11319
|
children: /* @__PURE__ */ jsx(Badge$1, { icon: /* @__PURE__ */ jsx(AgentIcon, { className: "group-hover/link:text-accent3" }), className: "bg-surface5 ", children: agent.name })
|
|
@@ -12585,7 +12597,7 @@ const WorkflowStatus = ({ stepId, status, result }) => {
|
|
|
12585
12597
|
status === "failed" && /* @__PURE__ */ jsx(CrossIcon, { className: "text-accent2" }),
|
|
12586
12598
|
status === "suspended" && /* @__PURE__ */ jsx(CirclePause, { className: "text-accent3" }),
|
|
12587
12599
|
status === "waiting" && /* @__PURE__ */ jsx(HourglassIcon, { className: "text-accent5" }),
|
|
12588
|
-
status === "running" && /* @__PURE__ */ jsx(Loader2, { className: "text-
|
|
12600
|
+
status === "running" && /* @__PURE__ */ jsx(Loader2, { className: "text-accent6 animate-spin" })
|
|
12589
12601
|
] }),
|
|
12590
12602
|
/* @__PURE__ */ jsx(Txt, { as: "span", variant: "ui-lg", className: "text-icon6 font-medium", children: stepId.charAt(0).toUpperCase() + stepId.slice(1) })
|
|
12591
12603
|
] }),
|
|
@@ -12756,6 +12768,7 @@ function WorkflowTrigger({
|
|
|
12756
12768
|
const zodInputSchema = triggerSchema ? resolveSerializedZodOutput(jsonSchemaToZod(parse(triggerSchema))) : null;
|
|
12757
12769
|
const workflowActivePaths = streamResultToUse?.payload?.workflowState?.steps ?? {};
|
|
12758
12770
|
const hasWorkflowActivePaths = Object.values(workflowActivePaths).length > 0;
|
|
12771
|
+
const doneStatuses = ["success", "failed", "canceled"];
|
|
12759
12772
|
return /* @__PURE__ */ jsxs("div", { className: "h-full pt-3 pb-12", children: [
|
|
12760
12773
|
/* @__PURE__ */ jsxs("div", { className: "space-y-4 px-5 pb-5 border-b-sm border-border1", children: [
|
|
12761
12774
|
(isResumingWorkflow || isSuspendedSteps && isStreamingWorkflow) && /* @__PURE__ */ jsxs("div", { className: "py-2 px-5 flex items-center gap-2 bg-surface5 -mx-5 -mt-5 border-b-sm border-border1", children: [
|
|
@@ -12823,7 +12836,7 @@ function WorkflowTrigger({
|
|
|
12823
12836
|
className: "w-full",
|
|
12824
12837
|
size: "lg",
|
|
12825
12838
|
onClick: handleCancelWorkflowRun,
|
|
12826
|
-
disabled: !!cancelResponse?.message || isCancellingWorkflowRun,
|
|
12839
|
+
disabled: !!cancelResponse?.message || isCancellingWorkflowRun || result?.payload?.workflowState?.status && doneStatuses.includes(result?.payload?.workflowState?.status),
|
|
12827
12840
|
children: [
|
|
12828
12841
|
isCancellingWorkflowRun ? /* @__PURE__ */ jsx(Icon, { children: /* @__PURE__ */ jsx(Loader2, { className: "animate-spin" }) }) : /* @__PURE__ */ jsx(Icon, { children: /* @__PURE__ */ jsx(StopCircle, {}) }),
|
|
12829
12842
|
cancelResponse?.message || "Cancel Workflow Run"
|
|
@@ -12914,7 +12927,8 @@ const columns = [
|
|
|
12914
12927
|
}
|
|
12915
12928
|
];
|
|
12916
12929
|
|
|
12917
|
-
function WorkflowTable({ workflows, legacyWorkflows, isLoading,
|
|
12930
|
+
function WorkflowTable({ workflows, legacyWorkflows, isLoading, computeLink }) {
|
|
12931
|
+
const { navigate } = useLinkComponent();
|
|
12918
12932
|
const workflowData = useMemo(() => {
|
|
12919
12933
|
const _workflowsData = Object.keys(workflows ?? {}).map((key) => {
|
|
12920
12934
|
const workflow = workflows?.[key];
|
|
@@ -12923,7 +12937,7 @@ function WorkflowTable({ workflows, legacyWorkflows, isLoading, onClickRow }) {
|
|
|
12923
12937
|
name: workflow?.name || "N/A",
|
|
12924
12938
|
stepsCount: Object.keys(workflow?.steps ?? {})?.length,
|
|
12925
12939
|
isLegacy: false,
|
|
12926
|
-
link:
|
|
12940
|
+
link: computeLink(key)
|
|
12927
12941
|
};
|
|
12928
12942
|
});
|
|
12929
12943
|
const legacyWorkflowsData = Object.keys(legacyWorkflows ?? {}).map((key) => {
|
|
@@ -12933,7 +12947,7 @@ function WorkflowTable({ workflows, legacyWorkflows, isLoading, onClickRow }) {
|
|
|
12933
12947
|
name: workflow?.name || "N/A",
|
|
12934
12948
|
stepsCount: Object.keys(workflow?.steps ?? {})?.length,
|
|
12935
12949
|
isLegacy: true,
|
|
12936
|
-
link:
|
|
12950
|
+
link: computeLink(key)
|
|
12937
12951
|
};
|
|
12938
12952
|
});
|
|
12939
12953
|
return [..._workflowsData, ...legacyWorkflowsData];
|
|
@@ -12951,7 +12965,7 @@ function WorkflowTable({ workflows, legacyWorkflows, isLoading, onClickRow }) {
|
|
|
12951
12965
|
}
|
|
12952
12966
|
return /* @__PURE__ */ jsx(ScrollableContainer, { children: /* @__PURE__ */ jsxs(Table, { children: [
|
|
12953
12967
|
/* @__PURE__ */ jsx(Thead, { className: "sticky top-0", children: ths.headers.map((header) => /* @__PURE__ */ jsx(Th, { style: { width: header.index === 0 ? "auto" : header.column.getSize() }, children: flexRender(header.column.columnDef.header, header.getContext()) }, header.id)) }),
|
|
12954
|
-
/* @__PURE__ */ jsx(Tbody, { children: rows.map((row) => /* @__PURE__ */ jsx(Row, { onClick: () =>
|
|
12968
|
+
/* @__PURE__ */ jsx(Tbody, { children: rows.map((row) => /* @__PURE__ */ jsx(Row, { onClick: () => navigate(row.original.link), children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx(React__default.Fragment, { children: flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id)) }, row.id)) })
|
|
12955
12969
|
] }) });
|
|
12956
12970
|
}
|
|
12957
12971
|
const WorkflowTableSkeleton = () => /* @__PURE__ */ jsxs(Table, { children: [
|
|
@@ -13349,5 +13363,5 @@ function usePolling({
|
|
|
13349
13363
|
};
|
|
13350
13364
|
}
|
|
13351
13365
|
|
|
13352
|
-
export { AgentChat, AgentCoinIcon, AgentEvals, AgentIcon, AgentNetworkCoinIcon, AgentSettings, AgentSettingsContext, AgentSettingsProvider, AgentTraces, AgentsTable, AgentsTableSkeleton, AiIcon, ApiIcon, Badge$1 as Badge, BranchIcon, Breadcrumb, Button, Cell, CheckIcon, ChevronIcon, CommitIcon, CrossIcon, Crumb, DarkLogo, DataTable, DateTimeCell, DbIcon, DebugIcon, DeploymentIcon, DividerIcon, DocsIcon, DynamicForm, EmptyAgentsTable, EmptyState, EmptyWorkflowsTable, Entity, EntityContent, EntityDescription, EntityIcon, EntityName, Entry, EntryCell, EnvIcon, EvaluatorCoinIcon, FiltersIcon, FolderIcon, GithubCoinIcon, GithubIcon, GoogleIcon, Header, HeaderAction, HeaderGroup, HeaderTitle, HomeIcon, Icon, InfoIcon, JudgeIcon, LatencyIcon, LegacyWorkflowGraph, LegacyWorkflowTrigger, LinkComponentProvider, LogsIcon, MainContentContent, MainContentLayout, MastraClientProvider, MastraResizablePanel, McpCoinIcon, McpServerIcon, MemoryIcon, NetworkChat, NetworkContext, NetworkProvider, NetworkTable, NetworkTableEmpty, NetworkTableSkeleton, OpenAIIcon, PromptIcon, RadioGroup, RadioGroupItem, RepoIcon, Row, RuntimeContext, RuntimeContextWrapper, ScoreIcon, SettingsIcon, SlashIcon, Table, Tbody, Th, Thead, ThreadDeleteButton, ThreadItem, ThreadLink, ThreadList, Threads, ToolCoinIcon, ToolList, ToolListEmpty, ToolListSkeleton, ToolsIcon, TraceIcon, TsIcon, Txt, TxtCell, UnitCell, VNextNetworkChat, VariablesIcon, WorkflowCoinIcon, WorkflowGraph, WorkflowIcon, WorkflowRunContext, WorkflowRunProvider, WorkflowRuns, WorkflowTable, WorkflowTableSkeleton, WorkflowTraces, WorkflowTrigger, WorkingMemoryContext, WorkingMemoryProvider, useAgentSettings, useCurrentRun, useLinkComponent, useMastraClient, usePlaygroundStore, usePolling, useSpeechRecognition, useWorkingMemory };
|
|
13366
|
+
export { AgentChat, AgentCoinIcon, AgentEvals, AgentIcon, AgentNetworkCoinIcon, AgentSettings, AgentSettingsContext, AgentSettingsProvider, AgentTraces, AgentsTable, AgentsTableSkeleton, AiIcon, ApiIcon, Badge$1 as Badge, BranchIcon, Breadcrumb, Button, Cell, CheckIcon, ChevronIcon, CommitIcon, CrossIcon, Crumb, DarkLogo, DataTable, DateTimeCell, DbIcon, DebugIcon, DeploymentIcon, DividerIcon, DocsIcon, DynamicForm, EmptyAgentsTable, EmptyState, EmptyWorkflowsTable, Entity, EntityContent, EntityDescription, EntityIcon, EntityName, Entry, EntryCell, EnvIcon, EvaluatorCoinIcon, FiltersIcon, FolderIcon, GithubCoinIcon, GithubIcon, GoogleIcon, Header, HeaderAction, HeaderGroup, HeaderTitle, HomeIcon, Icon, InfoIcon, JudgeIcon, LatencyIcon, LegacyWorkflowGraph, LegacyWorkflowTrigger, LinkComponentProvider, LogsIcon, MainContentContent, MainContentLayout, MastraClientProvider, MastraResizablePanel, McpCoinIcon, McpServerIcon, MemoryIcon, NetworkChat, NetworkContext, NetworkProvider, NetworkTable, NetworkTableEmpty, NetworkTableSkeleton, OpenAIIcon, PromptIcon, RadioGroup, RadioGroupItem, RepoIcon, Row, RuntimeContext, RuntimeContextWrapper, ScoreIcon, SettingsIcon, SlashIcon, Table, Tbody, Th, Thead, ThreadDeleteButton, ThreadItem, ThreadLink, ThreadList, Threads, ToolCoinIcon, ToolList, ToolListEmpty, ToolListSkeleton, ToolsIcon, TraceIcon, TsIcon, Txt, TxtCell, UnitCell, VNextNetworkChat, VariablesIcon, WorkflowCoinIcon, WorkflowGraph, WorkflowIcon, WorkflowRunContext, WorkflowRunProvider, WorkflowRuns, WorkflowTable, WorkflowTableSkeleton, WorkflowTraces, WorkflowTrigger, WorkingMemoryContext, WorkingMemoryProvider, providerMapToIcon, useAgentSettings, useCurrentRun, useLinkComponent, useMastraClient, usePlaygroundStore, usePolling, useSpeechRecognition, useWorkingMemory };
|
|
13353
13367
|
//# sourceMappingURL=index.es.js.map
|