@mastra/playground-ui 6.3.0 → 6.3.1-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/index.es.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
2
  import { useMessagePart, useMessage, MessagePrimitive, ActionBarPrimitive, useAttachment, AttachmentPrimitive, useComposerRuntime, ComposerPrimitive, useComposer, ThreadPrimitive, CompositeAttachmentAdapter, SimpleImageAttachmentAdapter, SimpleTextAttachmentAdapter, WebSpeechSynthesisAdapter, useExternalStoreRuntime, AssistantRuntimeProvider } from '@assistant-ui/react';
3
- import { CheckIcon as CheckIcon$1, CopyIcon, AlertCircle, Check, Copy, ChevronUpIcon, X, Share2, Braces, Loader2, Network, ChevronDown, PauseIcon, HourglassIcon, CircleDashed, Footprints, CircleCheck, CircleX, Minus, Plus, Maximize, Workflow, AlertCircleIcon, ChevronDownIcon, CirclePause, CalendarIcon, Brackets, PlusIcon, TrashIcon, Circle, StopCircle, ChevronLeftIcon, BrainIcon, AudioLinesIcon, StopCircleIcon, FileText, CircleXIcon, Link, CloudUpload, Mic, ArrowUp, Search, RefreshCcwIcon, ChevronRight, SortAsc, SortDesc, SaveIcon, RefreshCw, ExternalLink, InfoIcon as InfoIcon$1, TriangleAlertIcon, ChevronRightIcon, ArrowLeftIcon, ArrowRightIcon, XIcon, ChevronsRightIcon, ArrowUpIcon, ArrowDownIcon, AlignLeftIcon, AlignJustifyIcon, CircleAlertIcon, GaugeIcon, HashIcon, TriangleAlert, Info, GripVertical, SearchIcon, NetworkIcon, WorkflowIcon as WorkflowIcon$1, PackageIcon, GitBranchIcon, PackageOpenIcon, OctagonXIcon, AlertTriangleIcon, FrownIcon, ChevronUp, ChevronsLeftRight, TimerIcon, ChevronsLeftRightIcon, ChevronFirstIcon, ChevronLastIcon, ListTreeIcon, ArrowRightToLineIcon, CoinsIcon, EyeIcon, ChevronsLeftRightEllipsisIcon, PanelTopIcon, PanelLeftIcon } from 'lucide-react';
3
+ import { CheckIcon as CheckIcon$1, CopyIcon, AlertCircle, Check, Copy, ChevronUpIcon, X, Share2, Braces, Loader2, Network, ChevronDown, PauseIcon, HourglassIcon, CircleDashed, Footprints, CircleCheck, CircleX, Minus, Plus, Maximize, Workflow, AlertCircleIcon, ChevronDownIcon, CirclePause, CalendarIcon, Brackets, PlusIcon, TrashIcon, Circle, StopCircle, ChevronLeftIcon, BrainIcon, AudioLinesIcon, StopCircleIcon, FileText, CircleXIcon, Link, CloudUpload, Mic, ArrowUp, Search, RefreshCcwIcon, ChevronRight, SortAsc, SortDesc, SaveIcon, RefreshCw, ExternalLink, InfoIcon as InfoIcon$1, TriangleAlertIcon, ChevronRightIcon, ArrowLeftIcon, ArrowRightIcon, XIcon, ChevronsRightIcon, ArrowUpIcon, ArrowDownIcon, AlignLeftIcon, AlignJustifyIcon, CircleAlertIcon, GaugeIcon, HashIcon, TriangleAlert, Info, GripVertical, AlertTriangleIcon, SearchIcon, NetworkIcon, WorkflowIcon as WorkflowIcon$1, PackageIcon, GitBranchIcon, PackageOpenIcon, OctagonXIcon, FrownIcon, ChevronUp, ChevronsLeftRight, TimerIcon, ChevronsLeftRightIcon, ChevronFirstIcon, ChevronLastIcon, ListTreeIcon, ArrowRightToLineIcon, CoinsIcon, EyeIcon, ChevronsLeftRightEllipsisIcon, PanelTopIcon, PanelLeftIcon } from 'lucide-react';
4
4
  import * as React from 'react';
5
5
  import React__default, { forwardRef, memo, useState, useEffect, useRef, useCallback, useMemo, createContext, useContext, Fragment as Fragment$1, isValidElement, useId, startTransition } from 'react';
6
6
  import { Slot } from '@radix-ui/react-slot';
