@mastra/playground-ui 5.2.4 → 5.2.5-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 * as React from 'react';
3
- import React__default, { createContext, useContext, forwardRef, memo, useState, useEffect, useRef, useCallback, useMemo, Suspense, Fragment as Fragment$1, startTransition } from 'react';
3
+ import React__default, { createContext, useContext, forwardRef, memo, useState, useEffect, useRef, useCallback, useMemo, Suspense, Fragment as Fragment$1, useId, startTransition } from 'react';
4
4
  import { MastraClient } from '@mastra/client-js';
5
5
  import { useMessage, MessagePrimitive, ActionBarPrimitive, useAttachment, AttachmentPrimitive, useComposerRuntime, ComposerPrimitive, ThreadPrimitive, CompositeAttachmentAdapter, SimpleImageAttachmentAdapter, SimpleTextAttachmentAdapter, WebSpeechSynthesisAdapter, useExternalStoreRuntime, AssistantRuntimeProvider } from '@assistant-ui/react';
6
6
  import { CheckIcon as CheckIcon$1, CopyIcon, Check, Copy, ChevronUpIcon, BrainIcon, AudioLinesIcon, StopCircleIcon, X, FileText, CircleXIcon, Mic, PlusIcon, ArrowUp, Search, RefreshCcwIcon, ChevronRight, SortAsc, SortDesc, Circle, ChevronDown, Braces, SaveIcon, RefreshCw, ExternalLink, InfoIcon as InfoIcon$1, GaugeIcon, CircleCheck, EditIcon, Plus, LoaderCircle, ChevronDownIcon, ExternalLinkIcon, Loader2, Network, PauseIcon, HourglassIcon, CircleDashed, Footprints, CircleX, Minus, Maximize, Workflow, AlertCircleIcon, Users, Brain, NetworkIcon, SearchIcon, AlertCircle, CalendarIcon, Brackets, TrashIcon, CirclePause, StopCircle, ChevronUp } from 'lucide-react';
@@ -3088,7 +3088,7 @@ function cn(...inputs) {
3088
3088
  }
3089
3089
 
