@mastra/playground-ui 16.1.2 → 16.1.3-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/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @mastra/playground-ui
2
2
 
3
+ ## 16.1.3-alpha.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Fixed crash during template installation by ensuring error values from stream events are converted to strings before being passed to the UI. This prevents the 'e?.includes is not a function' TypeError when the server returns non-string error payloads. ([#14267](https://github.com/mastra-ai/mastra/pull/14267))
8
+
9
+ - Fixed crash when template installation errors are non-string values (e.g. objects). The error is now safely converted to a string before calling .includes(), preventing the 'e?.includes is not a function' TypeError in the studio. ([#14267](https://github.com/mastra-ai/mastra/pull/14267))
10
+
11
+ - Updated dependencies [[`51970b3`](https://github.com/mastra-ai/mastra/commit/51970b3828494d59a8dd4df143b194d37d31e3f5), [`4a7ce05`](https://github.com/mastra-ai/mastra/commit/4a7ce05125b8d3d260f68f1fc4a6c6866d22ba24), [`7a167db`](https://github.com/mastra-ai/mastra/commit/7a167db025e63a616123dee5855ff572c91264c5), [`085e371`](https://github.com/mastra-ai/mastra/commit/085e3718a7d0fe9a210fe7dd1c867b9bdfe8d16b), [`ce26fe2`](https://github.com/mastra-ai/mastra/commit/ce26fe2166dd90254f8bee5776e55977143e97de), [`b26307f`](https://github.com/mastra-ai/mastra/commit/b26307f050df39629511b0e831b8fc26973ce8b1)]:
12
+ - @mastra/core@1.13.3-alpha.0
13
+ - @mastra/schema-compat@1.2.5-alpha.0
14
+ - @mastra/ai-sdk@1.1.4-alpha.0
15
+ - @mastra/client-js@1.8.5-alpha.0
16
+ - @mastra/react@0.2.15-alpha.0
17
+
3
18
  ## 16.1.2
4
19
 
5
20
  ### Patch Changes
package/dist/index.cjs.js CHANGED
@@ -36332,8 +36332,9 @@ function TemplateSuccess({ name, installedEntities, linkComponent }) {
36332
36332
  }
36333
36333
 
36334
36334
  function TemplateFailure({ errorMsg, validationErrors }) {
36335
- const isSchemaError = errorMsg?.includes("Invalid schema for function");
36336
- const isValidationError = errorMsg?.includes("validation issue") || validationErrors && validationErrors.length > 0;
36335
+ const errorString = typeof errorMsg === "string" ? errorMsg : errorMsg != null ? String(errorMsg) : void 0;
36336
+ const isSchemaError = errorString?.includes("Invalid schema for function");
36337
+ const isValidationError = errorString?.includes("validation issue") || validationErrors && validationErrors.length > 0;
36337
36338
  const getUserFriendlyMessage = () => {
36338
36339
  if (isValidationError) {
36339
36340
  return "Template installation completed but some validation issues remain. The template may still be functional, but you should review and fix these issues.";
@@ -36375,9 +36376,9 @@ function TemplateFailure({ errorMsg, validationErrors }) {
36375
36376
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs font-mono text-gray-700 dark:text-gray-300 mt-1 whitespace-pre-wrap break-words", children: error.message })
36376
36377
  ] }, index)) })
36377
36378
  ] }),
36378
- errorMsg && !isValidationError && /* @__PURE__ */ jsxRuntime.jsxs("details", { className: "text-xs", children: [
36379
+ errorString && !isValidationError && /* @__PURE__ */ jsxRuntime.jsxs("details", { className: "text-xs", children: [
36379
36380
  /* @__PURE__ */ jsxRuntime.jsx("summary", { className: "cursor-pointer text-neutral3 hover:text-neutral4 select-none text-center", children: "Show Details" }),
36380
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-4 p-3 bg-gray-100 dark:bg-gray-800 rounded text-xs font-mono overflow-auto max-h-60 text-left", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "whitespace-pre-wrap break-words", children: errorMsg }) })
36381
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-4 p-3 bg-gray-100 dark:bg-gray-800 rounded text-xs font-mono overflow-auto max-h-60 text-left", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "whitespace-pre-wrap break-words", children: errorString }) })
36381
36382
  ] })
36382
36383
  ] });
36383
36384
  }