@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.
@@ -8,7 +8,8 @@ const Colors = {
8
8
  accent2: "#FF4931",
9
9
  accent3: "#267AD2",
10
10
  accent4: "#9E57B3",
11
- accent5: "#4A9DF2"
11
+ accent5: "#4A9DF2",
12
+ accent6: "#FFF176"
12
13
  };
13
14
  const BorderColors = {
14
15
  border1: "rgba(48, 48, 48, 1)",
@@ -24,4 +25,4 @@ const IconColors = {
24
25
  };
25
26
 
26
27
  export { BorderColors as B, Colors as C, IconColors as I };
27
- //# sourceMappingURL=colors-BauMYA7t.js.map
28
+ //# sourceMappingURL=colors-B25-HzLf.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"colors-B25-HzLf.js","sources":["../src/ds/tokens/colors.ts"],"sourcesContent":["export const Colors = {\n surface1: '#000000',\n surface2: '#0F0F0F',\n surface3: '#141414',\n surface4: '#1A1A1A',\n surface5: 'rgba(46, 46, 46, 0.9)',\n accent1: '#1AFB6F',\n accent2: '#FF4931',\n accent3: '#267AD2',\n accent4: '#9E57B3',\n accent5: '#4A9DF2',\n accent6: '#FFF176',\n};\n\nexport const BorderColors = {\n border1: 'rgba(48, 48, 48, 1)',\n border2: 'rgba(66, 66, 66, 1)',\n};\n\nexport const IconColors = {\n icon1: '#5C5C5C',\n icon2: '#707070',\n icon3: '#939393',\n icon4: '#A9A9A9',\n icon5: '#E6E6E6',\n icon6: '#FFFFFF',\n};\n"],"names":[],"mappings":"AAAO,MAAM,MAAA,GAAS;AAAA,EACpB,QAAA,EAAU,SAAA;AAAA,EACV,QAAA,EAAU,SAAA;AAAA,EACV,QAAA,EAAU,SAAA;AAAA,EACV,QAAA,EAAU,SAAA;AAAA,EACV,QAAA,EAAU,uBAAA;AAAA,EACV,OAAA,EAAS,SAAA;AAAA,EACT,OAAA,EAAS,SAAA;AAAA,EACT,OAAA,EAAS,SAAA;AAAA,EACT,OAAA,EAAS,SAAA;AAAA,EACT,OAAA,EAAS,SAAA;AAAA,EACT,OAAA,EAAS;AACX;AAEO,MAAM,YAAA,GAAe;AAAA,EAC1B,OAAA,EAAS,qBAAA;AAAA,EACT,OAAA,EAAS;AACX;AAEO,MAAM,UAAA,GAAa;AAAA,EACxB,KAAA,EAAO,SAAA;AAAA,EACP,KAAA,EAAO,SAAA;AAAA,EACP,KAAA,EAAO,SAAA;AAAA,EACP,KAAA,EAAO,SAAA;AAAA,EACP,KAAA,EAAO,SAAA;AAAA,EACP,KAAA,EAAO;AACT;;;;"}
@@ -10,7 +10,8 @@ const Colors = {
10
10
  accent2: "#FF4931",
11
11
  accent3: "#267AD2",
12
12
  accent4: "#9E57B3",
13
- accent5: "#4A9DF2"
13
+ accent5: "#4A9DF2",
14
+ accent6: "#FFF176"
14
15
  };
15
16
  const BorderColors = {
16
17
  border1: "rgba(48, 48, 48, 1)",
@@ -28,4 +29,4 @@ const IconColors = {
28
29
  exports.BorderColors = BorderColors;
29
30
  exports.Colors = Colors;
30
31
  exports.IconColors = IconColors;
31
- //# sourceMappingURL=colors-BjoU9dWU.cjs.map
32
+ //# sourceMappingURL=colors-CD-k9ILs.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"colors-CD-k9ILs.cjs","sources":["../src/ds/tokens/colors.ts"],"sourcesContent":["export const Colors = {\n surface1: '#000000',\n surface2: '#0F0F0F',\n surface3: '#141414',\n surface4: '#1A1A1A',\n surface5: 'rgba(46, 46, 46, 0.9)',\n accent1: '#1AFB6F',\n accent2: '#FF4931',\n accent3: '#267AD2',\n accent4: '#9E57B3',\n accent5: '#4A9DF2',\n accent6: '#FFF176',\n};\n\nexport const BorderColors = {\n border1: 'rgba(48, 48, 48, 1)',\n border2: 'rgba(66, 66, 66, 1)',\n};\n\nexport const IconColors = {\n icon1: '#5C5C5C',\n icon2: '#707070',\n icon3: '#939393',\n icon4: '#A9A9A9',\n icon5: '#E6E6E6',\n icon6: '#FFFFFF',\n};\n"],"names":[],"mappings":";;AAAO,MAAM,MAAA,GAAS;AAAA,EACpB,QAAA,EAAU,SAAA;AAAA,EACV,QAAA,EAAU,SAAA;AAAA,EACV,QAAA,EAAU,SAAA;AAAA,EACV,QAAA,EAAU,SAAA;AAAA,EACV,QAAA,EAAU,uBAAA;AAAA,EACV,OAAA,EAAS,SAAA;AAAA,EACT,OAAA,EAAS,SAAA;AAAA,EACT,OAAA,EAAS,SAAA;AAAA,EACT,OAAA,EAAS,SAAA;AAAA,EACT,OAAA,EAAS,SAAA;AAAA,EACT,OAAA,EAAS;AACX;AAEO,MAAM,YAAA,GAAe;AAAA,EAC1B,OAAA,EAAS,qBAAA;AAAA,EACT,OAAA,EAAS;AACX;AAEO,MAAM,UAAA,GAAa;AAAA,EACxB,KAAA,EAAO,SAAA;AAAA,EACP,KAAA,EAAO,SAAA;AAAA,EACP,KAAA,EAAO,SAAA;AAAA,EACP,KAAA,EAAO,SAAA;AAAA,EACP,KAAA,EAAO,SAAA;AAAA,EACP,KAAA,EAAO;AACT;;;;;;"}
package/dist/index.cjs.js CHANGED
@@ -28,7 +28,7 @@ const middleware = require('zustand/middleware');
28
28
  const dateFns = require('date-fns');
29
29
  const TabsPrimitive = require('@radix-ui/react-tabs');
30
30
  const react$1 = require('motion/react');
31
- const colors = require('./colors-BjoU9dWU.cjs');
31
+ const colors = require('./colors-CD-k9ILs.cjs');
32
32
  const SliderPrimitive = require('@radix-ui/react-slider');
33
33
  const LabelPrimitive = require('@radix-ui/react-label');
34
34
  const RadioGroupPrimitive = require('@radix-ui/react-radio-group');
@@ -7330,6 +7330,22 @@ function Skeleton({ className, ...props }) {
7330
7330
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("animate-pulse rounded-md bg-muted/50", className), ...props });
7331
7331
  }
7332
7332
 
7333
+ const LinkComponentContext = React.createContext({
7334
+ Link: React.forwardRef(() => null),
7335
+ navigate: () => {
7336
+ }
7337
+ });
7338
+ const LinkComponentProvider = ({ children, Link, navigate }) => {
7339
+ return /* @__PURE__ */ jsxRuntime.jsx(LinkComponentContext.Provider, { value: { Link, navigate }, children });
7340
+ };
7341
+ const useLinkComponent = () => {
7342
+ const ctx = React.useContext(LinkComponentContext);
7343
+ if (!ctx) {
7344
+ throw new Error("useLinkComponent must be used within a LinkComponentProvider");
7345
+ }
7346
+ return ctx;
7347
+ };
7348
+
7333
7349
  const OpenaiChatIcon = (props) => /* @__PURE__ */ jsxRuntime.jsx("svg", { className: "h-3 w-3", viewBox: "0 0 320 320", xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", ...props, children: /* @__PURE__ */ jsxRuntime.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" }) });