3090
3090
  const buttonVariants = cva(
3091
- "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
3091
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
3092
3092
  {
3093
3093
  variants: {
3094
3094
  variant: {
@@ -4465,7 +4465,7 @@ const DialogContent = React.forwardRef(({ className, children, ...props }, ref)
4465
4465
  ...props,
4466
4466
  children: [
4467
4467
  children,
4468
- /* @__PURE__ */ jsxs(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
4468
+ /* @__PURE__ */ jsxs(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
4469
4469
  /* @__PURE__ */ jsx(X, { className: "h-4 w-4" }),
4470
4470
  /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
4471
4471
  ] })
@@ -4984,11 +4984,11 @@ const Composer$1 = ({ hasMemory, onInputChange, agentId }) => {
4984
4984
  return /* @__PURE__ */ jsxs("div", { className: "mx-4", children: [
4985
4985
  /* @__PURE__ */ jsxs(ComposerPrimitive.Root, { children: [
4986
4986
  /* @__PURE__ */ jsx("div", { className: "max-w-[568px] w-full mx-auto pb-2", children: /* @__PURE__ */ jsx(ComposerAttachments, {}) }),
4987
- /* @__PURE__ */ jsxs("div", { className: "bg-surface3 rounded-lg border-sm border-border1 py-4 mt-auto max-w-[568px] w-full mx-auto px-4", children: [
4987
+ /* @__PURE__ */ jsxs("div", { className: "bg-surface3 rounded-lg border-sm border-border1 py-4 mt-auto max-w-[568px] w-full mx-auto px-4 focus-within:outline focus-within:outline-accent1", children: [
4988
4988
  /* @__PURE__ */ jsx(ComposerPrimitive.Input, { asChild: true, className: "w-full", children: /* @__PURE__ */ jsx(
4989
4989
  "textarea",
4990
4990
  {
4991
- className: "text-ui-lg leading-ui-lg placeholder:text-icon3 text-icon6 bg-transparent focus:outline-none resize-none",
4991
+ className: "text-ui-lg leading-ui-lg placeholder:text-icon3 text-icon6 bg-transparent focus:outline-none resize-none outline-none",
4992
4992
  autoFocus: true,
4993
4993
  placeholder: "Enter your message...",
4994
4994
  name: "",
@@ -6176,7 +6176,7 @@ const AgentChat = ({
6176
6176
  };
6177
6177
 
6178
6178
  const badgeVariants = cva(
6179
- "inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
6179
+ "inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors",
6180
6180
  {
6181
6181
  variants: {
6182
6182
  variant: {
@@ -6230,13 +6230,13 @@ function FormattedDate({ date }) {
6230
6230
  }
6231
6231
 
6232
6232
  const inputVariants = cva(
6233
- "flex w-full text-icon6 rounded-lg border bg-transparent shadow-sm focus-visible:ring-ring transition-colors focus-visible:outline-none focus-visible:ring-1 disabled:cursor-not-allowed disabled:opacity-50",
6233
+ "flex w-full text-icon6 rounded-lg border bg-transparent shadow-sm transition-colors disabled:cursor-not-allowed disabled:opacity-50",
6234
6234
  {
6235
6235
  variants: {
6236
6236
  variant: {
6237
6237
  default: "border-sm border-border1 placeholder:text-icon3",
6238
6238
  filled: "border-sm bg-inputFill border-border1 placeholder:text-icon3",
6239
- unstyled: "border-0 bg-transparent placeholder:text-icon3 focus-visible:ring-transparent focus-visible:outline-none"
6239
+ unstyled: "border-0 bg-transparent placeholder:text-icon3"
6240
6240
  },
6241
6241
  customSize: {
6242
6242
  default: "px-[13px] text-[calc(13_/_16_*_1rem)] h-8",
@@ -6338,24 +6338,14 @@ const TabsTrigger = React.forwardRef(({ className, ...props }, ref) => /* @__PUR
6338
6338
  {
6339
6339
  ref,
6340
6340
  className: cn(
6341
- "ring-offset-background focus-visible:ring-ring data-[state=active]:bg-background data-[state=active]:text-foreground whitespace-nowrap focus-visible:outline-none text-ui-lg text-icon3 -mb-[0.5px] inline-flex items-center justify-center border-b-2 border-transparent p-3 font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:border-b-2 data-[state=active]:border-white data-[state=active]:shadow",
6341
+ "-outline-offset-2 data-[state=active]:bg-background data-[state=active]:text-foreground whitespace-nowrap text-ui-lg text-icon3 -mb-[0.5px] inline-flex items-center justify-center border-b-2 border-transparent p-3 font-medium disabled:pointer-events-none disabled:opacity-50 data-[state=active]:border-b-2 data-[state=active]:border-white data-[state=active]:shadow",
6342
6342
  className
6343
6343
  ),
6344
6344
  ...props
6345
6345
  }
6346
6346
  ));
6347
6347
  TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
6348
- const TabsContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
6349
- TabsPrimitive.Content,
6350
- {
6351
- ref,
6352
- className: cn(
6353
- "ring-offset-background focus-visible:ring-ring mt-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",
6354
- className
6355
- ),
6356
- ...props
6357
- }
6358
- ));
6348
+ const TabsContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(TabsPrimitive.Content, { ref, className: cn("mt-2 -outline-offset-2", className), ...props }));
6359
6349
  TabsContent.displayName = TabsPrimitive.Content.displayName;
6360
6350
 
6361
6351
  const PlaygroundTabs = ({
@@ -6407,8 +6397,7 @@ const scrollableContentClass = cn(
6407
6397
  cn(
6408
6398
  "px-4 py-2 text-sm transition-all border-b-2 border-transparent",
6409
6399
  "data-[state=active]:border-white data-[state=active]:text-white font-medium",
6410
- "data-[state=inactive]:text-mastra-el-4 hover:data-[state=inactive]:text-mastra-el-2",
6411
- "focus-visible:outline-none"
6400
+ "data-[state=inactive]:text-mastra-el-4 hover:data-[state=inactive]:text-mastra-el-2"
6412
6401
  );
6413
6402
  cn("data-[state=inactive]:mt-0 min-h-0 h-full grid grid-rows-[1fr]");
6414
6403
  function AgentEvals({ liveEvals, ciEvals, onRefetchLiveEvals, onRefetchCiEvals }) {
@@ -6621,7 +6610,7 @@ const Slider = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
6621
6610
  ...props,
6622
6611
  children: [
6623
6612
  /* @__PURE__ */ jsx(SliderPrimitive.Track, { className: "relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20", children: /* @__PURE__ */ jsx(SliderPrimitive.Range, { className: "absolute h-full bg-primary/50" }) }),
6624
- /* @__PURE__ */ jsx(SliderPrimitive.Thumb, { className: "block h-4 w-4 rounded-full border border-primary/50 bg-white shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50" })
6613
+ /* @__PURE__ */ jsx(SliderPrimitive.Thumb, { className: "block h-4 w-4 rounded-full border border-primary/50 bg-white shadow transition-colors disabled:pointer-events-none disabled:opacity-50" })
6625
6614
  ]
6626
6615
  }
6627
6616
  ));
@@ -6641,7 +6630,7 @@ const RadioGroupItem = React.forwardRef(({ className, ...props }, ref) => {
6641
6630
  {
6642
6631
  ref,
6643
6632
  className: cn(
6644
- "aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
6633
+ "aspect-square h-4 w-4 rounded-full border border-primary text-primary disabled:cursor-not-allowed disabled:opacity-50",
6645
6634
  className
6646
6635
  ),
6647
6636
  ...props,
@@ -6686,7 +6675,10 @@ const Button = ({ className, as, size = "md", variant = "default", ...props }) =
6686
6675
  };
6687
6676
 
6688
6677
  const Collapsible = CollapsiblePrimitive.Root;
6689
- const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger;
6678
+ const CollapsibleTrigger = (props) => {
6679
+ const { className, ...rest } = props;
6680
+ return /* @__PURE__ */ jsx(CollapsiblePrimitive.CollapsibleTrigger, { className: cn("-outline-offset-2", className), ...rest });
6681
+ };
6690
6682
  const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent;
6691
6683
 
6692
6684
  const formatJSON = async (code) => {
@@ -6922,7 +6914,7 @@ const AgentAdvancedSettings = () => {
6922
6914
  onChange: setProviderOptionsValue,
6923
6915
  theme,
6924
6916
  extensions: [jsonLanguage],
6925
- className: "h-[300px] overflow-scroll rounded-lg border bg-transparent shadow-sm focus-visible:ring-ring transition-colors focus-visible:outline-none focus-visible:ring-1 p-2"
6917
+ className: "h-[300px] overflow-scroll rounded-lg border bg-transparent shadow-sm transition-colors p-2"
6926
6918
  }
6927
6919
  ),
6928
6920
  error && /* @__PURE__ */ jsx(Txt, { variant: "ui-md", className: "text-accent2", children: error })
@@ -7038,18 +7030,18 @@ const rowSize = {
7038
7030
  default: "[&>tbody>tr]:h-table-row",
7039
7031
  small: "[&>tbody>tr]:h-table-row-small"
7040
7032
  };
7041
- const Table = ({ className, children, size = "default" }) => {
7042
- return /* @__PURE__ */ jsx("table", { className: clsx("w-full", rowSize[size], className), children });
7033
+ const Table = ({ className, children, size = "default", style }) => {
7034
+ return /* @__PURE__ */ jsx("table", { className: clsx("w-full", rowSize[size], className), style, children });
7043
7035
  };
7044
7036
  const Thead = ({ className, children }) => {
7045
- return /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsx("tr", { className: clsx("h-table-header border-b-sm border-border1", className), children }) });
7037
+ return /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsx("tr", { className: clsx("h-table-header border-b-sm border-border1 bg-surface2", className), children }) });
7046
7038
  };
7047
7039
  const Th = ({ className, children, ...props }) => {
7048
7040
  return /* @__PURE__ */ jsx(
7049
7041
  "th",
7050
7042
  {
7051
7043
  className: clsx(
7052
- "text-icon3 text-ui-sm h-full text-left font-normal uppercase first:pl-5 last:pr-5 whitespace-nowrap",
7044
+ "text-icon3 text-ui-sm h-full whitespace-nowrap text-left font-normal uppercase first:pl-5 last:pr-5",
7053
7045
  className
7054
7046
  ),
7055
7047
  ...props,
@@ -7060,21 +7052,33 @@ const Th = ({ className, children, ...props }) => {
7060
7052
  const Tbody = ({ className, children }) => {
7061
7053
  return /* @__PURE__ */ jsx("tbody", { className: clsx("", className), children });
7062
7054
  };
7063
- const Row = ({ className, children, selected = false, onClick }) => {
7064
- return /* @__PURE__ */ jsx(
7065
- "tr",
7066
- {
7067
- className: clsx(
7068
- "border-b-sm border-border1 hover:bg-surface3",
7069
- selected && "bg-surface4",
7070
- onClick && "cursor-pointer",
7071
- className
7072
- ),
7073
- onClick,
7074
- children
7075
- }
7076
- );
7077
- };
7055
+ const Row = forwardRef(
7056
+ ({ className, children, selected = false, style, onClick, ...props }, ref) => {
7057
+ const handleKeyDown = (event) => {
7058
+ if (event.key === "Enter" && onClick) {
7059
+ onClick();
7060
+ }
7061
+ };
7062
+ return /* @__PURE__ */ jsx(
7063
+ "tr",
7064
+ {
7065
+ className: clsx(
7066
+ "border-b-sm border-border1 hover:bg-surface3 focus:bg-surface3 -outline-offset-2",
7067
+ selected && "bg-surface4",
7068
+ onClick && "cursor-pointer",
7069
+ className
7070
+ ),
7071
+ style,
7072
+ onClick,
7073
+ ref,
7074
+ tabIndex: onClick ? 0 : void 0,
7075
+ onKeyDown: handleKeyDown,
7076
+ ...props,
7077
+ children
7078
+ }
7079
+ );
7080
+ }
7081
+ );
7078
7082
 
7079
7083
  const formatDateCell = (date) => {
7080
7084
  const month = new Intl.DateTimeFormat("en-US", { month: "short" }).format(date).toUpperCase();
@@ -7923,7 +7927,7 @@ const AgentMetadataSection = ({ title, children, hint }) => {
7923
7927
  /* @__PURE__ */ jsxs(Txt, { as: "h3", variant: "ui-md", className: "text-icon3 flex items-center gap-1", children: [
7924
7928
  title,
7925
7929
  hint && /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsxs(Tooltip, { children: [
7926
- /* @__PURE__ */ jsx(TooltipTrigger, { 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, {}) }) }) }),
7930
+ /* @__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, {}) }) }) }),
7927
7931
  /* @__PURE__ */ jsx(TooltipContent, { children: hint.title })
7928
7932
  ] }) })
7929
7933
  ] }),
@@ -8266,7 +8270,7 @@ const SelectTrigger = React.forwardRef(({ className, children, ...props }, ref)
8266
8270
  {
8267
8271
  ref,
8268
8272
  className: cn(
8269
- "flex h-9 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
8273
+ "flex h-9 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
8270
8274
  className
8271
8275
  ),
8272
8276
  ...props,
@@ -8306,7 +8310,7 @@ const SelectItem = React.forwardRef(({ className, children, ...props }, ref) =>
8306
8310
  {
8307
8311
  ref,
8308
8312
  className: cn(
8309
- "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-mastra-el-5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
8313
+ "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-mastra-el-5 text-sm focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
8310
8314
  className
8311
8315
  ),
8312
8316
  ...props,
@@ -8327,7 +8331,7 @@ const PopoverContent = React.forwardRef(({ className, align = "center", sideOffs
8327
8331
  align,
8328
8332
  sideOffset,
8329
8333
  className: cn(
8330
- "z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
8334
+ "z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
8331
8335
  className
8332
8336
  ),
8333
8337
  ...props
@@ -10276,7 +10280,7 @@ const WorkflowStepActionBar = ({
10276
10280
  ] }),
10277
10281
  onShowTrace && /* @__PURE__ */ jsx(Button, { onClick: onShowTrace, children: "Show trace" }),
10278
10282
  showEventForm && /* @__PURE__ */ jsxs(Fragment, { children: [
10279
- /* @__PURE__ */ jsx(Button, { className: "ring-1 ring-accent5 !text-accent5", onClick: () => setIsEventFormOpen(true), children: "Send event" }),
10283
+ /* @__PURE__ */ jsx(Button, { className: "!text-accent5", onClick: () => setIsEventFormOpen(true), children: "Send event" }),
10280
10284
  /* @__PURE__ */ jsx(Dialog, { open: isEventFormOpen, onOpenChange: setIsEventFormOpen, children: /* @__PURE__ */ jsxs(DialogContent, { className: dialogContentClass, children: [
10281
10285
  /* @__PURE__ */ jsxs(DialogTitle, { className: dialogTitleClass, children: [
10282
10286
  "Send ",
@@ -10307,8 +10311,8 @@ function WorkflowConditionNode({ data }) {
10307
10311
  {
10308
10312
  className: cn(
10309
10313
  "bg-surface3 rounded-lg w-[300px] border-sm border-border1",
10310
- previousStep?.status === "success" && nextStep && "ring-2 ring-accent1 bg-accent1Darker",
10311
- previousStep?.status === "failed" && nextStep && "ring-2 ring-accent2 bg-accent2Darker"
10314
+ previousStep?.status === "success" && nextStep && "bg-accent1Darker",
10315
+ previousStep?.status === "failed" && nextStep && "bg-accent2Darker"
10312
10316
  ),
10313
10317
  children: [
10314
10318
  /* @__PURE__ */ jsxs(
@@ -10424,11 +10428,11 @@ function WorkflowDefaultNode({
10424
10428
  {
10425
10429
  className: cn(
10426
10430
  "bg-surface3 rounded-lg w-[274px] border-sm border-border1 pt-2",
10427
- step?.status === "success" && "ring-2 ring-accent1 bg-accent1Darker",
10428
- step?.status === "failed" && "ring-2 ring-accent2 bg-accent2Darker",
10429
- step?.status === "suspended" && "ring-2 ring-accent3 bg-accent3Darker",
10430
- step?.status === "waiting" && "ring-2 ring-accent5 bg-accent5Darker",
10431
- step?.status === "running" && "ring-2 ring-accent6 bg-accent6Darker"
10431
+ step?.status === "success" && "bg-accent1Darker",
10432
+ step?.status === "failed" && "bg-accent2Darker",
10433
+ step?.status === "suspended" && "bg-accent3Darker",
10434
+ step?.status === "waiting" && "bg-accent5Darker",
10435
+ step?.status === "running" && "bg-accent6Darker"
10432
10436
  ),
10433
10437
  children: [
10434
10438
  /* @__PURE__ */ jsxs("div", { className: cn("flex items-center gap-2 px-3", !description && "pb-2"), children: [
@@ -10728,11 +10732,11 @@ function WorkflowNestedNode({
10728
10732
  {
10729
10733
  className: cn(
10730
10734
  "bg-surface3 rounded-lg w-[274px] border-sm border-border1 pt-2",
10731
- step?.status === "success" && "ring-2 ring-accent1 bg-accent1Darker",
10732
- step?.status === "failed" && "ring-2 ring-accent2 bg-accent2Darker",
10733
- step?.status === "suspended" && "ring-2 ring-accent3 bg-accent3Darker",
10734
- step?.status === "waiting" && "ring-2 ring-accent5 bg-accent5Darker",
10735
- step?.status === "running" && "ring-2 ring-accent6 bg-accent6Darker"
10735
+ step?.status === "success" && "bg-accent1Darker",
10736
+ step?.status === "failed" && "bg-accent2Darker",
10737
+ step?.status === "suspended" && "bg-accent3Darker",
10738
+ step?.status === "waiting" && "bg-accent5Darker",
10739
+ step?.status === "running" && "bg-accent6Darker"
10736
10740
  ),
10737
10741
  children: [
10738
10742
  /* @__PURE__ */ jsxs("div", { className: cn("flex items-center gap-2 px-3", !description && "pb-2"), children: [
@@ -11320,7 +11324,7 @@ const Composer = ({ hasMemory }) => {
11320
11324
  /* @__PURE__ */ jsx(ComposerPrimitive.Input, { asChild: true, className: "w-full", children: /* @__PURE__ */ jsx(
11321
11325
  "textarea",
11322
11326
  {
11323
- className: "text-ui-lg leading-ui-lg placeholder:text-icon3 text-icon6 bg-transparent focus:outline-none resize-none",
11327
+ className: "text-ui-lg leading-ui-lg placeholder:text-icon3 text-icon6 bg-transparent resize-none",
11324
11328
  autoFocus: true,
11325
11329
  placeholder: "Enter your message...",
11326
11330
  name: "",
@@ -12062,6 +12066,65 @@ const NetworkTableSkeleton = () => {
12062
12066
  ] });
12063
12067
  };
12064
12068
 
12069
+ const themeClasses = {
12070
+ light: "bg-gray-100 border-gray-300 text-gray-700",
12071
+ dark: "bg-surface4 border-border1 text-icon6"
12072
+ };
12073
+ const Kbd = ({ children, theme = "dark" }) => {
12074
+ const themeClass = themeClasses[theme];
12075
+ return /* @__PURE__ */ jsx("kbd", { className: clsx("border-sm rounded-md px-1 py-0.5 font-mono", themeClass), children });
12076
+ };
12077
+
12078
+ const Searchbar = ({ onSearch, label, placeholder }) => {
12079
+ const id = useId();
12080
+ const inputRef = useRef(null);
12081
+ useEffect(() => {
12082
+ const input = inputRef.current;
12083
+ if (!input) return;
12084
+ const handleKeyDown = (event) => {
12085
+ if (event.key.toLowerCase() === "f" && event.shiftKey && (event.ctrlKey || event.metaKey)) {
12086
+ event.preventDefault();
12087
+ input.focus();
12088
+ }
12089
+ };
12090
+ window.addEventListener("keydown", handleKeyDown);
12091
+ return () => {
12092
+ window.removeEventListener("keydown", handleKeyDown);
12093
+ };
12094
+ }, []);
12095
+ const handleSubmit = (e) => {
12096
+ e.preventDefault();
12097
+ const formData = new FormData(e.target);
12098
+ const search = formData.get(id);
12099
+ onSearch(search);
12100
+ };
12101
+ return /* @__PURE__ */ jsxs(
12102
+ "form",
12103
+ {
12104
+ onSubmit: handleSubmit,
12105
+ className: "border-sm border-icon-3 flex h-8 w-full items-center gap-2 overflow-hidden rounded-lg pl-2 pr-1",
12106
+ children: [
12107
+ /* @__PURE__ */ jsx(SearchIcon, { className: "text-icon3 h-4 w-4" }),
12108
+ /* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
12109
+ /* @__PURE__ */ jsx("label", { htmlFor: id, className: "sr-only", children: label }),
12110
+ /* @__PURE__ */ jsx(
12111
+ "input",
12112
+ {
12113
+ id,
12114
+ type: "text",
12115
+ placeholder,
12116
+ className: "bg-surface2 text-ui-md placeholder:text-icon-3 block h-8 w-full px-2 -outline-offset-2",
12117
+ name: id,
12118
+ ref: inputRef
12119
+ }
12120
+ )
12121
+ ] }),
12122
+ /* @__PURE__ */ jsx("button", { type: "submit", className: "text-ui-sm text-icon3 flex flex-row items-center gap-1", children: /* @__PURE__ */ jsx(Kbd, { children: "Enter" }) })
12123
+ ]
12124
+ }
12125
+ );
12126
+ };
12127
+
12065
12128
  const ToolList = ({ tools, agents, isLoading, computeLink, computeAgentLink }) => {
12066
12129
  const toolsWithAgents = useMemo(() => prepareAgents(tools, agents), [tools, agents]);
12067
12130
  if (isLoading)
@@ -12076,8 +12139,7 @@ const ToolListInner = ({
12076
12139
  const [filteredTools, setFilteredTools] = useState(toolsWithAgents);
12077
12140
  const [value, setValue] = useState("");
12078
12141
  if (filteredTools.length === 0 && !value) return /* @__PURE__ */ jsx(ToolListEmpty, {});
12079
- const handleSearch = (e) => {
12080
- const value2 = e.target.value;
12142
+ const handleSearch = (value2) => {
12081
12143
  setValue(value2);
12082
12144
  startTransition(() => {
12083
12145
  setFilteredTools(
@@ -12091,19 +12153,7 @@ const ToolListInner = ({
12091
12153
  };
12092
12154
  return /* @__PURE__ */ jsxs("div", { children: [
12093
12155
  /* @__PURE__ */ jsxs("div", { className: "max-w-5xl w-full mx-auto px-4 pt-8", children: [
12094
- /* @__PURE__ */ jsxs("div", { className: "px-4 flex items-center gap-2 rounded-lg bg-surface5 focus-within:ring-2 focus-within:ring-accent3", children: [
12095
- /* @__PURE__ */ jsx(Icon, { children: /* @__PURE__ */ jsx(SearchIcon, {}) }),
12096
- /* @__PURE__ */ jsx(
12097
- "input",
12098
- {
12099
- type: "text",
12100
- placeholder: "Search for a tool",
12101
- className: "w-full py-2 bg-transparent text-icon3 focus:text-icon6 placeholder:text-icon3 outline-none",
12102
- value,
12103
- onChange: handleSearch
12104
- }
12105
- )
12106
- ] }),
12156
+ /* @__PURE__ */ jsx(Searchbar, { onSearch: handleSearch, label: "Search for a tool", placeholder: "Search for a tool" }),
12107
12157
  filteredTools.length === 0 && /* @__PURE__ */ jsx(Txt, { as: "p", className: "text-icon3 py-2", children: "No tools found matching your search." })
12108
12158
  ] }),
12109
12159
  /* @__PURE__ */ jsx("div", { className: "grid md:grid-cols-2 xl:grid-cols-3 gap-4 max-w-5xl mx-auto py-8", children: filteredTools.map((tool) => /* @__PURE__ */ jsx(ToolEntity, { tool, computeLink, computeAgentLink }, tool.id)) })
@@ -12457,7 +12507,7 @@ const Checkbox = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__
12457
12507
  {
12458
12508
  ref,
12459
12509
  className: cn(
12460
- "peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
12510
+ "peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
12461
12511
  className
12462
12512
  ),
12463
12513
  ...props,
@@ -15058,5 +15108,5 @@ const MemorySearch = ({
15058
15108
  ] });
15059
15109
  };
15060
15110
 
15061
- export { AgentChat, AgentCoinIcon, AgentEntityHeader, AgentEvals, AgentIcon, AgentMetadata, AgentMetadataList, AgentMetadataListEmpty, AgentMetadataListItem, AgentMetadataPrompt, AgentMetadataScorerList, AgentMetadataSection, AgentMetadataToolList, AgentMetadataWorkflowList, AgentMetadataWrapper, AgentNetworkCoinIcon, AgentSettings, AgentSettingsContext, AgentSettingsProvider, AgentsTable, AgentsTableSkeleton, AiIcon, AlertDialog, ApiIcon, Badge$1 as Badge, BranchIcon, Breadcrumb, Button, Cell, ChatThreads, CheckIcon, ChevronIcon, CommitIcon, CrossIcon, Crumb, DarkLogo, DataTable, DateTimeCell, DbIcon, DebugIcon, DeploymentIcon, DividerIcon, DocsIcon, DynamicForm, EmptyAgentsTable, EmptyScorerList, EmptyState, EmptyWorkflowsTable, Entity, EntityContent, EntityDescription, EntityHeader, EntityIcon, EntityName, Entry, EntryCell, EnvIcon, EvaluatorCoinIcon, FiltersIcon, FolderIcon, GithubCoinIcon, GithubIcon, GoogleIcon, Header, HeaderAction, HeaderGroup, HeaderTitle, HomeIcon, Icon, InfoIcon, JudgeIcon, LatencyIcon, LegacyWorkflowGraph, LegacyWorkflowTrigger, LinkComponentProvider, LogsIcon, MainContentContent, MainContentLayout, MastraClientProvider, MastraResizablePanel, McpCoinIcon, McpServerIcon, MemoryIcon, MemorySearch, NetworkChat, NetworkContext, NetworkProvider, NetworkTable, NetworkTableEmpty, NetworkTableSkeleton, OpenAIIcon, PlaygroundQueryClient, PlaygroundTabs, PromptIcon, RadioGroup, RadioGroupItem, RepoIcon, Row, RuntimeContext, RuntimeContextWrapper, ScoreIcon, ScorerList, ScorerSkeleton, SettingsIcon, SlashIcon, Tab, TabContent, TabList, Table, Tbody, Th, Thead, ThreadDeleteButton, ThreadItem, ThreadLink, ThreadList, Threads, ToolCoinIcon, ToolList, ToolListEmpty, ToolListSkeleton, ToolsIcon, TraceIcon, TracesView, TracesViewSkeleton, TsIcon, Txt, TxtCell, UnitCell, VNextNetworkChat, VariablesIcon, WorkflowCoinIcon, WorkflowGraph, WorkflowIcon, WorkflowRunContext, WorkflowRunProvider, WorkflowRuns, WorkflowTable, WorkflowTableSkeleton, WorkflowTrigger, WorkingMemoryContext, WorkingMemoryProvider, allowedAiSpanAttributes, cleanString, formatDuration, formatOtelTimestamp, formatOtelTimestamp2, providerMapToIcon, transformKey, useAgentSettings, useCurrentRun, useInView, useLinkComponent, useMastraClient, usePlaygroundStore, usePolling, useScorer, useScorers, useScoresByEntityId, useScoresByScorerId, useSpeechRecognition, useWorkingMemory };
15111
+ export { AgentChat, AgentCoinIcon, AgentEntityHeader, AgentEvals, AgentIcon, AgentMetadata, AgentMetadataList, AgentMetadataListEmpty, AgentMetadataListItem, AgentMetadataPrompt, AgentMetadataScorerList, AgentMetadataSection, AgentMetadataToolList, AgentMetadataWorkflowList, AgentMetadataWrapper, AgentNetworkCoinIcon, AgentSettings, AgentSettingsContext, AgentSettingsProvider, AgentsTable, AgentsTableSkeleton, AiIcon, AlertDialog, ApiIcon, Badge$1 as Badge, BranchIcon, Breadcrumb, Button, Cell, ChatThreads, CheckIcon, ChevronIcon, Collapsible, CollapsibleContent, CollapsibleTrigger, CommitIcon, CrossIcon, Crumb, DarkLogo, DataTable, DateTimeCell, DbIcon, DebugIcon, DeploymentIcon, DividerIcon, DocsIcon, DynamicForm, EmptyAgentsTable, EmptyScorerList, EmptyState, EmptyWorkflowsTable, Entity, EntityContent, EntityDescription, EntityHeader, EntityIcon, EntityName, Entry, EntryCell, EnvIcon, EvaluatorCoinIcon, FiltersIcon, FolderIcon, GithubCoinIcon, GithubIcon, GoogleIcon, Header, HeaderAction, HeaderGroup, HeaderTitle, HomeIcon, Icon, InfoIcon, JudgeIcon, Kbd, LatencyIcon, LegacyWorkflowGraph, LegacyWorkflowTrigger, LinkComponentProvider, LogsIcon, MainContentContent, MainContentLayout, MastraClientProvider, MastraResizablePanel, McpCoinIcon, McpServerIcon, MemoryIcon, MemorySearch, NetworkChat, NetworkContext, NetworkProvider, NetworkTable, NetworkTableEmpty, NetworkTableSkeleton, OpenAIIcon, PlaygroundQueryClient, PlaygroundTabs, PromptIcon, RadioGroup, RadioGroupItem, RepoIcon, Row, RuntimeContext, RuntimeContextWrapper, ScoreIcon, ScorerList, ScorerSkeleton, Searchbar, SettingsIcon, SlashIcon, Tab, TabContent, TabList, Table, Tbody, Th, Thead, ThreadDeleteButton, ThreadItem, ThreadLink, ThreadList, Threads, ToolCoinIcon, ToolList, ToolListEmpty, ToolListSkeleton, ToolsIcon, TraceIcon, TracesView, TracesViewSkeleton, TsIcon, Txt, TxtCell, UnitCell, VNextNetworkChat, VariablesIcon, WorkflowCoinIcon, WorkflowGraph, WorkflowIcon, WorkflowRunContext, WorkflowRunProvider, WorkflowRuns, WorkflowTable, WorkflowTableSkeleton, WorkflowTrigger, WorkingMemoryContext, WorkingMemoryProvider, allowedAiSpanAttributes, cleanString, formatDuration, formatOtelTimestamp, formatOtelTimestamp2, providerMapToIcon, transformKey, useAgentSettings, useCurrentRun, useInView, useLinkComponent, useMastraClient, usePlaygroundStore, usePolling, useScorer, useScorers, useScoresByEntityId, useScoresByScorerId, useSpeechRecognition, useWorkingMemory };
15062
15112
  //# sourceMappingURL=index.es.js.map