@mastra/playground-ui 5.2.5-alpha.1 → 6.0.0-alpha.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/dist/index.es.js CHANGED
@@ -11,7 +11,7 @@ import * as AvatarPrimitive from '@radix-ui/react-avatar';
11
11
  import { unstable_memoizeMarkdownComponents, useIsMarkdownCodeBlock, MarkdownTextPrimitive } from '@assistant-ui/react-markdown';
12
12
  import '@assistant-ui/react-markdown/styles/dot.css';
13
13
  import remarkGfm from 'remark-gfm';
14
- import { makePrismAsyncSyntaxHighlighter } from '@assistant-ui/react-syntax-highlighter';
14
+ import { makePrismAsyncLightSyntaxHighlighter } from '@assistant-ui/react-syntax-highlighter';
15
15
  import { coldarkDark } from 'react-syntax-highlighter/dist/cjs/styles/prism';
16
16
  import { jsonLanguage } from '@codemirror/lang-json';
17
17
  import { tags } from '@lezer/highlight';
@@ -3171,7 +3171,7 @@ const AvatarFallback = React.forwardRef(({ className, ...props }, ref) => /* @__
3171
3171
  ));
3172
3172
  AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
3173
3173
 
3174
- const SyntaxHighlighter$3 = makePrismAsyncSyntaxHighlighter({
3174
+ const SyntaxHighlighter$3 = makePrismAsyncLightSyntaxHighlighter({
3175
3175
  style: coldarkDark,
3176
3176
  customStyle: {
3177
3177
  margin: 0,
@@ -4377,7 +4377,7 @@ const AssistantMessage = ({ ToolFallback: ToolFallbackCustom }) => {
4377
4377
  const isToolCallAndOrReasoning = data.content.every(({ type }) => type === "tool-call" || type === "reasoning");
4378
4378
  return /* @__PURE__ */ jsxs(MessagePrimitive.Root, { className: "max-w-full", "data-message-id": messageId, children: [
4379
4379
  /* @__PURE__ */ jsx("div", { className: "text-icon6 text-ui-lg leading-ui-lg", children: /* @__PURE__ */ jsx(
4380
- MessagePrimitive.Content,
4380
+ MessagePrimitive.Parts,
4381
4381
  {
4382
4382
  components: {
4383
4383
  Text: MarkdownText,
@@ -4583,7 +4583,7 @@ const UserMessage = () => {
4583
4583
  const messageId = message?.id;
4584
4584
  return /* @__PURE__ */ jsxs(MessagePrimitive.Root, { className: "w-full flex items-end pb-4 flex-col", "data-message-id": messageId, children: [
4585
4585
  /* @__PURE__ */ jsx("div", { className: "max-w-[366px] px-5 py-3 text-icon6 text-ui-lg leading-ui-lg rounded-lg bg-surface3", children: /* @__PURE__ */ jsx(
4586
- MessagePrimitive.Content,
4586
+ MessagePrimitive.Parts,
4587
4587
  {
4588
4588
  components: {
4589
4589
  File: (p) => {
@@ -5319,7 +5319,7 @@ const handleFinishReason = (finishReason) => {
5319
5319
  }
5320
5320
  };
5321
5321
  const convertToAIAttachments = async (attachments) => {
5322
- const promises = attachments.filter((attachment) => attachment.type === "image" || attachment.type === "document").map(async (attachment) => {
5322
+ const promises = (attachments ?? []).filter((attachment) => attachment.type === "image" || attachment.type === "document").map(async (attachment) => {
5323
5323
  if (attachment.type === "document") {
5324
5324
  if (attachment.contentType === "application/pdf") {
5325
5325
  const pdfText = attachment.content?.[0]?.text || "";
@@ -11234,7 +11234,7 @@ const NextAssistantMessage = ({
11234
11234
  }
11235
11235
  return /* @__PURE__ */ jsxs(MessagePrimitive.Root, { className: "max-w-full", children: [
11236
11236
  /* @__PURE__ */ jsx("div", { className: "text-icon6 text-ui-lg leading-ui-lg", children: /* @__PURE__ */ jsx(
11237
- MessagePrimitive.Content,
11237
+ MessagePrimitive.Parts,
11238
11238
  {
11239
11239
  components: {
11240
11240
  Text: MarkdownText,