7334
7350
 
7335
7351
  const AnthropicChatIcon = (props) => /* @__PURE__ */ jsxRuntime.jsx("svg", { className: "h-3 w-3", viewBox: "0 0 320 320", xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", ...props, children: /* @__PURE__ */ jsxRuntime.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" }) });
@@ -7751,20 +7767,6 @@ const MistralIcon = (props) => /* @__PURE__ */ jsxRuntime.jsxs(
7751
7767
  }
7752
7768
  );
7753
7769
 
7754
- const LinkComponentContext = React.createContext({
7755
- Link: React.forwardRef(() => null)
7756
- });
7757
- const LinkComponentProvider = ({ children, Link }) => {
7758
- return /* @__PURE__ */ jsxRuntime.jsx(LinkComponentContext.Provider, { value: { Link }, children });
7759
- };
7760
- const useLinkComponent = () => {
7761
- const ctx = React.useContext(LinkComponentContext);
7762
- if (!ctx) {
7763
- throw new Error("useLinkComponent must be used within a LinkComponentProvider");
7764
- }
7765
- return ctx;
7766
- };
7767
-
7768
7770
  const providerMapToIcon = {
7769
7771
  "openai.chat": /* @__PURE__ */ jsxRuntime.jsx(OpenaiChatIcon, {}),
7770
7772
  "anthropic.chat": /* @__PURE__ */ jsxRuntime.jsx(AnthropicChatIcon, {}),
@@ -7777,6 +7779,7 @@ const providerMapToIcon = {
7777
7779
  X_GROK: /* @__PURE__ */ jsxRuntime.jsx(XGroqIcon, {}),
7778
7780
  MISTRAL: /* @__PURE__ */ jsxRuntime.jsx(MistralIcon, {})
7779
7781
  };
7782
+
7780
7783
  const NameCell = ({ row }) => {
7781
7784
  const { Link } = useLinkComponent();
7782
7785
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -7824,7 +7827,8 @@ const columns$2 = [
7824
7827
  }
7825
7828
  ];
7826
7829
 
7827
- function AgentsTable({ agents, isLoading, onClickRow }) {
7830
+ function AgentsTable({ agents, isLoading, computeLink }) {
7831
+ const { navigate } = useLinkComponent();
7828
7832
  const projectData = React.useMemo(
7829
7833
  () => Object.keys(agents).map((key) => {
7830
7834
  const agent = agents[key];
@@ -7838,7 +7842,7 @@ function AgentsTable({ agents, isLoading, onClickRow }) {
7838
7842
  repoUrl: void 0,
7839
7843
  tools: agent.tools,
7840
7844
  modelId: agent.modelId,
7841
- link: `/agents/${key}/chat/new`
7845
+ link: computeLink(key)
7842
7846
  };
7843
7847
  }),
7844
7848
  [agents]
@@ -7856,7 +7860,7 @@ function AgentsTable({ agents, isLoading, onClickRow }) {
7856
7860
  }
7857
7861
  return /* @__PURE__ */ jsxRuntime.jsx(ScrollableContainer, { children: /* @__PURE__ */ jsxRuntime.jsxs(Table, { children: [
7858
7862
  /* @__PURE__ */ jsxRuntime.jsx(Thead, { className: "sticky top-0", children: ths.headers.map((header) => /* @__PURE__ */ jsxRuntime.jsx(Th, { style: { width: header.index === 0 ? "auto" : header.column.getSize() }, children: reactTable.flexRender(header.column.columnDef.header, header.getContext()) }, header.id)) }),
7859
- /* @__PURE__ */ jsxRuntime.jsx(Tbody, { children: rows.map((row) => /* @__PURE__ */ jsxRuntime.jsx(Row, { onClick: () => onClickRow(row.original.id), children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsxRuntime.jsx(React.Fragment, { children: reactTable.flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id)) }, row.id)) })
7863
+ /* @__PURE__ */ jsxRuntime.jsx(Tbody, { children: rows.map((row) => /* @__PURE__ */ jsxRuntime.jsx(Row, { onClick: () => navigate(row.original.link), children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsxRuntime.jsx(React.Fragment, { children: reactTable.flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id)) }, row.id)) })
7860
7864
  ] }) });
7861
7865
  }
7862
7866
  const AgentsTableSkeleton = () => /* @__PURE__ */ jsxRuntime.jsxs(Table, { children: [
@@ -7931,7 +7935,7 @@ const RuntimeContext = () => {
7931
7935
  const formatted = await formatJSON(runtimeContextValue);
7932
7936
  setRuntimeContextValue(formatted);
7933
7937
  };
7934
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
7938
+ return /* @__PURE__ */ jsxRuntime.jsx(TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
7935
7939
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between pb-2", children: [
7936
7940
  /* @__PURE__ */ jsxRuntime.jsx(Txt, { as: "label", variant: "ui-md", className: "text-icon3", children: "Runtime Context (JSON)" }),
7937
7941
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
@@ -7956,7 +7960,7 @@ const RuntimeContext = () => {
7956
7960
  }
7957
7961
  ),
7958
7962
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-end pt-2", children: /* @__PURE__ */ jsxRuntime.jsx(Button, { onClick: handleSaveRuntimeContext, children: "Save" }) })
7959
- ] });
7963
+ ] }) });
7960
7964
  };
