@mastra/playground-ui 6.2.4-alpha.0 → 6.2.4-alpha.1

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.es.js CHANGED
@@ -11432,7 +11432,39 @@ const AgentAdvancedSettings = () => {
11432
11432
  ] }) });
11433
11433
  };
11434
11434
 
11435
- const AgentSettings = ({ modelVersion }) => {
11435
+ const NetworkCheckbox = ({ hasMemory, hasSubAgents }) => {
11436
+ const isNetworkAvailable = hasMemory && hasSubAgents;
11437
+ const radio = /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
11438
+ /* @__PURE__ */ jsx(RadioGroupItem, { value: "network", id: "network", className: "text-icon6", disabled: !isNetworkAvailable }),
11439
+ /* @__PURE__ */ jsx(
11440
+ Label,
11441
+ {
11442
+ className: clsx("text-icon6 text-ui-md", !isNetworkAvailable && "!text-icon3 cursor-not-allowed"),
11443
+ htmlFor: "network",
11444
+ children: "Network"
11445
+ }
11446
+ )
11447
+ ] });
11448
+ if (isNetworkAvailable) {
11449
+ return radio;
11450
+ }
11451
+ const requirements = [];
11452
+ if (!hasMemory) {
11453
+ requirements.push("memory enabled");
11454
+ }
11455
+ if (!hasSubAgents) {
11456
+ requirements.push("at least one sub-agent");
11457
+ }
11458
+ return /* @__PURE__ */ jsxs(Tooltip, { children: [
11459
+ /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: radio }),
11460
+ /* @__PURE__ */ jsx(TooltipContent, { children: /* @__PURE__ */ jsxs("p", { children: [
11461
+ "Network is not available. Please make sure you have ",
11462
+ requirements.join(" and "),
11463
+ "."
11464
+ ] }) })
11465
+ ] });
11466
+ };
11467
+ const AgentSettings = ({ modelVersion, hasMemory = false, hasSubAgents = false }) => {
11436
11468
  const { settings, setSettings, resetAll } = useAgentSettings();
11437
11469
  let radioValue;
11438
11470
  if (modelVersion === "v2") {
@@ -11479,10 +11511,7 @@ const AgentSettings = ({ modelVersion }) => {
11479
11511
  /* @__PURE__ */ jsx(RadioGroupItem, { value: "streamVNext", id: "streamVNext", className: "text-icon6" }),
11480
11512
  /* @__PURE__ */ jsx(Label, { className: "text-icon6 text-ui-md", htmlFor: "streamVNext", children: "Stream vNext" })
11481
11513
  ] }),
11482
- modelVersion === "v2" && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
11483
- /* @__PURE__ */ jsx(RadioGroupItem, { value: "network", id: "network", className: "text-icon6" }),
11484
- /* @__PURE__ */ jsx(Label, { className: "text-icon6 text-ui-md", htmlFor: "network", children: "Network" })
11485
- ] })
11514
+ modelVersion === "v2" && /* @__PURE__ */ jsx(NetworkCheckbox, { hasMemory, hasSubAgents })
11486
11515
  ]
11487
11516
  }
11488
11517
  ) }),