@@ -11459,7 +11459,7 @@ const AgentSettings = ({ modelVersion, hasMemory = false, hasSubAgents = false }
11459
11459
  children: [
11460
11460
  modelVersion !== "v2" && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
11461
11461
  /* @__PURE__ */ jsx(RadioGroupItem, { value: "generateLegacy", id: "generateLegacy", className: "text-icon6" }),
11462
- /* @__PURE__ */ jsx(Label, { className: "text-icon6 text-ui-md", htmlFor: "generateLegacy", children: "Generate" })
11462
+ /* @__PURE__ */ jsx(Label, { className: "text-icon6 text-ui-md", htmlFor: "generateLegacy", children: "Generate (Legacy)" })
11463
11463
  ] }),
11464
11464
  modelVersion === "v2" && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
11465
11465
  /* @__PURE__ */ jsx(RadioGroupItem, { value: "generate", id: "generate", className: "text-icon6" }),
@@ -11467,7 +11467,7 @@ const AgentSettings = ({ modelVersion, hasMemory = false, hasSubAgents = false }
11467
11467
  ] }),
11468
11468
  modelVersion !== "v2" && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
11469
11469
  /* @__PURE__ */ jsx(RadioGroupItem, { value: "streamLegacy", id: "streamLegacy", className: "text-icon6" }),
11470
- /* @__PURE__ */ jsx(Label, { className: "text-icon6 text-ui-md", htmlFor: "streamLegacy", children: "Stream" })
11470
+ /* @__PURE__ */ jsx(Label, { className: "text-icon6 text-ui-md", htmlFor: "streamLegacy", children: "Stream (Legacy)" })
11471
11471
  ] }),
11472
11472
  modelVersion === "v2" && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
11473
11473
  /* @__PURE__ */ jsx(RadioGroupItem, { value: "stream", id: "stream", className: "text-icon6" }),
@@ -11741,7 +11741,7 @@ const AgentMetadataSection = ({ title, children, hint }) => {
11741
11741
  /* @__PURE__ */ jsxs(Txt, { as: "h3", variant: "ui-md", className: "text-icon3 flex items-center gap-1", children: [
11742
11742
  title,
11743
11743
  hint && /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsxs(Tooltip, { children: [
11744
- /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(Link, { href: hint.link, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ jsx(Icon, { className: "text-icon3", size: "sm", children: /* @__PURE__ */ jsx(InfoIcon$1, {}) }) }) }),
11744
+ /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(Link, { href: hint.link, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ jsx(Icon, { className: "text-icon3", size: "sm", children: hint.icon || /* @__PURE__ */ jsx(InfoIcon$1, {}) }) }) }),
11745
11745
  /* @__PURE__ */ jsx(TooltipContent, { children: hint.title })
11746
11746
  ] }) })
11747
11747
  ] }),
@@ -14087,7 +14087,8 @@ const AgentMetadata = ({
14087
14087
  updateModel,
14088
14088
  modelProviders,
14089
14089
  updateModelInModelList,
14090
- reorderModelList
14090
+ reorderModelList,
14091
+ modelVersion
14091
14092
  }) => {
14092
14093
  const networkAgentsMap = agent.agents ?? {};
14093
14094
  const networkAgents = Object.values(networkAgentsMap);
@@ -14104,15 +14105,26 @@ const AgentMetadata = ({
14104
14105
  updateModelInModelList,
14105
14106
  reorderModelList
14106
14107
  }
14107
- ) }) : /* @__PURE__ */ jsx(AgentMetadataSection, { title: "Model", children: /* @__PURE__ */ jsx(
14108
- AgentMetadataModelSwitcher,
14108
+ ) }) : /* @__PURE__ */ jsx(
14109
+ AgentMetadataSection,
14109
14110
  {
14110
- defaultProvider: agent.provider,
14111
- defaultModel: agent.modelId,
14112
- updateModel,
14113
- modelProviders
14111
+ title: "Model",
14112
+ hint: modelVersion === "v2" ? void 0 : {
14113
+ link: "https://mastra.ai/en/reference/agents/migration-guide",
14114
+ title: "You are using a legacy v1 model",
14115
+ icon: /* @__PURE__ */ jsx(AlertTriangleIcon, { fontSize: 14, className: "mb-0.5" })
14116
+ },
14117
+ children: /* @__PURE__ */ jsx(
14118
+ AgentMetadataModelSwitcher,
14119
+ {
14120
+ defaultProvider: agent.provider,
14121
+ defaultModel: agent.modelId,
14122
+ updateModel,
14123
+ modelProviders
14124
+ }
14125
+ )
14114
14126
  }
14115
- ) }),
14127
+ ),
14116
14128
  /* @__PURE__ */ jsx(
14117
14129
  AgentMetadataSection,
14118
14130
  {