7961
7965
  const RuntimeContextWrapper = ({ children }) => {
7962
7966
  const { Link } = useLinkComponent();
@@ -9615,7 +9619,8 @@ function WorkflowDefaultNode({
9615
9619
  step?.status === "success" && "ring-2 ring-accent1",
9616
9620
  step?.status === "failed" && "ring-2 ring-accent2",
9617
9621
  step?.status === "suspended" && "ring-2 ring-accent3",
9618
- step?.status === "waiting" && "ring-2 ring-accent5"
9622
+ step?.status === "waiting" && "ring-2 ring-accent5",
9623
+ step?.status === "running" && "ring-2 ring-accent6"
9619
9624
  ),
9620
9625
  children: [
9621
9626
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex items-center gap-2 px-3", !description && "pb-2"), children: [
@@ -9624,7 +9629,7 @@ function WorkflowDefaultNode({
9624
9629
  step?.status === "success" && /* @__PURE__ */ jsxRuntime.jsx(CheckIcon, { className: "text-accent1" }),
9625
9630
  step?.status === "suspended" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.PauseIcon, { className: "text-accent3" }),
9626
9631
  step?.status === "waiting" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.HourglassIcon, { className: "text-accent5" }),
9627
- step?.status === "running" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "text-icon6 animate-spin" }),
9632
+ step?.status === "running" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "text-accent6 animate-spin" }),
9628
9633
  !step && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CircleDashed, { className: "text-icon2" })
