@mastra/playground-ui 7.0.0-beta.23 → 7.0.0-beta.25
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 +86 -0
- package/dist/index.cjs.js +1133 -264
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.css +10 -10
- package/dist/index.es.js +1120 -259
- package/dist/index.es.js.map +1 -1
- package/dist/spacings-Ddc7umGk.js +196 -0
- package/dist/spacings-Ddc7umGk.js.map +1 -0
- package/dist/spacings-bCnRJAUT.cjs +206 -0
- package/dist/spacings-bCnRJAUT.cjs.map +1 -0
- package/dist/src/domains/agents/components/agent-metadata/agent-metadata.d.ts +11 -0
- package/dist/src/domains/processors/components/index.d.ts +2 -0
- package/dist/src/domains/processors/components/processor-panel.d.ts +8 -0
- package/dist/src/domains/processors/components/processor-table/columns.d.ts +12 -0
- package/dist/src/domains/processors/components/processor-table/index.d.ts +2 -0
- package/dist/src/domains/processors/components/processor-table/processor-table.d.ts +7 -0
- package/dist/src/domains/processors/hooks/index.d.ts +1 -0
- package/dist/src/domains/processors/hooks/use-processors.d.ts +50 -0
- package/dist/src/domains/processors/index.d.ts +2 -0
- package/dist/src/domains/workflows/hooks/use-workflows.d.ts +3 -1
- package/dist/src/domains/workflows/workflow/workflow-input-data.d.ts +2 -1
- package/dist/src/ds/components/Alert/Alert.d.ts +2 -1
- package/dist/src/ds/components/Avatar/Avatar.d.ts +2 -1
- package/dist/src/ds/components/Badge/Badge.d.ts +1 -1
- package/dist/src/ds/components/Button/Button.d.ts +1 -1
- package/dist/src/ds/components/Card/Card.d.ts +26 -0
- package/dist/src/ds/components/Card/index.d.ts +2 -0
- package/dist/src/ds/components/Collapsible/collapsible.d.ts +4 -3
- package/dist/src/ds/components/EmptyState/EmptyState.d.ts +10 -9
- package/dist/src/ds/components/EmptyState/index.d.ts +2 -1
- package/dist/src/ds/components/Input/input.d.ts +2 -0
- package/dist/src/ds/components/Kbd/kbd.d.ts +2 -1
- package/dist/src/ds/components/Notification/notification.d.ts +1 -1
- package/dist/src/ds/components/Spinner/spinner.d.ts +2 -1
- package/dist/src/ds/components/StatusBadge/StatusBadge.d.ts +13 -0
- package/dist/src/ds/components/StatusBadge/index.d.ts +2 -0
- package/dist/src/ds/icons/ProcessorIcon.d.ts +2 -0
- package/dist/src/ds/icons/index.d.ts +1 -0
- package/dist/src/ds/primitives/form-element.d.ts +3 -2
- package/dist/src/ds/primitives/transitions.d.ts +22 -0
- package/dist/src/ds/tokens/animations.d.ts +5 -0
- package/dist/src/ds/tokens/colors.d.ts +2 -1
- package/dist/src/ds/tokens/index.d.ts +2 -0
- package/dist/src/ds/tokens/shadows.d.ts +14 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/lib/ai-ui/tools/badges/tool-approval-buttons.d.ts +2 -1
- package/dist/src/lib/framework.d.ts +2 -0
- package/dist/src/services/tool-call-provider.d.ts +5 -1
- package/dist/tailwind.preset.cjs.js +38 -10
- package/dist/tailwind.preset.cjs.js.map +1 -1
- package/dist/tailwind.preset.es.js +29 -1
- package/dist/tailwind.preset.es.js.map +1 -1
- package/dist/tokens.cjs.js +17 -175
- package/dist/tokens.cjs.js.map +1 -1
- package/dist/tokens.es.js +8 -169
- package/dist/tokens.es.js.map +1 -1
- package/package.json +10 -10
package/dist/index.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { useAssistantState, useMessage, MessagePrimitive, ActionBarPrimitive, useComposerRuntime, useAttachment, ComposerPrimitive, AttachmentPrimitive, useComposer, ThreadPrimitive, CompositeAttachmentAdapter, SimpleImageAttachmentAdapter, SimpleTextAttachmentAdapter, WebSpeechSynthesisAdapter, useExternalStoreRuntime, AssistantRuntimeProvider } from '@assistant-ui/react';
|
|
3
|
-
import { CheckIcon as CheckIcon$1, CopyIcon, ShieldAlert, ChevronDown, ChevronRight, RefreshCw, Tag, InfoIcon as InfoIcon$1, AlertCircle, TriangleAlert, ChevronUpIcon, CheckCircleIcon, X, Share2, Check, Clock as Clock$1, PlayCircle, Workflow, Layers, List, CalendarClock, Timer, CornerDownRight, GitBranch, Repeat, Repeat1, Network, TriangleAlertIcon, XIcon, CalendarIcon, CircleAlertIcon, Braces, ChevronDownIcon, Brackets, PlusIcon, TrashIcon, Plus, Loader2, Circle, EyeOffIcon, EyeIcon, PauseIcon, HourglassIcon, CircleDashed, Footprints, CircleCheck, CircleX, Minus, Maximize, AlertCircleIcon, CirclePause, StopCircle,
|
|
3
|
+
import { CheckIcon as CheckIcon$1, CopyIcon, ShieldAlert, ChevronDown, ChevronRight, RefreshCw, Tag, InfoIcon as InfoIcon$1, AlertCircle, TriangleAlert, ChevronUpIcon, CheckCircleIcon, X, Share2, Check, Clock as Clock$1, PlayCircle, Workflow, Layers, List, CalendarClock, Timer, CornerDownRight, GitBranch, Repeat, Repeat1, Network, TriangleAlertIcon, XIcon, CalendarIcon, CircleAlertIcon, Braces, ChevronDownIcon, Brackets, PlusIcon, TrashIcon, Plus, Loader2, Circle, EyeOffIcon, EyeIcon, PauseIcon, HourglassIcon, CircleDashed, Footprints, CircleCheck, CircleX, Minus, Maximize, AlertCircleIcon, CirclePause, StopCircle, SearchIcon, Cpu, ChevronsUpDown, Search, ArrowRight, ArrowLeft, BrainIcon, AudioLinesIcon, StopCircleIcon, FileText, CircleXIcon, Link, CloudUpload, Mic, ArrowUp, SaveIcon, Info, ExternalLink, ArrowLeftIcon, ArrowRightIcon, ChevronsRightIcon, AlignLeftIcon, AlignJustifyIcon, ArrowUpIcon, ArrowDownIcon, ChevronRightIcon, GaugeIcon, ChevronsLeftRightEllipsisIcon, CalculatorIcon, HashIcon, FileInputIcon, FileOutputIcon, ReceiptText, RotateCcw, GripVertical, RefreshCcwIcon, AlertTriangleIcon, Copy, NetworkIcon, WorkflowIcon as WorkflowIcon$1, PackageIcon, GitBranchIcon, PackageOpenIcon, OctagonXIcon, FrownIcon, CircleChevronUpIcon, CircleChevronDownIcon, FileIcon, ChevronsUpIcon, ChevronsDownIcon, TimerIcon, ChevronsLeftRightIcon, ChevronFirstIcon, ChevronLastIcon, CircleDashedIcon, ArrowRightToLineIcon, CoinsIcon, BracesIcon, CircleGaugeIcon, PanelTopIcon, ListTreeIcon, PanelLeftIcon, PanelRightIcon, KeyboardIcon, CircleSlash, Trash, Link2, MoveRight } 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, useId, useEffectEvent, Suspense, useLayoutEffect } from 'react';
|
|
6
|
-
import { BorderColors, Colors, Sizes, FontSizes, LineHeights, BorderRadius, Spacings } from './
|
|
6
|
+
import { S as Shadows, G as Glows, B as BorderColors, C as Colors, a as Sizes, F as FontSizes, L as LineHeights, b as BorderRadius, c as Spacings } from './spacings-Ddc7umGk.js';
|
|
7
7
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
8
8
|
import { TooltipProvider as TooltipProvider$1 } from '@radix-ui/react-tooltip';
|
|
9
9
|
import { unstable_memoizeMarkdownComponents, useIsMarkdownCodeBlock, MarkdownTextPrimitive } from '@assistant-ui/react-markdown';
|
|
@@ -3089,13 +3089,15 @@ const fontSizeKeys = Object.keys(FontSizes);
|
|
|
3089
3089
|
const lineHeightKeys = Object.keys(LineHeights);
|
|
3090
3090
|
const borderRadiusKeys = Object.keys(BorderRadius);
|
|
3091
3091
|
const sizeKeys = Object.keys(Sizes);
|
|
3092
|
+
const shadowKeys = Object.keys(Shadows).concat(Object.keys(Glows));
|
|
3092
3093
|
const twMerge = extendTailwindMerge({
|
|
3093
3094
|
extend: {
|
|
3094
3095
|
theme: {
|
|
3095
3096
|
color: colorKeys,
|
|
3096
3097
|
spacing: spacingKeys,
|
|
3097
3098
|
radius: borderRadiusKeys,
|
|
3098
|
-
leading: lineHeightKeys
|
|
3099
|
+
leading: lineHeightKeys,
|
|
3100
|
+
shadow: shadowKeys
|
|
3099
3101
|
},
|
|
3100
3102
|
classGroups: {
|
|
3101
3103
|
"font-size": [{ text: fontSizeKeys }],
|
|
@@ -3119,47 +3121,44 @@ const formElementSizes = {
|
|
|
3119
3121
|
md: "h-form-md",
|
|
3120
3122
|
lg: "h-form-lg"
|
|
3121
3123
|
};
|
|
3122
|
-
const formElementFocus = "focus:outline focus:
|
|
3123
|
-
const formElementFocusWithin = "focus-within:outline focus-within:
|
|
3124
|
+
const formElementFocus = "focus:outline-none focus:ring-1 focus:ring-accent1 focus:shadow-focus-ring transition-shadow duration-normal";
|
|
3125
|
+
const formElementFocusWithin = "focus-within:outline-none focus-within:ring-1 focus-within:ring-accent1 focus-within:shadow-focus-ring transition-shadow duration-normal";
|
|
3124
3126
|
const formElementRadius = "rounded-md";
|
|
3125
3127
|
|
|
3126
|
-
const sizeClasses$
|
|
3128
|
+
const sizeClasses$2 = {
|
|
3127
3129
|
sm: `${formElementSizes.sm} gap-0.5`,
|
|
3128
3130
|
md: `${formElementSizes.md} gap-1`,
|
|
3129
3131
|
lg: `${formElementSizes.lg} gap-2`
|
|
3130
3132
|
};
|
|
3131
3133
|
const variantClasses$2 = {
|
|
3132
|
-
default: "bg-surface2 hover:bg-surface4 text-neutral3 hover:text-neutral6 disabled:opacity-50",
|
|
3133
|
-
light: "bg-surface3 hover:bg-surface5 text-neutral6 disabled:opacity-50",
|
|
3134
|
-
outline: "bg-transparent hover:bg-surface2 text-neutral3 hover:text-neutral6 disabled:opacity-50",
|
|
3135
|
-
ghost: "bg-transparent border-transparent hover:bg-surface2 text-neutral3 hover:text-neutral6 disabled:opacity-50"
|
|
3134
|
+
default: "bg-surface2 hover:bg-surface4 text-neutral3 hover:text-neutral6 disabled:opacity-50 disabled:cursor-not-allowed",
|
|
3135
|
+
light: "bg-surface3 hover:bg-surface5 text-neutral6 disabled:opacity-50 disabled:cursor-not-allowed",
|
|
3136
|
+
outline: "bg-transparent hover:bg-surface2 text-neutral3 hover:text-neutral6 disabled:opacity-50 disabled:cursor-not-allowed",
|
|
3137
|
+
ghost: "bg-transparent border-transparent hover:bg-surface2 text-neutral3 hover:text-neutral6 disabled:opacity-50 disabled:cursor-not-allowed",
|
|
3138
|
+
primary: "bg-accent1 hover:bg-accent1/90 text-surface1 font-medium hover:shadow-glow-accent1 disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:shadow-none"
|
|
3136
3139
|
};
|
|
3140
|
+
const baseButtonStyles = "border border-border1 px-2 text-ui-md inline-flex items-center justify-center rounded-md transition-all duration-normal ease-out-custom active:scale-[0.98]";
|
|
3137
3141
|
function buttonVariants(options) {
|
|
3138
3142
|
const variant = options?.variant || "default";
|
|
3139
3143
|
const size = options?.size || "md";
|
|
3140
|
-
return cn(
|
|
3141
|
-
"bg-surface2 border border-border1 px-2 text-ui-md inline-flex items-center justify-center rounded-md border",
|
|
3142
|
-
formElementFocus,
|
|
3143
|
-
variantClasses$2[variant],
|
|
3144
|
-
sizeClasses$1[size]
|
|
3145
|
-
);
|
|
3144
|
+
return cn(baseButtonStyles, formElementFocus, variantClasses$2[variant], sizeClasses$2[size]);
|
|
3146
3145
|
}
|
|
3147
3146
|
const Button = React__default.forwardRef(
|
|
3148
|
-
({ className, as, size = "md", variant = "default", ...props }, ref) => {
|
|
3147
|
+
({ className, as, size = "md", variant = "default", disabled, ...props }, ref) => {
|
|
3149
3148
|
const Component = as || "button";
|
|
3150
3149
|
return /* @__PURE__ */ jsx(
|
|
3151
3150
|
Component,
|
|
3152
3151
|
{
|
|
3153
3152
|
ref,
|
|
3153
|
+
disabled,
|
|
3154
3154
|
className: cn(
|
|
3155
|
-
|
|
3155
|
+
baseButtonStyles,
|
|
3156
3156
|
formElementFocus,
|
|
3157
3157
|
variantClasses$2[variant],
|
|
3158
|
-
sizeClasses$
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
}
|
|
3158
|
+
sizeClasses$2[size],
|
|
3159
|
+
// Remove active scale when disabled
|
|
3160
|
+
disabled && "active:scale-100",
|
|
3161
|
+
className
|
|
3163
3162
|
),
|
|
3164
3163
|
...props
|
|
3165
3164
|
}
|
|
@@ -3214,17 +3213,36 @@ const Txt = ({ as: Root = "p", className, variant = "ui-md", font, ...props }) =
|
|
|
3214
3213
|
return /* @__PURE__ */ jsx(Root, { className: cn(variants[variant], font && fonts[font], className), ...props });
|
|
3215
3214
|
};
|
|
3216
3215
|
|
|
3217
|
-
const
|
|
3216
|
+
const transitions = {
|
|
3217
|
+
// For color changes (background, text, border)
|
|
3218
|
+
colors: "transition-colors duration-normal ease-out-custom",
|
|
3219
|
+
// For transform changes (scale, translate, rotate)
|
|
3220
|
+
transform: "transition-transform duration-normal ease-out-custom",
|
|
3221
|
+
// For all property changes
|
|
3222
|
+
all: "transition-all duration-normal ease-out-custom",
|
|
3223
|
+
// For opacity changes
|
|
3224
|
+
opacity: "transition-opacity duration-normal ease-out-custom"};
|
|
3225
|
+
const focusRing = {
|
|
3226
|
+
// Focus visible only (keyboard navigation)
|
|
3227
|
+
visible: "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent1 focus-visible:shadow-focus-ring"
|
|
3228
|
+
};
|
|
3229
|
+
|
|
3230
|
+
const sizeClasses$1 = {
|
|
3218
3231
|
sm: "h-avatar-sm w-avatar-sm",
|
|
3219
3232
|
md: "h-avatar-md w-avatar-md",
|
|
3220
3233
|
lg: "h-avatar-lg w-avatar-lg"
|
|
3221
3234
|
};
|
|
3222
|
-
const Avatar = ({ src, name, size = "sm" }) => {
|
|
3235
|
+
const Avatar = ({ src, name, size = "sm", interactive = false }) => {
|
|
3223
3236
|
return /* @__PURE__ */ jsx(
|
|
3224
3237
|
"div",
|
|
3225
3238
|
{
|
|
3226
|
-
className:
|
|
3227
|
-
|
|
3239
|
+
className: cn(
|
|
3240
|
+
sizeClasses$1[size],
|
|
3241
|
+
"border border-border1 bg-surface3 shrink-0 overflow-hidden rounded-full flex items-center justify-center",
|
|
3242
|
+
transitions.all,
|
|
3243
|
+
interactive && "cursor-pointer hover:scale-105 hover:border-neutral2 hover:shadow-sm"
|
|
3244
|
+
),
|
|
3245
|
+
children: src ? /* @__PURE__ */ jsx("img", { src, alt: name, className: "h-full w-full object-cover" }) : /* @__PURE__ */ jsx(Txt, { variant: "ui-md", className: "text-center text-neutral4", children: name[0].toUpperCase() })
|
|
3228
3246
|
}
|
|
3229
3247
|
);
|
|
3230
3248
|
};
|
|
@@ -4288,22 +4306,64 @@ const AgentNetworkCoinIcon = (props) => /* @__PURE__ */ jsxs("svg", { width: "12
|
|
|
4288
4306
|
) }) })
|
|
4289
4307
|
] });
|
|
4290
4308
|
|
|
4309
|
+
function ProcessorIcon(props) {
|
|
4310
|
+
return /* @__PURE__ */ jsxs(
|
|
4311
|
+
"svg",
|
|
4312
|
+
{
|
|
4313
|
+
width: "24",
|
|
4314
|
+
height: "24",
|
|
4315
|
+
viewBox: "0 0 24 24",
|
|
4316
|
+
fill: "none",
|
|
4317
|
+
stroke: "currentColor",
|
|
4318
|
+
strokeWidth: "2",
|
|
4319
|
+
strokeLinecap: "round",
|
|
4320
|
+
strokeLinejoin: "round",
|
|
4321
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4322
|
+
...props,
|
|
4323
|
+
children: [
|
|
4324
|
+
/* @__PURE__ */ jsx("rect", { width: "16", height: "16", x: "4", y: "4", rx: "2" }),
|
|
4325
|
+
/* @__PURE__ */ jsx("rect", { width: "6", height: "6", x: "9", y: "9", rx: "1" }),
|
|
4326
|
+
/* @__PURE__ */ jsx("path", { d: "M15 2v2" }),
|
|
4327
|
+
/* @__PURE__ */ jsx("path", { d: "M15 20v2" }),
|
|
4328
|
+
/* @__PURE__ */ jsx("path", { d: "M2 15h2" }),
|
|
4329
|
+
/* @__PURE__ */ jsx("path", { d: "M2 9h2" }),
|
|
4330
|
+
/* @__PURE__ */ jsx("path", { d: "M20 15h2" }),
|
|
4331
|
+
/* @__PURE__ */ jsx("path", { d: "M20 9h2" }),
|
|
4332
|
+
/* @__PURE__ */ jsx("path", { d: "M9 2v2" }),
|
|
4333
|
+
/* @__PURE__ */ jsx("path", { d: "M9 20v2" })
|
|
4334
|
+
]
|
|
4335
|
+
}
|
|
4336
|
+
);
|
|
4337
|
+
}
|
|
4338
|
+
|
|
4291
4339
|
const variantClasses$1 = {
|
|
4292
|
-
warning: "bg-
|
|
4293
|
-
destructive: "bg-
|
|
4294
|
-
info: "bg-
|
|
4340
|
+
warning: "bg-accent6Darker border-accent6/30 text-accent6",
|
|
4341
|
+
destructive: "bg-accent2Darker border-accent2/30 text-accent2",
|
|
4342
|
+
info: "bg-accent5Darker border-accent5/30 text-accent5"
|
|
4295
4343
|
};
|
|
4296
4344
|
const variantIcons = {
|
|
4297
4345
|
warning: TriangleAlert,
|
|
4298
4346
|
destructive: AlertCircle,
|
|
4299
4347
|
info: InfoIcon$1
|
|
4300
4348
|
};
|
|
4301
|
-
const Alert = ({ children, variant = "destructive" }) => {
|
|
4349
|
+
const Alert = ({ children, variant = "destructive", className }) => {
|
|
4302
4350
|
const Ico = variantIcons[variant];
|
|
4303
|
-
return /* @__PURE__ */ jsx(
|
|
4304
|
-
|
|
4305
|
-
|
|
4306
|
-
|
|
4351
|
+
return /* @__PURE__ */ jsx(
|
|
4352
|
+
"div",
|
|
4353
|
+
{
|
|
4354
|
+
className: cn(
|
|
4355
|
+
variantClasses$1[variant],
|
|
4356
|
+
"p-3 rounded-md border shadow-sm",
|
|
4357
|
+
transitions.all,
|
|
4358
|
+
"animate-in fade-in-0 slide-in-from-top-2 duration-200",
|
|
4359
|
+
className
|
|
4360
|
+
),
|
|
4361
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2", children: [
|
|
4362
|
+
/* @__PURE__ */ jsx(Icon, { className: "mt-0.5 flex-shrink-0", children: /* @__PURE__ */ jsx(Ico, {}) }),
|
|
4363
|
+
/* @__PURE__ */ jsx("div", { className: "text-neutral4", children })
|
|
4364
|
+
] })
|
|
4365
|
+
}
|
|
4366
|
+
);
|
|
4307
4367
|
};
|
|
4308
4368
|
const AlertTitle = ({ children, as: As = "h5" }) => {
|
|
4309
4369
|
return /* @__PURE__ */ jsx(Txt, { as: As, variant: "ui-md", className: "font-semibold", children });
|
|
@@ -4313,24 +4373,33 @@ const AlertDescription = ({ children, as: As = "p" }) => {
|
|
|
4313
4373
|
};
|
|
4314
4374
|
|
|
4315
4375
|
const variantClasses = {
|
|
4376
|
+
default: "text-neutral3 bg-surface4",
|
|
4377
|
+
success: "text-accent1 bg-accent1Dark",
|
|
4378
|
+
error: "text-accent2 bg-accent2Dark",
|
|
4379
|
+
info: "text-accent5 bg-accent5Dark",
|
|
4380
|
+
warning: "text-accent6 bg-accent6Dark"
|
|
4381
|
+
};
|
|
4382
|
+
const iconClasses = {
|
|
4316
4383
|
default: "text-neutral3",
|
|
4317
4384
|
success: "text-accent1",
|
|
4318
4385
|
error: "text-accent2",
|
|
4319
|
-
info: "text-
|
|
4386
|
+
info: "text-accent5",
|
|
4387
|
+
warning: "text-accent6"
|
|
4320
4388
|
};
|
|
4321
4389
|
const Badge = ({ icon, variant = "default", className, children, ...props }) => {
|
|
4322
4390
|
return /* @__PURE__ */ jsxs(
|
|
4323
4391
|
"div",
|
|
4324
4392
|
{
|
|
4325
4393
|
className: cn(
|
|
4326
|
-
"font-mono
|
|
4394
|
+
"font-mono text-ui-sm gap-1 h-badge-default inline-flex items-center rounded-md shrink-0",
|
|
4395
|
+
transitions.colors,
|
|
4327
4396
|
icon ? "pl-1 pr-1.5" : "px-1.5",
|
|
4328
|
-
|
|
4397
|
+
variant === "default" && icon ? "bg-surface4 text-neutral5" : variantClasses[variant],
|
|
4329
4398
|
className
|
|
4330
4399
|
),
|
|
4331
4400
|
...props,
|
|
4332
4401
|
children: [
|
|
4333
|
-
icon && /* @__PURE__ */ jsx("span", { className:
|
|
4402
|
+
icon && /* @__PURE__ */ jsx("span", { className: iconClasses[variant], children: /* @__PURE__ */ jsx(Icon, { children: icon }) }),
|
|
4334
4403
|
children
|
|
4335
4404
|
]
|
|
4336
4405
|
}
|
|
@@ -4433,20 +4502,34 @@ function CopyButton({
|
|
|
4433
4502
|
iconSize = "default",
|
|
4434
4503
|
className
|
|
4435
4504
|
}) {
|
|
4436
|
-
const
|
|
4505
|
+
const [copied, setCopied] = useState(false);
|
|
4506
|
+
const { handleCopy: originalHandleCopy } = useCopyToClipboard({
|
|
4437
4507
|
text: content,
|
|
4438
4508
|
copyMessage
|
|
4439
4509
|
});
|
|
4510
|
+
const handleCopy = () => {
|
|
4511
|
+
originalHandleCopy();
|
|
4512
|
+
setCopied(true);
|
|
4513
|
+
setTimeout(() => setCopied(false), 2e3);
|
|
4514
|
+
};
|
|
4440
4515
|
return /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
4441
|
-
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
4442
|
-
|
|
4516
|
+
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
4517
|
+
"button",
|
|
4443
4518
|
{
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
|
|
4519
|
+
onClick: handleCopy,
|
|
4520
|
+
type: "button",
|
|
4521
|
+
className: cn("rounded-lg p-1", transitions.all, focusRing.visible, "hover:bg-surface4", className),
|
|
4522
|
+
children: /* @__PURE__ */ jsx(
|
|
4523
|
+
Icon,
|
|
4524
|
+
{
|
|
4525
|
+
className: cn("text-neutral3", transitions.all, "hover:text-neutral6", copied && "text-accent1"),
|
|
4526
|
+
size: iconSize,
|
|
4527
|
+
children: copied ? /* @__PURE__ */ jsx(CheckIcon$1, {}) : /* @__PURE__ */ jsx(CopyIcon, {})
|
|
4528
|
+
}
|
|
4529
|
+
)
|
|
4447
4530
|
}
|
|
4448
|
-
) })
|
|
4449
|
-
/* @__PURE__ */ jsx(TooltipContent, { children: tooltip })
|
|
4531
|
+
) }),
|
|
4532
|
+
/* @__PURE__ */ jsx(TooltipContent, { children: copied ? "Copied!" : tooltip })
|
|
4450
4533
|
] });
|
|
4451
4534
|
}
|
|
4452
4535
|
|
|
@@ -4549,7 +4632,9 @@ const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
4549
4632
|
{
|
|
4550
4633
|
ref,
|
|
4551
4634
|
className: cn(
|
|
4552
|
-
"fixed inset-0 z-50 bg-
|
|
4635
|
+
"fixed inset-0 z-50 bg-overlay backdrop-blur-sm",
|
|
4636
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
4637
|
+
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
4553
4638
|
className
|
|
4554
4639
|
),
|
|
4555
4640
|
...props
|
|
@@ -4563,16 +4648,35 @@ const DialogContent = React.forwardRef(({ className, children, ...props }, ref)
|
|
|
4563
4648
|
{
|
|
4564
4649
|
ref,
|
|
4565
4650
|
className: cn(
|
|
4566
|
-
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%]
|
|
4651
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%]",
|
|
4652
|
+
"gap-4 border border-border1 bg-surface3 py-6 shadow-dialog rounded-lg",
|
|
4653
|
+
"duration-slow",
|
|
4654
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
4655
|
+
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
4656
|
+
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
4657
|
+
"data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%]",
|
|
4658
|
+
"data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]",
|
|
4567
4659
|
className
|
|
4568
4660
|
),
|
|
4569
4661
|
...props,
|
|
4570
4662
|
children: [
|
|
4571
4663
|
children,
|
|
4572
|
-
/* @__PURE__ */ jsxs(
|
|
4573
|
-
|
|
4574
|
-
|
|
4575
|
-
|
|
4664
|
+
/* @__PURE__ */ jsxs(
|
|
4665
|
+
DialogPrimitive.Close,
|
|
4666
|
+
{
|
|
4667
|
+
className: cn(
|
|
4668
|
+
"absolute right-4 top-4 rounded-md p-1",
|
|
4669
|
+
"text-neutral3 hover:text-neutral6 hover:bg-surface4",
|
|
4670
|
+
"transition-all duration-normal ease-out-custom",
|
|
4671
|
+
"focus:outline-none focus:ring-1 focus:ring-accent1 focus:shadow-focus-ring",
|
|
4672
|
+
"disabled:pointer-events-none"
|
|
4673
|
+
),
|
|
4674
|
+
children: [
|
|
4675
|
+
/* @__PURE__ */ jsx(X, { className: "h-4 w-4" }),
|
|
4676
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
4677
|
+
]
|
|
4678
|
+
}
|
|
4679
|
+
)
|
|
4576
4680
|
]
|
|
4577
4681
|
}
|
|
4578
4682
|
)
|
|
@@ -4652,6 +4756,8 @@ function ToolCallProvider({
|
|
|
4652
4756
|
children,
|
|
4653
4757
|
approveToolcall,
|
|
4654
4758
|
declineToolcall,
|
|
4759
|
+
approveToolcallGenerate,
|
|
4760
|
+
declineToolcallGenerate,
|
|
4655
4761
|
approveNetworkToolcall,
|
|
4656
4762
|
declineNetworkToolcall,
|
|
4657
4763
|
isRunning,
|
|
@@ -4664,6 +4770,8 @@ function ToolCallProvider({
|
|
|
4664
4770
|
value: {
|
|
4665
4771
|
approveToolcall,
|
|
4666
4772
|
declineToolcall,
|
|
4773
|
+
approveToolcallGenerate,
|
|
4774
|
+
declineToolcallGenerate,
|
|
4667
4775
|
approveNetworkToolcall,
|
|
4668
4776
|
declineNetworkToolcall,
|
|
4669
4777
|
isRunning,
|
|
@@ -4687,11 +4795,14 @@ const ToolApprovalButtons = ({
|
|
|
4687
4795
|
toolCallId,
|
|
4688
4796
|
toolApprovalMetadata,
|
|
4689
4797
|
toolName,
|
|
4690
|
-
isNetwork
|
|
4798
|
+
isNetwork,
|
|
4799
|
+
isGenerateMode
|
|
4691
4800
|
}) => {
|
|
4692
4801
|
const {
|
|
4693
4802
|
approveToolcall,
|
|
4694
4803
|
declineToolcall,
|
|
4804
|
+
approveToolcallGenerate,
|
|
4805
|
+
declineToolcallGenerate,
|
|
4695
4806
|
isRunning,
|
|
4696
4807
|
toolCallApprovals,
|
|
4697
4808
|
approveNetworkToolcall,
|
|
@@ -4701,6 +4812,8 @@ const ToolApprovalButtons = ({
|
|
|
4701
4812
|
const handleApprove = () => {
|
|
4702
4813
|
if (isNetwork) {
|
|
4703
4814
|
approveNetworkToolcall(toolName, toolApprovalMetadata?.runId);
|
|
4815
|
+
} else if (isGenerateMode) {
|
|
4816
|
+
approveToolcallGenerate(toolCallId);
|
|
4704
4817
|
} else {
|
|
4705
4818
|
approveToolcall(toolCallId);
|
|
4706
4819
|
}
|
|
@@ -4708,6 +4821,8 @@ const ToolApprovalButtons = ({
|
|
|
4708
4821
|
const handleDecline = () => {
|
|
4709
4822
|
if (isNetwork) {
|
|
4710
4823
|
declineNetworkToolcall(toolName, toolApprovalMetadata?.runId);
|
|
4824
|
+
} else if (isGenerateMode) {
|
|
4825
|
+
declineToolcallGenerate(toolCallId);
|
|
4711
4826
|
} else {
|
|
4712
4827
|
declineToolcall(toolCallId);
|
|
4713
4828
|
}
|
|
@@ -4809,7 +4924,8 @@ const ToolBadge = ({
|
|
|
4809
4924
|
toolCallId,
|
|
4810
4925
|
toolApprovalMetadata,
|
|
4811
4926
|
toolName,
|
|
4812
|
-
isNetwork
|
|
4927
|
+
isNetwork,
|
|
4928
|
+
isGenerateMode: metadata?.mode === "generate"
|
|
4813
4929
|
}
|
|
4814
4930
|
)
|
|
4815
4931
|
] })
|
|
@@ -4887,7 +5003,10 @@ const useWorkflows = () => {
|
|
|
4887
5003
|
const { requestContext } = usePlaygroundStore();
|
|
4888
5004
|
return useQuery({
|
|
4889
5005
|
queryKey: ["workflows", requestContext],
|
|
4890
|
-
queryFn: () =>
|
|
5006
|
+
queryFn: async () => {
|
|
5007
|
+
const workflows = await client.listWorkflows(requestContext);
|
|
5008
|
+
return Object.fromEntries(Object.entries(workflows).filter(([_, workflow]) => !workflow.isProcessorWorkflow));
|
|
5009
|
+
}
|
|
4891
5010
|
});
|
|
4892
5011
|
};
|
|
4893
5012
|
|
|
@@ -5784,7 +5903,21 @@ function WorkflowRunProvider({
|
|
|
5784
5903
|
}
|
|
5785
5904
|
|
|
5786
5905
|
function Skeleton({ className, ...props }) {
|
|
5787
|
-
return /* @__PURE__ */ jsx(
|
|
5906
|
+
return /* @__PURE__ */ jsx(
|
|
5907
|
+
"div",
|
|
5908
|
+
{
|
|
5909
|
+
className: cn(
|
|
5910
|
+
"rounded-md bg-surface4 relative overflow-hidden",
|
|
5911
|
+
// Shimmer effect using pseudo-element
|
|
5912
|
+
"before:absolute before:inset-0",
|
|
5913
|
+
"before:translate-x-[-100%]",
|
|
5914
|
+
"before:animate-[shimmer_2s_infinite]",
|
|
5915
|
+
"before:bg-gradient-to-r before:from-transparent before:via-surface5/20 before:to-transparent",
|
|
5916
|
+
className
|
|
5917
|
+
),
|
|
5918
|
+
...props
|
|
5919
|
+
}
|
|
5920
|
+
);
|
|
5788
5921
|
}
|
|
5789
5922
|
|
|
5790
5923
|
const lodashTitleCase = (str) => {
|
|
@@ -6182,11 +6315,40 @@ const constructNodesAndEdges = ({
|
|
|
6182
6315
|
};
|
|
6183
6316
|
|
|
6184
6317
|
const Collapsible = CollapsiblePrimitive.Root;
|
|
6185
|
-
const CollapsibleTrigger = (props) =>
|
|
6186
|
-
|
|
6187
|
-
|
|
6188
|
-
|
|
6189
|
-
|
|
6318
|
+
const CollapsibleTrigger = React__default.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
6319
|
+
CollapsiblePrimitive.CollapsibleTrigger,
|
|
6320
|
+
{
|
|
6321
|
+
ref,
|
|
6322
|
+
className: cn(
|
|
6323
|
+
"-outline-offset-2",
|
|
6324
|
+
transitions.colors,
|
|
6325
|
+
focusRing.visible,
|
|
6326
|
+
"hover:text-neutral5",
|
|
6327
|
+
"[&>svg]:transition-transform [&>svg]:duration-normal [&>svg]:ease-out-custom",
|
|
6328
|
+
"[&[data-state=open]>svg]:rotate-90",
|
|
6329
|
+
className
|
|
6330
|
+
),
|
|
6331
|
+
...props,
|
|
6332
|
+
children
|
|
6333
|
+
}
|
|
6334
|
+
));
|
|
6335
|
+
CollapsibleTrigger.displayName = CollapsiblePrimitive.CollapsibleTrigger.displayName;
|
|
6336
|
+
const CollapsibleContent = React__default.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
6337
|
+
CollapsiblePrimitive.CollapsibleContent,
|
|
6338
|
+
{
|
|
6339
|
+
ref,
|
|
6340
|
+
className: cn(
|
|
6341
|
+
"overflow-hidden",
|
|
6342
|
+
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:slide-in-from-top-1",
|
|
6343
|
+
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-1",
|
|
6344
|
+
"duration-normal ease-out-custom",
|
|
6345
|
+
className
|
|
6346
|
+
),
|
|
6347
|
+
...props,
|
|
6348
|
+
children
|
|
6349
|
+
}
|
|
6350
|
+
));
|
|
6351
|
+
CollapsibleContent.displayName = CollapsiblePrimitive.CollapsibleContent.displayName;
|
|
6190
6352
|
|
|
6191
6353
|
const BADGE_COLORS = {
|
|
6192
6354
|
sleep: "#A855F7",
|
|
@@ -6336,13 +6498,14 @@ const ScrollBar = React.forwardRef(({ className, orientation = "vertical", ...pr
|
|
|
6336
6498
|
ref,
|
|
6337
6499
|
orientation,
|
|
6338
6500
|
className: cn(
|
|
6339
|
-
"flex touch-none select-none transition-
|
|
6501
|
+
"flex touch-none select-none transition-all duration-normal ease-out-custom",
|
|
6502
|
+
"opacity-0 hover:opacity-100 data-[state=visible]:opacity-100",
|
|
6340
6503
|
orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-px",
|
|
6341
6504
|
orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-px",
|
|
6342
6505
|
className
|
|
6343
6506
|
),
|
|
6344
6507
|
...props,
|
|
6345
|
-
children: /* @__PURE__ */ jsx(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-
|
|
6508
|
+
children: /* @__PURE__ */ jsx(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-neutral2 hover:bg-neutral3 transition-colors duration-normal" })
|
|
6346
6509
|
}
|
|
6347
6510
|
));
|
|
6348
6511
|
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
@@ -6479,16 +6642,22 @@ const cva = (base, config)=>(props)=>{
|
|
|
6479
6642
|
|
|
6480
6643
|
const inputVariants = cva(
|
|
6481
6644
|
cn(
|
|
6482
|
-
|
|
6645
|
+
// Base styles with enhanced transitions
|
|
6646
|
+
"flex w-full text-neutral6 border bg-transparent",
|
|
6647
|
+
"transition-all duration-normal ease-out-custom",
|
|
6648
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
6649
|
+
// Better placeholder styling
|
|
6650
|
+
"placeholder:text-neutral2 placeholder:transition-opacity placeholder:duration-normal",
|
|
6651
|
+
"focus:placeholder:opacity-70",
|
|
6483
6652
|
formElementRadius,
|
|
6484
6653
|
formElementFocus
|
|
6485
6654
|
),
|
|
6486
6655
|
{
|
|
6487
6656
|
variants: {
|
|
6488
6657
|
variant: {
|
|
6489
|
-
default: "border border-border1
|
|
6490
|
-
filled: "border bg-
|
|
6491
|
-
unstyled: "border-0 bg-transparent
|
|
6658
|
+
default: "border border-border1 hover:border-border2",
|
|
6659
|
+
filled: "border bg-surface2 border-border1 hover:border-border2",
|
|
6660
|
+
unstyled: "border-0 bg-transparent shadow-none focus:shadow-none focus:ring-0"
|
|
6492
6661
|
},
|
|
6493
6662
|
size: {
|
|
6494
6663
|
sm: `${formElementSizes.sm} px-2 text-ui-sm`,
|
|
@@ -6503,14 +6672,20 @@ const inputVariants = cva(
|
|
|
6503
6672
|
}
|
|
6504
6673
|
);
|
|
6505
6674
|
const Input = React.forwardRef(
|
|
6506
|
-
({ className, size, testId, variant, type, ...props }, ref) => {
|
|
6675
|
+
({ className, size, testId, variant, type, error, ...props }, ref) => {
|
|
6507
6676
|
return /* @__PURE__ */ jsx(
|
|
6508
6677
|
"input",
|
|
6509
6678
|
{
|
|
6510
6679
|
type,
|
|
6511
|
-
className: cn(
|
|
6680
|
+
className: cn(
|
|
6681
|
+
inputVariants({ variant, size }),
|
|
6682
|
+
// Error state styling
|
|
6683
|
+
error && "border-error focus:ring-error focus:shadow-glow-accent2",
|
|
6684
|
+
className
|
|
6685
|
+
),
|
|
6512
6686
|
"data-testid": testId,
|
|
6513
6687
|
ref,
|
|
6688
|
+
"aria-invalid": error,
|
|
6514
6689
|
...props
|
|
6515
6690
|
}
|
|
6516
6691
|
);
|
|
@@ -6558,11 +6733,27 @@ const Checkbox = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
6558
6733
|
{
|
|
6559
6734
|
ref,
|
|
6560
6735
|
className: cn(
|
|
6561
|
-
"peer h-4 w-4 shrink-0 rounded-sm border border-
|
|
6736
|
+
"peer h-4 w-4 shrink-0 rounded-sm border border-neutral3",
|
|
6737
|
+
"shadow-sm",
|
|
6738
|
+
transitions.all,
|
|
6739
|
+
"hover:border-neutral5 hover:shadow-md",
|
|
6740
|
+
formElementFocus,
|
|
6741
|
+
"disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:border-neutral3 disabled:hover:shadow-sm",
|
|
6742
|
+
"data-[state=checked]:bg-accent1 data-[state=checked]:border-accent1 data-[state=checked]:text-surface1",
|
|
6743
|
+
"data-[state=checked]:shadow-glow-accent1",
|
|
6562
6744
|
className
|
|
6563
6745
|
),
|
|
6564
6746
|
...props,
|
|
6565
|
-
children: /* @__PURE__ */ jsx(
|
|
6747
|
+
children: /* @__PURE__ */ jsx(
|
|
6748
|
+
CheckboxPrimitive.Indicator,
|
|
6749
|
+
{
|
|
6750
|
+
className: cn(
|
|
6751
|
+
"flex items-center justify-center text-current",
|
|
6752
|
+
"data-[state=checked]:animate-in data-[state=checked]:zoom-in-50 data-[state=checked]:duration-150"
|
|
6753
|
+
),
|
|
6754
|
+
children: /* @__PURE__ */ jsx(Check, { className: "h-3.5 w-3.5 stroke-[3]" })
|
|
6755
|
+
}
|
|
6756
|
+
)
|
|
6566
6757
|
}
|
|
6567
6758
|
));
|
|
6568
6759
|
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
@@ -6665,13 +6856,15 @@ const SelectTrigger = React.forwardRef(
|
|
|
6665
6856
|
"flex w-full items-center justify-between border border-border1 bg-transparent py-2 shadow-sm placeholder:text-neutral3 disabled:cursor-not-allowed disabled:opacity-50",
|
|
6666
6857
|
formElementRadius,
|
|
6667
6858
|
formElementFocus,
|
|
6859
|
+
transitions.all,
|
|
6860
|
+
"hover:border-neutral2",
|
|
6668
6861
|
selectTriggerSizeClasses[size],
|
|
6669
6862
|
className
|
|
6670
6863
|
),
|
|
6671
6864
|
...props,
|
|
6672
6865
|
children: [
|
|
6673
6866
|
children,
|
|
6674
|
-
/* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4
|
|
6867
|
+
/* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDown, { className: cn("h-4 w-4 text-neutral3", transitions.colors) }) })
|
|
6675
6868
|
]
|
|
6676
6869
|
}
|
|
6677
6870
|
)
|
|
@@ -6706,12 +6899,17 @@ const SelectItem = React.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
6706
6899
|
{
|
|
6707
6900
|
ref,
|
|
6708
6901
|
className: cn(
|
|
6709
|
-
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-neutral5 text-sm
|
|
6902
|
+
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-neutral5 text-sm",
|
|
6903
|
+
transitions.colors,
|
|
6904
|
+
"hover:bg-surface5 hover:text-neutral5",
|
|
6905
|
+
"focus:bg-surface5 focus:text-neutral5",
|
|
6906
|
+
"data-[state=checked]:bg-accent1Dark data-[state=checked]:text-accent1",
|
|
6907
|
+
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
6710
6908
|
className
|
|
6711
6909
|
),
|
|
6712
6910
|
...props,
|
|
6713
6911
|
children: [
|
|
6714
|
-
/* @__PURE__ */ jsx("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) }) }),
|
|
6912
|
+
/* @__PURE__ */ jsx("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4 text-accent1" }) }) }),
|
|
6715
6913
|
/* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children })
|
|
6716
6914
|
]
|
|
6717
6915
|
}
|
|
@@ -6892,7 +7090,13 @@ function SearchField({ onReset, ...props }) {
|
|
|
6892
7090
|
{
|
|
6893
7091
|
type: "button",
|
|
6894
7092
|
onClick: onReset,
|
|
6895
|
-
className: cn(
|
|
7093
|
+
className: cn(
|
|
7094
|
+
"absolute top-1/2 right-2 -translate-y-1/2 p-1 rounded",
|
|
7095
|
+
transitions.all,
|
|
7096
|
+
"hover:bg-surface4",
|
|
7097
|
+
"[&>svg]:transition-colors [&>svg]:duration-normal",
|
|
7098
|
+
"[&:hover>svg]:text-neutral5"
|
|
7099
|
+
),
|
|
6896
7100
|
children: /* @__PURE__ */ jsx(XIcon, { className: "text-neutral3 w-[1rem] h-[1rem]" })
|
|
6897
7101
|
}
|
|
6898
7102
|
)
|
|
@@ -7946,11 +8150,26 @@ const RadioGroupItem = React.forwardRef(({ className, ...props }, ref) => {
|
|
|
7946
8150
|
{
|
|
7947
8151
|
ref,
|
|
7948
8152
|
className: cn(
|
|
7949
|
-
"aspect-square h-4 w-4 rounded-full border border-
|
|
8153
|
+
"aspect-square h-4 w-4 rounded-full border border-neutral3 text-neutral6",
|
|
8154
|
+
"shadow-sm",
|
|
8155
|
+
transitions.all,
|
|
8156
|
+
"hover:border-neutral5 hover:shadow-md",
|
|
8157
|
+
formElementFocus,
|
|
8158
|
+
"disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:border-neutral3 disabled:hover:shadow-sm",
|
|
8159
|
+
"data-[state=checked]:border-accent1 data-[state=checked]:shadow-glow-accent1",
|
|
7950
8160
|
className
|
|
7951
8161
|
),
|
|
7952
8162
|
...props,
|
|
7953
|
-
children: /* @__PURE__ */ jsx(
|
|
8163
|
+
children: /* @__PURE__ */ jsx(
|
|
8164
|
+
RadioGroupPrimitive.Indicator,
|
|
8165
|
+
{
|
|
8166
|
+
className: cn(
|
|
8167
|
+
"flex items-center justify-center",
|
|
8168
|
+
"data-[state=checked]:animate-in data-[state=checked]:zoom-in-50 data-[state=checked]:duration-150"
|
|
8169
|
+
),
|
|
8170
|
+
children: /* @__PURE__ */ jsx(Circle, { className: "h-2 w-2 fill-accent1 text-accent1" })
|
|
8171
|
+
}
|
|
8172
|
+
)
|
|
7954
8173
|
}
|
|
7955
8174
|
);
|
|
7956
8175
|
});
|
|
@@ -7963,9 +8182,10 @@ const WorkflowInputData = ({
|
|
|
7963
8182
|
isSubmitLoading,
|
|
7964
8183
|
submitButtonLabel,
|
|
7965
8184
|
onSubmit,
|
|
7966
|
-
children
|
|
8185
|
+
children,
|
|
8186
|
+
isProcessorWorkflow
|
|
7967
8187
|
}) => {
|
|
7968
|
-
const [type, setType] = useState("form");
|
|
8188
|
+
const [type, setType] = useState(isProcessorWorkflow ? "simple" : "form");
|
|
7969
8189
|
return /* @__PURE__ */ jsxs("div", { children: [
|
|
7970
8190
|
/* @__PURE__ */ jsx(
|
|
7971
8191
|
RadioGroup,
|
|
@@ -7975,6 +8195,10 @@ const WorkflowInputData = ({
|
|
|
7975
8195
|
onValueChange: (value) => setType(value),
|
|
7976
8196
|
className: "pb-4",
|
|
7977
8197
|
children: /* @__PURE__ */ jsxs("div", { className: "flex flex-row gap-4", children: [
|
|
8198
|
+
isProcessorWorkflow && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
8199
|
+
/* @__PURE__ */ jsx(RadioGroupItem, { value: "simple", id: "simple" }),
|
|
8200
|
+
/* @__PURE__ */ jsx(Label, { htmlFor: "simple", className: "!text-neutral3 text-ui-sm", children: "Simple" })
|
|
8201
|
+
] }),
|
|
7978
8202
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
7979
8203
|
/* @__PURE__ */ jsx(RadioGroupItem, { value: "form", id: "form" }),
|
|
7980
8204
|
/* @__PURE__ */ jsx(Label, { htmlFor: "form", className: "!text-neutral3 text-ui-sm", children: "Form" })
|
|
@@ -7992,7 +8216,18 @@ const WorkflowInputData = ({
|
|
|
7992
8216
|
className: cn({
|
|
7993
8217
|
"opacity-50 pointer-events-none": isSubmitLoading
|
|
7994
8218
|
}),
|
|
7995
|
-
children: type === "
|
|
8219
|
+
children: type === "simple" && isProcessorWorkflow ? /* @__PURE__ */ jsx(
|
|
8220
|
+
SimpleProcessorInput,
|
|
8221
|
+
{
|
|
8222
|
+
schema,
|
|
8223
|
+
defaultValues,
|
|
8224
|
+
isSubmitLoading,
|
|
8225
|
+
submitButtonLabel,
|
|
8226
|
+
onSubmit,
|
|
8227
|
+
withoutSubmit,
|
|
8228
|
+
children
|
|
8229
|
+
}
|
|
8230
|
+
) : type === "form" ? /* @__PURE__ */ jsx(
|
|
7996
8231
|
DynamicForm,
|
|
7997
8232
|
{
|
|
7998
8233
|
schema,
|
|
@@ -8061,6 +8296,87 @@ const JSONInput = ({
|
|
|
8061
8296
|
withoutSubmit ? null : /* @__PURE__ */ jsx(Button, { variant: "light", onClick: handleSubmit, className: "w-full", size: "lg", children: isSubmitLoading ? /* @__PURE__ */ jsx(Loader2, { className: "animate-spin" }) : submitButtonLabel })
|
|
8062
8297
|
] });
|
|
8063
8298
|
};
|
|
8299
|
+
const PROCESSOR_PHASES = [
|
|
8300
|
+
{ value: "input", label: "Input - Process input messages before LLM" },
|
|
8301
|
+
{ value: "inputStep", label: "Input Step - Process at each agentic loop step" },
|
|
8302
|
+
{ value: "outputStream", label: "Output Stream - Process streaming chunks" },
|
|
8303
|
+
{ value: "outputResult", label: "Output Result - Process complete output" },
|
|
8304
|
+
{ value: "outputStep", label: "Output Step - Process after each LLM response" }
|
|
8305
|
+
];
|
|
8306
|
+
const SimpleProcessorInput = ({
|
|
8307
|
+
schema,
|
|
8308
|
+
defaultValues,
|
|
8309
|
+
isSubmitLoading,
|
|
8310
|
+
submitButtonLabel,
|
|
8311
|
+
onSubmit,
|
|
8312
|
+
withoutSubmit,
|
|
8313
|
+
children
|
|
8314
|
+
}) => {
|
|
8315
|
+
const [message, setMessage] = useState("Hello, this is a test message.");
|
|
8316
|
+
const [phase, setPhase] = useState("input");
|
|
8317
|
+
const [errors, setErrors] = useState([]);
|
|
8318
|
+
const handleSubmit = () => {
|
|
8319
|
+
setErrors([]);
|
|
8320
|
+
const isOutputPhase = phase === "outputStep" || phase === "outputResult";
|
|
8321
|
+
const messageRole = isOutputPhase ? "assistant" : "user";
|
|
8322
|
+
const data = {
|
|
8323
|
+
messages: [
|
|
8324
|
+
{
|
|
8325
|
+
id: crypto.randomUUID(),
|
|
8326
|
+
role: messageRole,
|
|
8327
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
8328
|
+
content: {
|
|
8329
|
+
format: 2,
|
|
8330
|
+
parts: [{ type: "text", text: message }]
|
|
8331
|
+
}
|
|
8332
|
+
}
|
|
8333
|
+
],
|
|
8334
|
+
phase
|
|
8335
|
+
};
|
|
8336
|
+
try {
|
|
8337
|
+
const result = schema.safeParse(data);
|
|
8338
|
+
if (!result.success) {
|
|
8339
|
+
setErrors(result.error.issues.map((e) => `[${e.path.join(".")}] ${e.message}`));
|
|
8340
|
+
} else {
|
|
8341
|
+
onSubmit(result.data);
|
|
8342
|
+
}
|
|
8343
|
+
} catch (e) {
|
|
8344
|
+
setErrors(["Error processing input"]);
|
|
8345
|
+
}
|
|
8346
|
+
};
|
|
8347
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4", children: [
|
|
8348
|
+
errors.length > 0 && /* @__PURE__ */ jsxs("div", { className: "border border-accent2 rounded-lg p-2", children: [
|
|
8349
|
+
/* @__PURE__ */ jsxs(Txt, { as: "p", variant: "ui-md", className: "text-accent2 font-semibold", children: [
|
|
8350
|
+
errors.length,
|
|
8351
|
+
" errors found"
|
|
8352
|
+
] }),
|
|
8353
|
+
/* @__PURE__ */ jsx("ul", { className: "list-disc list-inside", children: errors.map((error, idx) => /* @__PURE__ */ jsx("li", { className: "text-ui-sm text-accent2", children: error }, idx)) })
|
|
8354
|
+
] }),
|
|
8355
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
8356
|
+
/* @__PURE__ */ jsx(Txt, { as: "label", variant: "ui-sm", className: "text-neutral3", children: "Phase" }),
|
|
8357
|
+
/* @__PURE__ */ jsxs(Select, { value: phase, onValueChange: setPhase, children: [
|
|
8358
|
+
/* @__PURE__ */ jsx(SelectTrigger, { className: "w-full", children: /* @__PURE__ */ jsx(SelectValue, { placeholder: "Select phase" }) }),
|
|
8359
|
+
/* @__PURE__ */ jsx(SelectContent, { children: PROCESSOR_PHASES.map((p) => /* @__PURE__ */ jsx(SelectItem, { value: p.value, children: p.value }, p.value)) })
|
|
8360
|
+
] }),
|
|
8361
|
+
/* @__PURE__ */ jsx(Txt, { variant: "ui-xs", className: "text-icon4", children: PROCESSOR_PHASES.find((p) => p.value === phase)?.label })
|
|
8362
|
+
] }),
|
|
8363
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
8364
|
+
/* @__PURE__ */ jsx(Txt, { as: "label", variant: "ui-sm", className: "text-neutral3", children: "Test Message" }),
|
|
8365
|
+
/* @__PURE__ */ jsx(
|
|
8366
|
+
"textarea",
|
|
8367
|
+
{
|
|
8368
|
+
value: message,
|
|
8369
|
+
onChange: (e) => setMessage(e.target.value),
|
|
8370
|
+
placeholder: "Enter a test message...",
|
|
8371
|
+
rows: 4,
|
|
8372
|
+
className: "w-full bg-transparent border border-border1 rounded-md p-3 text-ui-sm text-neutral6 placeholder:text-neutral3 focus:outline-none focus:ring-2 focus:ring-accent1"
|
|
8373
|
+
}
|
|
8374
|
+
)
|
|
8375
|
+
] }),
|
|
8376
|
+
children,
|
|
8377
|
+
withoutSubmit ? null : /* @__PURE__ */ jsx(Button, { variant: "light", onClick: handleSubmit, className: "w-full", size: "lg", children: isSubmitLoading ? /* @__PURE__ */ jsx(Loader2, { className: "animate-spin" }) : submitButtonLabel })
|
|
8378
|
+
] });
|
|
8379
|
+
};
|
|
8064
8380
|
|
|
8065
8381
|
const formatJSON = async (code) => {
|
|
8066
8382
|
const formatted = await prettier.format(code, {
|
|
@@ -9099,11 +9415,29 @@ const Slider = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
9099
9415
|
SliderPrimitive.Root,
|
|
9100
9416
|
{
|
|
9101
9417
|
ref,
|
|
9102
|
-
className: cn("relative flex w-full touch-none select-none items-center", className),
|
|
9418
|
+
className: cn("relative flex w-full touch-none select-none items-center group", className),
|
|
9103
9419
|
...props,
|
|
9104
9420
|
children: [
|
|
9105
|
-
/* @__PURE__ */ jsx(
|
|
9106
|
-
|
|
9421
|
+
/* @__PURE__ */ jsx(
|
|
9422
|
+
SliderPrimitive.Track,
|
|
9423
|
+
{
|
|
9424
|
+
className: cn("relative h-1.5 w-full grow overflow-hidden rounded-full bg-neutral2", transitions.colors),
|
|
9425
|
+
children: /* @__PURE__ */ jsx(SliderPrimitive.Range, { className: cn("absolute h-full bg-accent1", transitions.all) })
|
|
9426
|
+
}
|
|
9427
|
+
),
|
|
9428
|
+
/* @__PURE__ */ jsx(
|
|
9429
|
+
SliderPrimitive.Thumb,
|
|
9430
|
+
{
|
|
9431
|
+
className: cn(
|
|
9432
|
+
"block h-4 w-4 rounded-full border-2 border-accent1 bg-white shadow-md",
|
|
9433
|
+
"transition-all duration-normal ease-out-custom",
|
|
9434
|
+
formElementFocus,
|
|
9435
|
+
"hover:scale-110 hover:shadow-lg",
|
|
9436
|
+
"active:scale-95",
|
|
9437
|
+
"disabled:pointer-events-none disabled:opacity-50"
|
|
9438
|
+
)
|
|
9439
|
+
}
|
|
9440
|
+
)
|
|
9107
9441
|
]
|
|
9108
9442
|
}
|
|
9109
9443
|
));
|
|
@@ -9423,7 +9757,8 @@ function WorkflowTrigger({
|
|
|
9423
9757
|
setPayload(data);
|
|
9424
9758
|
handleExecuteWorkflow(data);
|
|
9425
9759
|
},
|
|
9426
|
-
withoutSubmit: !!paramsRunId
|
|
9760
|
+
withoutSubmit: !!paramsRunId,
|
|
9761
|
+
isProcessorWorkflow: workflow?.isProcessorWorkflow
|
|
9427
9762
|
}
|
|
9428
9763
|
) : !!paramsRunId ? null : /* @__PURE__ */ jsx(
|
|
9429
9764
|
Button,
|
|
@@ -9568,20 +9903,31 @@ const WorkflowRunDetail = ({
|
|
|
9568
9903
|
}
|
|
9569
9904
|
};
|
|
9570
9905
|
|
|
9571
|
-
|
|
9906
|
+
function EmptyState({
|
|
9572
9907
|
iconSlot,
|
|
9573
9908
|
titleSlot,
|
|
9574
9909
|
descriptionSlot,
|
|
9575
9910
|
actionSlot,
|
|
9576
|
-
|
|
9577
|
-
|
|
9578
|
-
|
|
9579
|
-
|
|
9580
|
-
|
|
9581
|
-
|
|
9582
|
-
|
|
9583
|
-
|
|
9584
|
-
|
|
9911
|
+
className,
|
|
9912
|
+
as: HeadingTag = "h3"
|
|
9913
|
+
}) {
|
|
9914
|
+
return /* @__PURE__ */ jsxs(
|
|
9915
|
+
"div",
|
|
9916
|
+
{
|
|
9917
|
+
className: cn(
|
|
9918
|
+
"flex flex-col items-center justify-center text-center py-10 px-6",
|
|
9919
|
+
"transition-opacity duration-normal ease-out-custom",
|
|
9920
|
+
className
|
|
9921
|
+
),
|
|
9922
|
+
children: [
|
|
9923
|
+
iconSlot && /* @__PURE__ */ jsx("div", { className: "mb-4", children: iconSlot }),
|
|
9924
|
+
/* @__PURE__ */ jsx(HeadingTag, { className: "font-medium text-neutral5 text-ui-md", children: titleSlot }),
|
|
9925
|
+
descriptionSlot && /* @__PURE__ */ jsx("p", { className: "mt-1.5 text-neutral3 text-ui-sm max-w-md", children: descriptionSlot }),
|
|
9926
|
+
actionSlot && /* @__PURE__ */ jsx("div", { className: "mt-5", children: actionSlot })
|
|
9927
|
+
]
|
|
9928
|
+
}
|
|
9929
|
+
);
|
|
9930
|
+
}
|
|
9585
9931
|
|
|
9586
9932
|
const rowSize = {
|
|
9587
9933
|
default: "[&>tbody>tr]:h-table-row",
|
|
@@ -9591,14 +9937,14 @@ const Table = ({ className, children, size = "default", style }) => {
|
|
|
9591
9937
|
return /* @__PURE__ */ jsx("table", { className: cn("w-full", rowSize[size], className), style, children });
|
|
9592
9938
|
};
|
|
9593
9939
|
const Thead = ({ className, children }) => {
|
|
9594
|
-
return /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsx("tr", { className: cn("h-table-header border-b border-border1 bg-surface2", className), children }) });
|
|
9940
|
+
return /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsx("tr", { className: cn("h-table-header border-b border-border1 bg-surface2/80", className), children }) });
|
|
9595
9941
|
};
|
|
9596
9942
|
const Th = ({ className, children, ...props }) => {
|
|
9597
9943
|
return /* @__PURE__ */ jsx(
|
|
9598
9944
|
"th",
|
|
9599
9945
|
{
|
|
9600
9946
|
className: cn(
|
|
9601
|
-
"text-
|
|
9947
|
+
"text-neutral2 text-ui-xs h-full whitespace-nowrap text-left font-medium uppercase tracking-wide first:pl-3 last:pr-3",
|
|
9602
9948
|
className
|
|
9603
9949
|
),
|
|
9604
9950
|
...props,
|
|
@@ -9620,7 +9966,12 @@ const Row = forwardRef(
|
|
|
9620
9966
|
"tr",
|
|
9621
9967
|
{
|
|
9622
9968
|
className: cn(
|
|
9623
|
-
"border-b border-border1
|
|
9969
|
+
"border-b border-border1",
|
|
9970
|
+
// Smooth hover transition
|
|
9971
|
+
"transition-colors duration-normal ease-out-custom",
|
|
9972
|
+
"hover:bg-surface3",
|
|
9973
|
+
// Focus state
|
|
9974
|
+
"focus:bg-surface3 focus:outline-none focus:ring-1 focus:ring-inset focus:ring-accent1/50",
|
|
9624
9975
|
selected && "bg-surface4",
|
|
9625
9976
|
onClick && "cursor-pointer",
|
|
9626
9977
|
className
|
|
@@ -9838,6 +10189,8 @@ const LinkComponentContext = createContext({
|
|
|
9838
10189
|
networkThreadLink: () => "",
|
|
9839
10190
|
scorerLink: () => "",
|
|
9840
10191
|
toolLink: () => "",
|
|
10192
|
+
processorsLink: () => "",
|
|
10193
|
+
processorLink: () => "",
|
|
9841
10194
|
mcpServerLink: () => "",
|
|
9842
10195
|
mcpServerToolLink: () => "",
|
|
9843
10196
|
workflowRunLink: () => ""
|
|
@@ -9854,7 +10207,7 @@ const useLinkComponent = () => {
|
|
|
9854
10207
|
return ctx;
|
|
9855
10208
|
};
|
|
9856
10209
|
|
|
9857
|
-
const columns$
|
|
10210
|
+
const columns$5 = [
|
|
9858
10211
|
{
|
|
9859
10212
|
id: "name",
|
|
9860
10213
|
header: "Name",
|
|
@@ -9864,10 +10217,7 @@ const columns$4 = [
|
|
|
9864
10217
|
return /* @__PURE__ */ jsx(
|
|
9865
10218
|
EntryCell,
|
|
9866
10219
|
{
|
|
9867
|
-
name: /* @__PURE__ */
|
|
9868
|
-
/* @__PURE__ */ jsx(Link, { href: paths.workflowLink(row.original.id), children: row.original.name }),
|
|
9869
|
-
workflow.isProcessorWorkflow && /* @__PURE__ */ jsx(Badge, { icon: /* @__PURE__ */ jsx(Cpu, { className: "h-3 w-3" }), className: "!h-badge-sm bg-violet-500/20 text-violet-400", children: "Processor" })
|
|
9870
|
-
] }),
|
|
10220
|
+
name: /* @__PURE__ */ jsx(Link, { href: paths.workflowLink(row.original.id), children: row.original.name }),
|
|
9871
10221
|
description: workflow.description,
|
|
9872
10222
|
meta: void 0
|
|
9873
10223
|
}
|
|
@@ -9933,10 +10283,12 @@ const Searchbar = ({ onSearch, label, placeholder, debounceMs = 300, size = "md"
|
|
|
9933
10283
|
"border border-border1 flex w-full items-center gap-2 overflow-hidden pl-2 pr-1",
|
|
9934
10284
|
formElementRadius,
|
|
9935
10285
|
formElementFocusWithin,
|
|
10286
|
+
transitions.all,
|
|
10287
|
+
"hover:border-neutral2",
|
|
9936
10288
|
searchbarSizeClasses[size]
|
|
9937
10289
|
),
|
|
9938
10290
|
children: [
|
|
9939
|
-
/* @__PURE__ */ jsx(SearchIcon, { className: "text-neutral3 h-4 w-4" }),
|
|
10291
|
+
/* @__PURE__ */ jsx(SearchIcon, { className: cn("text-neutral3 h-4 w-4", transitions.colors) }),
|
|
9940
10292
|
/* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
|
|
9941
10293
|
/* @__PURE__ */ jsx("label", { htmlFor: id, className: "sr-only", children: label }),
|
|
9942
10294
|
/* @__PURE__ */ jsx(
|
|
@@ -9946,7 +10298,7 @@ const Searchbar = ({ onSearch, label, placeholder, debounceMs = 300, size = "md"
|
|
|
9946
10298
|
type: "text",
|
|
9947
10299
|
placeholder,
|
|
9948
10300
|
className: cn(
|
|
9949
|
-
"bg-
|
|
10301
|
+
"bg-transparent text-ui-md placeholder:text-neutral3 block w-full px-2 outline-none",
|
|
9950
10302
|
searchbarSizeClasses[size]
|
|
9951
10303
|
),
|
|
9952
10304
|
name: id,
|
|
@@ -9978,7 +10330,7 @@ function WorkflowTable({ workflows, isLoading }) {
|
|
|
9978
10330
|
}, [workflows]);
|
|
9979
10331
|
const table = useReactTable({
|
|
9980
10332
|
data: workflowData,
|
|
9981
|
-
columns: columns$
|
|
10333
|
+
columns: columns$5,
|
|
9982
10334
|
getCoreRowModel: getCoreRowModel()
|
|
9983
10335
|
});
|
|
9984
10336
|
const ths = table.getHeaderGroups()[0];
|
|
@@ -10059,16 +10411,18 @@ const TabList = ({ children, variant = "default", className }) => {
|
|
|
10059
10411
|
RadixTabs.List,
|
|
10060
10412
|
{
|
|
10061
10413
|
className: cn(
|
|
10062
|
-
"flex items-center",
|
|
10414
|
+
"flex items-center relative",
|
|
10063
10415
|
{
|
|
10064
10416
|
// variant: default
|
|
10065
10417
|
"text-ui-lg": variant === "default",
|
|
10066
10418
|
"[&>button]:py-2 [&>button]:px-6 [&>button]:font-normal [&>button]:text-neutral3 [&>button]:flex-1 [&>button]:border-b [&>button]:border-border1": variant === "default",
|
|
10067
|
-
|
|
10419
|
+
[`[&>button]:${transitions.colors} [&>button]:hover:text-neutral4`]: variant === "default",
|
|
10420
|
+
"[&>button[data-state=active]]:text-neutral5 [&>button[data-state=active]]:border-accent1": variant === "default",
|
|
10068
10421
|
// variant: buttons
|
|
10069
10422
|
"border border-border1 flex justify-stretch rounded-md overflow-hidden text-ui-md min-h-[2.5rem]": variant === "buttons",
|
|
10070
|
-
|
|
10071
|
-
"[&>button
|
|
10423
|
+
[`[&>button]:flex-1 [&>button]:py-2 [&>button]:px-4 [&>button]:text-neutral3 [&>button]:${transitions.all}`]: variant === "buttons",
|
|
10424
|
+
"[&>button]:hover:text-neutral4 [&>button]:hover:bg-surface3": variant === "buttons",
|
|
10425
|
+
"[&>button[data-state=active]]:text-neutral5 [&>button[data-state=active]]:bg-surface4 [&>button[data-state=active]]:shadow-inner": variant === "buttons"
|
|
10072
10426
|
},
|
|
10073
10427
|
className
|
|
10074
10428
|
),
|
|
@@ -10083,7 +10437,11 @@ const Tab = ({ children, value, onClick, onClose, className }) => {
|
|
|
10083
10437
|
{
|
|
10084
10438
|
value,
|
|
10085
10439
|
className: cn(
|
|
10086
|
-
"text-xs p-3 text-neutral3
|
|
10440
|
+
"text-xs p-3 text-neutral3 whitespace-nowrap flex-shrink-0 flex items-center justify-center gap-1.5",
|
|
10441
|
+
transitions.all,
|
|
10442
|
+
focusRing.visible,
|
|
10443
|
+
"hover:text-neutral4",
|
|
10444
|
+
"data-[state=active]:text-neutral5 data-[state=active]:border-b-2 data-[state=active]:border-accent1",
|
|
10087
10445
|
className
|
|
10088
10446
|
),
|
|
10089
10447
|
onClick,
|
|
@@ -10096,7 +10454,7 @@ const Tab = ({ children, value, onClick, onClose, className }) => {
|
|
|
10096
10454
|
e.stopPropagation();
|
|
10097
10455
|
onClose();
|
|
10098
10456
|
},
|
|
10099
|
-
className: "p-0.5 hover:bg-
|
|
10457
|
+
className: cn("p-0.5 hover:bg-surface4 rounded", transitions.colors, "hover:text-neutral5"),
|
|
10100
10458
|
"aria-label": "Close tab",
|
|
10101
10459
|
children: /* @__PURE__ */ jsx(X, { className: "w-3 h-3" })
|
|
10102
10460
|
}
|
|
@@ -10112,7 +10470,10 @@ const TabContent = ({ children, value, className }) => {
|
|
|
10112
10470
|
{
|
|
10113
10471
|
value,
|
|
10114
10472
|
className: cn(
|
|
10115
|
-
"grid py-3 overflow-y-auto ring-offset-background
|
|
10473
|
+
"grid py-3 overflow-y-auto ring-offset-background",
|
|
10474
|
+
focusRing.visible,
|
|
10475
|
+
"data-[state=active]:animate-in data-[state=active]:fade-in-0 data-[state=active]:duration-200",
|
|
10476
|
+
"data-[state=inactive]:animate-out data-[state=inactive]:fade-out-0 data-[state=inactive]:duration-150",
|
|
10116
10477
|
className
|
|
10117
10478
|
),
|
|
10118
10479
|
children
|
|
@@ -10164,21 +10525,27 @@ const TracingRunOptions = () => {
|
|
|
10164
10525
|
] });
|
|
10165
10526
|
};
|
|
10166
10527
|
|
|
10167
|
-
|
|
10528
|
+
const sizeClasses = {
|
|
10529
|
+
sm: "w-4 h-4",
|
|
10530
|
+
md: "w-6 h-6",
|
|
10531
|
+
lg: "w-8 h-8"
|
|
10532
|
+
};
|
|
10533
|
+
function Spinner({ color, className, size = "md" }) {
|
|
10168
10534
|
return /* @__PURE__ */ jsx(
|
|
10169
10535
|
"svg",
|
|
10170
10536
|
{
|
|
10171
|
-
className: cn("animate-spin
|
|
10537
|
+
className: cn("animate-spin", sizeClasses[size], className),
|
|
10538
|
+
style: { animationDuration: "800ms", animationTimingFunction: "cubic-bezier(0.4, 0, 0.2, 1)" },
|
|
10172
10539
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10173
10540
|
width: "24",
|
|
10174
10541
|
height: "24",
|
|
10175
10542
|
viewBox: "0 0 24 24",
|
|
10176
10543
|
fill: "none",
|
|
10177
10544
|
stroke: "currentColor",
|
|
10178
|
-
strokeWidth: "2",
|
|
10545
|
+
strokeWidth: "2.5",
|
|
10179
10546
|
strokeLinecap: "round",
|
|
10180
10547
|
strokeLinejoin: "round",
|
|
10181
|
-
children: /* @__PURE__ */ jsx("path", { d: "M21 12a9 9 0 1 1-6.219-8.56", stroke: color })
|
|
10548
|
+
children: /* @__PURE__ */ jsx("path", { d: "M21 12a9 9 0 1 1-6.219-8.56", stroke: color || "currentColor", className: "text-accent1" })
|
|
10182
10549
|
}
|
|
10183
10550
|
);
|
|
10184
10551
|
}
|
|
@@ -10513,59 +10880,84 @@ function Combobox({
|
|
|
10513
10880
|
]
|
|
10514
10881
|
}
|
|
10515
10882
|
) }),
|
|
10516
|
-
/* @__PURE__ */ jsx(PopoverContent, { className: "p-0 w-fit", align: "start", children: /* @__PURE__ */ jsxs(
|
|
10517
|
-
|
|
10518
|
-
|
|
10519
|
-
|
|
10520
|
-
"
|
|
10521
|
-
|
|
10522
|
-
|
|
10523
|
-
|
|
10524
|
-
|
|
10525
|
-
|
|
10526
|
-
|
|
10527
|
-
|
|
10528
|
-
|
|
10529
|
-
"aria-autocomplete": "list",
|
|
10530
|
-
"aria-controls": "combobox-options",
|
|
10531
|
-
"aria-expanded": open
|
|
10532
|
-
}
|
|
10533
|
-
)
|
|
10534
|
-
] }),
|
|
10535
|
-
/* @__PURE__ */ jsx(
|
|
10536
|
-
"div",
|
|
10537
|
-
{
|
|
10538
|
-
ref: listRef,
|
|
10539
|
-
id: "combobox-options",
|
|
10540
|
-
role: "listbox",
|
|
10541
|
-
className: "max-h-dropdown-max-height overflow-y-auto overflow-x-hidden p-1",
|
|
10542
|
-
children: filteredOptions.length === 0 ? /* @__PURE__ */ jsx("div", { className: "py-6 text-center text-sm", children: emptyText }) : filteredOptions.map((option, index) => {
|
|
10543
|
-
const isSelected = value === option.value;
|
|
10544
|
-
const isHighlighted = index === highlightedIndex;
|
|
10545
|
-
return /* @__PURE__ */ jsxs(
|
|
10546
|
-
"div",
|
|
10883
|
+
/* @__PURE__ */ jsx(PopoverContent, { className: "p-0 w-fit", align: "start", children: /* @__PURE__ */ jsxs(
|
|
10884
|
+
"div",
|
|
10885
|
+
{
|
|
10886
|
+
className: cn(
|
|
10887
|
+
"flex h-full w-full flex-col overflow-hidden rounded-md bg-surface3 text-neutral5",
|
|
10888
|
+
"shadow-elevated",
|
|
10889
|
+
"animate-in fade-in-0 zoom-in-95 duration-150"
|
|
10890
|
+
),
|
|
10891
|
+
children: [
|
|
10892
|
+
/* @__PURE__ */ jsxs("div", { className: cn("flex items-center border-b border-border1 px-3 py-2", transitions.colors), children: [
|
|
10893
|
+
/* @__PURE__ */ jsx(Search, { className: cn("mr-2 h-4 w-4 shrink-0 text-neutral3", transitions.colors) }),
|
|
10894
|
+
/* @__PURE__ */ jsx(
|
|
10895
|
+
"input",
|
|
10547
10896
|
{
|
|
10548
|
-
|
|
10549
|
-
"aria-selected": isSelected,
|
|
10897
|
+
ref: inputRef,
|
|
10550
10898
|
className: cn(
|
|
10551
|
-
"
|
|
10552
|
-
"
|
|
10553
|
-
|
|
10554
|
-
|
|
10899
|
+
"flex h-8 w-full rounded-md bg-transparent py-1 text-sm",
|
|
10900
|
+
"placeholder:text-neutral3 disabled:cursor-not-allowed disabled:opacity-50",
|
|
10901
|
+
"outline-none",
|
|
10902
|
+
transitions.colors
|
|
10555
10903
|
),
|
|
10556
|
-
|
|
10557
|
-
|
|
10558
|
-
|
|
10559
|
-
|
|
10560
|
-
|
|
10561
|
-
|
|
10562
|
-
|
|
10563
|
-
|
|
10564
|
-
|
|
10565
|
-
|
|
10566
|
-
|
|
10567
|
-
|
|
10568
|
-
|
|
10904
|
+
placeholder: searchPlaceholder,
|
|
10905
|
+
value: search,
|
|
10906
|
+
onChange: (e) => setSearch(e.target.value),
|
|
10907
|
+
onKeyDown: handleKeyDown,
|
|
10908
|
+
role: "combobox",
|
|
10909
|
+
"aria-autocomplete": "list",
|
|
10910
|
+
"aria-controls": "combobox-options",
|
|
10911
|
+
"aria-expanded": open
|
|
10912
|
+
}
|
|
10913
|
+
)
|
|
10914
|
+
] }),
|
|
10915
|
+
/* @__PURE__ */ jsx(
|
|
10916
|
+
"div",
|
|
10917
|
+
{
|
|
10918
|
+
ref: listRef,
|
|
10919
|
+
id: "combobox-options",
|
|
10920
|
+
role: "listbox",
|
|
10921
|
+
className: "max-h-dropdown-max-height overflow-y-auto overflow-x-hidden p-1",
|
|
10922
|
+
children: filteredOptions.length === 0 ? /* @__PURE__ */ jsx("div", { className: "py-6 text-center text-sm text-neutral3", children: emptyText }) : filteredOptions.map((option, index) => {
|
|
10923
|
+
const isSelected = value === option.value;
|
|
10924
|
+
const isHighlighted = index === highlightedIndex;
|
|
10925
|
+
return /* @__PURE__ */ jsxs(
|
|
10926
|
+
"div",
|
|
10927
|
+
{
|
|
10928
|
+
role: "option",
|
|
10929
|
+
"aria-selected": isSelected,
|
|
10930
|
+
className: cn(
|
|
10931
|
+
"relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm",
|
|
10932
|
+
transitions.colors,
|
|
10933
|
+
"hover:bg-surface5 hover:text-neutral5",
|
|
10934
|
+
isHighlighted && "bg-surface5 text-neutral5",
|
|
10935
|
+
isSelected && !isHighlighted && "bg-accent1Dark text-accent1"
|
|
10936
|
+
),
|
|
10937
|
+
onClick: () => handleSelect(option.value),
|
|
10938
|
+
onMouseEnter: () => setHighlightedIndex(index),
|
|
10939
|
+
children: [
|
|
10940
|
+
/* @__PURE__ */ jsx(
|
|
10941
|
+
Check,
|
|
10942
|
+
{
|
|
10943
|
+
className: cn(
|
|
10944
|
+
"mr-2 h-4 w-4",
|
|
10945
|
+
transitions.opacity,
|
|
10946
|
+
isSelected ? "opacity-100 text-accent1" : "opacity-0"
|
|
10947
|
+
)
|
|
10948
|
+
}
|
|
10949
|
+
),
|
|
10950
|
+
option.label
|
|
10951
|
+
]
|
|
10952
|
+
},
|
|
10953
|
+
option.value
|
|
10954
|
+
);
|
|
10955
|
+
})
|
|
10956
|
+
}
|
|
10957
|
+
)
|
|
10958
|
+
]
|
|
10959
|
+
}
|
|
10960
|
+
) })
|
|
10569
10961
|
] });
|
|
10570
10962
|
}
|
|
10571
10963
|
|
|
@@ -10831,7 +11223,8 @@ const WorkflowBadge = ({
|
|
|
10831
11223
|
toolCallId,
|
|
10832
11224
|
toolApprovalMetadata,
|
|
10833
11225
|
toolName,
|
|
10834
|
-
isNetwork
|
|
11226
|
+
isNetwork,
|
|
11227
|
+
isGenerateMode: metadata?.mode === "generate"
|
|
10835
11228
|
}
|
|
10836
11229
|
)
|
|
10837
11230
|
]
|
|
@@ -10935,7 +11328,8 @@ const AgentBadge = ({
|
|
|
10935
11328
|
toolCallId,
|
|
10936
11329
|
toolApprovalMetadata,
|
|
10937
11330
|
toolName,
|
|
10938
|
-
isNetwork
|
|
11331
|
+
isNetwork,
|
|
11332
|
+
isGenerateMode: metadata?.mode === "generate"
|
|
10939
11333
|
}
|
|
10940
11334
|
)
|
|
10941
11335
|
]
|
|
@@ -11003,8 +11397,8 @@ const ToolFallbackInner = ({ toolName, result, args, metadata, toolCallId, ...pr
|
|
|
11003
11397
|
const isNetwork = metadata?.mode === "network";
|
|
11004
11398
|
const agentToolName = toolName.startsWith("agent-") ? toolName.substring("agent-".length) : toolName;
|
|
11005
11399
|
const workflowToolName = toolName.startsWith("workflow-") ? toolName.substring("workflow-".length) : toolName;
|
|
11006
|
-
const requireApprovalMetadata = (metadata?.mode === "stream" || metadata?.mode === "network") && metadata?.requireApprovalMetadata;
|
|
11007
|
-
const suspendedTools = (metadata?.mode === "stream" || metadata?.mode === "network") && metadata?.suspendedTools;
|
|
11400
|
+
const requireApprovalMetadata = (metadata?.mode === "stream" || metadata?.mode === "network" || metadata?.mode === "generate") && metadata?.requireApprovalMetadata;
|
|
11401
|
+
const suspendedTools = (metadata?.mode === "stream" || metadata?.mode === "network" || metadata?.mode === "generate") && metadata?.suspendedTools;
|
|
11008
11402
|
const toolApprovalMetadata = requireApprovalMetadata ? requireApprovalMetadata?.[toolName] ?? requireApprovalMetadata?.[toolCallId] : void 0;
|
|
11009
11403
|
const suspendedToolMetadata = suspendedTools ? suspendedTools?.[toolName] : void 0;
|
|
11010
11404
|
const toolCalled = metadata?.mode === "network" && metadata?.hasMoreMessages ? true : void 0;
|
|
@@ -12750,6 +13144,8 @@ function MastraRuntimeProvider({
|
|
|
12750
13144
|
setMessages,
|
|
12751
13145
|
approveToolCall,
|
|
12752
13146
|
declineToolCall,
|
|
13147
|
+
approveToolCallGenerate,
|
|
13148
|
+
declineToolCallGenerate,
|
|
12753
13149
|
toolCallApprovals,
|
|
12754
13150
|
approveNetworkToolCall,
|
|
12755
13151
|
declineNetworkToolCall,
|
|
@@ -13201,6 +13597,8 @@ function MastraRuntimeProvider({
|
|
|
13201
13597
|
{
|
|
13202
13598
|
approveToolcall: approveToolCall,
|
|
13203
13599
|
declineToolcall: declineToolCall,
|
|
13600
|
+
approveToolcallGenerate: approveToolCallGenerate,
|
|
13601
|
+
declineToolcallGenerate: declineToolCallGenerate,
|
|
13204
13602
|
isRunning: isRunningStream,
|
|
13205
13603
|
toolCallApprovals,
|
|
13206
13604
|
approveNetworkToolcall: approveNetworkToolCall,
|
|
@@ -13804,7 +14202,7 @@ const AgentSettings = ({ agentId }) => {
|
|
|
13804
14202
|
] });
|
|
13805
14203
|
};
|
|
13806
14204
|
|
|
13807
|
-
const NameCell$
|
|
14205
|
+
const NameCell$4 = ({ row }) => {
|
|
13808
14206
|
const { Link, paths } = useLinkComponent();
|
|
13809
14207
|
return /* @__PURE__ */ jsx(
|
|
13810
14208
|
EntryCell,
|
|
@@ -13814,11 +14212,11 @@ const NameCell$3 = ({ row }) => {
|
|
|
13814
14212
|
}
|
|
13815
14213
|
);
|
|
13816
14214
|
};
|
|
13817
|
-
const columns$
|
|
14215
|
+
const columns$4 = [
|
|
13818
14216
|
{
|
|
13819
14217
|
header: "Name",
|
|
13820
14218
|
accessorKey: "name",
|
|
13821
|
-
cell: NameCell$
|
|
14219
|
+
cell: NameCell$4
|
|
13822
14220
|
},
|
|
13823
14221
|
{
|
|
13824
14222
|
header: "Model",
|
|
@@ -13860,7 +14258,9 @@ const columns$3 = [
|
|
|
13860
14258
|
const agentsCount = Object.keys(agent.agents || {}).length;
|
|
13861
14259
|
const toolsCount = Object.keys(agent.tools || {}).length;
|
|
13862
14260
|
const workflowsCount = Object.keys(agent.workflows || {}).length;
|
|
13863
|
-
|
|
14261
|
+
const inputProcessorsCount = (agent.inputProcessors || []).length;
|
|
14262
|
+
const outputProcessorsCount = (agent.outputProcessors || []).length;
|
|
14263
|
+
return /* @__PURE__ */ jsx(Cell, { children: /* @__PURE__ */ jsxs("span", { className: "flex flex-row gap-2 w-full items-center flex-wrap", children: [
|
|
13864
14264
|
/* @__PURE__ */ jsxs(Badge, { variant: "default", icon: /* @__PURE__ */ jsx(AgentIcon, { className: "text-accent1" }), children: [
|
|
13865
14265
|
agentsCount,
|
|
13866
14266
|
" agent",
|
|
@@ -13875,6 +14275,22 @@ const columns$3 = [
|
|
|
13875
14275
|
workflowsCount,
|
|
13876
14276
|
" workflow",
|
|
13877
14277
|
workflowsCount > 1 ? "s" : ""
|
|
14278
|
+
] }),
|
|
14279
|
+
(inputProcessorsCount > 0 || outputProcessorsCount > 0) && /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
14280
|
+
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(Badge, { variant: "default", icon: /* @__PURE__ */ jsx(ProcessorIcon, { className: "text-accent4" }) }) }),
|
|
14281
|
+
/* @__PURE__ */ jsxs(TooltipContent, { className: "flex flex-col gap-1", children: [
|
|
14282
|
+
/* @__PURE__ */ jsx(
|
|
14283
|
+
"a",
|
|
14284
|
+
{
|
|
14285
|
+
href: "https://mastra.ai/docs/agents/processors",
|
|
14286
|
+
target: "_blank",
|
|
14287
|
+
rel: "noopener noreferrer",
|
|
14288
|
+
className: "text-accent1 hover:underline",
|
|
14289
|
+
children: "Processors"
|
|
14290
|
+
}
|
|
14291
|
+
),
|
|
14292
|
+
/* @__PURE__ */ jsx("span", { className: "text-icon3", children: [inputProcessorsCount > 0 && "input", outputProcessorsCount > 0 && "output"].filter(Boolean).join(", ") })
|
|
14293
|
+
] })
|
|
13878
14294
|
] })
|
|
13879
14295
|
] }) });
|
|
13880
14296
|
}
|
|
@@ -13887,7 +14303,7 @@ function AgentsTable({ agents, isLoading }) {
|
|
|
13887
14303
|
const projectData = useMemo(() => Object.values(agents), [agents]);
|
|
13888
14304
|
const table = useReactTable({
|
|
13889
14305
|
data: projectData,
|
|
13890
|
-
columns: columns$
|
|
14306
|
+
columns: columns$4,
|
|
13891
14307
|
getCoreRowModel: getCoreRowModel()
|
|
13892
14308
|
});
|
|
13893
14309
|
const ths = table.getHeaderGroups()[0];
|
|
@@ -14087,22 +14503,19 @@ function EntryListEntry({ entry, isSelected, onClick, children, columns }) {
|
|
|
14087
14503
|
className: cn(
|
|
14088
14504
|
"border-t text-neutral5 border-border1 last:border-b-0 text-ui-md",
|
|
14089
14505
|
"[&:last-child>button]:rounded-b-lg",
|
|
14506
|
+
transitions.colors,
|
|
14090
14507
|
{
|
|
14091
|
-
"bg-
|
|
14508
|
+
"bg-accent1Dark": isSelected
|
|
14092
14509
|
}
|
|
14093
14510
|
),
|
|
14094
14511
|
children: /* @__PURE__ */ jsx(
|
|
14095
14512
|
"button",
|
|
14096
14513
|
{
|
|
14097
14514
|
onClick: handleClick,
|
|
14098
|
-
className: cn(
|
|
14099
|
-
|
|
14100
|
-
"
|
|
14101
|
-
|
|
14102
|
-
// hover effect only not for skeleton and selected
|
|
14103
|
-
"hover:bg-surface4": entry && !isSelected
|
|
14104
|
-
}
|
|
14105
|
-
),
|
|
14515
|
+
className: cn("grid w-full px-6 gap-6 text-left items-center min-h-12", transitions.colors, focusRing.visible, {
|
|
14516
|
+
// hover effect only not for skeleton and selected
|
|
14517
|
+
"hover:bg-surface4": entry && !isSelected
|
|
14518
|
+
}),
|
|
14106
14519
|
style: { gridTemplateColumns: getColumnTemplate(columns) },
|
|
14107
14520
|
disabled: !entry,
|
|
14108
14521
|
children
|
|
@@ -14346,18 +14759,28 @@ function SideDialogRoot({
|
|
|
14346
14759
|
}) {
|
|
14347
14760
|
const isConfirmation = variant === "confirmation";
|
|
14348
14761
|
return /* @__PURE__ */ jsx(DialogPrimitive.Root, { open: isOpen, onOpenChange: onClose, children: /* @__PURE__ */ jsxs(DialogPrimitive.Portal, { children: [
|
|
14349
|
-
!isConfirmation && /* @__PURE__ */ jsx(
|
|
14762
|
+
!isConfirmation && /* @__PURE__ */ jsx(
|
|
14763
|
+
DialogPrimitive.Overlay,
|
|
14764
|
+
{
|
|
14765
|
+
className: cn(
|
|
14766
|
+
"bg-overlay backdrop-blur-sm top-0 bottom-0 right-0 left-0 fixed z-50",
|
|
14767
|
+
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:duration-200",
|
|
14768
|
+
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:duration-150"
|
|
14769
|
+
)
|
|
14770
|
+
}
|
|
14771
|
+
),
|
|
14350
14772
|
/* @__PURE__ */ jsxs(
|
|
14351
14773
|
DialogPrimitive.Content,
|
|
14352
14774
|
{
|
|
14353
14775
|
className: cn(
|
|
14354
|
-
"fixed top-0 bottom-0 right-0 border-l border-border2 z-50 bg-surface2
|
|
14776
|
+
"fixed top-0 bottom-0 right-0 border-l border-border2 z-50 bg-surface2",
|
|
14777
|
+
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-right-1/4 data-[state=closed]:duration-200",
|
|
14355
14778
|
{
|
|
14356
14779
|
"w-[75vw] 2xl:w-[65vw] 4xl:w-[55vw]": level === 1,
|
|
14357
14780
|
"w-[70vw] 2xl:w-[59vw] 4xl:w-[48vw]": level === 2,
|
|
14358
14781
|
"w-[65vw] 2xl:w-[53vw] 4xl:w-[41vw]": level === 3,
|
|
14359
|
-
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:slide-in-from-right-1/4
|
|
14360
|
-
"bg-surface2/70": isConfirmation
|
|
14782
|
+
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:slide-in-from-right-1/4 data-[state=open]:duration-300 shadow-dialog": !isConfirmation,
|
|
14783
|
+
"bg-surface2/70 backdrop-blur-sm": isConfirmation
|
|
14361
14784
|
},
|
|
14362
14785
|
className
|
|
14363
14786
|
),
|
|
@@ -14370,8 +14793,9 @@ function SideDialogRoot({
|
|
|
14370
14793
|
"button",
|
|
14371
14794
|
{
|
|
14372
14795
|
className: cn(
|
|
14373
|
-
"flex appearance-none items-center justify-center rounded-bl-lg h-[3.5rem] w-[3.5rem] absolute top-0 left-[-3.5rem] bg-surface2 text-
|
|
14374
|
-
|
|
14796
|
+
"flex appearance-none items-center justify-center rounded-bl-lg h-[3.5rem] w-[3.5rem] absolute top-0 left-[-3.5rem] bg-surface2 text-neutral3 border-l border-b border-border2",
|
|
14797
|
+
transitions.all,
|
|
14798
|
+
"hover:bg-surface4 hover:text-neutral5"
|
|
14375
14799
|
),
|
|
14376
14800
|
"aria-label": "Close",
|
|
14377
14801
|
children: /* @__PURE__ */ jsx(ChevronsRightIcon, {})
|
|
@@ -14925,7 +15349,7 @@ function ScorerCombobox({
|
|
|
14925
15349
|
);
|
|
14926
15350
|
}
|
|
14927
15351
|
|
|
14928
|
-
const NameCell$
|
|
15352
|
+
const NameCell$3 = ({ row }) => {
|
|
14929
15353
|
const { Link, paths } = useLinkComponent();
|
|
14930
15354
|
const scorer = row.original;
|
|
14931
15355
|
return /* @__PURE__ */ jsx(
|
|
@@ -14936,11 +15360,11 @@ const NameCell$2 = ({ row }) => {
|
|
|
14936
15360
|
}
|
|
14937
15361
|
);
|
|
14938
15362
|
};
|
|
14939
|
-
const columns$
|
|
15363
|
+
const columns$3 = [
|
|
14940
15364
|
{
|
|
14941
15365
|
header: "Name",
|
|
14942
15366
|
accessorKey: "name",
|
|
14943
|
-
cell: NameCell$
|
|
15367
|
+
cell: NameCell$3
|
|
14944
15368
|
}
|
|
14945
15369
|
];
|
|
14946
15370
|
|
|
@@ -14959,7 +15383,7 @@ function ScorersTable({ scorers, isLoading }) {
|
|
|
14959
15383
|
);
|
|
14960
15384
|
const table = useReactTable({
|
|
14961
15385
|
data: scorersData,
|
|
14962
|
-
columns: columns$
|
|
15386
|
+
columns: columns$3,
|
|
14963
15387
|
getCoreRowModel: getCoreRowModel()
|
|
14964
15388
|
});
|
|
14965
15389
|
const ths = table.getHeaderGroups()[0];
|
|
@@ -15596,7 +16020,13 @@ const Switch = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
15596
16020
|
SwitchPrimitives.Root,
|
|
15597
16021
|
{
|
|
15598
16022
|
className: cn(
|
|
15599
|
-
"peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent
|
|
16023
|
+
"peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent",
|
|
16024
|
+
transitions.all,
|
|
16025
|
+
formElementFocus,
|
|
16026
|
+
"hover:brightness-110",
|
|
16027
|
+
"disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:brightness-100",
|
|
16028
|
+
"data-[state=checked]:bg-accent1 data-[state=checked]:shadow-glow-accent1",
|
|
16029
|
+
"data-[state=unchecked]:bg-neutral2",
|
|
15600
16030
|
className
|
|
15601
16031
|
),
|
|
15602
16032
|
...props,
|
|
@@ -15605,7 +16035,10 @@ const Switch = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
15605
16035
|
SwitchPrimitives.Thumb,
|
|
15606
16036
|
{
|
|
15607
16037
|
className: cn(
|
|
15608
|
-
"pointer-events-none block h-4 w-4 rounded-full bg-white shadow-
|
|
16038
|
+
"pointer-events-none block h-4 w-4 rounded-full bg-white shadow-md",
|
|
16039
|
+
"transition-all duration-normal ease-out-custom",
|
|
16040
|
+
"data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0",
|
|
16041
|
+
"data-[state=checked]:shadow-lg"
|
|
15609
16042
|
)
|
|
15610
16043
|
}
|
|
15611
16044
|
)
|
|
@@ -15890,6 +16323,8 @@ const AgentMetadata = ({ agentId }) => {
|
|
|
15890
16323
|
const tools = Object.keys(agentTools).map((key) => agentTools[key]);
|
|
15891
16324
|
const agentWorkflows = agent.workflows ?? {};
|
|
15892
16325
|
const workflows = Object.keys(agentWorkflows).map((key) => ({ id: key, ...agentWorkflows[key] }));
|
|
16326
|
+
const inputProcessors = agent.inputProcessors ?? [];
|
|
16327
|
+
const outputProcessors = agent.outputProcessors ?? [];
|
|
15893
16328
|
return /* @__PURE__ */ jsxs(AgentMetadataWrapper, { children: [
|
|
15894
16329
|
agent?.description && /* @__PURE__ */ jsx(AgentMetadataSection, { title: "Description", children: /* @__PURE__ */ jsx("p", { className: "text-sm text-neutral6", children: agent.description }) }),
|
|
15895
16330
|
agent.modelList ? /* @__PURE__ */ jsx(AgentMetadataSection, { title: "Models", children: /* @__PURE__ */ jsx(
|
|
@@ -15983,6 +16418,17 @@ const AgentMetadata = ({ agentId }) => {
|
|
|
15983
16418
|
children: /* @__PURE__ */ jsx(AgentMetadataWorkflowList, { workflows })
|
|
15984
16419
|
}
|
|
15985
16420
|
),
|
|
16421
|
+
(inputProcessors.length > 0 || outputProcessors.length > 0) && /* @__PURE__ */ jsx(
|
|
16422
|
+
AgentMetadataSection,
|
|
16423
|
+
{
|
|
16424
|
+
title: "Processors",
|
|
16425
|
+
hint: {
|
|
16426
|
+
link: "https://mastra.ai/docs/agents/processors",
|
|
16427
|
+
title: "Processors documentation"
|
|
16428
|
+
},
|
|
16429
|
+
children: /* @__PURE__ */ jsx(AgentMetadataCombinedProcessorList, { inputProcessors, outputProcessors })
|
|
16430
|
+
}
|
|
16431
|
+
),
|
|
15986
16432
|
/* @__PURE__ */ jsx(AgentMetadataSection, { title: "Scorers", children: /* @__PURE__ */ jsx(AgentMetadataScorerList, { entityId: agent.name, entityType: "AGENT" }) }),
|
|
15987
16433
|
/* @__PURE__ */ jsx(AgentMetadataSection, { title: "System Prompt", children: /* @__PURE__ */ jsx(PromptEnhancer, { agentId }) })
|
|
15988
16434
|
] });
|
|
@@ -16019,6 +16465,21 @@ const AgentMetadataScorerList = ({ entityId, entityType }) => {
|
|
|
16019
16465
|
}
|
|
16020
16466
|
return /* @__PURE__ */ jsx(AgentMetadataList, { children: scorerList.map((scorer) => /* @__PURE__ */ jsx(AgentMetadataListItem, { children: /* @__PURE__ */ jsx(Link, { href: paths.scorerLink(scorer.id), "data-testid": "scorer-badge", children: /* @__PURE__ */ jsx(Badge, { icon: /* @__PURE__ */ jsx(GaugeIcon, { className: "text-neutral3" }), children: scorer.scorer.config.name }) }) }, scorer.id)) });
|
|
16021
16467
|
};
|
|
16468
|
+
const AgentMetadataCombinedProcessorList = ({
|
|
16469
|
+
inputProcessors,
|
|
16470
|
+
outputProcessors
|
|
16471
|
+
}) => {
|
|
16472
|
+
const { Link, paths } = useLinkComponent();
|
|
16473
|
+
if (inputProcessors.length === 0 && outputProcessors.length === 0) {
|
|
16474
|
+
return /* @__PURE__ */ jsx(AgentMetadataListEmpty, { children: "No processors" });
|
|
16475
|
+
}
|
|
16476
|
+
const inputProcessorId = inputProcessors[0]?.id;
|
|
16477
|
+
const outputProcessorId = outputProcessors[0]?.id;
|
|
16478
|
+
return /* @__PURE__ */ jsxs(AgentMetadataList, { children: [
|
|
16479
|
+
inputProcessors.length > 0 && inputProcessorId && /* @__PURE__ */ jsx(AgentMetadataListItem, { children: /* @__PURE__ */ jsx(Link, { href: `${paths.workflowLink(inputProcessorId)}/graph`, "data-testid": "processor-badge", children: /* @__PURE__ */ jsx(Badge, { icon: /* @__PURE__ */ jsx(ProcessorIcon, { className: "text-accent4" }), children: "input" }) }) }),
|
|
16480
|
+
outputProcessors.length > 0 && outputProcessorId && /* @__PURE__ */ jsx(AgentMetadataListItem, { children: /* @__PURE__ */ jsx(Link, { href: `${paths.workflowLink(outputProcessorId)}/graph`, "data-testid": "processor-badge", children: /* @__PURE__ */ jsx(Badge, { icon: /* @__PURE__ */ jsx(ProcessorIcon, { className: "text-accent5" }), children: "output" }) }) })
|
|
16481
|
+
] });
|
|
16482
|
+
};
|
|
16022
16483
|
|
|
16023
16484
|
const AgentEntityHeader = ({ agentId }) => {
|
|
16024
16485
|
const { data: agent, isLoading } = useAgent(agentId);
|
|
@@ -16040,7 +16501,11 @@ const ThreadLink = ({ children, as: Component = "a", href, className, prefetch,
|
|
|
16040
16501
|
href,
|
|
16041
16502
|
prefetch,
|
|
16042
16503
|
to,
|
|
16043
|
-
className: cn(
|
|
16504
|
+
className: cn(
|
|
16505
|
+
"text-ui-sm flex h-full w-full flex-col justify-center font-medium cursor-pointer",
|
|
16506
|
+
transitions.colors,
|
|
16507
|
+
className
|
|
16508
|
+
),
|
|
16044
16509
|
children
|
|
16045
16510
|
}
|
|
16046
16511
|
);
|
|
@@ -16053,8 +16518,10 @@ const ThreadItem = ({ children, isActive, className }) => {
|
|
|
16053
16518
|
"li",
|
|
16054
16519
|
{
|
|
16055
16520
|
className: cn(
|
|
16056
|
-
"border-b border-border1
|
|
16057
|
-
|
|
16521
|
+
"border-b border-border1 group flex h-[54px] items-center justify-between gap-2 px-3 py-2",
|
|
16522
|
+
transitions.colors,
|
|
16523
|
+
"hover:bg-surface3",
|
|
16524
|
+
isActive && "bg-accent1Dark",
|
|
16058
16525
|
className
|
|
16059
16526
|
),
|
|
16060
16527
|
children
|
|
@@ -16065,9 +16532,15 @@ const ThreadDeleteButton = ({ onClick }) => {
|
|
|
16065
16532
|
return /* @__PURE__ */ jsx(
|
|
16066
16533
|
Button,
|
|
16067
16534
|
{
|
|
16068
|
-
|
|
16535
|
+
variant: "ghost",
|
|
16536
|
+
className: cn(
|
|
16537
|
+
"shrink-0 opacity-0",
|
|
16538
|
+
transitions.all,
|
|
16539
|
+
"group-focus-within:opacity-100 group-hover:opacity-100",
|
|
16540
|
+
"hover:bg-surface4 hover:text-accent2"
|
|
16541
|
+
),
|
|
16069
16542
|
onClick,
|
|
16070
|
-
children: /* @__PURE__ */ jsx(Icon, { children: /* @__PURE__ */ jsx(X, { "aria-label": "delete thread", className: "text-neutral3" }) })
|
|
16543
|
+
children: /* @__PURE__ */ jsx(Icon, { children: /* @__PURE__ */ jsx(X, { "aria-label": "delete thread", className: "text-neutral3 hover:text-accent2 transition-colors" }) })
|
|
16071
16544
|
}
|
|
16072
16545
|
);
|
|
16073
16546
|
};
|
|
@@ -16086,7 +16559,9 @@ const AlertDialogOverlay = React.forwardRef(({ className, ...props }, ref) => /*
|
|
|
16086
16559
|
AlertDialogPrimitive.Overlay,
|
|
16087
16560
|
{
|
|
16088
16561
|
className: cn(
|
|
16089
|
-
"fixed inset-0 z-50 bg-
|
|
16562
|
+
"fixed inset-0 z-50 bg-overlay backdrop-blur-sm",
|
|
16563
|
+
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:duration-200",
|
|
16564
|
+
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:duration-150",
|
|
16090
16565
|
className
|
|
16091
16566
|
),
|
|
16092
16567
|
...props,
|
|
@@ -16101,7 +16576,9 @@ const AlertDialogContent = React.forwardRef(({ className, ...props }, ref) => /*
|
|
|
16101
16576
|
{
|
|
16102
16577
|
ref,
|
|
16103
16578
|
className: cn(
|
|
16104
|
-
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-border1 bg-surface3 p-6 shadow-
|
|
16579
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-border1 bg-surface3 p-6 shadow-dialog rounded-md",
|
|
16580
|
+
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] data-[state=open]:duration-200",
|
|
16581
|
+
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=closed]:duration-150",
|
|
16105
16582
|
className
|
|
16106
16583
|
),
|
|
16107
16584
|
...props
|
|
@@ -17202,6 +17679,320 @@ const AgentLayout = ({ agentId, children, leftSlot, rightSlot }) => {
|
|
|
17202
17679
|
] });
|
|
17203
17680
|
};
|
|
17204
17681
|
|
|
17682
|
+
const NameCell$2 = ({ row }) => {
|
|
17683
|
+
const { Link, paths } = useLinkComponent();
|
|
17684
|
+
const processor = row.original;
|
|
17685
|
+
return /* @__PURE__ */ jsx(
|
|
17686
|
+
EntryCell,
|
|
17687
|
+
{
|
|
17688
|
+
name: /* @__PURE__ */ jsx(Link, { className: "w-full space-y-0", href: paths.processorLink(processor.id), children: processor.name || processor.id }),
|
|
17689
|
+
description: processor.description
|
|
17690
|
+
}
|
|
17691
|
+
);
|
|
17692
|
+
};
|
|
17693
|
+
const PhasesCell = ({ row }) => {
|
|
17694
|
+
const processor = row.original;
|
|
17695
|
+
const phases = processor.phases || [];
|
|
17696
|
+
const phaseLabels = {
|
|
17697
|
+
input: "Input",
|
|
17698
|
+
inputStep: "Input Step",
|
|
17699
|
+
outputStream: "Output Stream",
|
|
17700
|
+
outputResult: "Output Result",
|
|
17701
|
+
outputStep: "Output Step"
|
|
17702
|
+
};
|
|
17703
|
+
return /* @__PURE__ */ jsx(Cell, { children: /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: phases.map((phase) => /* @__PURE__ */ jsx(Badge, { variant: "default", children: phaseLabels[phase] || phase }, phase)) }) });
|
|
17704
|
+
};
|
|
17705
|
+
const AgentsCell = ({ row }) => {
|
|
17706
|
+
const processor = row.original;
|
|
17707
|
+
const agentsCount = processor.agentIds?.length || 0;
|
|
17708
|
+
return /* @__PURE__ */ jsx(Cell, { children: /* @__PURE__ */ jsxs(Badge, { variant: "default", icon: /* @__PURE__ */ jsx(AgentIcon, { className: "text-accent1" }), children: [
|
|
17709
|
+
agentsCount,
|
|
17710
|
+
" agent",
|
|
17711
|
+
agentsCount !== 1 ? "s" : ""
|
|
17712
|
+
] }) });
|
|
17713
|
+
};
|
|
17714
|
+
const columns$2 = [
|
|
17715
|
+
{
|
|
17716
|
+
header: "Name",
|
|
17717
|
+
accessorKey: "name",
|
|
17718
|
+
cell: NameCell$2
|
|
17719
|
+
},
|
|
17720
|
+
{
|
|
17721
|
+
header: "Phases",
|
|
17722
|
+
accessorKey: "phases",
|
|
17723
|
+
cell: PhasesCell
|
|
17724
|
+
},
|
|
17725
|
+
{
|
|
17726
|
+
header: "Used by",
|
|
17727
|
+
accessorKey: "agentIds",
|
|
17728
|
+
cell: AgentsCell
|
|
17729
|
+
}
|
|
17730
|
+
];
|
|
17731
|
+
|
|
17732
|
+
function ProcessorTable({ processors, isLoading }) {
|
|
17733
|
+
const [search, setSearch] = useState("");
|
|
17734
|
+
const { navigate, paths } = useLinkComponent();
|
|
17735
|
+
const processorData = useMemo(() => {
|
|
17736
|
+
return Object.values(processors ?? {}).filter((p) => p.phases && p.phases.length > 0);
|
|
17737
|
+
}, [processors]);
|
|
17738
|
+
const table = useReactTable({
|
|
17739
|
+
data: processorData,
|
|
17740
|
+
columns: columns$2,
|
|
17741
|
+
getCoreRowModel: getCoreRowModel()
|
|
17742
|
+
});
|
|
17743
|
+
const ths = table.getHeaderGroups()[0];
|
|
17744
|
+
const rows = table.getRowModel().rows.concat();
|
|
17745
|
+
if (rows.length === 0 && !isLoading) {
|
|
17746
|
+
return /* @__PURE__ */ jsx(EmptyProcessorsTable, {});
|
|
17747
|
+
}
|
|
17748
|
+
const filteredRows = rows.filter((row) => {
|
|
17749
|
+
const id = row.original.id.toLowerCase();
|
|
17750
|
+
const name = (row.original.name || "").toLowerCase();
|
|
17751
|
+
const searchLower = search.toLowerCase();
|
|
17752
|
+
return id.includes(searchLower) || name.includes(searchLower);
|
|
17753
|
+
});
|
|
17754
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
17755
|
+
/* @__PURE__ */ jsx(SearchbarWrapper, { children: /* @__PURE__ */ jsx(Searchbar, { onSearch: setSearch, label: "Search processors", placeholder: "Search processors" }) }),
|
|
17756
|
+
isLoading ? /* @__PURE__ */ jsx(ProcessorTableSkeleton, {}) : /* @__PURE__ */ jsx(ScrollableContainer, { children: /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsxs(Table, { children: [
|
|
17757
|
+
/* @__PURE__ */ jsx(Thead, { className: "sticky top-0", children: ths.headers.map((header) => /* @__PURE__ */ jsx(Th, { style: { width: header.column.getSize() ?? "auto" }, children: flexRender(header.column.columnDef.header, header.getContext()) }, header.id)) }),
|
|
17758
|
+
/* @__PURE__ */ jsx(Tbody, { children: filteredRows.map((row) => {
|
|
17759
|
+
return /* @__PURE__ */ jsx(
|
|
17760
|
+
Row,
|
|
17761
|
+
{
|
|
17762
|
+
onClick: () => {
|
|
17763
|
+
if (row.original.isWorkflow) {
|
|
17764
|
+
navigate(paths.workflowLink(row.original.id) + "/graph");
|
|
17765
|
+
} else {
|
|
17766
|
+
navigate(paths.processorLink(row.original.id));
|
|
17767
|
+
}
|
|
17768
|
+
},
|
|
17769
|
+
children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx(React__default.Fragment, { children: flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id))
|
|
17770
|
+
},
|
|
17771
|
+
row.id
|
|
17772
|
+
);
|
|
17773
|
+
}) })
|
|
17774
|
+
] }) }) })
|
|
17775
|
+
] });
|
|
17776
|
+
}
|
|
17777
|
+
const ProcessorTableSkeleton = () => /* @__PURE__ */ jsxs(Table, { children: [
|
|
17778
|
+
/* @__PURE__ */ jsxs(Thead, { children: [
|
|
17779
|
+
/* @__PURE__ */ jsx(Th, { children: "Name" }),
|
|
17780
|
+
/* @__PURE__ */ jsx(Th, { children: "Phases" }),
|
|
17781
|
+
/* @__PURE__ */ jsx(Th, { children: "Used by" })
|
|
17782
|
+
] }),
|
|
17783
|
+
/* @__PURE__ */ jsx(Tbody, { children: Array.from({ length: 3 }).map((_, index) => /* @__PURE__ */ jsxs(Row, { children: [
|
|
17784
|
+
/* @__PURE__ */ jsx(Cell, { children: /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-1/2" }) }),
|
|
17785
|
+
/* @__PURE__ */ jsx(Cell, { children: /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-1/2" }) }),
|
|
17786
|
+
/* @__PURE__ */ jsx(Cell, { children: /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-1/2" }) })
|
|
17787
|
+
] }, index)) })
|
|
17788
|
+
] });
|
|
17789
|
+
const EmptyProcessorsTable = () => /* @__PURE__ */ jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ jsx(
|
|
17790
|
+
EmptyState,
|
|
17791
|
+
{
|
|
17792
|
+
iconSlot: /* @__PURE__ */ jsx(Cpu, {}),
|
|
17793
|
+
titleSlot: "Configure Processors",
|
|
17794
|
+
descriptionSlot: "No processors are configured yet. Add input or output processors to your agents to transform messages.",
|
|
17795
|
+
actionSlot: /* @__PURE__ */ jsxs(
|
|
17796
|
+
Button,
|
|
17797
|
+
{
|
|
17798
|
+
size: "lg",
|
|
17799
|
+
className: "w-full",
|
|
17800
|
+
variant: "light",
|
|
17801
|
+
as: "a",
|
|
17802
|
+
href: "https://mastra.ai/en/docs/processors",
|
|
17803
|
+
target: "_blank",
|
|
17804
|
+
children: [
|
|
17805
|
+
/* @__PURE__ */ jsx(Icon, { children: /* @__PURE__ */ jsx(Cpu, {}) }),
|
|
17806
|
+
"Docs"
|
|
17807
|
+
]
|
|
17808
|
+
}
|
|
17809
|
+
)
|
|
17810
|
+
}
|
|
17811
|
+
) });
|
|
17812
|
+
|
|
17813
|
+
const useProcessors = () => {
|
|
17814
|
+
const { requestContext } = usePlaygroundStore();
|
|
17815
|
+
const client = useMastraClient();
|
|
17816
|
+
return useQuery({
|
|
17817
|
+
queryKey: ["processors"],
|
|
17818
|
+
queryFn: () => client.listProcessors(requestContext)
|
|
17819
|
+
});
|
|
17820
|
+
};
|
|
17821
|
+
const useProcessor = (processorId, options) => {
|
|
17822
|
+
const client = useMastraClient();
|
|
17823
|
+
const { requestContext } = usePlaygroundStore();
|
|
17824
|
+
return useQuery({
|
|
17825
|
+
queryKey: ["processor", processorId],
|
|
17826
|
+
queryFn: () => client.getProcessor(processorId).details(requestContext),
|
|
17827
|
+
enabled: options?.enabled !== false && !!processorId
|
|
17828
|
+
});
|
|
17829
|
+
};
|
|
17830
|
+
const useExecuteProcessor = () => {
|
|
17831
|
+
const client = useMastraClient();
|
|
17832
|
+
const { requestContext } = usePlaygroundStore();
|
|
17833
|
+
return useMutation({
|
|
17834
|
+
mutationFn: async ({
|
|
17835
|
+
processorId,
|
|
17836
|
+
phase,
|
|
17837
|
+
messages,
|
|
17838
|
+
agentId
|
|
17839
|
+
}) => {
|
|
17840
|
+
return client.getProcessor(processorId).execute({
|
|
17841
|
+
phase,
|
|
17842
|
+
messages,
|
|
17843
|
+
agentId,
|
|
17844
|
+
requestContext
|
|
17845
|
+
});
|
|
17846
|
+
}
|
|
17847
|
+
});
|
|
17848
|
+
};
|
|
17849
|
+
|
|
17850
|
+
const PHASE_LABELS = {
|
|
17851
|
+
input: "Input - Process input messages before LLM (once at start)",
|
|
17852
|
+
inputStep: "Input Step - Process at each agentic loop step",
|
|
17853
|
+
outputStream: "Output Stream - Process streaming chunks",
|
|
17854
|
+
outputResult: "Output Result - Process complete output after streaming",
|
|
17855
|
+
outputStep: "Output Step - Process after each LLM response (before tools)"
|
|
17856
|
+
};
|
|
17857
|
+
function ProcessorPanel({ processorId }) {
|
|
17858
|
+
const { data: processor, isLoading, error } = useProcessor(processorId);
|
|
17859
|
+
useEffect(() => {
|
|
17860
|
+
if (error) {
|
|
17861
|
+
const errorMessage = error instanceof Error ? error.message : "Failed to load processor";
|
|
17862
|
+
toast.error(`Error loading processor: ${errorMessage}`);
|
|
17863
|
+
}
|
|
17864
|
+
}, [error]);
|
|
17865
|
+
if (isLoading) {
|
|
17866
|
+
return /* @__PURE__ */ jsxs("div", { className: "p-6", children: [
|
|
17867
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-8 w-48 mb-4" }),
|
|
17868
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-32 w-full" })
|
|
17869
|
+
] });
|
|
17870
|
+
}
|
|
17871
|
+
if (error) return null;
|
|
17872
|
+
if (!processor)
|
|
17873
|
+
return /* @__PURE__ */ jsx("div", { className: "py-12 text-center px-6", children: /* @__PURE__ */ jsx(Txt, { variant: "header-md", className: "text-neutral3", children: "Processor not found" }) });
|
|
17874
|
+
return /* @__PURE__ */ jsx(ProcessorDetailPanel, { processor });
|
|
17875
|
+
}
|
|
17876
|
+
function ProcessorDetailPanel({ processor }) {
|
|
17877
|
+
const theme = useCodemirrorTheme$1();
|
|
17878
|
+
const formId = useId();
|
|
17879
|
+
const [selectedPhase, setSelectedPhase] = useState(processor.phases[0] || "input");
|
|
17880
|
+
const [selectedAgentId, setSelectedAgentId] = useState(processor.configurations[0]?.agentId || "");
|
|
17881
|
+
const [testMessage, setTestMessage] = useState("Hello, this is a test message.");
|
|
17882
|
+
const [result, setResult] = useState(null);
|
|
17883
|
+
const [errorString, setErrorString] = useState();
|
|
17884
|
+
const executeProcessor = useExecuteProcessor();
|
|
17885
|
+
const handleExecute = async () => {
|
|
17886
|
+
setErrorString(void 0);
|
|
17887
|
+
setResult(null);
|
|
17888
|
+
const isOutputPhase = selectedPhase === "outputStep" || selectedPhase === "outputResult";
|
|
17889
|
+
const messageRole = isOutputPhase ? "assistant" : "user";
|
|
17890
|
+
const messages = [
|
|
17891
|
+
{
|
|
17892
|
+
id: crypto.randomUUID(),
|
|
17893
|
+
role: messageRole,
|
|
17894
|
+
createdAt: /* @__PURE__ */ new Date(),
|
|
17895
|
+
content: {
|
|
17896
|
+
format: 2,
|
|
17897
|
+
parts: [{ type: "text", text: testMessage }]
|
|
17898
|
+
}
|
|
17899
|
+
}
|
|
17900
|
+
];
|
|
17901
|
+
try {
|
|
17902
|
+
const response = await executeProcessor.mutateAsync({
|
|
17903
|
+
processorId: processor.id,
|
|
17904
|
+
phase: selectedPhase,
|
|
17905
|
+
messages,
|
|
17906
|
+
agentId: selectedAgentId || void 0
|
|
17907
|
+
});
|
|
17908
|
+
setResult(response);
|
|
17909
|
+
if (!response.success && response.error) {
|
|
17910
|
+
setErrorString(response.error);
|
|
17911
|
+
}
|
|
17912
|
+
} catch (error) {
|
|
17913
|
+
setErrorString(error.message || "An error occurred");
|
|
17914
|
+
}
|
|
17915
|
+
};
|
|
17916
|
+
const resultCode = result ? JSON.stringify(result, null, 2) : "{}";
|
|
17917
|
+
return /* @__PURE__ */ jsxs(MainContentContent, { hasLeftServiceColumn: true, className: "relative", children: [
|
|
17918
|
+
/* @__PURE__ */ jsxs("div", { className: "bg-surface2 border-r border-border1 w-[22rem] overflow-y-auto", children: [
|
|
17919
|
+
/* @__PURE__ */ jsx(ProcessorInformation, { processor }),
|
|
17920
|
+
/* @__PURE__ */ jsxs("div", { className: "p-5 space-y-5", children: [
|
|
17921
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
17922
|
+
/* @__PURE__ */ jsx(Txt, { as: "label", variant: "ui-sm", className: "text-icon3", children: "Phase" }),
|
|
17923
|
+
/* @__PURE__ */ jsxs(Select, { value: selectedPhase, onValueChange: (v) => setSelectedPhase(v), children: [
|
|
17924
|
+
/* @__PURE__ */ jsx(SelectTrigger, { className: "w-full", children: /* @__PURE__ */ jsx(SelectValue, { placeholder: "Select phase" }) }),
|
|
17925
|
+
/* @__PURE__ */ jsx(SelectContent, { children: processor.phases.map((phase) => /* @__PURE__ */ jsx(SelectItem, { value: phase, children: phase }, phase)) })
|
|
17926
|
+
] }),
|
|
17927
|
+
/* @__PURE__ */ jsx(Txt, { variant: "ui-xs", className: "text-icon4", children: PHASE_LABELS[selectedPhase] })
|
|
17928
|
+
] }),
|
|
17929
|
+
processor.configurations.length > 1 && /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
17930
|
+
/* @__PURE__ */ jsx(Txt, { as: "label", variant: "ui-sm", className: "text-icon3", children: "Agent Configuration" }),
|
|
17931
|
+
/* @__PURE__ */ jsxs(Select, { value: selectedAgentId, onValueChange: setSelectedAgentId, children: [
|
|
17932
|
+
/* @__PURE__ */ jsx(SelectTrigger, { className: "w-full", children: /* @__PURE__ */ jsx(SelectValue, { placeholder: "Select agent" }) }),
|
|
17933
|
+
/* @__PURE__ */ jsx(SelectContent, { children: processor.configurations.map((config) => /* @__PURE__ */ jsxs(SelectItem, { value: config.agentId, children: [
|
|
17934
|
+
config.agentName,
|
|
17935
|
+
" (",
|
|
17936
|
+
config.type,
|
|
17937
|
+
")"
|
|
17938
|
+
] }, config.agentId)) })
|
|
17939
|
+
] })
|
|
17940
|
+
] }),
|
|
17941
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
17942
|
+
/* @__PURE__ */ jsx(Txt, { as: "label", htmlFor: formId, variant: "ui-sm", className: "text-icon3", children: "Test Message" }),
|
|
17943
|
+
/* @__PURE__ */ jsx(
|
|
17944
|
+
"textarea",
|
|
17945
|
+
{
|
|
17946
|
+
id: formId,
|
|
17947
|
+
value: testMessage,
|
|
17948
|
+
onChange: (e) => setTestMessage(e.target.value),
|
|
17949
|
+
placeholder: "Enter a test message...",
|
|
17950
|
+
rows: 4,
|
|
17951
|
+
className: "w-full bg-transparent border border-border1 rounded-md p-3 text-ui-sm text-neutral6 placeholder:text-neutral3 focus:outline-none focus:ring-2 focus:ring-accent1"
|
|
17952
|
+
}
|
|
17953
|
+
)
|
|
17954
|
+
] }),
|
|
17955
|
+
/* @__PURE__ */ jsx(
|
|
17956
|
+
Button,
|
|
17957
|
+
{
|
|
17958
|
+
onClick: handleExecute,
|
|
17959
|
+
disabled: executeProcessor.isPending || selectedPhase === "outputStream",
|
|
17960
|
+
className: "w-full",
|
|
17961
|
+
children: executeProcessor.isPending ? "Running..." : "Run Processor"
|
|
17962
|
+
}
|
|
17963
|
+
),
|
|
17964
|
+
selectedPhase === "outputStream" && /* @__PURE__ */ jsx(Txt, { variant: "ui-xs", className: "text-accent6", children: "Output Stream phase cannot be executed directly. Use streaming instead." }),
|
|
17965
|
+
result && /* @__PURE__ */ jsxs("div", { className: "space-y-2 pt-4 border-t border-border1", children: [
|
|
17966
|
+
/* @__PURE__ */ jsx(Txt, { variant: "ui-sm", className: "text-icon3", children: "Status" }),
|
|
17967
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
17968
|
+
/* @__PURE__ */ jsx(Badge, { variant: result.success ? "success" : "error", children: result.success ? "Success" : "Failed" }),
|
|
17969
|
+
result.tripwire?.triggered && /* @__PURE__ */ jsx(Badge, { variant: "info", children: "Tripwire Triggered" })
|
|
17970
|
+
] }),
|
|
17971
|
+
result.tripwire?.triggered && result.tripwire.reason && /* @__PURE__ */ jsxs("div", { className: "mt-2 p-3 bg-accent6Dark rounded-md border border-accent6/20", children: [
|
|
17972
|
+
/* @__PURE__ */ jsx(Txt, { variant: "ui-sm", className: "text-accent6 font-medium", children: "Tripwire Reason" }),
|
|
17973
|
+
/* @__PURE__ */ jsx(Txt, { variant: "ui-sm", className: "text-icon3 mt-1", children: result.tripwire.reason })
|
|
17974
|
+
] })
|
|
17975
|
+
] })
|
|
17976
|
+
] })
|
|
17977
|
+
] }),
|
|
17978
|
+
/* @__PURE__ */ jsx("div", { className: "absolute top-4 right-4 z-10", children: /* @__PURE__ */ jsx(CopyButton, { content: resultCode, tooltip: "Copy JSON result to clipboard" }) }),
|
|
17979
|
+
/* @__PURE__ */ jsx("div", { className: "p-5 h-full relative overflow-x-auto overflow-y-auto", children: /* @__PURE__ */ jsx(CodeMirror, { value: errorString || resultCode, editable: true, theme, extensions: [jsonLanguage] }) })
|
|
17980
|
+
] });
|
|
17981
|
+
}
|
|
17982
|
+
function ProcessorInformation({ processor }) {
|
|
17983
|
+
return /* @__PURE__ */ jsxs("div", { className: "px-5 pt-5 pb-4 border-b border-border1", children: [
|
|
17984
|
+
/* @__PURE__ */ jsx(Txt, { variant: "header-md", className: "text-icon1 mb-2", children: processor.name || processor.id }),
|
|
17985
|
+
processor.name && processor.name !== processor.id && /* @__PURE__ */ jsx(Txt, { variant: "ui-sm", className: "text-icon4 mb-3", children: processor.id }),
|
|
17986
|
+
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1 mt-3", children: processor.phases.map((phase) => /* @__PURE__ */ jsx(Badge, { variant: "default", children: phase }, phase)) }),
|
|
17987
|
+
/* @__PURE__ */ jsx("div", { className: "mt-3", children: /* @__PURE__ */ jsxs(Txt, { variant: "ui-xs", className: "text-icon4", children: [
|
|
17988
|
+
"Attached to ",
|
|
17989
|
+
processor.configurations.length,
|
|
17990
|
+
" agent",
|
|
17991
|
+
processor.configurations.length !== 1 ? "s" : ""
|
|
17992
|
+
] }) })
|
|
17993
|
+
] });
|
|
17994
|
+
}
|
|
17995
|
+
|
|
17205
17996
|
const NameCell$1 = ({ row }) => {
|
|
17206
17997
|
const { Link, paths } = useLinkComponent();
|
|
17207
17998
|
const tool = row.original;
|
|
@@ -17893,30 +18684,53 @@ function ProcessStepListItem({ stepId, step, isActive, position }) {
|
|
|
17893
18684
|
return /* @__PURE__ */ jsxs(
|
|
17894
18685
|
"div",
|
|
17895
18686
|
{
|
|
17896
|
-
className: cn("grid gap-6 grid-cols-[1fr_auto] py-3 px-4 rounded-lg", {
|
|
17897
|
-
"border border-dashed border-
|
|
18687
|
+
className: cn("grid gap-6 grid-cols-[1fr_auto] py-3 px-4 rounded-lg", transitions.all, {
|
|
18688
|
+
"border border-dashed border-neutral2 bg-surface3": isActive
|
|
17898
18689
|
}),
|
|
17899
18690
|
children: [
|
|
17900
18691
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-[auto_1fr] gap-2", children: [
|
|
17901
|
-
/* @__PURE__ */ jsxs(
|
|
17902
|
-
|
|
17903
|
-
|
|
17904
|
-
|
|
18692
|
+
/* @__PURE__ */ jsxs(
|
|
18693
|
+
"span",
|
|
18694
|
+
{
|
|
18695
|
+
className: cn("text-ui-md min-w-6 flex justify-end", transitions.colors, {
|
|
18696
|
+
"text-neutral5": isActive || step.status === "success",
|
|
18697
|
+
"text-neutral3": !isActive && step.status !== "success"
|
|
18698
|
+
}),
|
|
18699
|
+
children: [
|
|
18700
|
+
position,
|
|
18701
|
+
"."
|
|
18702
|
+
]
|
|
18703
|
+
}
|
|
18704
|
+
),
|
|
17905
18705
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
17906
|
-
/* @__PURE__ */ jsx(
|
|
17907
|
-
|
|
18706
|
+
/* @__PURE__ */ jsx(
|
|
18707
|
+
"h4",
|
|
18708
|
+
{
|
|
18709
|
+
className: cn("text-ui-md", transitions.colors, {
|
|
18710
|
+
"text-neutral5": isActive || step.status === "success",
|
|
18711
|
+
"text-neutral3": !isActive && step.status !== "success"
|
|
18712
|
+
}),
|
|
18713
|
+
children: formatStepTitle(stepId)
|
|
18714
|
+
}
|
|
18715
|
+
),
|
|
18716
|
+
step.description && /* @__PURE__ */ jsx("p", { className: "text-ui-md text-neutral2 -mt-0.5", children: step.description })
|
|
17908
18717
|
] })
|
|
17909
18718
|
] }),
|
|
17910
18719
|
/* @__PURE__ */ jsx(
|
|
17911
18720
|
"div",
|
|
17912
18721
|
{
|
|
17913
|
-
className: cn(
|
|
17914
|
-
"
|
|
17915
|
-
|
|
17916
|
-
|
|
17917
|
-
|
|
17918
|
-
|
|
17919
|
-
|
|
18722
|
+
className: cn(
|
|
18723
|
+
"w-[1.75rem] h-[1.75rem] rounded-full flex items-center justify-center self-center",
|
|
18724
|
+
transitions.all,
|
|
18725
|
+
{
|
|
18726
|
+
"border border-neutral2 border-dashed": step.status === "pending",
|
|
18727
|
+
"[&>svg]:text-white [&>svg]:w-[1rem] [&>svg]:h-[1rem]": step.status !== "running",
|
|
18728
|
+
"w-[1.75rem] h-[1.75rem]": step.status === "running",
|
|
18729
|
+
"bg-accent1Dark shadow-glow-accent1": step.status === "success",
|
|
18730
|
+
"bg-accent2Dark shadow-glow-accent2": step.status === "failed",
|
|
18731
|
+
"scale-110": step.status === "success" || step.status === "failed"
|
|
18732
|
+
}
|
|
18733
|
+
),
|
|
17920
18734
|
children: getStatusIcon(step.status)
|
|
17921
18735
|
}
|
|
17922
18736
|
)
|
|
@@ -17946,19 +18760,20 @@ function ProcessStepProgressBar({ steps }) {
|
|
|
17946
18760
|
return /* @__PURE__ */ jsx(
|
|
17947
18761
|
"div",
|
|
17948
18762
|
{
|
|
17949
|
-
className: cn("flex justify-end items-center relative h-[2rem]
|
|
17950
|
-
"bg-
|
|
18763
|
+
className: cn("flex justify-end items-center relative h-[2rem]", transitions.colors, {
|
|
18764
|
+
"bg-accent1Dark": step.status === "success" && steps?.[idx - 1]?.status === "success"
|
|
17951
18765
|
}),
|
|
17952
18766
|
children: /* @__PURE__ */ jsx(
|
|
17953
18767
|
"div",
|
|
17954
18768
|
{
|
|
17955
18769
|
className: cn(
|
|
17956
18770
|
"w-[2rem] h-[2rem] rounded-full flex items-center justify-center self-center absolute right-0 translate-x-[50%] bg-surface3 z-10 text-neutral3 font-bold text-ui-sm",
|
|
18771
|
+
transitions.all,
|
|
17957
18772
|
{
|
|
17958
|
-
"border border-
|
|
17959
|
-
"[&>svg]:text-
|
|
17960
|
-
"bg-
|
|
17961
|
-
"bg-
|
|
18773
|
+
"border border-neutral2 border-dashed": step.status === "pending",
|
|
18774
|
+
"[&>svg]:text-surface1 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]": step.status !== "running",
|
|
18775
|
+
"bg-accent1Dark text-white shadow-glow-accent1 scale-110": step.status === "success",
|
|
18776
|
+
"bg-accent2Dark text-white shadow-glow-accent2 scale-110": step.status === "failed"
|
|
17962
18777
|
}
|
|
17963
18778
|
),
|
|
17964
18779
|
children: step.status === "running" ? /* @__PURE__ */ jsx(Spinner, {}) : idx + 1
|
|
@@ -17968,7 +18783,7 @@ function ProcessStepProgressBar({ steps }) {
|
|
|
17968
18783
|
step.id
|
|
17969
18784
|
);
|
|
17970
18785
|
}) }),
|
|
17971
|
-
/* @__PURE__ */ jsxs("div", { className: "text-xs text-neutral3 text-center", children: [
|
|
18786
|
+
/* @__PURE__ */ jsxs("div", { className: cn("text-xs text-neutral3 text-center", transitions.colors), children: [
|
|
17972
18787
|
completedSteps,
|
|
17973
18788
|
" of ",
|
|
17974
18789
|
totalSteps,
|
|
@@ -19841,46 +20656,67 @@ function Notification({
|
|
|
19841
20656
|
type = "info"
|
|
19842
20657
|
}) {
|
|
19843
20658
|
const [localIsVisible, setLocalIsVisible] = useState(isVisible);
|
|
20659
|
+
const [isAnimatingOut, setIsAnimatingOut] = useState(false);
|
|
19844
20660
|
useEffect(() => {
|
|
19845
20661
|
if (dismissible && autoDismiss && isVisible) {
|
|
19846
20662
|
const timer = setTimeout(() => {
|
|
19847
|
-
|
|
20663
|
+
handleDismiss();
|
|
19848
20664
|
}, dismissTime);
|
|
19849
20665
|
return () => clearTimeout(timer);
|
|
19850
20666
|
}
|
|
19851
|
-
}, [autoDismiss, isVisible, dismissTime]);
|
|
20667
|
+
}, [autoDismiss, isVisible, dismissTime, dismissible]);
|
|
19852
20668
|
useEffect(() => {
|
|
19853
|
-
|
|
20669
|
+
if (isVisible) {
|
|
20670
|
+
setIsAnimatingOut(false);
|
|
20671
|
+
setLocalIsVisible(true);
|
|
20672
|
+
}
|
|
19854
20673
|
}, [isVisible]);
|
|
20674
|
+
const handleDismiss = () => {
|
|
20675
|
+
setIsAnimatingOut(true);
|
|
20676
|
+
setTimeout(() => {
|
|
20677
|
+
setLocalIsVisible(false);
|
|
20678
|
+
setIsAnimatingOut(false);
|
|
20679
|
+
}, 200);
|
|
20680
|
+
};
|
|
19855
20681
|
if (!localIsVisible) return null;
|
|
20682
|
+
const typeStyles = {
|
|
20683
|
+
info: "bg-surface4 border-border1",
|
|
20684
|
+
error: "bg-accent2Darker border-accent2/30",
|
|
20685
|
+
success: "bg-accent1Darker border-accent1/30",
|
|
20686
|
+
warning: "bg-accent6Darker border-accent6/30"
|
|
20687
|
+
};
|
|
20688
|
+
const iconStyles = {
|
|
20689
|
+
info: "text-accent5",
|
|
20690
|
+
error: "text-accent2",
|
|
20691
|
+
success: "text-accent1",
|
|
20692
|
+
warning: "text-accent6"
|
|
20693
|
+
};
|
|
19856
20694
|
return /* @__PURE__ */ jsxs(
|
|
19857
20695
|
"div",
|
|
19858
20696
|
{
|
|
19859
20697
|
className: cn(
|
|
19860
|
-
"grid grid-cols-[
|
|
19861
|
-
|
|
19862
|
-
|
|
19863
|
-
|
|
20698
|
+
"grid grid-cols-[auto_1fr_auto] gap-3 rounded-lg border p-4 text-ui-md text-neutral4 items-start",
|
|
20699
|
+
"shadow-card",
|
|
20700
|
+
transitions.all,
|
|
20701
|
+
isAnimatingOut ? "animate-out fade-out-0 slide-out-to-right-2 duration-200" : "animate-in fade-in-0 slide-in-from-right-2 duration-300",
|
|
20702
|
+
typeStyles[type],
|
|
19864
20703
|
className
|
|
19865
20704
|
),
|
|
19866
20705
|
children: [
|
|
19867
|
-
/* @__PURE__ */ jsx(
|
|
19868
|
-
|
|
20706
|
+
/* @__PURE__ */ jsx("div", { className: cn("flex-shrink-0 mt-0.5", iconStyles[type]), children: type === "error" || type === "warning" ? /* @__PURE__ */ jsx(AlertTriangleIcon, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx(InfoIcon$1, { className: "h-4 w-4" }) }),
|
|
20707
|
+
/* @__PURE__ */ jsx("div", { className: "flex gap-2 items-start min-w-0", children }),
|
|
20708
|
+
dismissible && /* @__PURE__ */ jsxs(
|
|
20709
|
+
Button,
|
|
19869
20710
|
{
|
|
19870
|
-
|
|
19871
|
-
|
|
19872
|
-
|
|
19873
|
-
|
|
19874
|
-
|
|
19875
|
-
}
|
|
19876
|
-
|
|
19877
|
-
children
|
|
20711
|
+
variant: "ghost",
|
|
20712
|
+
className: cn("h-6 w-6 p-0 flex-shrink-0", transitions.colors, "hover:bg-surface5"),
|
|
20713
|
+
onClick: handleDismiss,
|
|
20714
|
+
children: [
|
|
20715
|
+
/* @__PURE__ */ jsx(XIcon, { className: "h-4 w-4" }),
|
|
20716
|
+
/* @__PURE__ */ jsx(VisuallyHidden$1, { children: "Dismiss" })
|
|
20717
|
+
]
|
|
19878
20718
|
}
|
|
19879
|
-
)
|
|
19880
|
-
dismissible && /* @__PURE__ */ jsxs(Button, { onClick: () => setLocalIsVisible(false), children: [
|
|
19881
|
-
/* @__PURE__ */ jsx(XIcon, {}),
|
|
19882
|
-
/* @__PURE__ */ jsx(VisuallyHidden$1, { children: "Dismiss" })
|
|
19883
|
-
] })
|
|
20719
|
+
)
|
|
19884
20720
|
]
|
|
19885
20721
|
}
|
|
19886
20722
|
);
|
|
@@ -19986,7 +20822,8 @@ const Crumb = ({ className, as, isCurrent, action, ...props }) => {
|
|
|
19986
20822
|
"aria-current": isCurrent ? "page" : void 0,
|
|
19987
20823
|
className: cn(
|
|
19988
20824
|
"text-ui-md leading-ui-md flex items-center gap-2",
|
|
19989
|
-
|
|
20825
|
+
transitions.colors,
|
|
20826
|
+
isCurrent ? "text-white" : "text-neutral3 hover:text-neutral5",
|
|
19990
20827
|
className
|
|
19991
20828
|
),
|
|
19992
20829
|
...props
|
|
@@ -19994,7 +20831,7 @@ const Crumb = ({ className, as, isCurrent, action, ...props }) => {
|
|
|
19994
20831
|
),
|
|
19995
20832
|
action
|
|
19996
20833
|
] }),
|
|
19997
|
-
!isCurrent && /* @__PURE__ */ jsx("li", { role: "separator", className: "flex h-full items-center", children: /* @__PURE__ */ jsx(Icon, { className: "text-
|
|
20834
|
+
!isCurrent && /* @__PURE__ */ jsx("li", { role: "separator", className: "flex h-full items-center", children: /* @__PURE__ */ jsx(Icon, { className: cn("text-neutral2", transitions.colors), children: /* @__PURE__ */ jsx(SlashIcon, {}) }) })
|
|
19998
20835
|
] });
|
|
19999
20836
|
};
|
|
20000
20837
|
|
|
@@ -20063,12 +20900,24 @@ const LogoWithoutText = (props) => /* @__PURE__ */ jsx("svg", { xmlns: "http://w
|
|
|
20063
20900
|
) });
|
|
20064
20901
|
|
|
20065
20902
|
const themeClasses = {
|
|
20066
|
-
light: "bg-gray-100 border-gray-300 text-gray-700",
|
|
20067
|
-
dark: "bg-surface4 border-border1 text-
|
|
20903
|
+
light: "bg-gray-100 border-gray-300 text-gray-700 shadow-[0_1px_0_rgba(0,0,0,0.1)]",
|
|
20904
|
+
dark: "bg-surface4 border-border1 text-neutral5 shadow-[0_1px_0_rgba(0,0,0,0.3)]"
|
|
20068
20905
|
};
|
|
20069
|
-
const Kbd = ({ children, theme = "dark" }) => {
|
|
20906
|
+
const Kbd = ({ children, theme = "dark", className }) => {
|
|
20070
20907
|
const themeClass = themeClasses[theme];
|
|
20071
|
-
return /* @__PURE__ */ jsx(
|
|
20908
|
+
return /* @__PURE__ */ jsx(
|
|
20909
|
+
"kbd",
|
|
20910
|
+
{
|
|
20911
|
+
className: cn(
|
|
20912
|
+
"border rounded-md px-1.5 py-0.5 font-mono text-ui-sm inline-flex items-center justify-center min-w-[1.5rem]",
|
|
20913
|
+
transitions.transform,
|
|
20914
|
+
"active:scale-95 active:shadow-none",
|
|
20915
|
+
themeClass,
|
|
20916
|
+
className
|
|
20917
|
+
),
|
|
20918
|
+
children
|
|
20919
|
+
}
|
|
20920
|
+
);
|
|
20072
20921
|
};
|
|
20073
20922
|
|
|
20074
20923
|
const SIDEBAR_COOKIE_NAME = "sidebar:state";
|
|
@@ -20138,6 +20987,8 @@ function MainSidebarRoot({ children, className }) {
|
|
|
20138
20987
|
{
|
|
20139
20988
|
className: cn(
|
|
20140
20989
|
"flex flex-col h-full px-4 relative overflow-y-auto",
|
|
20990
|
+
// Smooth width transition for collapse/expand
|
|
20991
|
+
"transition-all duration-slow ease-out-custom",
|
|
20141
20992
|
{
|
|
20142
20993
|
"lg:min-w-52 xl:min-w-56 2xl:min-w-60 3xl:min-w-64 4xl:min-w-72": !isCollapsed
|
|
20143
20994
|
},
|
|
@@ -20154,8 +21005,10 @@ function MainSidebarRoot({ children, className }) {
|
|
|
20154
21005
|
onClick: toggleSidebar,
|
|
20155
21006
|
className: cn(
|
|
20156
21007
|
"inline-flex w-auto items-center text-neutral3 h-8 px-3 rounded-md ml-auto",
|
|
20157
|
-
"hover:bg-surface4",
|
|
20158
|
-
"
|
|
21008
|
+
"hover:bg-surface4 hover:text-neutral5",
|
|
21009
|
+
"transition-all duration-normal ease-out-custom",
|
|
21010
|
+
"focus:outline-none focus:ring-1 focus:ring-accent1 focus:shadow-focus-ring",
|
|
21011
|
+
"[&_svg]:w-[1rem] [&_svg]:h-[1rem] [&_svg]:text-neutral3 [&_svg]:transition-transform [&_svg]:duration-normal",
|
|
20159
21012
|
{
|
|
20160
21013
|
"ml-auto": !isCollapsed
|
|
20161
21014
|
}
|
|
@@ -20223,15 +21076,23 @@ function MainSidebarNavLink({
|
|
|
20223
21076
|
"li",
|
|
20224
21077
|
{
|
|
20225
21078
|
className: cn(
|
|
20226
|
-
"flex",
|
|
21079
|
+
"flex relative",
|
|
21080
|
+
// Base link styles with smooth transitions
|
|
20227
21081
|
"[&>a]:flex [&>a]:items-center [&>a]:min-h-8 [&>a]:gap-2.5 [&>a]:text-ui-md [&>a]:text-neutral3 [&>a]:py-1.5 [&>a]:px-3 [&>a]:w-full [&>a]:rounded-lg [&>a]:justify-center",
|
|
20228
|
-
"[
|
|
21082
|
+
"[&>a]:transition-all [&>a]:duration-normal [&>a]:ease-out-custom",
|
|
21083
|
+
// Icon styles with transitions
|
|
21084
|
+
"[&_svg]:w-4 [&_svg]:h-4 [&_svg]:text-neutral3/60 [&_svg]:transition-colors [&_svg]:duration-normal",
|
|
21085
|
+
// Hover states
|
|
20229
21086
|
"[&>a:hover]:bg-surface4 [&>a:hover]:text-neutral5 [&>a:hover_svg]:text-neutral3",
|
|
20230
21087
|
{
|
|
21088
|
+
// Active state with left indicator bar
|
|
20231
21089
|
"[&>a]:text-neutral5 [&>a]:bg-surface3": isActive,
|
|
20232
21090
|
"[&_svg]:text-neutral5": isActive,
|
|
21091
|
+
// Active indicator bar
|
|
21092
|
+
"before:absolute before:left-0 before:top-1/2 before:-translate-y-1/2 before:w-0.5 before:h-5 before:bg-accent1 before:rounded-r-full before:transition-all before:duration-normal": isActive && !isCollapsed,
|
|
20233
21093
|
"[&>a]:justify-start": !isCollapsed,
|
|
20234
21094
|
"[&_svg]:text-neutral3": isCollapsed,
|
|
21095
|
+
// Featured variant
|
|
20235
21096
|
"[&>a]:rounded-md [&>a]:my-2 [&>a]:bg-accent1/75 [&>a:hover]:bg-accent1/85 [&>a]:text-black [&>a:hover]:text-black": isFeatured,
|
|
20236
21097
|
"[&_svg]:text-black/75 [&>a:hover_svg]:text-black": isFeatured
|
|
20237
21098
|
},
|
|
@@ -21236,5 +22097,5 @@ const useMastraPlatform = () => {
|
|
|
21236
22097
|
return { isMastraPlatform, mastraPlatformEndpoint };
|
|
21237
22098
|
};
|
|
21238
22099
|
|
|
21239
|
-
export { AgentChat, AgentCoinIcon, AgentCombobox, AgentEntityHeader, AgentIcon, AgentInformation, AgentInformationLayout, AgentInformationTabLayout, AgentLayout, AgentMemory, AgentMetadata, AgentMetadataList, AgentMetadataListEmpty, AgentMetadataListItem, AgentMetadataNetworkList, AgentMetadataScorerList, AgentMetadataSection, AgentMetadataToolList, AgentMetadataWorkflowList, AgentMetadataWrapper, AgentNetworkCoinIcon, AgentPromptExperimentProvider, AgentSettings, AgentSettingsContext, AgentSettingsProvider, AgentToolPanel, AgentsTable, AiIcon, Alert, AlertDescription, AlertDialog, AlertTitle, ApiIcon, AutoForm, Avatar, Badge, BranchIcon, Breadcrumb, Button, ButtonsGroup, Cell, ChatThreads, CheckIcon, Checkbox, ChevronIcon, CodeEditor, Collapsible, CollapsibleContent, CollapsibleTrigger, CombinedButtons, Combobox, CommitIcon, CopyButton, CrossIcon, Crumb, DatePicker, DateTimeCell, DateTimePicker, DateTimePickerContent, DbIcon, DebugIcon, DefaultTrigger, DeploymentIcon, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DividerIcon, DocsIcon, DynamicForm, ElementSelect, EmptyState, Entity, EntityContent, EntityDescription, EntityHeader, EntityIcon, EntityName, Entry, EntryCell, EntryList, EntryListSkeleton, EnvIcon, FiltersIcon, FolderIcon, GithubCoinIcon, GithubIcon, GoogleIcon, Header, HeaderAction, HeaderGroup, HeaderTitle, HomeIcon, Icon, InfoIcon, Input, InputField, JudgeIcon, Kbd, KeyValueList, Label, LatencyIcon, LinkComponentProvider, LogoWithoutText, LogsIcon, MCPDetail, MCPServerCombobox, MCPTable, MCPToolPanel, MainContentContent, MainContentLayout, MainSidebar, MainSidebarProvider, MarkdownRenderer, MastraPackagesInfo, MastraVersionFooter, McpCoinIcon, McpServerIcon, MemoryIcon, MemorySearch, Notification, OpenAIIcon, PageHeader, PlaygroundConfigGuard, PlaygroundQueryClient, Popover, PopoverContent, PopoverTrigger, ProcessStepList, ProcessStepListItem, ProcessStepProgressBar, PromptIcon, RadioGroup, RadioGroupItem, RepoIcon, RequestContext, RequestContextWrapper, Row, ScoreDialog, ScorerCombobox, ScorersTable, ScoresList, ScoresTools, ScrollArea, ScrollBar, SearchField, Searchbar, SearchbarWrapper, Section, Sections, Select, SelectContent, SelectField$1 as SelectField, SelectGroup, SelectItem, SelectTrigger, SelectValue, SettingsIcon, ShadcnAutoFormFieldComponents, SideDialog, Skeleton, SlashIcon, Slider, SpanScoreList, SpanScoring, SpanTabs, Spinner, StudioConfigContext, StudioConfigForm, StudioConfigProvider, Switch, Tab, TabContent, TabList, Table, Tabs, Tbody, TemplateFailure, TemplateForm, TemplateInfo, TemplateInstallation, TemplateSuccess, TemplatesList, TemplatesTools, TextAndIcon, Th, Thead, ThreadDeleteButton, ThreadInputProvider, ThreadItem, ThreadLink, ThreadList, Threads, TimePicker, ToolCoinIcon, ToolCombobox, ToolFallback, ToolIconMap, ToolInformation, ToolPanel, ToolTable, ToolsIcon, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TraceDialog, TraceIcon, TraceTimeline, TraceTimelineSpan, TraceTimelineTools, TracesList, TracesTools, TracingSettingsContext, TracingSettingsProvider, TsIcon, Txt, TxtCell, VariablesIcon, WorkflowCoinIcon, WorkflowCombobox, WorkflowGraph, WorkflowIcon, WorkflowInformation, WorkflowLayout, WorkflowRunContext, WorkflowRunDetail, WorkflowRunList, WorkflowRunProvider, WorkflowStepDetailContext, WorkflowStepDetailProvider, WorkflowTable, WorkflowTrigger, WorkingMemoryContext, WorkingMemoryProvider, buttonVariants, cn, convertWorkflowRunStateToStreamResult, extractPrompt, fieldConfig, formatHierarchicalSpans, getColumnTemplate, getMainContentContentClassName, getShortId, getSpanTypeUi, getStatusIcon, getToNextEntryFn, getToPreviousEntryFn, highlight, inputVariants, parseError, providerMapToIcon, removeEmptyValues, resolveSerializedZodOutput, scoresListColumns, spanTypePrefixes, toast, traceScoresListColumns, tracesListColumns, useAgent, useAgentInformationSettings, useAgentInformationTab, useAgentPromptExperiment, useAgentSettings, useAgents, useCancelWorkflowRun, useCloneThread, useCodemirrorTheme$1 as useCodemirrorTheme, useCurrentRun, useDeleteThread, useDeleteWorkflowRun, useExecuteAgentTool, useExecuteMCPTool, useExecuteTool, useExecuteWorkflow, useInView, useLinkComponent, useMCPServerTool, useMCPServerTools, useMCPServers, useMainSidebar, useMastraPackages, useMastraPlatform, useMemory, useMemoryConfig, useMemorySearch, usePackageUpdates, usePlaygroundStore, useReorderModelList, useResetAgentModel, useScorer, useScorers, useScoresByScorerId, useSpeechRecognition, useStreamWorkflow, useStudioConfig, useThreadInput, useThreads, useTool, useTools, useTraceSpanScores, useTracingSettings, useUpdateAgentModel, useUpdateModelInModelList, useWorkflow, useWorkflowRun, useWorkflowRuns, useWorkflowStepDetail, useWorkflows, useWorkingMemory };
|
|
22100
|
+
export { AgentChat, AgentCoinIcon, AgentCombobox, AgentEntityHeader, AgentIcon, AgentInformation, AgentInformationLayout, AgentInformationTabLayout, AgentLayout, AgentMemory, AgentMetadata, AgentMetadataCombinedProcessorList, AgentMetadataList, AgentMetadataListEmpty, AgentMetadataListItem, AgentMetadataNetworkList, AgentMetadataScorerList, AgentMetadataSection, AgentMetadataToolList, AgentMetadataWorkflowList, AgentMetadataWrapper, AgentNetworkCoinIcon, AgentPromptExperimentProvider, AgentSettings, AgentSettingsContext, AgentSettingsProvider, AgentToolPanel, AgentsTable, AiIcon, Alert, AlertDescription, AlertDialog, AlertTitle, ApiIcon, AutoForm, Avatar, Badge, BranchIcon, Breadcrumb, Button, ButtonsGroup, Cell, ChatThreads, CheckIcon, Checkbox, ChevronIcon, CodeEditor, Collapsible, CollapsibleContent, CollapsibleTrigger, CombinedButtons, Combobox, CommitIcon, CopyButton, CrossIcon, Crumb, DatePicker, DateTimeCell, DateTimePicker, DateTimePickerContent, DbIcon, DebugIcon, DefaultTrigger, DeploymentIcon, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DividerIcon, DocsIcon, DynamicForm, ElementSelect, EmptyState, Entity, EntityContent, EntityDescription, EntityHeader, EntityIcon, EntityName, Entry, EntryCell, EntryList, EntryListSkeleton, EnvIcon, FiltersIcon, FolderIcon, GithubCoinIcon, GithubIcon, GoogleIcon, Header, HeaderAction, HeaderGroup, HeaderTitle, HomeIcon, Icon, InfoIcon, Input, InputField, JudgeIcon, Kbd, KeyValueList, Label, LatencyIcon, LinkComponentProvider, LogoWithoutText, LogsIcon, MCPDetail, MCPServerCombobox, MCPTable, MCPToolPanel, MainContentContent, MainContentLayout, MainSidebar, MainSidebarProvider, MarkdownRenderer, MastraPackagesInfo, MastraVersionFooter, McpCoinIcon, McpServerIcon, MemoryIcon, MemorySearch, Notification, OpenAIIcon, PageHeader, PlaygroundConfigGuard, PlaygroundQueryClient, Popover, PopoverContent, PopoverTrigger, ProcessStepList, ProcessStepListItem, ProcessStepProgressBar, ProcessorIcon, ProcessorPanel, ProcessorTable, PromptIcon, RadioGroup, RadioGroupItem, RepoIcon, RequestContext, RequestContextWrapper, Row, ScoreDialog, ScorerCombobox, ScorersTable, ScoresList, ScoresTools, ScrollArea, ScrollBar, SearchField, Searchbar, SearchbarWrapper, Section, Sections, Select, SelectContent, SelectField$1 as SelectField, SelectGroup, SelectItem, SelectTrigger, SelectValue, SettingsIcon, ShadcnAutoFormFieldComponents, SideDialog, Skeleton, SlashIcon, Slider, SpanScoreList, SpanScoring, SpanTabs, Spinner, StudioConfigContext, StudioConfigForm, StudioConfigProvider, Switch, Tab, TabContent, TabList, Table, Tabs, Tbody, TemplateFailure, TemplateForm, TemplateInfo, TemplateInstallation, TemplateSuccess, TemplatesList, TemplatesTools, TextAndIcon, Th, Thead, ThreadDeleteButton, ThreadInputProvider, ThreadItem, ThreadLink, ThreadList, Threads, TimePicker, ToolCoinIcon, ToolCombobox, ToolFallback, ToolIconMap, ToolInformation, ToolPanel, ToolTable, ToolsIcon, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TraceDialog, TraceIcon, TraceTimeline, TraceTimelineSpan, TraceTimelineTools, TracesList, TracesTools, TracingSettingsContext, TracingSettingsProvider, TsIcon, Txt, TxtCell, VariablesIcon, WorkflowCoinIcon, WorkflowCombobox, WorkflowGraph, WorkflowIcon, WorkflowInformation, WorkflowLayout, WorkflowRunContext, WorkflowRunDetail, WorkflowRunList, WorkflowRunProvider, WorkflowStepDetailContext, WorkflowStepDetailProvider, WorkflowTable, WorkflowTrigger, WorkingMemoryContext, WorkingMemoryProvider, buttonVariants, cn, columns$2 as columns, convertWorkflowRunStateToStreamResult, extractPrompt, fieldConfig, formatHierarchicalSpans, getColumnTemplate, getMainContentContentClassName, getShortId, getSpanTypeUi, getStatusIcon, getToNextEntryFn, getToPreviousEntryFn, highlight, inputVariants, parseError, providerMapToIcon, removeEmptyValues, resolveSerializedZodOutput, scoresListColumns, spanTypePrefixes, toast, traceScoresListColumns, tracesListColumns, useAgent, useAgentInformationSettings, useAgentInformationTab, useAgentPromptExperiment, useAgentSettings, useAgents, useCancelWorkflowRun, useCloneThread, useCodemirrorTheme$1 as useCodemirrorTheme, useCurrentRun, useDeleteThread, useDeleteWorkflowRun, useExecuteAgentTool, useExecuteMCPTool, useExecuteProcessor, useExecuteTool, useExecuteWorkflow, useInView, useLinkComponent, useMCPServerTool, useMCPServerTools, useMCPServers, useMainSidebar, useMastraPackages, useMastraPlatform, useMemory, useMemoryConfig, useMemorySearch, usePackageUpdates, usePlaygroundStore, useProcessor, useProcessors, useReorderModelList, useResetAgentModel, useScorer, useScorers, useScoresByScorerId, useSpeechRecognition, useStreamWorkflow, useStudioConfig, useThreadInput, useThreads, useTool, useTools, useTraceSpanScores, useTracingSettings, useUpdateAgentModel, useUpdateModelInModelList, useWorkflow, useWorkflowRun, useWorkflowRuns, useWorkflowStepDetail, useWorkflows, useWorkingMemory };
|
|
21240
22101
|
//# sourceMappingURL=index.es.js.map
|