@mastra/playground-ui 20.0.0-alpha.8 → 20.0.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.css CHANGED
@@ -5762,6 +5762,11 @@
5762
5762
  --tw-exit-opacity: 0;
5763
5763
  }
5764
5764
 
5765
+ .outline-none {
5766
+ --tw-outline-style: none;
5767
+ outline-style: none;
5768
+ }
5769
+
5765
5770
  .select-none {
5766
5771
  -webkit-user-select: none;
5767
5772
  user-select: none;
@@ -8387,15 +8392,19 @@
8387
8392
  border-width: 0;
8388
8393
  }
8389
8394
 
8390
- .\[\&\>button\]\:border-b > button {
8395
+ .\[\&\>button\]\:border-b-2 > button {
8391
8396
  border-bottom-style: var(--tw-border-style);
8392
- border-bottom-width: 1px;
8397
+ border-bottom-width: 2px;
8393
8398
  }
8394
8399
 
8395
8400
  .\[\&\>button\]\:border-border1 > button {
8396
8401
  border-color: var(--color-border1);
8397
8402
  }
8398
8403
 
8404
+ .\[\&\>button\]\:border-transparent > button {
8405
+ border-color: #0000;
8406
+ }
8407
+
8399
8408
  .\[\&\>button\]\:p-1 > button {
8400
8409
  padding: var(--spacing-1);
8401
8410
  }
package/dist/index.es.js CHANGED
@@ -13184,16 +13184,16 @@ const Tabs = ({ children, defaultTab, value, onValueChange, className }) => {
13184
13184
  return /* @__PURE__ */ jsx(RadixTabs.Root, { value: currentTab, onValueChange: handleTabChange, className: cn("overflow-y-auto", className), children });
13185
13185
  };
13186
13186
 
13187
- const TabList = ({ children, variant = "default", alignment = "full-width", className }) => {
13187
+ const TabList = ({ children, variant = "default", alignment = "left", className }) => {
13188
13188
  return /* @__PURE__ */ jsx("div", { className: cn("w-full overflow-x-auto", className), children: /* @__PURE__ */ jsx(
13189
13189
  RadixTabs.List,
13190
13190
  {
13191
13191
  className: cn(
13192
- "flex items-center relative",
13192
+ "flex items-center relative w-max min-w-full",
13193
13193
  {
13194
13194
  // variant: default
13195
- "text-ui-lg": variant === "default",
13196
- "[&>button]:py-2 [&>button]:px-6 [&>button]:font-normal [&>button]:text-neutral3 [&>button]:border-b [&>button]:border-border1": variant === "default",
13195
+ "text-ui-lg border-b border-border1": variant === "default",
13196
+ "[&>button]:py-2 [&>button]:px-6 [&>button]:font-normal [&>button]:text-neutral3 [&>button]:border-b-2 [&>button]:border-transparent": variant === "default",
13197
13197
  "[&>button]:flex-1": variant === "default" && alignment === "full-width",
13198
13198
  [`[&>button]:${transitions.colors} [&>button]:hover:text-neutral4`]: variant === "default",
13199
13199
  "[&>button[data-state=active]]:text-neutral5 [&>button[data-state=active]]:border-black/50 [&>button[data-state=active]]:dark:border-white/50": variant === "default",
@@ -13216,7 +13216,7 @@ const Tab = ({ children, value, onClick, onClose, className }) => {
13216
13216
  {
13217
13217
  value,
13218
13218
  className: cn(
13219
- "text-sm p-3 text-neutral3 whitespace-nowrap shrink-0 flex items-center justify-center gap-1.5",
13219
+ "text-sm py-3 px-2 text-neutral3 whitespace-nowrap shrink-0 flex items-center justify-center gap-1.5 outline-none",
13220
13220
  transitions.all,
13221
13221
  focusRing.visible,
13222
13222
  "hover:text-neutral4",
@@ -17039,7 +17039,8 @@ function MastraRuntimeProvider({
17039
17039
  refreshThreadList,
17040
17040
  settings,
17041
17041
  requestContext,
17042
- modelVersion
17042
+ modelVersion,
17043
+ agentVersionId
17043
17044
  }) {
17044
17045
  const { settings: tracingSettings } = useTracingSettings();
17045
17046
  const [isLegacyRunning, setIsLegacyRunning] = useState(false);
@@ -17047,6 +17048,12 @@ function MastraRuntimeProvider({
17047
17048
  useEffect(() => {
17048
17049
  setLegacyMessages(initializeMessageState(initialLegacyMessages || []));
17049
17050
  }, [initialLegacyMessages]);
17051
+ const chatRequestContext = useMemo(() => {
17052
+ if (!agentVersionId) return void 0;
17053
+ const ctx = new RequestContext$1();
17054
+ ctx.set("agentVersionId", agentVersionId);
17055
+ return ctx;
17056
+ }, [agentVersionId]);
17050
17057
  const {
17051
17058
  messages,
17052
17059
  sendMessage,
@@ -17063,7 +17070,8 @@ function MastraRuntimeProvider({
17063
17070
  networkToolCallApprovals
17064
17071
  } = useChat({
17065
17072
  agentId,
17066
- initialMessages
17073
+ initialMessages,
17074
+ requestContext: chatRequestContext
17067
17075
  });
17068
17076
  const { refetch: refreshWorkingMemory } = useWorkingMemory();
17069
17077
  const abortControllerRef = useRef(null);
@@ -17273,6 +17281,9 @@ function MastraRuntimeProvider({
17273
17281
  Object.entries(requestContext ?? {}).forEach(([key, value]) => {
17274
17282
  requestContextInstance.set(key, value);
17275
17283
  });
17284
+ if (agentVersionId) {
17285
+ requestContextInstance.set("agentVersionId", agentVersionId);
17286
+ }
17276
17287
  try {
17277
17288
  if (isSupportedModel) {
17278
17289
  if (chatWithNetwork) {
@@ -17740,6 +17751,7 @@ const AgentChat = ({
17740
17751
  memory,
17741
17752
  refreshThreadList,
17742
17753
  modelVersion,
17754
+ agentVersionId,
17743
17755
  modelList,
17744
17756
  messageId,
17745
17757
  isNewThread,
@@ -17777,6 +17789,7 @@ const AgentChat = ({
17777
17789
  agentId,
17778
17790
  agentName,
17779
17791
  modelVersion,
17792
+ agentVersionId,
17780
17793
  threadId,
17781
17794
  initialMessages: v5Messages,
17782
17795
  initialLegacyMessages: v4Messages,
@@ -32682,7 +32695,13 @@ function AgentPlaygroundConfig({ agentId, selectedVersionId, latestVersionId })
32682
32695
  ] });
32683
32696
  }
32684
32697
 
32685
- function AgentPlaygroundTestChat({ agentId, agentName, modelVersion, hasMemory }) {
32698
+ function AgentPlaygroundTestChat({
32699
+ agentId,
32700
+ agentName,
32701
+ modelVersion,
32702
+ agentVersionId,
32703
+ hasMemory
32704
+ }) {
32686
32705
  const testThreadId = useMemo(() => v4(), [agentId]);
32687
32706
  const mergedRequestContext = useMergedRequestContext();
32688
32707
  const hasRequestContext = Object.keys(mergedRequestContext).length > 0;
@@ -32699,6 +32718,7 @@ function AgentPlaygroundTestChat({ agentId, agentName, modelVersion, hasMemory }
32699
32718
  agentId,
32700
32719
  agentName,
32701
32720
  modelVersion,
32721
+ agentVersionId,
32702
32722
  threadId: testThreadId,
32703
32723
  memory: hasMemory,
32704
32724
  refreshThreadList: async () => {
@@ -32933,6 +32953,7 @@ function AgentPlaygroundView({
32933
32953
  agentId,
32934
32954
  agentName,
32935
32955
  modelVersion,
32956
+ agentVersionId,
32936
32957
  hasMemory,
32937
32958
  activeVersionId,
32938
32959
  selectedVersionId,
@@ -32975,6 +32996,7 @@ function AgentPlaygroundView({
32975
32996
  agentId,
32976
32997
  agentName,
32977
32998
  modelVersion,
32999
+ agentVersionId,
32978
33000
  hasMemory
32979
33001
  }
32980
33002
  ) }) }) })