9629
9634
  ] }),
9630
9635
  /* @__PURE__ */ jsxRuntime.jsxs(Txt, { variant: "ui-lg", className: "text-icon6 font-medium inline-flex items-center gap-1 justify-between w-full", children: [
@@ -9917,7 +9922,8 @@ function WorkflowNestedNode({
9917
9922
  step?.status === "success" && "ring-2 ring-accent1",
9918
9923
  step?.status === "failed" && "ring-2 ring-accent2",
9919
9924
  step?.status === "suspended" && "ring-2 ring-accent3",
9920
- step?.status === "waiting" && "ring-2 ring-accent5"
9925
+ step?.status === "waiting" && "ring-2 ring-accent5",
9926
+ step?.status === "running" && "ring-2 ring-accent6"
9921
9927
  ),
9922
9928
  children: [
9923
9929
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex items-center gap-2 px-3", !description && "pb-2"), children: [
@@ -9926,7 +9932,7 @@ function WorkflowNestedNode({
9926
9932
  step?.status === "success" && /* @__PURE__ */ jsxRuntime.jsx(CheckIcon, { className: "text-accent1" }),
9927
9933
  step?.status === "suspended" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.PauseIcon, { className: "text-accent3" }),
9928
9934
  step?.status === "waiting" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.HourglassIcon, { className: "text-accent5" }),
9929
- step?.status === "running" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "text-icon6 animate-spin" }),
9935
+ step?.status === "running" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "text-accent6 animate-spin" }),
9930
9936
  !step && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CircleDashed, { className: "text-icon2" })
9931
9937
  ] }),
9932
9938
  /* @__PURE__ */ jsxRuntime.jsxs(Txt, { variant: "ui-lg", className: "text-icon6 font-medium inline-flex items-center gap-1 justify-between w-full", children: [
@@ -11157,7 +11163,8 @@ const columns$1 = [
11157
11163
  }
11158
11164
  ];
11159
11165
 
11160
- const NetworkTable = ({ legacyNetworks, networks, isLoading, onClickRow }) => {
11166
+ const NetworkTable = ({ legacyNetworks, networks, isLoading, computeLink }) => {
11167
+ const { navigate } = useLinkComponent();
11161
11168
  const allNetworks = React.useMemo(
11162
11169
  () => [
11163
11170
  ...legacyNetworks?.map((network) => ({
@@ -11190,7 +11197,15 @@ const NetworkTable = ({ legacyNetworks, networks, isLoading, onClickRow }) => {
11190
11197
  }
11191
11198
  return /* @__PURE__ */ jsxRuntime.jsx(ScrollableContainer, { children: /* @__PURE__ */ jsxRuntime.jsxs(Table, { children: [
11192
11199
  /* @__PURE__ */ jsxRuntime.jsx(Thead, { className: "sticky top-0", children: ths.headers.map((header) => /* @__PURE__ */ jsxRuntime.jsx(Th, { style: { width: header.index === 0 ? "auto" : header.column.getSize() }, children: reactTable.flexRender(header.column.columnDef.header, header.getContext()) }, header.id)) }),
11193
- /* @__PURE__ */ jsxRuntime.jsx(Tbody, { children: rows.map((row) => /* @__PURE__ */ jsxRuntime.jsx(Row, { onClick: () => onClickRow(row.original.id, row.original.isVNext || false), children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsxRuntime.jsx(React.Fragment, { children: reactTable.flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id)) }, row.id)) })
11200
+ /* @__PURE__ */ jsxRuntime.jsx(Tbody, { children: rows.map((row) => /* @__PURE__ */ jsxRuntime.jsx(
11201
+ Row,
11202
+ {
11203
+ onClick: () => navigate(computeLink(row.original.id, row.original.isVNext || false)),
11204
+ className: "cursor-pointer",
11205
+ children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsxRuntime.jsx(React.Fragment, { children: reactTable.flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id))
11206
+ },
11207
+ row.id
11208
+ )) })
11194
11209
  ] }) });
11195
11210
  };
11196
11211
  const NetworkTableEmpty = () => {
@@ -11272,13 +11287,17 @@ const EntityContent = ({ children, className }) => {
11272
11287
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className, children });
11273
11288
  };
11274
11289
 
11275
- const ToolList = ({ tools, agents, isLoading }) => {
11290
+ const ToolList = ({ tools, agents, isLoading, computeLink, computeAgentLink }) => {
11276
11291
  const toolsWithAgents = React.useMemo(() => prepareAgents(tools, agents), [tools, agents]);
11277
11292
  if (isLoading)
11278
11293
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-w-5xl w-full mx-auto px-4 pt-8", children: /* @__PURE__ */ jsxRuntime.jsx(ToolListSkeleton, {}) });
11279
- return /* @__PURE__ */ jsxRuntime.jsx(ToolListInner, { toolsWithAgents });
11294
+ return /* @__PURE__ */ jsxRuntime.jsx(ToolListInner, { toolsWithAgents, computeLink, computeAgentLink });
11280
11295
  };
11281
- const ToolListInner = ({ toolsWithAgents }) => {
11296
+ const ToolListInner = ({
11297
+ toolsWithAgents,
11298
+ computeLink,
11299
+ computeAgentLink
11300
+ }) => {
11282
11301
  const [filteredTools, setFilteredTools] = React.useState(toolsWithAgents);
11283
11302
  const [value, setValue] = React.useState("");
11284
11303
  if (filteredTools.length === 0 && !value) return /* @__PURE__ */ jsxRuntime.jsx(ToolListEmpty, {});
@@ -11312,29 +11331,22 @@ const ToolListInner = ({ toolsWithAgents }) => {
11312
11331
  ] }),
11313
11332
  filteredTools.length === 0 && /* @__PURE__ */ jsxRuntime.jsx(Txt, { as: "p", className: "text-icon3 py-2", children: "No tools found matching your search." })
11314
11333
  ] }),
11315
- /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx(ToolEntity, { tool }, tool.id)) })
11334
+ /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx(ToolEntity, { tool, computeLink, computeAgentLink }, tool.id)) })
11316
11335
  ] });
11317
11336
  };
11318
- const ToolEntity = ({ tool }) => {
11337
+ const ToolEntity = ({ tool, computeLink, computeAgentLink }) => {
11319
11338
  const linkRef = React.useRef(null);
11320
11339
  const { Link } = useLinkComponent();
11321
11340
  return /* @__PURE__ */ jsxRuntime.jsxs(Entity, { onClick: () => linkRef.current?.click(), children: [
11322
11341
  /* @__PURE__ */ jsxRuntime.jsx(EntityIcon, { children: /* @__PURE__ */ jsxRuntime.jsx(ToolsIcon, { className: "group-hover/entity:text-[#ECB047]" }) }),
11323
11342
  /* @__PURE__ */ jsxRuntime.jsxs(EntityContent, { children: [
11324
- /* @__PURE__ */ jsxRuntime.jsx(EntityName, { children: /* @__PURE__ */ jsxRuntime.jsx(
11325
- Link,
11326
- {
11327
- ref: linkRef,
11328
- href: tool.agents.length > 0 ? `/tools/${tool.agents[0].id}/${tool.id}` : `/tools/all/${tool.id}`,
11329
- children: tool.id
11330
- }
11331
- ) }),
11343
+ /* @__PURE__ */ jsxRuntime.jsx(EntityName, { children: /* @__PURE__ */ jsxRuntime.jsx(Link, { ref: linkRef, href: computeLink(tool.id, tool.agents[0]?.id), children: tool.id }) }),
11332
11344
  /* @__PURE__ */ jsxRuntime.jsx(EntityDescription, { children: tool.description }),
11333
11345
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "inline-flex flex-wrap gap-2 pt-4", children: tool.agents.map((agent) => {
11334
11346
  return /* @__PURE__ */ jsxRuntime.jsx(
11335
11347
  Link,
11336
11348
  {
11337
- href: `/agents/${agent.id}/chat`,
11349
+ href: computeAgentLink(tool.id, agent.id),
11338
11350
  onClick: (e) => e.stopPropagation(),
11339
11351
  className: "group/link",
11340
11352
  children: /* @__PURE__ */ jsxRuntime.jsx(Badge$1, { icon: /* @__PURE__ */ jsxRuntime.jsx(AgentIcon, { className: "group-hover/link:text-accent3" }), className: "bg-surface5 ", children: agent.name })
@@ -12618,7 +12630,7 @@ const WorkflowStatus = ({ stepId, status, result }) => {
12618
12630
  status === "failed" && /* @__PURE__ */ jsxRuntime.jsx(CrossIcon, { className: "text-accent2" }),
12619
12631
  status === "suspended" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CirclePause, { className: "text-accent3" }),
12620
12632
  status === "waiting" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.HourglassIcon, { className: "text-accent5" }),
12621
- status === "running" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "text-icon3 animate-spin" })
12633
+ status === "running" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "text-accent6 animate-spin" })
12622
12634
  ] }),
12623
12635
  /* @__PURE__ */ jsxRuntime.jsx(Txt, { as: "span", variant: "ui-lg", className: "text-icon6 font-medium", children: stepId.charAt(0).toUpperCase() + stepId.slice(1) })
12624
12636
  ] }),
@@ -12789,6 +12801,7 @@ function WorkflowTrigger({
12789
12801
  const zodInputSchema = triggerSchema ? resolveSerializedZodOutput(jsonSchemaToZod(superjson.parse(triggerSchema))) : null;
12790
12802
  const workflowActivePaths = streamResultToUse?.payload?.workflowState?.steps ?? {};
12791
12803
  const hasWorkflowActivePaths = Object.values(workflowActivePaths).length > 0;
12804
+ const doneStatuses = ["success", "failed", "canceled"];
12792
12805
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "h-full pt-3 pb-12", children: [
12793
12806
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4 px-5 pb-5 border-b-sm border-border1", children: [
12794
12807
  (isResumingWorkflow || isSuspendedSteps && isStreamingWorkflow) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "py-2 px-5 flex items-center gap-2 bg-surface5 -mx-5 -mt-5 border-b-sm border-border1", children: [
@@ -12856,7 +12869,7 @@ function WorkflowTrigger({
12856
12869
  className: "w-full",
12857
12870
  size: "lg",
12858
12871
  onClick: handleCancelWorkflowRun,
12859
- disabled: !!cancelResponse?.message || isCancellingWorkflowRun,
12872
+ disabled: !!cancelResponse?.message || isCancellingWorkflowRun || result?.payload?.workflowState?.status && doneStatuses.includes(result?.payload?.workflowState?.status),
12860
12873
  children: [
12861
12874
  isCancellingWorkflowRun ? /* @__PURE__ */ jsxRuntime.jsx(Icon, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "animate-spin" }) }) : /* @__PURE__ */ jsxRuntime.jsx(Icon, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.StopCircle, {}) }),
12862
12875
  cancelResponse?.message || "Cancel Workflow Run"
@@ -12947,7 +12960,8 @@ const columns = [
12947
12960
  }
12948
12961
  ];
12949
12962
 
12950
- function WorkflowTable({ workflows, legacyWorkflows, isLoading, onClickRow }) {
12963
+ function WorkflowTable({ workflows, legacyWorkflows, isLoading, computeLink }) {
12964
+ const { navigate } = useLinkComponent();
12951
12965
  const workflowData = React.useMemo(() => {
12952
12966
  const _workflowsData = Object.keys(workflows ?? {}).map((key) => {
12953
12967
  const workflow = workflows?.[key];
@@ -12956,7 +12970,7 @@ function WorkflowTable({ workflows, legacyWorkflows, isLoading, onClickRow }) {
12956
12970
  name: workflow?.name || "N/A",
12957
12971
  stepsCount: Object.keys(workflow?.steps ?? {})?.length,
12958
12972
  isLegacy: false,
12959
- link: `/workflows/${key}/graph`
12973
+ link: computeLink(key)
12960
12974
  };
12961
12975
  });
12962
12976
  const legacyWorkflowsData = Object.keys(legacyWorkflows ?? {}).map((key) => {
@@ -12966,7 +12980,7 @@ function WorkflowTable({ workflows, legacyWorkflows, isLoading, onClickRow }) {
12966
12980
  name: workflow?.name || "N/A",
12967
12981
  stepsCount: Object.keys(workflow?.steps ?? {})?.length,
12968
12982
  isLegacy: true,
12969
- link: `/workflows/legacy/${key}/graph`
12983
+ link: computeLink(key)
12970
12984
  };
12971
12985
  });
12972
12986
  return [..._workflowsData, ...legacyWorkflowsData];
@@ -12984,7 +12998,7 @@ function WorkflowTable({ workflows, legacyWorkflows, isLoading, onClickRow }) {
12984
12998
  }
12985
12999
  return /* @__PURE__ */ jsxRuntime.jsx(ScrollableContainer, { children: /* @__PURE__ */ jsxRuntime.jsxs(Table, { children: [
12986
13000
  /* @__PURE__ */ jsxRuntime.jsx(Thead, { className: "sticky top-0", children: ths.headers.map((header) => /* @__PURE__ */ jsxRuntime.jsx(Th, { style: { width: header.index === 0 ? "auto" : header.column.getSize() }, children: reactTable.flexRender(header.column.columnDef.header, header.getContext()) }, header.id)) }),
12987
- /* @__PURE__ */ jsxRuntime.jsx(Tbody, { children: rows.map((row) => /* @__PURE__ */ jsxRuntime.jsx(Row, { onClick: () => onClickRow(row.original.id), children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsxRuntime.jsx(React.Fragment, { children: reactTable.flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id)) }, row.id)) })
13001
+ /* @__PURE__ */ jsxRuntime.jsx(Tbody, { children: rows.map((row) => /* @__PURE__ */ jsxRuntime.jsx(Row, { onClick: () => navigate(row.original.link), children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsxRuntime.jsx(React.Fragment, { children: reactTable.flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id)) }, row.id)) })
12988
13002
  ] }) });
12989
13003
  }
12990
13004
  const WorkflowTableSkeleton = () => /* @__PURE__ */ jsxRuntime.jsxs(Table, { children: [
@@ -13501,6 +13515,7 @@ exports.WorkflowTraces = WorkflowTraces;
13501
13515
  exports.WorkflowTrigger = WorkflowTrigger;
13502
13516
  exports.WorkingMemoryContext = WorkingMemoryContext;
13503
13517
  exports.WorkingMemoryProvider = WorkingMemoryProvider;
13518
+ exports.providerMapToIcon = providerMapToIcon;
13504
13519
  exports.useAgentSettings = useAgentSettings;
13505
13520
  exports.useCurrentRun = useCurrentRun;
13506
13521
  exports.useLinkComponent = useLinkComponent;