@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.cjs.js
CHANGED
|
@@ -6,7 +6,7 @@ require('./index.css');const jsxRuntime = require('react/jsx-runtime');
|
|
|
6
6
|
const react = require('@assistant-ui/react');
|
|
7
7
|
const lucideReact = require('lucide-react');
|
|
8
8
|
const React = require('react');
|
|
9
|
-
const
|
|
9
|
+
const spacings = require('./spacings-bCnRJAUT.cjs');
|
|
10
10
|
const TooltipPrimitive = require('@radix-ui/react-tooltip');
|
|
11
11
|
const reactMarkdown = require('@assistant-ui/react-markdown');
|
|
12
12
|
require('@assistant-ui/react-markdown/styles/dot.css');
|
|
@@ -3116,19 +3116,21 @@ const mergeArrayProperties = (baseObject, mergeObject, key) => {
|
|
|
3116
3116
|
};
|
|
3117
3117
|
const extendTailwindMerge = (configExtension, ...createConfig) => typeof configExtension === 'function' ? createTailwindMerge(getDefaultConfig, configExtension, ...createConfig) : createTailwindMerge(() => mergeConfigs(getDefaultConfig(), configExtension), ...createConfig);
|
|
3118
3118
|
|
|
3119
|
-
const colorKeys = Object.keys({ ...
|
|
3120
|
-
const spacingKeys = Object.keys(
|
|
3121
|
-
const fontSizeKeys = Object.keys(
|
|
3122
|
-
const lineHeightKeys = Object.keys(
|
|
3123
|
-
const borderRadiusKeys = Object.keys(
|
|
3124
|
-
const sizeKeys = Object.keys(
|
|
3119
|
+
const colorKeys = Object.keys({ ...spacings.Colors, ...spacings.BorderColors });
|
|
3120
|
+
const spacingKeys = Object.keys(spacings.Spacings);
|
|
3121
|
+
const fontSizeKeys = Object.keys(spacings.FontSizes);
|
|
3122
|
+
const lineHeightKeys = Object.keys(spacings.LineHeights);
|
|
3123
|
+
const borderRadiusKeys = Object.keys(spacings.BorderRadius);
|
|
3124
|
+
const sizeKeys = Object.keys(spacings.Sizes);
|
|
3125
|
+
const shadowKeys = Object.keys(spacings.Shadows).concat(Object.keys(spacings.Glows));
|
|
3125
3126
|
const twMerge = extendTailwindMerge({
|
|
3126
3127
|
extend: {
|
|
3127
3128
|
theme: {
|
|
3128
3129
|
color: colorKeys,
|
|
3129
3130
|
spacing: spacingKeys,
|
|
3130
3131
|
radius: borderRadiusKeys,
|
|
3131
|
-
leading: lineHeightKeys
|
|
3132
|
+
leading: lineHeightKeys,
|
|
3133
|
+
shadow: shadowKeys
|
|
3132
3134
|
},
|
|
3133
3135
|
classGroups: {
|
|
3134
3136
|
"font-size": [{ text: fontSizeKeys }],
|
|
@@ -3152,47 +3154,44 @@ const formElementSizes = {
|
|
|
3152
3154
|
md: "h-form-md",
|
|
3153
3155
|
lg: "h-form-lg"
|
|
3154
3156
|
};
|
|
3155
|
-
const formElementFocus = "focus:outline focus:
|
|
3156
|
-
const formElementFocusWithin = "focus-within:outline focus-within:
|
|
3157
|
+
const formElementFocus = "focus:outline-none focus:ring-1 focus:ring-accent1 focus:shadow-focus-ring transition-shadow duration-normal";
|
|
3158
|
+
const formElementFocusWithin = "focus-within:outline-none focus-within:ring-1 focus-within:ring-accent1 focus-within:shadow-focus-ring transition-shadow duration-normal";
|
|
3157
3159
|
const formElementRadius = "rounded-md";
|
|
3158
3160
|
|
|
3159
|
-
const sizeClasses$
|
|
3161
|
+
const sizeClasses$2 = {
|
|
3160
3162
|
sm: `${formElementSizes.sm} gap-0.5`,
|
|
3161
3163
|
md: `${formElementSizes.md} gap-1`,
|
|
3162
3164
|
lg: `${formElementSizes.lg} gap-2`
|
|
3163
3165
|
};
|
|
3164
3166
|
const variantClasses$2 = {
|
|
3165
|
-
default: "bg-surface2 hover:bg-surface4 text-neutral3 hover:text-neutral6 disabled:opacity-50",
|
|
3166
|
-
light: "bg-surface3 hover:bg-surface5 text-neutral6 disabled:opacity-50",
|
|
3167
|
-
outline: "bg-transparent hover:bg-surface2 text-neutral3 hover:text-neutral6 disabled:opacity-50",
|
|
3168
|
-
ghost: "bg-transparent border-transparent hover:bg-surface2 text-neutral3 hover:text-neutral6 disabled:opacity-50"
|
|
3167
|
+
default: "bg-surface2 hover:bg-surface4 text-neutral3 hover:text-neutral6 disabled:opacity-50 disabled:cursor-not-allowed",
|
|
3168
|
+
light: "bg-surface3 hover:bg-surface5 text-neutral6 disabled:opacity-50 disabled:cursor-not-allowed",
|
|
3169
|
+
outline: "bg-transparent hover:bg-surface2 text-neutral3 hover:text-neutral6 disabled:opacity-50 disabled:cursor-not-allowed",
|
|
3170
|
+
ghost: "bg-transparent border-transparent hover:bg-surface2 text-neutral3 hover:text-neutral6 disabled:opacity-50 disabled:cursor-not-allowed",
|
|
3171
|
+
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"
|
|
3169
3172
|
};
|
|
3173
|
+
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]";
|
|
3170
3174
|
function buttonVariants(options) {
|
|
3171
3175
|
const variant = options?.variant || "default";
|
|
3172
3176
|
const size = options?.size || "md";
|
|
3173
|
-
return cn(
|
|
3174
|
-
"bg-surface2 border border-border1 px-2 text-ui-md inline-flex items-center justify-center rounded-md border",
|
|
3175
|
-
formElementFocus,
|
|
3176
|
-
variantClasses$2[variant],
|
|
3177
|
-
sizeClasses$1[size]
|
|
3178
|
-
);
|
|
3177
|
+
return cn(baseButtonStyles, formElementFocus, variantClasses$2[variant], sizeClasses$2[size]);
|
|
3179
3178
|
}
|
|
3180
3179
|
const Button = React.forwardRef(
|
|
3181
|
-
({ className, as, size = "md", variant = "default", ...props }, ref) => {
|
|
3180
|
+
({ className, as, size = "md", variant = "default", disabled, ...props }, ref) => {
|
|
3182
3181
|
const Component = as || "button";
|
|
3183
3182
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3184
3183
|
Component,
|
|
3185
3184
|
{
|
|
3186
3185
|
ref,
|
|
3186
|
+
disabled,
|
|
3187
3187
|
className: cn(
|
|
3188
|
-
|
|
3188
|
+
baseButtonStyles,
|
|
3189
3189
|
formElementFocus,
|
|
3190
3190
|
variantClasses$2[variant],
|
|
3191
|
-
sizeClasses$
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
}
|
|
3191
|
+
sizeClasses$2[size],
|
|
3192
|
+
// Remove active scale when disabled
|
|
3193
|
+
disabled && "active:scale-100",
|
|
3194
|
+
className
|
|
3196
3195
|
),
|
|
3197
3196
|
...props
|
|
3198
3197
|
}
|
|
@@ -3247,17 +3246,36 @@ const Txt = ({ as: Root = "p", className, variant = "ui-md", font, ...props }) =
|
|
|
3247
3246
|
return /* @__PURE__ */ jsxRuntime.jsx(Root, { className: cn(variants[variant], font && fonts[font], className), ...props });
|
|
3248
3247
|
};
|
|
3249
3248
|
|
|
3250
|
-
const
|
|
3249
|
+
const transitions = {
|
|
3250
|
+
// For color changes (background, text, border)
|
|
3251
|
+
colors: "transition-colors duration-normal ease-out-custom",
|
|
3252
|
+
// For transform changes (scale, translate, rotate)
|
|
3253
|
+
transform: "transition-transform duration-normal ease-out-custom",
|
|
3254
|
+
// For all property changes
|
|
3255
|
+
all: "transition-all duration-normal ease-out-custom",
|
|
3256
|
+
// For opacity changes
|
|
3257
|
+
opacity: "transition-opacity duration-normal ease-out-custom"};
|
|
3258
|
+
const focusRing = {
|
|
3259
|
+
// Focus visible only (keyboard navigation)
|
|
3260
|
+
visible: "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent1 focus-visible:shadow-focus-ring"
|
|
3261
|
+
};
|
|
3262
|
+
|
|
3263
|
+
const sizeClasses$1 = {
|
|
3251
3264
|
sm: "h-avatar-sm w-avatar-sm",
|
|
3252
3265
|
md: "h-avatar-md w-avatar-md",
|
|
3253
3266
|
lg: "h-avatar-lg w-avatar-lg"
|
|
3254
3267
|
};
|
|
3255
|
-
const Avatar = ({ src, name, size = "sm" }) => {
|
|
3268
|
+
const Avatar = ({ src, name, size = "sm", interactive = false }) => {
|
|
3256
3269
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3257
3270
|
"div",
|
|
3258
3271
|
{
|
|
3259
|
-
className:
|
|
3260
|
-
|
|
3272
|
+
className: cn(
|
|
3273
|
+
sizeClasses$1[size],
|
|
3274
|
+
"border border-border1 bg-surface3 shrink-0 overflow-hidden rounded-full flex items-center justify-center",
|
|
3275
|
+
transitions.all,
|
|
3276
|
+
interactive && "cursor-pointer hover:scale-105 hover:border-neutral2 hover:shadow-sm"
|
|
3277
|
+
),
|
|
3278
|
+
children: src ? /* @__PURE__ */ jsxRuntime.jsx("img", { src, alt: name, className: "h-full w-full object-cover" }) : /* @__PURE__ */ jsxRuntime.jsx(Txt, { variant: "ui-md", className: "text-center text-neutral4", children: name[0].toUpperCase() })
|
|
3261
3279
|
}
|
|
3262
3280
|
);
|
|
3263
3281
|
};
|
|
@@ -4321,22 +4339,64 @@ const AgentNetworkCoinIcon = (props) => /* @__PURE__ */ jsxRuntime.jsxs("svg", {
|
|
|
4321
4339
|
) }) })
|
|
4322
4340
|
] });
|
|
4323
4341
|
|
|
4342
|
+
function ProcessorIcon(props) {
|
|
4343
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4344
|
+
"svg",
|
|
4345
|
+
{
|
|
4346
|
+
width: "24",
|
|
4347
|
+
height: "24",
|
|
4348
|
+
viewBox: "0 0 24 24",
|
|
4349
|
+
fill: "none",
|
|
4350
|
+
stroke: "currentColor",
|
|
4351
|
+
strokeWidth: "2",
|
|
4352
|
+
strokeLinecap: "round",
|
|
4353
|
+
strokeLinejoin: "round",
|
|
4354
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4355
|
+
...props,
|
|
4356
|
+
children: [
|
|
4357
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { width: "16", height: "16", x: "4", y: "4", rx: "2" }),
|
|
4358
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { width: "6", height: "6", x: "9", y: "9", rx: "1" }),
|
|
4359
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M15 2v2" }),
|
|
4360
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M15 20v2" }),
|
|
4361
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M2 15h2" }),
|
|
4362
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M2 9h2" }),
|
|
4363
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M20 15h2" }),
|
|
4364
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M20 9h2" }),
|
|
4365
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M9 2v2" }),
|
|
4366
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M9 20v2" })
|
|
4367
|
+
]
|
|
4368
|
+
}
|
|
4369
|
+
);
|
|
4370
|
+
}
|
|
4371
|
+
|
|
4324
4372
|
const variantClasses$1 = {
|
|
4325
|
-
warning: "bg-
|
|
4326
|
-
destructive: "bg-
|
|
4327
|
-
info: "bg-
|
|
4373
|
+
warning: "bg-accent6Darker border-accent6/30 text-accent6",
|
|
4374
|
+
destructive: "bg-accent2Darker border-accent2/30 text-accent2",
|
|
4375
|
+
info: "bg-accent5Darker border-accent5/30 text-accent5"
|
|
4328
4376
|
};
|
|
4329
4377
|
const variantIcons = {
|
|
4330
4378
|
warning: lucideReact.TriangleAlert,
|
|
4331
4379
|
destructive: lucideReact.AlertCircle,
|
|
4332
4380
|
info: lucideReact.InfoIcon
|
|
4333
4381
|
};
|
|
4334
|
-
const Alert = ({ children, variant = "destructive" }) => {
|
|
4382
|
+
const Alert = ({ children, variant = "destructive", className }) => {
|
|
4335
4383
|
const Ico = variantIcons[variant];
|
|
4336
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4384
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4385
|
+
"div",
|
|
4386
|
+
{
|
|
4387
|
+
className: cn(
|
|
4388
|
+
variantClasses$1[variant],
|
|
4389
|
+
"p-3 rounded-md border shadow-sm",
|
|
4390
|
+
transitions.all,
|
|
4391
|
+
"animate-in fade-in-0 slide-in-from-top-2 duration-200",
|
|
4392
|
+
className
|
|
4393
|
+
),
|
|
4394
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2", children: [
|
|
4395
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "mt-0.5 flex-shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(Ico, {}) }),
|
|
4396
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-neutral4", children })
|
|
4397
|
+
] })
|
|
4398
|
+
}
|
|
4399
|
+
);
|
|
4340
4400
|
};
|
|
4341
4401
|
const AlertTitle = ({ children, as: As = "h5" }) => {
|
|
4342
4402
|
return /* @__PURE__ */ jsxRuntime.jsx(Txt, { as: As, variant: "ui-md", className: "font-semibold", children });
|
|
@@ -4346,24 +4406,33 @@ const AlertDescription = ({ children, as: As = "p" }) => {
|
|
|
4346
4406
|
};
|
|
4347
4407
|
|
|
4348
4408
|
const variantClasses = {
|
|
4409
|
+
default: "text-neutral3 bg-surface4",
|
|
4410
|
+
success: "text-accent1 bg-accent1Dark",
|
|
4411
|
+
error: "text-accent2 bg-accent2Dark",
|
|
4412
|
+
info: "text-accent5 bg-accent5Dark",
|
|
4413
|
+
warning: "text-accent6 bg-accent6Dark"
|
|
4414
|
+
};
|
|
4415
|
+
const iconClasses = {
|
|
4349
4416
|
default: "text-neutral3",
|
|
4350
4417
|
success: "text-accent1",
|
|
4351
4418
|
error: "text-accent2",
|
|
4352
|
-
info: "text-
|
|
4419
|
+
info: "text-accent5",
|
|
4420
|
+
warning: "text-accent6"
|
|
4353
4421
|
};
|
|
4354
4422
|
const Badge = ({ icon, variant = "default", className, children, ...props }) => {
|
|
4355
4423
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4356
4424
|
"div",
|
|
4357
4425
|
{
|
|
4358
4426
|
className: cn(
|
|
4359
|
-
"font-mono
|
|
4427
|
+
"font-mono text-ui-sm gap-1 h-badge-default inline-flex items-center rounded-md shrink-0",
|
|
4428
|
+
transitions.colors,
|
|
4360
4429
|
icon ? "pl-1 pr-1.5" : "px-1.5",
|
|
4361
|
-
|
|
4430
|
+
variant === "default" && icon ? "bg-surface4 text-neutral5" : variantClasses[variant],
|
|
4362
4431
|
className
|
|
4363
4432
|
),
|
|
4364
4433
|
...props,
|
|
4365
4434
|
children: [
|
|
4366
|
-
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
4435
|
+
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: iconClasses[variant], children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { children: icon }) }),
|
|
4367
4436
|
children
|
|
4368
4437
|
]
|
|
4369
4438
|
}
|
|
@@ -4466,20 +4535,34 @@ function CopyButton({
|
|
|
4466
4535
|
iconSize = "default",
|
|
4467
4536
|
className
|
|
4468
4537
|
}) {
|
|
4469
|
-
const
|
|
4538
|
+
const [copied, setCopied] = React.useState(false);
|
|
4539
|
+
const { handleCopy: originalHandleCopy } = useCopyToClipboard({
|
|
4470
4540
|
text: content,
|
|
4471
4541
|
copyMessage
|
|
4472
4542
|
});
|
|
4543
|
+
const handleCopy = () => {
|
|
4544
|
+
originalHandleCopy();
|
|
4545
|
+
setCopied(true);
|
|
4546
|
+
setTimeout(() => setCopied(false), 2e3);
|
|
4547
|
+
};
|
|
4473
4548
|
return /* @__PURE__ */ jsxRuntime.jsxs(Tooltip, { children: [
|
|
4474
|
-
/* @__PURE__ */ jsxRuntime.jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4475
|
-
|
|
4549
|
+
/* @__PURE__ */ jsxRuntime.jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4550
|
+
"button",
|
|
4476
4551
|
{
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
|
|
4552
|
+
onClick: handleCopy,
|
|
4553
|
+
type: "button",
|
|
4554
|
+
className: cn("rounded-lg p-1", transitions.all, focusRing.visible, "hover:bg-surface4", className),
|
|
4555
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4556
|
+
Icon,
|
|
4557
|
+
{
|
|
4558
|
+
className: cn("text-neutral3", transitions.all, "hover:text-neutral6", copied && "text-accent1"),
|
|
4559
|
+
size: iconSize,
|
|
4560
|
+
children: copied ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckIcon, {}) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CopyIcon, {})
|
|
4561
|
+
}
|
|
4562
|
+
)
|
|
4480
4563
|
}
|
|
4481
|
-
) })
|
|
4482
|
-
/* @__PURE__ */ jsxRuntime.jsx(TooltipContent, { children: tooltip })
|
|
4564
|
+
) }),
|
|
4565
|
+
/* @__PURE__ */ jsxRuntime.jsx(TooltipContent, { children: copied ? "Copied!" : tooltip })
|
|
4483
4566
|
] });
|
|
4484
4567
|
}
|
|
4485
4568
|
|
|
@@ -4582,7 +4665,9 @@ const DialogOverlay = React__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
4582
4665
|
{
|
|
4583
4666
|
ref,
|
|
4584
4667
|
className: cn(
|
|
4585
|
-
"fixed inset-0 z-50 bg-
|
|
4668
|
+
"fixed inset-0 z-50 bg-overlay backdrop-blur-sm",
|
|
4669
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
4670
|
+
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
4586
4671
|
className
|
|
4587
4672
|
),
|
|
4588
4673
|
...props
|
|
@@ -4596,16 +4681,35 @@ const DialogContent = React__namespace.forwardRef(({ className, children, ...pro
|
|
|
4596
4681
|
{
|
|
4597
4682
|
ref,
|
|
4598
4683
|
className: cn(
|
|
4599
|
-
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%]
|
|
4684
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%]",
|
|
4685
|
+
"gap-4 border border-border1 bg-surface3 py-6 shadow-dialog rounded-lg",
|
|
4686
|
+
"duration-slow",
|
|
4687
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
4688
|
+
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
4689
|
+
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
4690
|
+
"data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%]",
|
|
4691
|
+
"data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]",
|
|
4600
4692
|
className
|
|
4601
4693
|
),
|
|
4602
4694
|
...props,
|
|
4603
4695
|
children: [
|
|
4604
4696
|
children,
|
|
4605
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4606
|
-
|
|
4607
|
-
|
|
4608
|
-
|
|
4697
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4698
|
+
DialogPrimitive__namespace.Close,
|
|
4699
|
+
{
|
|
4700
|
+
className: cn(
|
|
4701
|
+
"absolute right-4 top-4 rounded-md p-1",
|
|
4702
|
+
"text-neutral3 hover:text-neutral6 hover:bg-surface4",
|
|
4703
|
+
"transition-all duration-normal ease-out-custom",
|
|
4704
|
+
"focus:outline-none focus:ring-1 focus:ring-accent1 focus:shadow-focus-ring",
|
|
4705
|
+
"disabled:pointer-events-none"
|
|
4706
|
+
),
|
|
4707
|
+
children: [
|
|
4708
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" }),
|
|
4709
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
|
|
4710
|
+
]
|
|
4711
|
+
}
|
|
4712
|
+
)
|
|
4609
4713
|
]
|
|
4610
4714
|
}
|
|
4611
4715
|
)
|
|
@@ -4685,6 +4789,8 @@ function ToolCallProvider({
|
|
|
4685
4789
|
children,
|
|
4686
4790
|
approveToolcall,
|
|
4687
4791
|
declineToolcall,
|
|
4792
|
+
approveToolcallGenerate,
|
|
4793
|
+
declineToolcallGenerate,
|
|
4688
4794
|
approveNetworkToolcall,
|
|
4689
4795
|
declineNetworkToolcall,
|
|
4690
4796
|
isRunning,
|
|
@@ -4697,6 +4803,8 @@ function ToolCallProvider({
|
|
|
4697
4803
|
value: {
|
|
4698
4804
|
approveToolcall,
|
|
4699
4805
|
declineToolcall,
|
|
4806
|
+
approveToolcallGenerate,
|
|
4807
|
+
declineToolcallGenerate,
|
|
4700
4808
|
approveNetworkToolcall,
|
|
4701
4809
|
declineNetworkToolcall,
|
|
4702
4810
|
isRunning,
|
|
@@ -4720,11 +4828,14 @@ const ToolApprovalButtons = ({
|
|
|
4720
4828
|
toolCallId,
|
|
4721
4829
|
toolApprovalMetadata,
|
|
4722
4830
|
toolName,
|
|
4723
|
-
isNetwork
|
|
4831
|
+
isNetwork,
|
|
4832
|
+
isGenerateMode
|
|
4724
4833
|
}) => {
|
|
4725
4834
|
const {
|
|
4726
4835
|
approveToolcall,
|
|
4727
4836
|
declineToolcall,
|
|
4837
|
+
approveToolcallGenerate,
|
|
4838
|
+
declineToolcallGenerate,
|
|
4728
4839
|
isRunning,
|
|
4729
4840
|
toolCallApprovals,
|
|
4730
4841
|
approveNetworkToolcall,
|
|
@@ -4734,6 +4845,8 @@ const ToolApprovalButtons = ({
|
|
|
4734
4845
|
const handleApprove = () => {
|
|
4735
4846
|
if (isNetwork) {
|
|
4736
4847
|
approveNetworkToolcall(toolName, toolApprovalMetadata?.runId);
|
|
4848
|
+
} else if (isGenerateMode) {
|
|
4849
|
+
approveToolcallGenerate(toolCallId);
|
|
4737
4850
|
} else {
|
|
4738
4851
|
approveToolcall(toolCallId);
|
|
4739
4852
|
}
|
|
@@ -4741,6 +4854,8 @@ const ToolApprovalButtons = ({
|
|
|
4741
4854
|
const handleDecline = () => {
|
|
4742
4855
|
if (isNetwork) {
|
|
4743
4856
|
declineNetworkToolcall(toolName, toolApprovalMetadata?.runId);
|
|
4857
|
+
} else if (isGenerateMode) {
|
|
4858
|
+
declineToolcallGenerate(toolCallId);
|
|
4744
4859
|
} else {
|
|
4745
4860
|
declineToolcall(toolCallId);
|
|
4746
4861
|
}
|
|
@@ -4842,7 +4957,8 @@ const ToolBadge = ({
|
|
|
4842
4957
|
toolCallId,
|
|
4843
4958
|
toolApprovalMetadata,
|
|
4844
4959
|
toolName,
|
|
4845
|
-
isNetwork
|
|
4960
|
+
isNetwork,
|
|
4961
|
+
isGenerateMode: metadata?.mode === "generate"
|
|
4846
4962
|
}
|
|
4847
4963
|
)
|
|
4848
4964
|
] })
|
|
@@ -4920,7 +5036,10 @@ const useWorkflows = () => {
|
|
|
4920
5036
|
const { requestContext } = usePlaygroundStore();
|
|
4921
5037
|
return reactQuery.useQuery({
|
|
4922
5038
|
queryKey: ["workflows", requestContext],
|
|
4923
|
-
queryFn: () =>
|
|
5039
|
+
queryFn: async () => {
|
|
5040
|
+
const workflows = await client.listWorkflows(requestContext);
|
|
5041
|
+
return Object.fromEntries(Object.entries(workflows).filter(([_, workflow]) => !workflow.isProcessorWorkflow));
|
|
5042
|
+
}
|
|
4924
5043
|
});
|
|
4925
5044
|
};
|
|
4926
5045
|
|
|
@@ -5817,7 +5936,21 @@ function WorkflowRunProvider({
|
|
|
5817
5936
|
}
|
|
5818
5937
|
|
|
5819
5938
|
function Skeleton({ className, ...props }) {
|
|
5820
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5939
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5940
|
+
"div",
|
|
5941
|
+
{
|
|
5942
|
+
className: cn(
|
|
5943
|
+
"rounded-md bg-surface4 relative overflow-hidden",
|
|
5944
|
+
// Shimmer effect using pseudo-element
|
|
5945
|
+
"before:absolute before:inset-0",
|
|
5946
|
+
"before:translate-x-[-100%]",
|
|
5947
|
+
"before:animate-[shimmer_2s_infinite]",
|
|
5948
|
+
"before:bg-gradient-to-r before:from-transparent before:via-surface5/20 before:to-transparent",
|
|
5949
|
+
className
|
|
5950
|
+
),
|
|
5951
|
+
...props
|
|
5952
|
+
}
|
|
5953
|
+
);
|
|
5821
5954
|
}
|
|
5822
5955
|
|
|
5823
5956
|
const lodashTitleCase = (str) => {
|
|
@@ -6215,11 +6348,40 @@ const constructNodesAndEdges = ({
|
|
|
6215
6348
|
};
|
|
6216
6349
|
|
|
6217
6350
|
const Collapsible = CollapsiblePrimitive__namespace.Root;
|
|
6218
|
-
const CollapsibleTrigger = (props) =>
|
|
6219
|
-
|
|
6220
|
-
|
|
6221
|
-
|
|
6222
|
-
|
|
6351
|
+
const CollapsibleTrigger = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6352
|
+
CollapsiblePrimitive__namespace.CollapsibleTrigger,
|
|
6353
|
+
{
|
|
6354
|
+
ref,
|
|
6355
|
+
className: cn(
|
|
6356
|
+
"-outline-offset-2",
|
|
6357
|
+
transitions.colors,
|
|
6358
|
+
focusRing.visible,
|
|
6359
|
+
"hover:text-neutral5",
|
|
6360
|
+
"[&>svg]:transition-transform [&>svg]:duration-normal [&>svg]:ease-out-custom",
|
|
6361
|
+
"[&[data-state=open]>svg]:rotate-90",
|
|
6362
|
+
className
|
|
6363
|
+
),
|
|
6364
|
+
...props,
|
|
6365
|
+
children
|
|
6366
|
+
}
|
|
6367
|
+
));
|
|
6368
|
+
CollapsibleTrigger.displayName = CollapsiblePrimitive__namespace.CollapsibleTrigger.displayName;
|
|
6369
|
+
const CollapsibleContent = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6370
|
+
CollapsiblePrimitive__namespace.CollapsibleContent,
|
|
6371
|
+
{
|
|
6372
|
+
ref,
|
|
6373
|
+
className: cn(
|
|
6374
|
+
"overflow-hidden",
|
|
6375
|
+
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:slide-in-from-top-1",
|
|
6376
|
+
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-1",
|
|
6377
|
+
"duration-normal ease-out-custom",
|
|
6378
|
+
className
|
|
6379
|
+
),
|
|
6380
|
+
...props,
|
|
6381
|
+
children
|
|
6382
|
+
}
|
|
6383
|
+
));
|
|
6384
|
+
CollapsibleContent.displayName = CollapsiblePrimitive__namespace.CollapsibleContent.displayName;
|
|
6223
6385
|
|
|
6224
6386
|
const BADGE_COLORS = {
|
|
6225
6387
|
sleep: "#A855F7",
|
|
@@ -6369,13 +6531,14 @@ const ScrollBar = React__namespace.forwardRef(({ className, orientation = "verti
|
|
|
6369
6531
|
ref,
|
|
6370
6532
|
orientation,
|
|
6371
6533
|
className: cn(
|
|
6372
|
-
"flex touch-none select-none transition-
|
|
6534
|
+
"flex touch-none select-none transition-all duration-normal ease-out-custom",
|
|
6535
|
+
"opacity-0 hover:opacity-100 data-[state=visible]:opacity-100",
|
|
6373
6536
|
orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-px",
|
|
6374
6537
|
orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-px",
|
|
6375
6538
|
className
|
|
6376
6539
|
),
|
|
6377
6540
|
...props,
|
|
6378
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(ScrollAreaPrimitive__namespace.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-
|
|
6541
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(ScrollAreaPrimitive__namespace.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-neutral2 hover:bg-neutral3 transition-colors duration-normal" })
|
|
6379
6542
|
}
|
|
6380
6543
|
));
|
|
6381
6544
|
ScrollBar.displayName = ScrollAreaPrimitive__namespace.ScrollAreaScrollbar.displayName;
|
|
@@ -6512,16 +6675,22 @@ const cva = (base, config)=>(props)=>{
|
|
|
6512
6675
|
|
|
6513
6676
|
const inputVariants = cva(
|
|
6514
6677
|
cn(
|
|
6515
|
-
|
|
6678
|
+
// Base styles with enhanced transitions
|
|
6679
|
+
"flex w-full text-neutral6 border bg-transparent",
|
|
6680
|
+
"transition-all duration-normal ease-out-custom",
|
|
6681
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
6682
|
+
// Better placeholder styling
|
|
6683
|
+
"placeholder:text-neutral2 placeholder:transition-opacity placeholder:duration-normal",
|
|
6684
|
+
"focus:placeholder:opacity-70",
|
|
6516
6685
|
formElementRadius,
|
|
6517
6686
|
formElementFocus
|
|
6518
6687
|
),
|
|
6519
6688
|
{
|
|
6520
6689
|
variants: {
|
|
6521
6690
|
variant: {
|
|
6522
|
-
default: "border border-border1
|
|
6523
|
-
filled: "border bg-
|
|
6524
|
-
unstyled: "border-0 bg-transparent
|
|
6691
|
+
default: "border border-border1 hover:border-border2",
|
|
6692
|
+
filled: "border bg-surface2 border-border1 hover:border-border2",
|
|
6693
|
+
unstyled: "border-0 bg-transparent shadow-none focus:shadow-none focus:ring-0"
|
|
6525
6694
|
},
|
|
6526
6695
|
size: {
|
|
6527
6696
|
sm: `${formElementSizes.sm} px-2 text-ui-sm`,
|
|
@@ -6536,14 +6705,20 @@ const inputVariants = cva(
|
|
|
6536
6705
|
}
|
|
6537
6706
|
);
|
|
6538
6707
|
const Input = React__namespace.forwardRef(
|
|
6539
|
-
({ className, size, testId, variant, type, ...props }, ref) => {
|
|
6708
|
+
({ className, size, testId, variant, type, error, ...props }, ref) => {
|
|
6540
6709
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6541
6710
|
"input",
|
|
6542
6711
|
{
|
|
6543
6712
|
type,
|
|
6544
|
-
className: cn(
|
|
6713
|
+
className: cn(
|
|
6714
|
+
inputVariants({ variant, size }),
|
|
6715
|
+
// Error state styling
|
|
6716
|
+
error && "border-error focus:ring-error focus:shadow-glow-accent2",
|
|
6717
|
+
className
|
|
6718
|
+
),
|
|
6545
6719
|
"data-testid": testId,
|
|
6546
6720
|
ref,
|
|
6721
|
+
"aria-invalid": error,
|
|
6547
6722
|
...props
|
|
6548
6723
|
}
|
|
6549
6724
|
);
|
|
@@ -6591,11 +6766,27 @@ const Checkbox = React__namespace.forwardRef(({ className, ...props }, ref) => /
|
|
|
6591
6766
|
{
|
|
6592
6767
|
ref,
|
|
6593
6768
|
className: cn(
|
|
6594
|
-
"peer h-4 w-4 shrink-0 rounded-sm border border-
|
|
6769
|
+
"peer h-4 w-4 shrink-0 rounded-sm border border-neutral3",
|
|
6770
|
+
"shadow-sm",
|
|
6771
|
+
transitions.all,
|
|
6772
|
+
"hover:border-neutral5 hover:shadow-md",
|
|
6773
|
+
formElementFocus,
|
|
6774
|
+
"disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:border-neutral3 disabled:hover:shadow-sm",
|
|
6775
|
+
"data-[state=checked]:bg-accent1 data-[state=checked]:border-accent1 data-[state=checked]:text-surface1",
|
|
6776
|
+
"data-[state=checked]:shadow-glow-accent1",
|
|
6595
6777
|
className
|
|
6596
6778
|
),
|
|
6597
6779
|
...props,
|
|
6598
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6780
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6781
|
+
CheckboxPrimitive__namespace.Indicator,
|
|
6782
|
+
{
|
|
6783
|
+
className: cn(
|
|
6784
|
+
"flex items-center justify-center text-current",
|
|
6785
|
+
"data-[state=checked]:animate-in data-[state=checked]:zoom-in-50 data-[state=checked]:duration-150"
|
|
6786
|
+
),
|
|
6787
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-3.5 w-3.5 stroke-[3]" })
|
|
6788
|
+
}
|
|
6789
|
+
)
|
|
6599
6790
|
}
|
|
6600
6791
|
));
|
|
6601
6792
|
Checkbox.displayName = CheckboxPrimitive__namespace.Root.displayName;
|
|
@@ -6698,13 +6889,15 @@ const SelectTrigger = React__namespace.forwardRef(
|
|
|
6698
6889
|
"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",
|
|
6699
6890
|
formElementRadius,
|
|
6700
6891
|
formElementFocus,
|
|
6892
|
+
transitions.all,
|
|
6893
|
+
"hover:border-neutral2",
|
|
6701
6894
|
selectTriggerSizeClasses[size],
|
|
6702
6895
|
className
|
|
6703
6896
|
),
|
|
6704
6897
|
...props,
|
|
6705
6898
|
children: [
|
|
6706
6899
|
children,
|
|
6707
|
-
/* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Icon, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "h-4 w-4
|
|
6900
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Icon, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: cn("h-4 w-4 text-neutral3", transitions.colors) }) })
|
|
6708
6901
|
]
|
|
6709
6902
|
}
|
|
6710
6903
|
)
|
|
@@ -6739,12 +6932,17 @@ const SelectItem = React__namespace.forwardRef(({ className, children, ...props
|
|
|
6739
6932
|
{
|
|
6740
6933
|
ref,
|
|
6741
6934
|
className: cn(
|
|
6742
|
-
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-neutral5 text-sm
|
|
6935
|
+
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-neutral5 text-sm",
|
|
6936
|
+
transitions.colors,
|
|
6937
|
+
"hover:bg-surface5 hover:text-neutral5",
|
|
6938
|
+
"focus:bg-surface5 focus:text-neutral5",
|
|
6939
|
+
"data-[state=checked]:bg-accent1Dark data-[state=checked]:text-accent1",
|
|
6940
|
+
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
6743
6941
|
className
|
|
6744
6942
|
),
|
|
6745
6943
|
...props,
|
|
6746
6944
|
children: [
|
|
6747
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-4 w-4" }) }) }),
|
|
6945
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-4 w-4 text-accent1" }) }) }),
|
|
6748
6946
|
/* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.ItemText, { children })
|
|
6749
6947
|
]
|
|
6750
6948
|
}
|
|
@@ -6925,7 +7123,13 @@ function SearchField({ onReset, ...props }) {
|
|
|
6925
7123
|
{
|
|
6926
7124
|
type: "button",
|
|
6927
7125
|
onClick: onReset,
|
|
6928
|
-
className: cn(
|
|
7126
|
+
className: cn(
|
|
7127
|
+
"absolute top-1/2 right-2 -translate-y-1/2 p-1 rounded",
|
|
7128
|
+
transitions.all,
|
|
7129
|
+
"hover:bg-surface4",
|
|
7130
|
+
"[&>svg]:transition-colors [&>svg]:duration-normal",
|
|
7131
|
+
"[&:hover>svg]:text-neutral5"
|
|
7132
|
+
),
|
|
6929
7133
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.XIcon, { className: "text-neutral3 w-[1rem] h-[1rem]" })
|
|
6930
7134
|
}
|
|
6931
7135
|
)
|
|
@@ -7979,11 +8183,26 @@ const RadioGroupItem = React__namespace.forwardRef(({ className, ...props }, ref
|
|
|
7979
8183
|
{
|
|
7980
8184
|
ref,
|
|
7981
8185
|
className: cn(
|
|
7982
|
-
"aspect-square h-4 w-4 rounded-full border border-
|
|
8186
|
+
"aspect-square h-4 w-4 rounded-full border border-neutral3 text-neutral6",
|
|
8187
|
+
"shadow-sm",
|
|
8188
|
+
transitions.all,
|
|
8189
|
+
"hover:border-neutral5 hover:shadow-md",
|
|
8190
|
+
formElementFocus,
|
|
8191
|
+
"disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:border-neutral3 disabled:hover:shadow-sm",
|
|
8192
|
+
"data-[state=checked]:border-accent1 data-[state=checked]:shadow-glow-accent1",
|
|
7983
8193
|
className
|
|
7984
8194
|
),
|
|
7985
8195
|
...props,
|
|
7986
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8196
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8197
|
+
RadioGroupPrimitive__namespace.Indicator,
|
|
8198
|
+
{
|
|
8199
|
+
className: cn(
|
|
8200
|
+
"flex items-center justify-center",
|
|
8201
|
+
"data-[state=checked]:animate-in data-[state=checked]:zoom-in-50 data-[state=checked]:duration-150"
|
|
8202
|
+
),
|
|
8203
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Circle, { className: "h-2 w-2 fill-accent1 text-accent1" })
|
|
8204
|
+
}
|
|
8205
|
+
)
|
|
7987
8206
|
}
|
|
7988
8207
|
);
|
|
7989
8208
|
});
|
|
@@ -7996,9 +8215,10 @@ const WorkflowInputData = ({
|
|
|
7996
8215
|
isSubmitLoading,
|
|
7997
8216
|
submitButtonLabel,
|
|
7998
8217
|
onSubmit,
|
|
7999
|
-
children
|
|
8218
|
+
children,
|
|
8219
|
+
isProcessorWorkflow
|
|
8000
8220
|
}) => {
|
|
8001
|
-
const [type, setType] = React.useState("form");
|
|
8221
|
+
const [type, setType] = React.useState(isProcessorWorkflow ? "simple" : "form");
|
|
8002
8222
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
8003
8223
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8004
8224
|
RadioGroup,
|
|
@@ -8008,6 +8228,10 @@ const WorkflowInputData = ({
|
|
|
8008
8228
|
onValueChange: (value) => setType(value),
|
|
8009
8229
|
className: "pb-4",
|
|
8010
8230
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row gap-4", children: [
|
|
8231
|
+
isProcessorWorkflow && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
8232
|
+
/* @__PURE__ */ jsxRuntime.jsx(RadioGroupItem, { value: "simple", id: "simple" }),
|
|
8233
|
+
/* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: "simple", className: "!text-neutral3 text-ui-sm", children: "Simple" })
|
|
8234
|
+
] }),
|
|
8011
8235
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
8012
8236
|
/* @__PURE__ */ jsxRuntime.jsx(RadioGroupItem, { value: "form", id: "form" }),
|
|
8013
8237
|
/* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: "form", className: "!text-neutral3 text-ui-sm", children: "Form" })
|
|
@@ -8025,7 +8249,18 @@ const WorkflowInputData = ({
|
|
|
8025
8249
|
className: cn({
|
|
8026
8250
|
"opacity-50 pointer-events-none": isSubmitLoading
|
|
8027
8251
|
}),
|
|
8028
|
-
children: type === "
|
|
8252
|
+
children: type === "simple" && isProcessorWorkflow ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
8253
|
+
SimpleProcessorInput,
|
|
8254
|
+
{
|
|
8255
|
+
schema,
|
|
8256
|
+
defaultValues,
|
|
8257
|
+
isSubmitLoading,
|
|
8258
|
+
submitButtonLabel,
|
|
8259
|
+
onSubmit,
|
|
8260
|
+
withoutSubmit,
|
|
8261
|
+
children
|
|
8262
|
+
}
|
|
8263
|
+
) : type === "form" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
8029
8264
|
DynamicForm,
|
|
8030
8265
|
{
|
|
8031
8266
|
schema,
|
|
@@ -8094,6 +8329,87 @@ const JSONInput = ({
|
|
|
8094
8329
|
withoutSubmit ? null : /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "light", onClick: handleSubmit, className: "w-full", size: "lg", children: isSubmitLoading ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "animate-spin" }) : submitButtonLabel })
|
|
8095
8330
|
] });
|
|
8096
8331
|
};
|
|
8332
|
+
const PROCESSOR_PHASES = [
|
|
8333
|
+
{ value: "input", label: "Input - Process input messages before LLM" },
|
|
8334
|
+
{ value: "inputStep", label: "Input Step - Process at each agentic loop step" },
|
|
8335
|
+
{ value: "outputStream", label: "Output Stream - Process streaming chunks" },
|
|
8336
|
+
{ value: "outputResult", label: "Output Result - Process complete output" },
|
|
8337
|
+
{ value: "outputStep", label: "Output Step - Process after each LLM response" }
|
|
8338
|
+
];
|
|
8339
|
+
const SimpleProcessorInput = ({
|
|
8340
|
+
schema,
|
|
8341
|
+
defaultValues,
|
|
8342
|
+
isSubmitLoading,
|
|
8343
|
+
submitButtonLabel,
|
|
8344
|
+
onSubmit,
|
|
8345
|
+
withoutSubmit,
|
|
8346
|
+
children
|
|
8347
|
+
}) => {
|
|
8348
|
+
const [message, setMessage] = React.useState("Hello, this is a test message.");
|
|
8349
|
+
const [phase, setPhase] = React.useState("input");
|
|
8350
|
+
const [errors, setErrors] = React.useState([]);
|
|
8351
|
+
const handleSubmit = () => {
|
|
8352
|
+
setErrors([]);
|
|
8353
|
+
const isOutputPhase = phase === "outputStep" || phase === "outputResult";
|
|
8354
|
+
const messageRole = isOutputPhase ? "assistant" : "user";
|
|
8355
|
+
const data = {
|
|
8356
|
+
messages: [
|
|
8357
|
+
{
|
|
8358
|
+
id: crypto.randomUUID(),
|
|
8359
|
+
role: messageRole,
|
|
8360
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
8361
|
+
content: {
|
|
8362
|
+
format: 2,
|
|
8363
|
+
parts: [{ type: "text", text: message }]
|
|
8364
|
+
}
|
|
8365
|
+
}
|
|
8366
|
+
],
|
|
8367
|
+
phase
|
|
8368
|
+
};
|
|
8369
|
+
try {
|
|
8370
|
+
const result = schema.safeParse(data);
|
|
8371
|
+
if (!result.success) {
|
|
8372
|
+
setErrors(result.error.issues.map((e) => `[${e.path.join(".")}] ${e.message}`));
|
|
8373
|
+
} else {
|
|
8374
|
+
onSubmit(result.data);
|
|
8375
|
+
}
|
|
8376
|
+
} catch (e) {
|
|
8377
|
+
setErrors(["Error processing input"]);
|
|
8378
|
+
}
|
|
8379
|
+
};
|
|
8380
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-4", children: [
|
|
8381
|
+
errors.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border border-accent2 rounded-lg p-2", children: [
|
|
8382
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Txt, { as: "p", variant: "ui-md", className: "text-accent2 font-semibold", children: [
|
|
8383
|
+
errors.length,
|
|
8384
|
+
" errors found"
|
|
8385
|
+
] }),
|
|
8386
|
+
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: "list-disc list-inside", children: errors.map((error, idx) => /* @__PURE__ */ jsxRuntime.jsx("li", { className: "text-ui-sm text-accent2", children: error }, idx)) })
|
|
8387
|
+
] }),
|
|
8388
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
8389
|
+
/* @__PURE__ */ jsxRuntime.jsx(Txt, { as: "label", variant: "ui-sm", className: "text-neutral3", children: "Phase" }),
|
|
8390
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Select, { value: phase, onValueChange: setPhase, children: [
|
|
8391
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { className: "w-full", children: /* @__PURE__ */ jsxRuntime.jsx(SelectValue, { placeholder: "Select phase" }) }),
|
|
8392
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectContent, { children: PROCESSOR_PHASES.map((p) => /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: p.value, children: p.value }, p.value)) })
|
|
8393
|
+
] }),
|
|
8394
|
+
/* @__PURE__ */ jsxRuntime.jsx(Txt, { variant: "ui-xs", className: "text-icon4", children: PROCESSOR_PHASES.find((p) => p.value === phase)?.label })
|
|
8395
|
+
] }),
|
|
8396
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
8397
|
+
/* @__PURE__ */ jsxRuntime.jsx(Txt, { as: "label", variant: "ui-sm", className: "text-neutral3", children: "Test Message" }),
|
|
8398
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8399
|
+
"textarea",
|
|
8400
|
+
{
|
|
8401
|
+
value: message,
|
|
8402
|
+
onChange: (e) => setMessage(e.target.value),
|
|
8403
|
+
placeholder: "Enter a test message...",
|
|
8404
|
+
rows: 4,
|
|
8405
|
+
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"
|
|
8406
|
+
}
|
|
8407
|
+
)
|
|
8408
|
+
] }),
|
|
8409
|
+
children,
|
|
8410
|
+
withoutSubmit ? null : /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "light", onClick: handleSubmit, className: "w-full", size: "lg", children: isSubmitLoading ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "animate-spin" }) : submitButtonLabel })
|
|
8411
|
+
] });
|
|
8412
|
+
};
|
|
8097
8413
|
|
|
8098
8414
|
const formatJSON = async (code) => {
|
|
8099
8415
|
const formatted = await prettier.format(code, {
|
|
@@ -9132,11 +9448,29 @@ const Slider = React__namespace.forwardRef(({ className, ...props }, ref) => /*
|
|
|
9132
9448
|
SliderPrimitive__namespace.Root,
|
|
9133
9449
|
{
|
|
9134
9450
|
ref,
|
|
9135
|
-
className: cn("relative flex w-full touch-none select-none items-center", className),
|
|
9451
|
+
className: cn("relative flex w-full touch-none select-none items-center group", className),
|
|
9136
9452
|
...props,
|
|
9137
9453
|
children: [
|
|
9138
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9139
|
-
|
|
9454
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9455
|
+
SliderPrimitive__namespace.Track,
|
|
9456
|
+
{
|
|
9457
|
+
className: cn("relative h-1.5 w-full grow overflow-hidden rounded-full bg-neutral2", transitions.colors),
|
|
9458
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(SliderPrimitive__namespace.Range, { className: cn("absolute h-full bg-accent1", transitions.all) })
|
|
9459
|
+
}
|
|
9460
|
+
),
|
|
9461
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9462
|
+
SliderPrimitive__namespace.Thumb,
|
|
9463
|
+
{
|
|
9464
|
+
className: cn(
|
|
9465
|
+
"block h-4 w-4 rounded-full border-2 border-accent1 bg-white shadow-md",
|
|
9466
|
+
"transition-all duration-normal ease-out-custom",
|
|
9467
|
+
formElementFocus,
|
|
9468
|
+
"hover:scale-110 hover:shadow-lg",
|
|
9469
|
+
"active:scale-95",
|
|
9470
|
+
"disabled:pointer-events-none disabled:opacity-50"
|
|
9471
|
+
)
|
|
9472
|
+
}
|
|
9473
|
+
)
|
|
9140
9474
|
]
|
|
9141
9475
|
}
|
|
9142
9476
|
));
|
|
@@ -9456,7 +9790,8 @@ function WorkflowTrigger({
|
|
|
9456
9790
|
setPayload(data);
|
|
9457
9791
|
handleExecuteWorkflow(data);
|
|
9458
9792
|
},
|
|
9459
|
-
withoutSubmit: !!paramsRunId
|
|
9793
|
+
withoutSubmit: !!paramsRunId,
|
|
9794
|
+
isProcessorWorkflow: workflow?.isProcessorWorkflow
|
|
9460
9795
|
}
|
|
9461
9796
|
) : !!paramsRunId ? null : /* @__PURE__ */ jsxRuntime.jsx(
|
|
9462
9797
|
Button,
|
|
@@ -9601,20 +9936,31 @@ const WorkflowRunDetail = ({
|
|
|
9601
9936
|
}
|
|
9602
9937
|
};
|
|
9603
9938
|
|
|
9604
|
-
|
|
9939
|
+
function EmptyState({
|
|
9605
9940
|
iconSlot,
|
|
9606
9941
|
titleSlot,
|
|
9607
9942
|
descriptionSlot,
|
|
9608
9943
|
actionSlot,
|
|
9609
|
-
|
|
9610
|
-
|
|
9611
|
-
|
|
9612
|
-
|
|
9613
|
-
|
|
9614
|
-
|
|
9615
|
-
|
|
9616
|
-
|
|
9617
|
-
|
|
9944
|
+
className,
|
|
9945
|
+
as: HeadingTag = "h3"
|
|
9946
|
+
}) {
|
|
9947
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9948
|
+
"div",
|
|
9949
|
+
{
|
|
9950
|
+
className: cn(
|
|
9951
|
+
"flex flex-col items-center justify-center text-center py-10 px-6",
|
|
9952
|
+
"transition-opacity duration-normal ease-out-custom",
|
|
9953
|
+
className
|
|
9954
|
+
),
|
|
9955
|
+
children: [
|
|
9956
|
+
iconSlot && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-4", children: iconSlot }),
|
|
9957
|
+
/* @__PURE__ */ jsxRuntime.jsx(HeadingTag, { className: "font-medium text-neutral5 text-ui-md", children: titleSlot }),
|
|
9958
|
+
descriptionSlot && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1.5 text-neutral3 text-ui-sm max-w-md", children: descriptionSlot }),
|
|
9959
|
+
actionSlot && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-5", children: actionSlot })
|
|
9960
|
+
]
|
|
9961
|
+
}
|
|
9962
|
+
);
|
|
9963
|
+
}
|
|
9618
9964
|
|
|
9619
9965
|
const rowSize = {
|
|
9620
9966
|
default: "[&>tbody>tr]:h-table-row",
|
|
@@ -9624,14 +9970,14 @@ const Table = ({ className, children, size = "default", style }) => {
|
|
|
9624
9970
|
return /* @__PURE__ */ jsxRuntime.jsx("table", { className: cn("w-full", rowSize[size], className), style, children });
|
|
9625
9971
|
};
|
|
9626
9972
|
const Thead = ({ className, children }) => {
|
|
9627
|
-
return /* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsx("tr", { className: cn("h-table-header border-b border-border1 bg-surface2", className), children }) });
|
|
9973
|
+
return /* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsx("tr", { className: cn("h-table-header border-b border-border1 bg-surface2/80", className), children }) });
|
|
9628
9974
|
};
|
|
9629
9975
|
const Th = ({ className, children, ...props }) => {
|
|
9630
9976
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9631
9977
|
"th",
|
|
9632
9978
|
{
|
|
9633
9979
|
className: cn(
|
|
9634
|
-
"text-
|
|
9980
|
+
"text-neutral2 text-ui-xs h-full whitespace-nowrap text-left font-medium uppercase tracking-wide first:pl-3 last:pr-3",
|
|
9635
9981
|
className
|
|
9636
9982
|
),
|
|
9637
9983
|
...props,
|
|
@@ -9653,7 +9999,12 @@ const Row = React.forwardRef(
|
|
|
9653
9999
|
"tr",
|
|
9654
10000
|
{
|
|
9655
10001
|
className: cn(
|
|
9656
|
-
"border-b border-border1
|
|
10002
|
+
"border-b border-border1",
|
|
10003
|
+
// Smooth hover transition
|
|
10004
|
+
"transition-colors duration-normal ease-out-custom",
|
|
10005
|
+
"hover:bg-surface3",
|
|
10006
|
+
// Focus state
|
|
10007
|
+
"focus:bg-surface3 focus:outline-none focus:ring-1 focus:ring-inset focus:ring-accent1/50",
|
|
9657
10008
|
selected && "bg-surface4",
|
|
9658
10009
|
onClick && "cursor-pointer",
|
|
9659
10010
|
className
|
|
@@ -9871,6 +10222,8 @@ const LinkComponentContext = React.createContext({
|
|
|
9871
10222
|
networkThreadLink: () => "",
|
|
9872
10223
|
scorerLink: () => "",
|
|
9873
10224
|
toolLink: () => "",
|
|
10225
|
+
processorsLink: () => "",
|
|
10226
|
+
processorLink: () => "",
|
|
9874
10227
|
mcpServerLink: () => "",
|
|
9875
10228
|
mcpServerToolLink: () => "",
|
|
9876
10229
|
workflowRunLink: () => ""
|
|
@@ -9887,7 +10240,7 @@ const useLinkComponent = () => {
|
|
|
9887
10240
|
return ctx;
|
|
9888
10241
|
};
|
|
9889
10242
|
|
|
9890
|
-
const columns$
|
|
10243
|
+
const columns$5 = [
|
|
9891
10244
|
{
|
|
9892
10245
|
id: "name",
|
|
9893
10246
|
header: "Name",
|
|
@@ -9897,10 +10250,7 @@ const columns$4 = [
|
|
|
9897
10250
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9898
10251
|
EntryCell,
|
|
9899
10252
|
{
|
|
9900
|
-
name: /* @__PURE__ */ jsxRuntime.
|
|
9901
|
-
/* @__PURE__ */ jsxRuntime.jsx(Link, { href: paths.workflowLink(row.original.id), children: row.original.name }),
|
|
9902
|
-
workflow.isProcessorWorkflow && /* @__PURE__ */ jsxRuntime.jsx(Badge, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Cpu, { className: "h-3 w-3" }), className: "!h-badge-sm bg-violet-500/20 text-violet-400", children: "Processor" })
|
|
9903
|
-
] }),
|
|
10253
|
+
name: /* @__PURE__ */ jsxRuntime.jsx(Link, { href: paths.workflowLink(row.original.id), children: row.original.name }),
|
|
9904
10254
|
description: workflow.description,
|
|
9905
10255
|
meta: void 0
|
|
9906
10256
|
}
|
|
@@ -9966,10 +10316,12 @@ const Searchbar = ({ onSearch, label, placeholder, debounceMs = 300, size = "md"
|
|
|
9966
10316
|
"border border-border1 flex w-full items-center gap-2 overflow-hidden pl-2 pr-1",
|
|
9967
10317
|
formElementRadius,
|
|
9968
10318
|
formElementFocusWithin,
|
|
10319
|
+
transitions.all,
|
|
10320
|
+
"hover:border-neutral2",
|
|
9969
10321
|
searchbarSizeClasses[size]
|
|
9970
10322
|
),
|
|
9971
10323
|
children: [
|
|
9972
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.SearchIcon, { className: "text-neutral3 h-4 w-4" }),
|
|
10324
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.SearchIcon, { className: cn("text-neutral3 h-4 w-4", transitions.colors) }),
|
|
9973
10325
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1", children: [
|
|
9974
10326
|
/* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: id, className: "sr-only", children: label }),
|
|
9975
10327
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -9979,7 +10331,7 @@ const Searchbar = ({ onSearch, label, placeholder, debounceMs = 300, size = "md"
|
|
|
9979
10331
|
type: "text",
|
|
9980
10332
|
placeholder,
|
|
9981
10333
|
className: cn(
|
|
9982
|
-
"bg-
|
|
10334
|
+
"bg-transparent text-ui-md placeholder:text-neutral3 block w-full px-2 outline-none",
|
|
9983
10335
|
searchbarSizeClasses[size]
|
|
9984
10336
|
),
|
|
9985
10337
|
name: id,
|
|
@@ -10011,7 +10363,7 @@ function WorkflowTable({ workflows, isLoading }) {
|
|
|
10011
10363
|
}, [workflows]);
|
|
10012
10364
|
const table = reactTable.useReactTable({
|
|
10013
10365
|
data: workflowData,
|
|
10014
|
-
columns: columns$
|
|
10366
|
+
columns: columns$5,
|
|
10015
10367
|
getCoreRowModel: reactTable.getCoreRowModel()
|
|
10016
10368
|
});
|
|
10017
10369
|
const ths = table.getHeaderGroups()[0];
|
|
@@ -10092,16 +10444,18 @@ const TabList = ({ children, variant = "default", className }) => {
|
|
|
10092
10444
|
RadixTabs__namespace.List,
|
|
10093
10445
|
{
|
|
10094
10446
|
className: cn(
|
|
10095
|
-
"flex items-center",
|
|
10447
|
+
"flex items-center relative",
|
|
10096
10448
|
{
|
|
10097
10449
|
// variant: default
|
|
10098
10450
|
"text-ui-lg": variant === "default",
|
|
10099
10451
|
"[&>button]:py-2 [&>button]:px-6 [&>button]:font-normal [&>button]:text-neutral3 [&>button]:flex-1 [&>button]:border-b [&>button]:border-border1": variant === "default",
|
|
10100
|
-
|
|
10452
|
+
[`[&>button]:${transitions.colors} [&>button]:hover:text-neutral4`]: variant === "default",
|
|
10453
|
+
"[&>button[data-state=active]]:text-neutral5 [&>button[data-state=active]]:border-accent1": variant === "default",
|
|
10101
10454
|
// variant: buttons
|
|
10102
10455
|
"border border-border1 flex justify-stretch rounded-md overflow-hidden text-ui-md min-h-[2.5rem]": variant === "buttons",
|
|
10103
|
-
|
|
10104
|
-
"[&>button
|
|
10456
|
+
[`[&>button]:flex-1 [&>button]:py-2 [&>button]:px-4 [&>button]:text-neutral3 [&>button]:${transitions.all}`]: variant === "buttons",
|
|
10457
|
+
"[&>button]:hover:text-neutral4 [&>button]:hover:bg-surface3": variant === "buttons",
|
|
10458
|
+
"[&>button[data-state=active]]:text-neutral5 [&>button[data-state=active]]:bg-surface4 [&>button[data-state=active]]:shadow-inner": variant === "buttons"
|
|
10105
10459
|
},
|
|
10106
10460
|
className
|
|
10107
10461
|
),
|
|
@@ -10116,7 +10470,11 @@ const Tab = ({ children, value, onClick, onClose, className }) => {
|
|
|
10116
10470
|
{
|
|
10117
10471
|
value,
|
|
10118
10472
|
className: cn(
|
|
10119
|
-
"text-xs p-3 text-neutral3
|
|
10473
|
+
"text-xs p-3 text-neutral3 whitespace-nowrap flex-shrink-0 flex items-center justify-center gap-1.5",
|
|
10474
|
+
transitions.all,
|
|
10475
|
+
focusRing.visible,
|
|
10476
|
+
"hover:text-neutral4",
|
|
10477
|
+
"data-[state=active]:text-neutral5 data-[state=active]:border-b-2 data-[state=active]:border-accent1",
|
|
10120
10478
|
className
|
|
10121
10479
|
),
|
|
10122
10480
|
onClick,
|
|
@@ -10129,7 +10487,7 @@ const Tab = ({ children, value, onClick, onClose, className }) => {
|
|
|
10129
10487
|
e.stopPropagation();
|
|
10130
10488
|
onClose();
|
|
10131
10489
|
},
|
|
10132
|
-
className: "p-0.5 hover:bg-
|
|
10490
|
+
className: cn("p-0.5 hover:bg-surface4 rounded", transitions.colors, "hover:text-neutral5"),
|
|
10133
10491
|
"aria-label": "Close tab",
|
|
10134
10492
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "w-3 h-3" })
|
|
10135
10493
|
}
|
|
@@ -10145,7 +10503,10 @@ const TabContent = ({ children, value, className }) => {
|
|
|
10145
10503
|
{
|
|
10146
10504
|
value,
|
|
10147
10505
|
className: cn(
|
|
10148
|
-
"grid py-3 overflow-y-auto ring-offset-background
|
|
10506
|
+
"grid py-3 overflow-y-auto ring-offset-background",
|
|
10507
|
+
focusRing.visible,
|
|
10508
|
+
"data-[state=active]:animate-in data-[state=active]:fade-in-0 data-[state=active]:duration-200",
|
|
10509
|
+
"data-[state=inactive]:animate-out data-[state=inactive]:fade-out-0 data-[state=inactive]:duration-150",
|
|
10149
10510
|
className
|
|
10150
10511
|
),
|
|
10151
10512
|
children
|
|
@@ -10197,21 +10558,27 @@ const TracingRunOptions = () => {
|
|
|
10197
10558
|
] });
|
|
10198
10559
|
};
|
|
10199
10560
|
|
|
10200
|
-
|
|
10561
|
+
const sizeClasses = {
|
|
10562
|
+
sm: "w-4 h-4",
|
|
10563
|
+
md: "w-6 h-6",
|
|
10564
|
+
lg: "w-8 h-8"
|
|
10565
|
+
};
|
|
10566
|
+
function Spinner({ color, className, size = "md" }) {
|
|
10201
10567
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10202
10568
|
"svg",
|
|
10203
10569
|
{
|
|
10204
|
-
className: cn("animate-spin
|
|
10570
|
+
className: cn("animate-spin", sizeClasses[size], className),
|
|
10571
|
+
style: { animationDuration: "800ms", animationTimingFunction: "cubic-bezier(0.4, 0, 0.2, 1)" },
|
|
10205
10572
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10206
10573
|
width: "24",
|
|
10207
10574
|
height: "24",
|
|
10208
10575
|
viewBox: "0 0 24 24",
|
|
10209
10576
|
fill: "none",
|
|
10210
10577
|
stroke: "currentColor",
|
|
10211
|
-
strokeWidth: "2",
|
|
10578
|
+
strokeWidth: "2.5",
|
|
10212
10579
|
strokeLinecap: "round",
|
|
10213
10580
|
strokeLinejoin: "round",
|
|
10214
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M21 12a9 9 0 1 1-6.219-8.56", stroke: color })
|
|
10581
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M21 12a9 9 0 1 1-6.219-8.56", stroke: color || "currentColor", className: "text-accent1" })
|
|
10215
10582
|
}
|
|
10216
10583
|
);
|
|
10217
10584
|
}
|
|
@@ -10546,59 +10913,84 @@ function Combobox({
|
|
|
10546
10913
|
]
|
|
10547
10914
|
}
|
|
10548
10915
|
) }),
|
|
10549
|
-
/* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { className: "p-0 w-fit", align: "start", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10550
|
-
|
|
10551
|
-
|
|
10552
|
-
|
|
10553
|
-
"
|
|
10554
|
-
|
|
10555
|
-
|
|
10556
|
-
|
|
10557
|
-
|
|
10558
|
-
|
|
10559
|
-
|
|
10560
|
-
|
|
10561
|
-
|
|
10562
|
-
"aria-autocomplete": "list",
|
|
10563
|
-
"aria-controls": "combobox-options",
|
|
10564
|
-
"aria-expanded": open
|
|
10565
|
-
}
|
|
10566
|
-
)
|
|
10567
|
-
] }),
|
|
10568
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10569
|
-
"div",
|
|
10570
|
-
{
|
|
10571
|
-
ref: listRef,
|
|
10572
|
-
id: "combobox-options",
|
|
10573
|
-
role: "listbox",
|
|
10574
|
-
className: "max-h-dropdown-max-height overflow-y-auto overflow-x-hidden p-1",
|
|
10575
|
-
children: filteredOptions.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "py-6 text-center text-sm", children: emptyText }) : filteredOptions.map((option, index) => {
|
|
10576
|
-
const isSelected = value === option.value;
|
|
10577
|
-
const isHighlighted = index === highlightedIndex;
|
|
10578
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10579
|
-
"div",
|
|
10916
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { className: "p-0 w-fit", align: "start", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10917
|
+
"div",
|
|
10918
|
+
{
|
|
10919
|
+
className: cn(
|
|
10920
|
+
"flex h-full w-full flex-col overflow-hidden rounded-md bg-surface3 text-neutral5",
|
|
10921
|
+
"shadow-elevated",
|
|
10922
|
+
"animate-in fade-in-0 zoom-in-95 duration-150"
|
|
10923
|
+
),
|
|
10924
|
+
children: [
|
|
10925
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex items-center border-b border-border1 px-3 py-2", transitions.colors), children: [
|
|
10926
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: cn("mr-2 h-4 w-4 shrink-0 text-neutral3", transitions.colors) }),
|
|
10927
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10928
|
+
"input",
|
|
10580
10929
|
{
|
|
10581
|
-
|
|
10582
|
-
"aria-selected": isSelected,
|
|
10930
|
+
ref: inputRef,
|
|
10583
10931
|
className: cn(
|
|
10584
|
-
"
|
|
10585
|
-
"
|
|
10586
|
-
|
|
10587
|
-
|
|
10932
|
+
"flex h-8 w-full rounded-md bg-transparent py-1 text-sm",
|
|
10933
|
+
"placeholder:text-neutral3 disabled:cursor-not-allowed disabled:opacity-50",
|
|
10934
|
+
"outline-none",
|
|
10935
|
+
transitions.colors
|
|
10588
10936
|
),
|
|
10589
|
-
|
|
10590
|
-
|
|
10591
|
-
|
|
10592
|
-
|
|
10593
|
-
|
|
10594
|
-
|
|
10595
|
-
|
|
10596
|
-
|
|
10597
|
-
|
|
10598
|
-
|
|
10599
|
-
|
|
10600
|
-
|
|
10601
|
-
|
|
10937
|
+
placeholder: searchPlaceholder,
|
|
10938
|
+
value: search,
|
|
10939
|
+
onChange: (e) => setSearch(e.target.value),
|
|
10940
|
+
onKeyDown: handleKeyDown,
|
|
10941
|
+
role: "combobox",
|
|
10942
|
+
"aria-autocomplete": "list",
|
|
10943
|
+
"aria-controls": "combobox-options",
|
|
10944
|
+
"aria-expanded": open
|
|
10945
|
+
}
|
|
10946
|
+
)
|
|
10947
|
+
] }),
|
|
10948
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10949
|
+
"div",
|
|
10950
|
+
{
|
|
10951
|
+
ref: listRef,
|
|
10952
|
+
id: "combobox-options",
|
|
10953
|
+
role: "listbox",
|
|
10954
|
+
className: "max-h-dropdown-max-height overflow-y-auto overflow-x-hidden p-1",
|
|
10955
|
+
children: filteredOptions.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "py-6 text-center text-sm text-neutral3", children: emptyText }) : filteredOptions.map((option, index) => {
|
|
10956
|
+
const isSelected = value === option.value;
|
|
10957
|
+
const isHighlighted = index === highlightedIndex;
|
|
10958
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10959
|
+
"div",
|
|
10960
|
+
{
|
|
10961
|
+
role: "option",
|
|
10962
|
+
"aria-selected": isSelected,
|
|
10963
|
+
className: cn(
|
|
10964
|
+
"relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm",
|
|
10965
|
+
transitions.colors,
|
|
10966
|
+
"hover:bg-surface5 hover:text-neutral5",
|
|
10967
|
+
isHighlighted && "bg-surface5 text-neutral5",
|
|
10968
|
+
isSelected && !isHighlighted && "bg-accent1Dark text-accent1"
|
|
10969
|
+
),
|
|
10970
|
+
onClick: () => handleSelect(option.value),
|
|
10971
|
+
onMouseEnter: () => setHighlightedIndex(index),
|
|
10972
|
+
children: [
|
|
10973
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10974
|
+
lucideReact.Check,
|
|
10975
|
+
{
|
|
10976
|
+
className: cn(
|
|
10977
|
+
"mr-2 h-4 w-4",
|
|
10978
|
+
transitions.opacity,
|
|
10979
|
+
isSelected ? "opacity-100 text-accent1" : "opacity-0"
|
|
10980
|
+
)
|
|
10981
|
+
}
|
|
10982
|
+
),
|
|
10983
|
+
option.label
|
|
10984
|
+
]
|
|
10985
|
+
},
|
|
10986
|
+
option.value
|
|
10987
|
+
);
|
|
10988
|
+
})
|
|
10989
|
+
}
|
|
10990
|
+
)
|
|
10991
|
+
]
|
|
10992
|
+
}
|
|
10993
|
+
) })
|
|
10602
10994
|
] });
|
|
10603
10995
|
}
|
|
10604
10996
|
|
|
@@ -10805,7 +11197,7 @@ const LoadingBadge = () => {
|
|
|
10805
11197
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10806
11198
|
BadgeWrapper,
|
|
10807
11199
|
{
|
|
10808
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(Spinner, { color:
|
|
11200
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(Spinner, { color: spacings.Colors.neutral3 }),
|
|
10809
11201
|
title: /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "ml-2 w-12 h-2" }),
|
|
10810
11202
|
collapsible: false
|
|
10811
11203
|
}
|
|
@@ -10864,7 +11256,8 @@ const WorkflowBadge = ({
|
|
|
10864
11256
|
toolCallId,
|
|
10865
11257
|
toolApprovalMetadata,
|
|
10866
11258
|
toolName,
|
|
10867
|
-
isNetwork
|
|
11259
|
+
isNetwork,
|
|
11260
|
+
isGenerateMode: metadata?.mode === "generate"
|
|
10868
11261
|
}
|
|
10869
11262
|
)
|
|
10870
11263
|
]
|
|
@@ -10968,7 +11361,8 @@ const AgentBadge = ({
|
|
|
10968
11361
|
toolCallId,
|
|
10969
11362
|
toolApprovalMetadata,
|
|
10970
11363
|
toolName,
|
|
10971
|
-
isNetwork
|
|
11364
|
+
isNetwork,
|
|
11365
|
+
isGenerateMode: metadata?.mode === "generate"
|
|
10972
11366
|
}
|
|
10973
11367
|
)
|
|
10974
11368
|
]
|
|
@@ -11036,8 +11430,8 @@ const ToolFallbackInner = ({ toolName, result, args, metadata, toolCallId, ...pr
|
|
|
11036
11430
|
const isNetwork = metadata?.mode === "network";
|
|
11037
11431
|
const agentToolName = toolName.startsWith("agent-") ? toolName.substring("agent-".length) : toolName;
|
|
11038
11432
|
const workflowToolName = toolName.startsWith("workflow-") ? toolName.substring("workflow-".length) : toolName;
|
|
11039
|
-
const requireApprovalMetadata = (metadata?.mode === "stream" || metadata?.mode === "network") && metadata?.requireApprovalMetadata;
|
|
11040
|
-
const suspendedTools = (metadata?.mode === "stream" || metadata?.mode === "network") && metadata?.suspendedTools;
|
|
11433
|
+
const requireApprovalMetadata = (metadata?.mode === "stream" || metadata?.mode === "network" || metadata?.mode === "generate") && metadata?.requireApprovalMetadata;
|
|
11434
|
+
const suspendedTools = (metadata?.mode === "stream" || metadata?.mode === "network" || metadata?.mode === "generate") && metadata?.suspendedTools;
|
|
11041
11435
|
const toolApprovalMetadata = requireApprovalMetadata ? requireApprovalMetadata?.[toolName] ?? requireApprovalMetadata?.[toolCallId] : void 0;
|
|
11042
11436
|
const suspendedToolMetadata = suspendedTools ? suspendedTools?.[toolName] : void 0;
|
|
11043
11437
|
const toolCalled = metadata?.mode === "network" && metadata?.hasMoreMessages ? true : void 0;
|
|
@@ -12783,6 +13177,8 @@ function MastraRuntimeProvider({
|
|
|
12783
13177
|
setMessages,
|
|
12784
13178
|
approveToolCall,
|
|
12785
13179
|
declineToolCall,
|
|
13180
|
+
approveToolCallGenerate,
|
|
13181
|
+
declineToolCallGenerate,
|
|
12786
13182
|
toolCallApprovals,
|
|
12787
13183
|
approveNetworkToolCall,
|
|
12788
13184
|
declineNetworkToolCall,
|
|
@@ -13234,6 +13630,8 @@ function MastraRuntimeProvider({
|
|
|
13234
13630
|
{
|
|
13235
13631
|
approveToolcall: approveToolCall,
|
|
13236
13632
|
declineToolcall: declineToolCall,
|
|
13633
|
+
approveToolcallGenerate: approveToolCallGenerate,
|
|
13634
|
+
declineToolcallGenerate: declineToolCallGenerate,
|
|
13237
13635
|
isRunning: isRunningStream,
|
|
13238
13636
|
toolCallApprovals,
|
|
13239
13637
|
approveNetworkToolcall: approveNetworkToolCall,
|
|
@@ -13837,7 +14235,7 @@ const AgentSettings = ({ agentId }) => {
|
|
|
13837
14235
|
] });
|
|
13838
14236
|
};
|
|
13839
14237
|
|
|
13840
|
-
const NameCell$
|
|
14238
|
+
const NameCell$4 = ({ row }) => {
|
|
13841
14239
|
const { Link, paths } = useLinkComponent();
|
|
13842
14240
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
13843
14241
|
EntryCell,
|
|
@@ -13847,11 +14245,11 @@ const NameCell$3 = ({ row }) => {
|
|
|
13847
14245
|
}
|
|
13848
14246
|
);
|
|
13849
14247
|
};
|
|
13850
|
-
const columns$
|
|
14248
|
+
const columns$4 = [
|
|
13851
14249
|
{
|
|
13852
14250
|
header: "Name",
|
|
13853
14251
|
accessorKey: "name",
|
|
13854
|
-
cell: NameCell$
|
|
14252
|
+
cell: NameCell$4
|
|
13855
14253
|
},
|
|
13856
14254
|
{
|
|
13857
14255
|
header: "Model",
|
|
@@ -13893,7 +14291,9 @@ const columns$3 = [
|
|
|
13893
14291
|
const agentsCount = Object.keys(agent.agents || {}).length;
|
|
13894
14292
|
const toolsCount = Object.keys(agent.tools || {}).length;
|
|
13895
14293
|
const workflowsCount = Object.keys(agent.workflows || {}).length;
|
|
13896
|
-
|
|
14294
|
+
const inputProcessorsCount = (agent.inputProcessors || []).length;
|
|
14295
|
+
const outputProcessorsCount = (agent.outputProcessors || []).length;
|
|
14296
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Cell, { children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex flex-row gap-2 w-full items-center flex-wrap", children: [
|
|
13897
14297
|
/* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant: "default", icon: /* @__PURE__ */ jsxRuntime.jsx(AgentIcon, { className: "text-accent1" }), children: [
|
|
13898
14298
|
agentsCount,
|
|
13899
14299
|
" agent",
|
|
@@ -13908,6 +14308,22 @@ const columns$3 = [
|
|
|
13908
14308
|
workflowsCount,
|
|
13909
14309
|
" workflow",
|
|
13910
14310
|
workflowsCount > 1 ? "s" : ""
|
|
14311
|
+
] }),
|
|
14312
|
+
(inputProcessorsCount > 0 || outputProcessorsCount > 0) && /* @__PURE__ */ jsxRuntime.jsxs(Tooltip, { children: [
|
|
14313
|
+
/* @__PURE__ */ jsxRuntime.jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "default", icon: /* @__PURE__ */ jsxRuntime.jsx(ProcessorIcon, { className: "text-accent4" }) }) }),
|
|
14314
|
+
/* @__PURE__ */ jsxRuntime.jsxs(TooltipContent, { className: "flex flex-col gap-1", children: [
|
|
14315
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14316
|
+
"a",
|
|
14317
|
+
{
|
|
14318
|
+
href: "https://mastra.ai/docs/agents/processors",
|
|
14319
|
+
target: "_blank",
|
|
14320
|
+
rel: "noopener noreferrer",
|
|
14321
|
+
className: "text-accent1 hover:underline",
|
|
14322
|
+
children: "Processors"
|
|
14323
|
+
}
|
|
14324
|
+
),
|
|
14325
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-icon3", children: [inputProcessorsCount > 0 && "input", outputProcessorsCount > 0 && "output"].filter(Boolean).join(", ") })
|
|
14326
|
+
] })
|
|
13911
14327
|
] })
|
|
13912
14328
|
] }) });
|
|
13913
14329
|
}
|
|
@@ -13920,7 +14336,7 @@ function AgentsTable({ agents, isLoading }) {
|
|
|
13920
14336
|
const projectData = React.useMemo(() => Object.values(agents), [agents]);
|
|
13921
14337
|
const table = reactTable.useReactTable({
|
|
13922
14338
|
data: projectData,
|
|
13923
|
-
columns: columns$
|
|
14339
|
+
columns: columns$4,
|
|
13924
14340
|
getCoreRowModel: reactTable.getCoreRowModel()
|
|
13925
14341
|
});
|
|
13926
14342
|
const ths = table.getHeaderGroups()[0];
|
|
@@ -14120,22 +14536,19 @@ function EntryListEntry({ entry, isSelected, onClick, children, columns }) {
|
|
|
14120
14536
|
className: cn(
|
|
14121
14537
|
"border-t text-neutral5 border-border1 last:border-b-0 text-ui-md",
|
|
14122
14538
|
"[&:last-child>button]:rounded-b-lg",
|
|
14539
|
+
transitions.colors,
|
|
14123
14540
|
{
|
|
14124
|
-
"bg-
|
|
14541
|
+
"bg-accent1Dark": isSelected
|
|
14125
14542
|
}
|
|
14126
14543
|
),
|
|
14127
14544
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
14128
14545
|
"button",
|
|
14129
14546
|
{
|
|
14130
14547
|
onClick: handleClick,
|
|
14131
|
-
className: cn(
|
|
14132
|
-
|
|
14133
|
-
"
|
|
14134
|
-
|
|
14135
|
-
// hover effect only not for skeleton and selected
|
|
14136
|
-
"hover:bg-surface4": entry && !isSelected
|
|
14137
|
-
}
|
|
14138
|
-
),
|
|
14548
|
+
className: cn("grid w-full px-6 gap-6 text-left items-center min-h-12", transitions.colors, focusRing.visible, {
|
|
14549
|
+
// hover effect only not for skeleton and selected
|
|
14550
|
+
"hover:bg-surface4": entry && !isSelected
|
|
14551
|
+
}),
|
|
14139
14552
|
style: { gridTemplateColumns: getColumnTemplate(columns) },
|
|
14140
14553
|
disabled: !entry,
|
|
14141
14554
|
children
|
|
@@ -14379,18 +14792,28 @@ function SideDialogRoot({
|
|
|
14379
14792
|
}) {
|
|
14380
14793
|
const isConfirmation = variant === "confirmation";
|
|
14381
14794
|
return /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Root, { open: isOpen, onOpenChange: onClose, children: /* @__PURE__ */ jsxRuntime.jsxs(DialogPrimitive__namespace.Portal, { children: [
|
|
14382
|
-
!isConfirmation && /* @__PURE__ */ jsxRuntime.jsx(
|
|
14795
|
+
!isConfirmation && /* @__PURE__ */ jsxRuntime.jsx(
|
|
14796
|
+
DialogPrimitive__namespace.Overlay,
|
|
14797
|
+
{
|
|
14798
|
+
className: cn(
|
|
14799
|
+
"bg-overlay backdrop-blur-sm top-0 bottom-0 right-0 left-0 fixed z-50",
|
|
14800
|
+
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:duration-200",
|
|
14801
|
+
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:duration-150"
|
|
14802
|
+
)
|
|
14803
|
+
}
|
|
14804
|
+
),
|
|
14383
14805
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
14384
14806
|
DialogPrimitive__namespace.Content,
|
|
14385
14807
|
{
|
|
14386
14808
|
className: cn(
|
|
14387
|
-
"fixed top-0 bottom-0 right-0 border-l border-border2 z-50 bg-surface2
|
|
14809
|
+
"fixed top-0 bottom-0 right-0 border-l border-border2 z-50 bg-surface2",
|
|
14810
|
+
"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",
|
|
14388
14811
|
{
|
|
14389
14812
|
"w-[75vw] 2xl:w-[65vw] 4xl:w-[55vw]": level === 1,
|
|
14390
14813
|
"w-[70vw] 2xl:w-[59vw] 4xl:w-[48vw]": level === 2,
|
|
14391
14814
|
"w-[65vw] 2xl:w-[53vw] 4xl:w-[41vw]": level === 3,
|
|
14392
|
-
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:slide-in-from-right-1/4
|
|
14393
|
-
"bg-surface2/70": isConfirmation
|
|
14815
|
+
"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,
|
|
14816
|
+
"bg-surface2/70 backdrop-blur-sm": isConfirmation
|
|
14394
14817
|
},
|
|
14395
14818
|
className
|
|
14396
14819
|
),
|
|
@@ -14403,8 +14826,9 @@ function SideDialogRoot({
|
|
|
14403
14826
|
"button",
|
|
14404
14827
|
{
|
|
14405
14828
|
className: cn(
|
|
14406
|
-
"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-
|
|
14407
|
-
|
|
14829
|
+
"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",
|
|
14830
|
+
transitions.all,
|
|
14831
|
+
"hover:bg-surface4 hover:text-neutral5"
|
|
14408
14832
|
),
|
|
14409
14833
|
"aria-label": "Close",
|
|
14410
14834
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronsRightIcon, {})
|
|
@@ -14958,7 +15382,7 @@ function ScorerCombobox({
|
|
|
14958
15382
|
);
|
|
14959
15383
|
}
|
|
14960
15384
|
|
|
14961
|
-
const NameCell$
|
|
15385
|
+
const NameCell$3 = ({ row }) => {
|
|
14962
15386
|
const { Link, paths } = useLinkComponent();
|
|
14963
15387
|
const scorer = row.original;
|
|
14964
15388
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -14969,11 +15393,11 @@ const NameCell$2 = ({ row }) => {
|
|
|
14969
15393
|
}
|
|
14970
15394
|
);
|
|
14971
15395
|
};
|
|
14972
|
-
const columns$
|
|
15396
|
+
const columns$3 = [
|
|
14973
15397
|
{
|
|
14974
15398
|
header: "Name",
|
|
14975
15399
|
accessorKey: "name",
|
|
14976
|
-
cell: NameCell$
|
|
15400
|
+
cell: NameCell$3
|
|
14977
15401
|
}
|
|
14978
15402
|
];
|
|
14979
15403
|
|
|
@@ -14992,7 +15416,7 @@ function ScorersTable({ scorers, isLoading }) {
|
|
|
14992
15416
|
);
|
|
14993
15417
|
const table = reactTable.useReactTable({
|
|
14994
15418
|
data: scorersData,
|
|
14995
|
-
columns: columns$
|
|
15419
|
+
columns: columns$3,
|
|
14996
15420
|
getCoreRowModel: reactTable.getCoreRowModel()
|
|
14997
15421
|
});
|
|
14998
15422
|
const ths = table.getHeaderGroups()[0];
|
|
@@ -15629,7 +16053,13 @@ const Switch = React__namespace.forwardRef(({ className, ...props }, ref) => /*
|
|
|
15629
16053
|
SwitchPrimitives__namespace.Root,
|
|
15630
16054
|
{
|
|
15631
16055
|
className: cn(
|
|
15632
|
-
"peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent
|
|
16056
|
+
"peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent",
|
|
16057
|
+
transitions.all,
|
|
16058
|
+
formElementFocus,
|
|
16059
|
+
"hover:brightness-110",
|
|
16060
|
+
"disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:brightness-100",
|
|
16061
|
+
"data-[state=checked]:bg-accent1 data-[state=checked]:shadow-glow-accent1",
|
|
16062
|
+
"data-[state=unchecked]:bg-neutral2",
|
|
15633
16063
|
className
|
|
15634
16064
|
),
|
|
15635
16065
|
...props,
|
|
@@ -15638,7 +16068,10 @@ const Switch = React__namespace.forwardRef(({ className, ...props }, ref) => /*
|
|
|
15638
16068
|
SwitchPrimitives__namespace.Thumb,
|
|
15639
16069
|
{
|
|
15640
16070
|
className: cn(
|
|
15641
|
-
"pointer-events-none block h-4 w-4 rounded-full bg-white shadow-
|
|
16071
|
+
"pointer-events-none block h-4 w-4 rounded-full bg-white shadow-md",
|
|
16072
|
+
"transition-all duration-normal ease-out-custom",
|
|
16073
|
+
"data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0",
|
|
16074
|
+
"data-[state=checked]:shadow-lg"
|
|
15642
16075
|
)
|
|
15643
16076
|
}
|
|
15644
16077
|
)
|
|
@@ -15923,6 +16356,8 @@ const AgentMetadata = ({ agentId }) => {
|
|
|
15923
16356
|
const tools = Object.keys(agentTools).map((key) => agentTools[key]);
|
|
15924
16357
|
const agentWorkflows = agent.workflows ?? {};
|
|
15925
16358
|
const workflows = Object.keys(agentWorkflows).map((key) => ({ id: key, ...agentWorkflows[key] }));
|
|
16359
|
+
const inputProcessors = agent.inputProcessors ?? [];
|
|
16360
|
+
const outputProcessors = agent.outputProcessors ?? [];
|
|
15926
16361
|
return /* @__PURE__ */ jsxRuntime.jsxs(AgentMetadataWrapper, { children: [
|
|
15927
16362
|
agent?.description && /* @__PURE__ */ jsxRuntime.jsx(AgentMetadataSection, { title: "Description", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-neutral6", children: agent.description }) }),
|
|
15928
16363
|
agent.modelList ? /* @__PURE__ */ jsxRuntime.jsx(AgentMetadataSection, { title: "Models", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -16016,6 +16451,17 @@ const AgentMetadata = ({ agentId }) => {
|
|
|
16016
16451
|
children: /* @__PURE__ */ jsxRuntime.jsx(AgentMetadataWorkflowList, { workflows })
|
|
16017
16452
|
}
|
|
16018
16453
|
),
|
|
16454
|
+
(inputProcessors.length > 0 || outputProcessors.length > 0) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
16455
|
+
AgentMetadataSection,
|
|
16456
|
+
{
|
|
16457
|
+
title: "Processors",
|
|
16458
|
+
hint: {
|
|
16459
|
+
link: "https://mastra.ai/docs/agents/processors",
|
|
16460
|
+
title: "Processors documentation"
|
|
16461
|
+
},
|
|
16462
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(AgentMetadataCombinedProcessorList, { inputProcessors, outputProcessors })
|
|
16463
|
+
}
|
|
16464
|
+
),
|
|
16019
16465
|
/* @__PURE__ */ jsxRuntime.jsx(AgentMetadataSection, { title: "Scorers", children: /* @__PURE__ */ jsxRuntime.jsx(AgentMetadataScorerList, { entityId: agent.name, entityType: "AGENT" }) }),
|
|
16020
16466
|
/* @__PURE__ */ jsxRuntime.jsx(AgentMetadataSection, { title: "System Prompt", children: /* @__PURE__ */ jsxRuntime.jsx(PromptEnhancer, { agentId }) })
|
|
16021
16467
|
] });
|
|
@@ -16052,6 +16498,21 @@ const AgentMetadataScorerList = ({ entityId, entityType }) => {
|
|
|
16052
16498
|
}
|
|
16053
16499
|
return /* @__PURE__ */ jsxRuntime.jsx(AgentMetadataList, { children: scorerList.map((scorer) => /* @__PURE__ */ jsxRuntime.jsx(AgentMetadataListItem, { children: /* @__PURE__ */ jsxRuntime.jsx(Link, { href: paths.scorerLink(scorer.id), "data-testid": "scorer-badge", children: /* @__PURE__ */ jsxRuntime.jsx(Badge, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.GaugeIcon, { className: "text-neutral3" }), children: scorer.scorer.config.name }) }) }, scorer.id)) });
|
|
16054
16500
|
};
|
|
16501
|
+
const AgentMetadataCombinedProcessorList = ({
|
|
16502
|
+
inputProcessors,
|
|
16503
|
+
outputProcessors
|
|
16504
|
+
}) => {
|
|
16505
|
+
const { Link, paths } = useLinkComponent();
|
|
16506
|
+
if (inputProcessors.length === 0 && outputProcessors.length === 0) {
|
|
16507
|
+
return /* @__PURE__ */ jsxRuntime.jsx(AgentMetadataListEmpty, { children: "No processors" });
|
|
16508
|
+
}
|
|
16509
|
+
const inputProcessorId = inputProcessors[0]?.id;
|
|
16510
|
+
const outputProcessorId = outputProcessors[0]?.id;
|
|
16511
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(AgentMetadataList, { children: [
|
|
16512
|
+
inputProcessors.length > 0 && inputProcessorId && /* @__PURE__ */ jsxRuntime.jsx(AgentMetadataListItem, { children: /* @__PURE__ */ jsxRuntime.jsx(Link, { href: `${paths.workflowLink(inputProcessorId)}/graph`, "data-testid": "processor-badge", children: /* @__PURE__ */ jsxRuntime.jsx(Badge, { icon: /* @__PURE__ */ jsxRuntime.jsx(ProcessorIcon, { className: "text-accent4" }), children: "input" }) }) }),
|
|
16513
|
+
outputProcessors.length > 0 && outputProcessorId && /* @__PURE__ */ jsxRuntime.jsx(AgentMetadataListItem, { children: /* @__PURE__ */ jsxRuntime.jsx(Link, { href: `${paths.workflowLink(outputProcessorId)}/graph`, "data-testid": "processor-badge", children: /* @__PURE__ */ jsxRuntime.jsx(Badge, { icon: /* @__PURE__ */ jsxRuntime.jsx(ProcessorIcon, { className: "text-accent5" }), children: "output" }) }) })
|
|
16514
|
+
] });
|
|
16515
|
+
};
|
|
16055
16516
|
|
|
16056
16517
|
const AgentEntityHeader = ({ agentId }) => {
|
|
16057
16518
|
const { data: agent, isLoading } = useAgent(agentId);
|
|
@@ -16073,7 +16534,11 @@ const ThreadLink = ({ children, as: Component = "a", href, className, prefetch,
|
|
|
16073
16534
|
href,
|
|
16074
16535
|
prefetch,
|
|
16075
16536
|
to,
|
|
16076
|
-
className: cn(
|
|
16537
|
+
className: cn(
|
|
16538
|
+
"text-ui-sm flex h-full w-full flex-col justify-center font-medium cursor-pointer",
|
|
16539
|
+
transitions.colors,
|
|
16540
|
+
className
|
|
16541
|
+
),
|
|
16077
16542
|
children
|
|
16078
16543
|
}
|
|
16079
16544
|
);
|
|
@@ -16086,8 +16551,10 @@ const ThreadItem = ({ children, isActive, className }) => {
|
|
|
16086
16551
|
"li",
|
|
16087
16552
|
{
|
|
16088
16553
|
className: cn(
|
|
16089
|
-
"border-b border-border1
|
|
16090
|
-
|
|
16554
|
+
"border-b border-border1 group flex h-[54px] items-center justify-between gap-2 px-3 py-2",
|
|
16555
|
+
transitions.colors,
|
|
16556
|
+
"hover:bg-surface3",
|
|
16557
|
+
isActive && "bg-accent1Dark",
|
|
16091
16558
|
className
|
|
16092
16559
|
),
|
|
16093
16560
|
children
|
|
@@ -16098,9 +16565,15 @@ const ThreadDeleteButton = ({ onClick }) => {
|
|
|
16098
16565
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
16099
16566
|
Button,
|
|
16100
16567
|
{
|
|
16101
|
-
|
|
16568
|
+
variant: "ghost",
|
|
16569
|
+
className: cn(
|
|
16570
|
+
"shrink-0 opacity-0",
|
|
16571
|
+
transitions.all,
|
|
16572
|
+
"group-focus-within:opacity-100 group-hover:opacity-100",
|
|
16573
|
+
"hover:bg-surface4 hover:text-accent2"
|
|
16574
|
+
),
|
|
16102
16575
|
onClick,
|
|
16103
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { "aria-label": "delete thread", className: "text-neutral3" }) })
|
|
16576
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { "aria-label": "delete thread", className: "text-neutral3 hover:text-accent2 transition-colors" }) })
|
|
16104
16577
|
}
|
|
16105
16578
|
);
|
|
16106
16579
|
};
|
|
@@ -16119,7 +16592,9 @@ const AlertDialogOverlay = React__namespace.forwardRef(({ className, ...props },
|
|
|
16119
16592
|
AlertDialogPrimitive__namespace.Overlay,
|
|
16120
16593
|
{
|
|
16121
16594
|
className: cn(
|
|
16122
|
-
"fixed inset-0 z-50 bg-
|
|
16595
|
+
"fixed inset-0 z-50 bg-overlay backdrop-blur-sm",
|
|
16596
|
+
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:duration-200",
|
|
16597
|
+
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:duration-150",
|
|
16123
16598
|
className
|
|
16124
16599
|
),
|
|
16125
16600
|
...props,
|
|
@@ -16134,7 +16609,9 @@ const AlertDialogContent = React__namespace.forwardRef(({ className, ...props },
|
|
|
16134
16609
|
{
|
|
16135
16610
|
ref,
|
|
16136
16611
|
className: cn(
|
|
16137
|
-
"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-
|
|
16612
|
+
"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",
|
|
16613
|
+
"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",
|
|
16614
|
+
"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",
|
|
16138
16615
|
className
|
|
16139
16616
|
),
|
|
16140
16617
|
...props
|
|
@@ -17235,6 +17712,320 @@ const AgentLayout = ({ agentId, children, leftSlot, rightSlot }) => {
|
|
|
17235
17712
|
] });
|
|
17236
17713
|
};
|
|
17237
17714
|
|
|
17715
|
+
const NameCell$2 = ({ row }) => {
|
|
17716
|
+
const { Link, paths } = useLinkComponent();
|
|
17717
|
+
const processor = row.original;
|
|
17718
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
17719
|
+
EntryCell,
|
|
17720
|
+
{
|
|
17721
|
+
name: /* @__PURE__ */ jsxRuntime.jsx(Link, { className: "w-full space-y-0", href: paths.processorLink(processor.id), children: processor.name || processor.id }),
|
|
17722
|
+
description: processor.description
|
|
17723
|
+
}
|
|
17724
|
+
);
|
|
17725
|
+
};
|
|
17726
|
+
const PhasesCell = ({ row }) => {
|
|
17727
|
+
const processor = row.original;
|
|
17728
|
+
const phases = processor.phases || [];
|
|
17729
|
+
const phaseLabels = {
|
|
17730
|
+
input: "Input",
|
|
17731
|
+
inputStep: "Input Step",
|
|
17732
|
+
outputStream: "Output Stream",
|
|
17733
|
+
outputResult: "Output Result",
|
|
17734
|
+
outputStep: "Output Step"
|
|
17735
|
+
};
|
|
17736
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Cell, { children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1", children: phases.map((phase) => /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "default", children: phaseLabels[phase] || phase }, phase)) }) });
|
|
17737
|
+
};
|
|
17738
|
+
const AgentsCell = ({ row }) => {
|
|
17739
|
+
const processor = row.original;
|
|
17740
|
+
const agentsCount = processor.agentIds?.length || 0;
|
|
17741
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Cell, { children: /* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant: "default", icon: /* @__PURE__ */ jsxRuntime.jsx(AgentIcon, { className: "text-accent1" }), children: [
|
|
17742
|
+
agentsCount,
|
|
17743
|
+
" agent",
|
|
17744
|
+
agentsCount !== 1 ? "s" : ""
|
|
17745
|
+
] }) });
|
|
17746
|
+
};
|
|
17747
|
+
const columns$2 = [
|
|
17748
|
+
{
|
|
17749
|
+
header: "Name",
|
|
17750
|
+
accessorKey: "name",
|
|
17751
|
+
cell: NameCell$2
|
|
17752
|
+
},
|
|
17753
|
+
{
|
|
17754
|
+
header: "Phases",
|
|
17755
|
+
accessorKey: "phases",
|
|
17756
|
+
cell: PhasesCell
|
|
17757
|
+
},
|
|
17758
|
+
{
|
|
17759
|
+
header: "Used by",
|
|
17760
|
+
accessorKey: "agentIds",
|
|
17761
|
+
cell: AgentsCell
|
|
17762
|
+
}
|
|
17763
|
+
];
|
|
17764
|
+
|
|
17765
|
+
function ProcessorTable({ processors, isLoading }) {
|
|
17766
|
+
const [search, setSearch] = React.useState("");
|
|
17767
|
+
const { navigate, paths } = useLinkComponent();
|
|
17768
|
+
const processorData = React.useMemo(() => {
|
|
17769
|
+
return Object.values(processors ?? {}).filter((p) => p.phases && p.phases.length > 0);
|
|
17770
|
+
}, [processors]);
|
|
17771
|
+
const table = reactTable.useReactTable({
|
|
17772
|
+
data: processorData,
|
|
17773
|
+
columns: columns$2,
|
|
17774
|
+
getCoreRowModel: reactTable.getCoreRowModel()
|
|
17775
|
+
});
|
|
17776
|
+
const ths = table.getHeaderGroups()[0];
|
|
17777
|
+
const rows = table.getRowModel().rows.concat();
|
|
17778
|
+
if (rows.length === 0 && !isLoading) {
|
|
17779
|
+
return /* @__PURE__ */ jsxRuntime.jsx(EmptyProcessorsTable, {});
|
|
17780
|
+
}
|
|
17781
|
+
const filteredRows = rows.filter((row) => {
|
|
17782
|
+
const id = row.original.id.toLowerCase();
|
|
17783
|
+
const name = (row.original.name || "").toLowerCase();
|
|
17784
|
+
const searchLower = search.toLowerCase();
|
|
17785
|
+
return id.includes(searchLower) || name.includes(searchLower);
|
|
17786
|
+
});
|
|
17787
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
17788
|
+
/* @__PURE__ */ jsxRuntime.jsx(SearchbarWrapper, { children: /* @__PURE__ */ jsxRuntime.jsx(Searchbar, { onSearch: setSearch, label: "Search processors", placeholder: "Search processors" }) }),
|
|
17789
|
+
isLoading ? /* @__PURE__ */ jsxRuntime.jsx(ProcessorTableSkeleton, {}) : /* @__PURE__ */ jsxRuntime.jsx(ScrollableContainer, { children: /* @__PURE__ */ jsxRuntime.jsx(TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(Table, { children: [
|
|
17790
|
+
/* @__PURE__ */ jsxRuntime.jsx(Thead, { className: "sticky top-0", children: ths.headers.map((header) => /* @__PURE__ */ jsxRuntime.jsx(Th, { style: { width: header.column.getSize() ?? "auto" }, children: reactTable.flexRender(header.column.columnDef.header, header.getContext()) }, header.id)) }),
|
|
17791
|
+
/* @__PURE__ */ jsxRuntime.jsx(Tbody, { children: filteredRows.map((row) => {
|
|
17792
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
17793
|
+
Row,
|
|
17794
|
+
{
|
|
17795
|
+
onClick: () => {
|
|
17796
|
+
if (row.original.isWorkflow) {
|
|
17797
|
+
navigate(paths.workflowLink(row.original.id) + "/graph");
|
|
17798
|
+
} else {
|
|
17799
|
+
navigate(paths.processorLink(row.original.id));
|
|
17800
|
+
}
|
|
17801
|
+
},
|
|
17802
|
+
children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsxRuntime.jsx(React.Fragment, { children: reactTable.flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id))
|
|
17803
|
+
},
|
|
17804
|
+
row.id
|
|
17805
|
+
);
|
|
17806
|
+
}) })
|
|
17807
|
+
] }) }) })
|
|
17808
|
+
] });
|
|
17809
|
+
}
|
|
17810
|
+
const ProcessorTableSkeleton = () => /* @__PURE__ */ jsxRuntime.jsxs(Table, { children: [
|
|
17811
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Thead, { children: [
|
|
17812
|
+
/* @__PURE__ */ jsxRuntime.jsx(Th, { children: "Name" }),
|
|
17813
|
+
/* @__PURE__ */ jsxRuntime.jsx(Th, { children: "Phases" }),
|
|
17814
|
+
/* @__PURE__ */ jsxRuntime.jsx(Th, { children: "Used by" })
|
|
17815
|
+
] }),
|
|
17816
|
+
/* @__PURE__ */ jsxRuntime.jsx(Tbody, { children: Array.from({ length: 3 }).map((_, index) => /* @__PURE__ */ jsxRuntime.jsxs(Row, { children: [
|
|
17817
|
+
/* @__PURE__ */ jsxRuntime.jsx(Cell, { children: /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-4 w-1/2" }) }),
|
|
17818
|
+
/* @__PURE__ */ jsxRuntime.jsx(Cell, { children: /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-4 w-1/2" }) }),
|
|
17819
|
+
/* @__PURE__ */ jsxRuntime.jsx(Cell, { children: /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-4 w-1/2" }) })
|
|
17820
|
+
] }, index)) })
|
|
17821
|
+
] });
|
|
17822
|
+
const EmptyProcessorsTable = () => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
17823
|
+
EmptyState,
|
|
17824
|
+
{
|
|
17825
|
+
iconSlot: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Cpu, {}),
|
|
17826
|
+
titleSlot: "Configure Processors",
|
|
17827
|
+
descriptionSlot: "No processors are configured yet. Add input or output processors to your agents to transform messages.",
|
|
17828
|
+
actionSlot: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
17829
|
+
Button,
|
|
17830
|
+
{
|
|
17831
|
+
size: "lg",
|
|
17832
|
+
className: "w-full",
|
|
17833
|
+
variant: "light",
|
|
17834
|
+
as: "a",
|
|
17835
|
+
href: "https://mastra.ai/en/docs/processors",
|
|
17836
|
+
target: "_blank",
|
|
17837
|
+
children: [
|
|
17838
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icon, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Cpu, {}) }),
|
|
17839
|
+
"Docs"
|
|
17840
|
+
]
|
|
17841
|
+
}
|
|
17842
|
+
)
|
|
17843
|
+
}
|
|
17844
|
+
) });
|
|
17845
|
+
|
|
17846
|
+
const useProcessors = () => {
|
|
17847
|
+
const { requestContext } = usePlaygroundStore();
|
|
17848
|
+
const client = react$1.useMastraClient();
|
|
17849
|
+
return reactQuery.useQuery({
|
|
17850
|
+
queryKey: ["processors"],
|
|
17851
|
+
queryFn: () => client.listProcessors(requestContext)
|
|
17852
|
+
});
|
|
17853
|
+
};
|
|
17854
|
+
const useProcessor = (processorId, options) => {
|
|
17855
|
+
const client = react$1.useMastraClient();
|
|
17856
|
+
const { requestContext } = usePlaygroundStore();
|
|
17857
|
+
return reactQuery.useQuery({
|
|
17858
|
+
queryKey: ["processor", processorId],
|
|
17859
|
+
queryFn: () => client.getProcessor(processorId).details(requestContext),
|
|
17860
|
+
enabled: options?.enabled !== false && !!processorId
|
|
17861
|
+
});
|
|
17862
|
+
};
|
|
17863
|
+
const useExecuteProcessor = () => {
|
|
17864
|
+
const client = react$1.useMastraClient();
|
|
17865
|
+
const { requestContext } = usePlaygroundStore();
|
|
17866
|
+
return reactQuery.useMutation({
|
|
17867
|
+
mutationFn: async ({
|
|
17868
|
+
processorId,
|
|
17869
|
+
phase,
|
|
17870
|
+
messages,
|
|
17871
|
+
agentId
|
|
17872
|
+
}) => {
|
|
17873
|
+
return client.getProcessor(processorId).execute({
|
|
17874
|
+
phase,
|
|
17875
|
+
messages,
|
|
17876
|
+
agentId,
|
|
17877
|
+
requestContext
|
|
17878
|
+
});
|
|
17879
|
+
}
|
|
17880
|
+
});
|
|
17881
|
+
};
|
|
17882
|
+
|
|
17883
|
+
const PHASE_LABELS = {
|
|
17884
|
+
input: "Input - Process input messages before LLM (once at start)",
|
|
17885
|
+
inputStep: "Input Step - Process at each agentic loop step",
|
|
17886
|
+
outputStream: "Output Stream - Process streaming chunks",
|
|
17887
|
+
outputResult: "Output Result - Process complete output after streaming",
|
|
17888
|
+
outputStep: "Output Step - Process after each LLM response (before tools)"
|
|
17889
|
+
};
|
|
17890
|
+
function ProcessorPanel({ processorId }) {
|
|
17891
|
+
const { data: processor, isLoading, error } = useProcessor(processorId);
|
|
17892
|
+
React.useEffect(() => {
|
|
17893
|
+
if (error) {
|
|
17894
|
+
const errorMessage = error instanceof Error ? error.message : "Failed to load processor";
|
|
17895
|
+
toast.error(`Error loading processor: ${errorMessage}`);
|
|
17896
|
+
}
|
|
17897
|
+
}, [error]);
|
|
17898
|
+
if (isLoading) {
|
|
17899
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-6", children: [
|
|
17900
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-8 w-48 mb-4" }),
|
|
17901
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-32 w-full" })
|
|
17902
|
+
] });
|
|
17903
|
+
}
|
|
17904
|
+
if (error) return null;
|
|
17905
|
+
if (!processor)
|
|
17906
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "py-12 text-center px-6", children: /* @__PURE__ */ jsxRuntime.jsx(Txt, { variant: "header-md", className: "text-neutral3", children: "Processor not found" }) });
|
|
17907
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ProcessorDetailPanel, { processor });
|
|
17908
|
+
}
|
|
17909
|
+
function ProcessorDetailPanel({ processor }) {
|
|
17910
|
+
const theme = useCodemirrorTheme$1();
|
|
17911
|
+
const formId = React.useId();
|
|
17912
|
+
const [selectedPhase, setSelectedPhase] = React.useState(processor.phases[0] || "input");
|
|
17913
|
+
const [selectedAgentId, setSelectedAgentId] = React.useState(processor.configurations[0]?.agentId || "");
|
|
17914
|
+
const [testMessage, setTestMessage] = React.useState("Hello, this is a test message.");
|
|
17915
|
+
const [result, setResult] = React.useState(null);
|
|
17916
|
+
const [errorString, setErrorString] = React.useState();
|
|
17917
|
+
const executeProcessor = useExecuteProcessor();
|
|
17918
|
+
const handleExecute = async () => {
|
|
17919
|
+
setErrorString(void 0);
|
|
17920
|
+
setResult(null);
|
|
17921
|
+
const isOutputPhase = selectedPhase === "outputStep" || selectedPhase === "outputResult";
|
|
17922
|
+
const messageRole = isOutputPhase ? "assistant" : "user";
|
|
17923
|
+
const messages = [
|
|
17924
|
+
{
|
|
17925
|
+
id: crypto.randomUUID(),
|
|
17926
|
+
role: messageRole,
|
|
17927
|
+
createdAt: /* @__PURE__ */ new Date(),
|
|
17928
|
+
content: {
|
|
17929
|
+
format: 2,
|
|
17930
|
+
parts: [{ type: "text", text: testMessage }]
|
|
17931
|
+
}
|
|
17932
|
+
}
|
|
17933
|
+
];
|
|
17934
|
+
try {
|
|
17935
|
+
const response = await executeProcessor.mutateAsync({
|
|
17936
|
+
processorId: processor.id,
|
|
17937
|
+
phase: selectedPhase,
|
|
17938
|
+
messages,
|
|
17939
|
+
agentId: selectedAgentId || void 0
|
|
17940
|
+
});
|
|
17941
|
+
setResult(response);
|
|
17942
|
+
if (!response.success && response.error) {
|
|
17943
|
+
setErrorString(response.error);
|
|
17944
|
+
}
|
|
17945
|
+
} catch (error) {
|
|
17946
|
+
setErrorString(error.message || "An error occurred");
|
|
17947
|
+
}
|
|
17948
|
+
};
|
|
17949
|
+
const resultCode = result ? JSON.stringify(result, null, 2) : "{}";
|
|
17950
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(MainContentContent, { hasLeftServiceColumn: true, className: "relative", children: [
|
|
17951
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-surface2 border-r border-border1 w-[22rem] overflow-y-auto", children: [
|
|
17952
|
+
/* @__PURE__ */ jsxRuntime.jsx(ProcessorInformation, { processor }),
|
|
17953
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-5 space-y-5", children: [
|
|
17954
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
17955
|
+
/* @__PURE__ */ jsxRuntime.jsx(Txt, { as: "label", variant: "ui-sm", className: "text-icon3", children: "Phase" }),
|
|
17956
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Select, { value: selectedPhase, onValueChange: (v) => setSelectedPhase(v), children: [
|
|
17957
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { className: "w-full", children: /* @__PURE__ */ jsxRuntime.jsx(SelectValue, { placeholder: "Select phase" }) }),
|
|
17958
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectContent, { children: processor.phases.map((phase) => /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: phase, children: phase }, phase)) })
|
|
17959
|
+
] }),
|
|
17960
|
+
/* @__PURE__ */ jsxRuntime.jsx(Txt, { variant: "ui-xs", className: "text-icon4", children: PHASE_LABELS[selectedPhase] })
|
|
17961
|
+
] }),
|
|
17962
|
+
processor.configurations.length > 1 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
17963
|
+
/* @__PURE__ */ jsxRuntime.jsx(Txt, { as: "label", variant: "ui-sm", className: "text-icon3", children: "Agent Configuration" }),
|
|
17964
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Select, { value: selectedAgentId, onValueChange: setSelectedAgentId, children: [
|
|
17965
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { className: "w-full", children: /* @__PURE__ */ jsxRuntime.jsx(SelectValue, { placeholder: "Select agent" }) }),
|
|
17966
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectContent, { children: processor.configurations.map((config) => /* @__PURE__ */ jsxRuntime.jsxs(SelectItem, { value: config.agentId, children: [
|
|
17967
|
+
config.agentName,
|
|
17968
|
+
" (",
|
|
17969
|
+
config.type,
|
|
17970
|
+
")"
|
|
17971
|
+
] }, config.agentId)) })
|
|
17972
|
+
] })
|
|
17973
|
+
] }),
|
|
17974
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
17975
|
+
/* @__PURE__ */ jsxRuntime.jsx(Txt, { as: "label", htmlFor: formId, variant: "ui-sm", className: "text-icon3", children: "Test Message" }),
|
|
17976
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17977
|
+
"textarea",
|
|
17978
|
+
{
|
|
17979
|
+
id: formId,
|
|
17980
|
+
value: testMessage,
|
|
17981
|
+
onChange: (e) => setTestMessage(e.target.value),
|
|
17982
|
+
placeholder: "Enter a test message...",
|
|
17983
|
+
rows: 4,
|
|
17984
|
+
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"
|
|
17985
|
+
}
|
|
17986
|
+
)
|
|
17987
|
+
] }),
|
|
17988
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17989
|
+
Button,
|
|
17990
|
+
{
|
|
17991
|
+
onClick: handleExecute,
|
|
17992
|
+
disabled: executeProcessor.isPending || selectedPhase === "outputStream",
|
|
17993
|
+
className: "w-full",
|
|
17994
|
+
children: executeProcessor.isPending ? "Running..." : "Run Processor"
|
|
17995
|
+
}
|
|
17996
|
+
),
|
|
17997
|
+
selectedPhase === "outputStream" && /* @__PURE__ */ jsxRuntime.jsx(Txt, { variant: "ui-xs", className: "text-accent6", children: "Output Stream phase cannot be executed directly. Use streaming instead." }),
|
|
17998
|
+
result && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2 pt-4 border-t border-border1", children: [
|
|
17999
|
+
/* @__PURE__ */ jsxRuntime.jsx(Txt, { variant: "ui-sm", className: "text-icon3", children: "Status" }),
|
|
18000
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
18001
|
+
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: result.success ? "success" : "error", children: result.success ? "Success" : "Failed" }),
|
|
18002
|
+
result.tripwire?.triggered && /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "info", children: "Tripwire Triggered" })
|
|
18003
|
+
] }),
|
|
18004
|
+
result.tripwire?.triggered && result.tripwire.reason && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-2 p-3 bg-accent6Dark rounded-md border border-accent6/20", children: [
|
|
18005
|
+
/* @__PURE__ */ jsxRuntime.jsx(Txt, { variant: "ui-sm", className: "text-accent6 font-medium", children: "Tripwire Reason" }),
|
|
18006
|
+
/* @__PURE__ */ jsxRuntime.jsx(Txt, { variant: "ui-sm", className: "text-icon3 mt-1", children: result.tripwire.reason })
|
|
18007
|
+
] })
|
|
18008
|
+
] })
|
|
18009
|
+
] })
|
|
18010
|
+
] }),
|
|
18011
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-4 right-4 z-10", children: /* @__PURE__ */ jsxRuntime.jsx(CopyButton, { content: resultCode, tooltip: "Copy JSON result to clipboard" }) }),
|
|
18012
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-5 h-full relative overflow-x-auto overflow-y-auto", children: /* @__PURE__ */ jsxRuntime.jsx(CodeMirror, { value: errorString || resultCode, editable: true, theme, extensions: [langJson.jsonLanguage] }) })
|
|
18013
|
+
] });
|
|
18014
|
+
}
|
|
18015
|
+
function ProcessorInformation({ processor }) {
|
|
18016
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-5 pt-5 pb-4 border-b border-border1", children: [
|
|
18017
|
+
/* @__PURE__ */ jsxRuntime.jsx(Txt, { variant: "header-md", className: "text-icon1 mb-2", children: processor.name || processor.id }),
|
|
18018
|
+
processor.name && processor.name !== processor.id && /* @__PURE__ */ jsxRuntime.jsx(Txt, { variant: "ui-sm", className: "text-icon4 mb-3", children: processor.id }),
|
|
18019
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1 mt-3", children: processor.phases.map((phase) => /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "default", children: phase }, phase)) }),
|
|
18020
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3", children: /* @__PURE__ */ jsxRuntime.jsxs(Txt, { variant: "ui-xs", className: "text-icon4", children: [
|
|
18021
|
+
"Attached to ",
|
|
18022
|
+
processor.configurations.length,
|
|
18023
|
+
" agent",
|
|
18024
|
+
processor.configurations.length !== 1 ? "s" : ""
|
|
18025
|
+
] }) })
|
|
18026
|
+
] });
|
|
18027
|
+
}
|
|
18028
|
+
|
|
17238
18029
|
const NameCell$1 = ({ row }) => {
|
|
17239
18030
|
const { Link, paths } = useLinkComponent();
|
|
17240
18031
|
const tool = row.original;
|
|
@@ -17926,30 +18717,53 @@ function ProcessStepListItem({ stepId, step, isActive, position }) {
|
|
|
17926
18717
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
17927
18718
|
"div",
|
|
17928
18719
|
{
|
|
17929
|
-
className: cn("grid gap-6 grid-cols-[1fr_auto] py-3 px-4 rounded-lg", {
|
|
17930
|
-
"border border-dashed border-
|
|
18720
|
+
className: cn("grid gap-6 grid-cols-[1fr_auto] py-3 px-4 rounded-lg", transitions.all, {
|
|
18721
|
+
"border border-dashed border-neutral2 bg-surface3": isActive
|
|
17931
18722
|
}),
|
|
17932
18723
|
children: [
|
|
17933
18724
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-[auto_1fr] gap-2", children: [
|
|
17934
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
17935
|
-
|
|
17936
|
-
|
|
17937
|
-
|
|
18725
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
18726
|
+
"span",
|
|
18727
|
+
{
|
|
18728
|
+
className: cn("text-ui-md min-w-6 flex justify-end", transitions.colors, {
|
|
18729
|
+
"text-neutral5": isActive || step.status === "success",
|
|
18730
|
+
"text-neutral3": !isActive && step.status !== "success"
|
|
18731
|
+
}),
|
|
18732
|
+
children: [
|
|
18733
|
+
position,
|
|
18734
|
+
"."
|
|
18735
|
+
]
|
|
18736
|
+
}
|
|
18737
|
+
),
|
|
17938
18738
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
17939
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17940
|
-
|
|
18739
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
18740
|
+
"h4",
|
|
18741
|
+
{
|
|
18742
|
+
className: cn("text-ui-md", transitions.colors, {
|
|
18743
|
+
"text-neutral5": isActive || step.status === "success",
|
|
18744
|
+
"text-neutral3": !isActive && step.status !== "success"
|
|
18745
|
+
}),
|
|
18746
|
+
children: formatStepTitle(stepId)
|
|
18747
|
+
}
|
|
18748
|
+
),
|
|
18749
|
+
step.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-ui-md text-neutral2 -mt-0.5", children: step.description })
|
|
17941
18750
|
] })
|
|
17942
18751
|
] }),
|
|
17943
18752
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17944
18753
|
"div",
|
|
17945
18754
|
{
|
|
17946
|
-
className: cn(
|
|
17947
|
-
"
|
|
17948
|
-
|
|
17949
|
-
|
|
17950
|
-
|
|
17951
|
-
|
|
17952
|
-
|
|
18755
|
+
className: cn(
|
|
18756
|
+
"w-[1.75rem] h-[1.75rem] rounded-full flex items-center justify-center self-center",
|
|
18757
|
+
transitions.all,
|
|
18758
|
+
{
|
|
18759
|
+
"border border-neutral2 border-dashed": step.status === "pending",
|
|
18760
|
+
"[&>svg]:text-white [&>svg]:w-[1rem] [&>svg]:h-[1rem]": step.status !== "running",
|
|
18761
|
+
"w-[1.75rem] h-[1.75rem]": step.status === "running",
|
|
18762
|
+
"bg-accent1Dark shadow-glow-accent1": step.status === "success",
|
|
18763
|
+
"bg-accent2Dark shadow-glow-accent2": step.status === "failed",
|
|
18764
|
+
"scale-110": step.status === "success" || step.status === "failed"
|
|
18765
|
+
}
|
|
18766
|
+
),
|
|
17953
18767
|
children: getStatusIcon(step.status)
|
|
17954
18768
|
}
|
|
17955
18769
|
)
|
|
@@ -17979,19 +18793,20 @@ function ProcessStepProgressBar({ steps }) {
|
|
|
17979
18793
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
17980
18794
|
"div",
|
|
17981
18795
|
{
|
|
17982
|
-
className: cn("flex justify-end items-center relative h-[2rem]
|
|
17983
|
-
"bg-
|
|
18796
|
+
className: cn("flex justify-end items-center relative h-[2rem]", transitions.colors, {
|
|
18797
|
+
"bg-accent1Dark": step.status === "success" && steps?.[idx - 1]?.status === "success"
|
|
17984
18798
|
}),
|
|
17985
18799
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
17986
18800
|
"div",
|
|
17987
18801
|
{
|
|
17988
18802
|
className: cn(
|
|
17989
18803
|
"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",
|
|
18804
|
+
transitions.all,
|
|
17990
18805
|
{
|
|
17991
|
-
"border border-
|
|
17992
|
-
"[&>svg]:text-
|
|
17993
|
-
"bg-
|
|
17994
|
-
"bg-
|
|
18806
|
+
"border border-neutral2 border-dashed": step.status === "pending",
|
|
18807
|
+
"[&>svg]:text-surface1 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]": step.status !== "running",
|
|
18808
|
+
"bg-accent1Dark text-white shadow-glow-accent1 scale-110": step.status === "success",
|
|
18809
|
+
"bg-accent2Dark text-white shadow-glow-accent2 scale-110": step.status === "failed"
|
|
17995
18810
|
}
|
|
17996
18811
|
),
|
|
17997
18812
|
children: step.status === "running" ? /* @__PURE__ */ jsxRuntime.jsx(Spinner, {}) : idx + 1
|
|
@@ -18001,7 +18816,7 @@ function ProcessStepProgressBar({ steps }) {
|
|
|
18001
18816
|
step.id
|
|
18002
18817
|
);
|
|
18003
18818
|
}) }),
|
|
18004
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-xs text-neutral3 text-center", children: [
|
|
18819
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("text-xs text-neutral3 text-center", transitions.colors), children: [
|
|
18005
18820
|
completedSteps,
|
|
18006
18821
|
" of ",
|
|
18007
18822
|
totalSteps,
|
|
@@ -19874,46 +20689,67 @@ function Notification({
|
|
|
19874
20689
|
type = "info"
|
|
19875
20690
|
}) {
|
|
19876
20691
|
const [localIsVisible, setLocalIsVisible] = React.useState(isVisible);
|
|
20692
|
+
const [isAnimatingOut, setIsAnimatingOut] = React.useState(false);
|
|
19877
20693
|
React.useEffect(() => {
|
|
19878
20694
|
if (dismissible && autoDismiss && isVisible) {
|
|
19879
20695
|
const timer = setTimeout(() => {
|
|
19880
|
-
|
|
20696
|
+
handleDismiss();
|
|
19881
20697
|
}, dismissTime);
|
|
19882
20698
|
return () => clearTimeout(timer);
|
|
19883
20699
|
}
|
|
19884
|
-
}, [autoDismiss, isVisible, dismissTime]);
|
|
20700
|
+
}, [autoDismiss, isVisible, dismissTime, dismissible]);
|
|
19885
20701
|
React.useEffect(() => {
|
|
19886
|
-
|
|
20702
|
+
if (isVisible) {
|
|
20703
|
+
setIsAnimatingOut(false);
|
|
20704
|
+
setLocalIsVisible(true);
|
|
20705
|
+
}
|
|
19887
20706
|
}, [isVisible]);
|
|
20707
|
+
const handleDismiss = () => {
|
|
20708
|
+
setIsAnimatingOut(true);
|
|
20709
|
+
setTimeout(() => {
|
|
20710
|
+
setLocalIsVisible(false);
|
|
20711
|
+
setIsAnimatingOut(false);
|
|
20712
|
+
}, 200);
|
|
20713
|
+
};
|
|
19888
20714
|
if (!localIsVisible) return null;
|
|
20715
|
+
const typeStyles = {
|
|
20716
|
+
info: "bg-surface4 border-border1",
|
|
20717
|
+
error: "bg-accent2Darker border-accent2/30",
|
|
20718
|
+
success: "bg-accent1Darker border-accent1/30",
|
|
20719
|
+
warning: "bg-accent6Darker border-accent6/30"
|
|
20720
|
+
};
|
|
20721
|
+
const iconStyles = {
|
|
20722
|
+
info: "text-accent5",
|
|
20723
|
+
error: "text-accent2",
|
|
20724
|
+
success: "text-accent1",
|
|
20725
|
+
warning: "text-accent6"
|
|
20726
|
+
};
|
|
19889
20727
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
19890
20728
|
"div",
|
|
19891
20729
|
{
|
|
19892
20730
|
className: cn(
|
|
19893
|
-
"grid grid-cols-[
|
|
19894
|
-
|
|
19895
|
-
|
|
19896
|
-
|
|
20731
|
+
"grid grid-cols-[auto_1fr_auto] gap-3 rounded-lg border p-4 text-ui-md text-neutral4 items-start",
|
|
20732
|
+
"shadow-card",
|
|
20733
|
+
transitions.all,
|
|
20734
|
+
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",
|
|
20735
|
+
typeStyles[type],
|
|
19897
20736
|
className
|
|
19898
20737
|
),
|
|
19899
20738
|
children: [
|
|
19900
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
19901
|
-
|
|
20739
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex-shrink-0 mt-0.5", iconStyles[type]), children: type === "error" || type === "warning" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertTriangleIcon, { className: "h-4 w-4" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.InfoIcon, { className: "h-4 w-4" }) }),
|
|
20740
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-2 items-start min-w-0", children }),
|
|
20741
|
+
dismissible && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
20742
|
+
Button,
|
|
19902
20743
|
{
|
|
19903
|
-
|
|
19904
|
-
|
|
19905
|
-
|
|
19906
|
-
|
|
19907
|
-
|
|
19908
|
-
}
|
|
19909
|
-
|
|
19910
|
-
children
|
|
20744
|
+
variant: "ghost",
|
|
20745
|
+
className: cn("h-6 w-6 p-0 flex-shrink-0", transitions.colors, "hover:bg-surface5"),
|
|
20746
|
+
onClick: handleDismiss,
|
|
20747
|
+
children: [
|
|
20748
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.XIcon, { className: "h-4 w-4" }),
|
|
20749
|
+
/* @__PURE__ */ jsxRuntime.jsx(VisuallyHidden.VisuallyHidden, { children: "Dismiss" })
|
|
20750
|
+
]
|
|
19911
20751
|
}
|
|
19912
|
-
)
|
|
19913
|
-
dismissible && /* @__PURE__ */ jsxRuntime.jsxs(Button, { onClick: () => setLocalIsVisible(false), children: [
|
|
19914
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.XIcon, {}),
|
|
19915
|
-
/* @__PURE__ */ jsxRuntime.jsx(VisuallyHidden.VisuallyHidden, { children: "Dismiss" })
|
|
19916
|
-
] })
|
|
20752
|
+
)
|
|
19917
20753
|
]
|
|
19918
20754
|
}
|
|
19919
20755
|
);
|
|
@@ -20019,7 +20855,8 @@ const Crumb = ({ className, as, isCurrent, action, ...props }) => {
|
|
|
20019
20855
|
"aria-current": isCurrent ? "page" : void 0,
|
|
20020
20856
|
className: cn(
|
|
20021
20857
|
"text-ui-md leading-ui-md flex items-center gap-2",
|
|
20022
|
-
|
|
20858
|
+
transitions.colors,
|
|
20859
|
+
isCurrent ? "text-white" : "text-neutral3 hover:text-neutral5",
|
|
20023
20860
|
className
|
|
20024
20861
|
),
|
|
20025
20862
|
...props
|
|
@@ -20027,7 +20864,7 @@ const Crumb = ({ className, as, isCurrent, action, ...props }) => {
|
|
|
20027
20864
|
),
|
|
20028
20865
|
action
|
|
20029
20866
|
] }),
|
|
20030
|
-
!isCurrent && /* @__PURE__ */ jsxRuntime.jsx("li", { role: "separator", className: "flex h-full items-center", children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "text-
|
|
20867
|
+
!isCurrent && /* @__PURE__ */ jsxRuntime.jsx("li", { role: "separator", className: "flex h-full items-center", children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: cn("text-neutral2", transitions.colors), children: /* @__PURE__ */ jsxRuntime.jsx(SlashIcon, {}) }) })
|
|
20031
20868
|
] });
|
|
20032
20869
|
};
|
|
20033
20870
|
|
|
@@ -20096,12 +20933,24 @@ const LogoWithoutText = (props) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns
|
|
|
20096
20933
|
) });
|
|
20097
20934
|
|
|
20098
20935
|
const themeClasses = {
|
|
20099
|
-
light: "bg-gray-100 border-gray-300 text-gray-700",
|
|
20100
|
-
dark: "bg-surface4 border-border1 text-
|
|
20936
|
+
light: "bg-gray-100 border-gray-300 text-gray-700 shadow-[0_1px_0_rgba(0,0,0,0.1)]",
|
|
20937
|
+
dark: "bg-surface4 border-border1 text-neutral5 shadow-[0_1px_0_rgba(0,0,0,0.3)]"
|
|
20101
20938
|
};
|
|
20102
|
-
const Kbd = ({ children, theme = "dark" }) => {
|
|
20939
|
+
const Kbd = ({ children, theme = "dark", className }) => {
|
|
20103
20940
|
const themeClass = themeClasses[theme];
|
|
20104
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
20941
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
20942
|
+
"kbd",
|
|
20943
|
+
{
|
|
20944
|
+
className: cn(
|
|
20945
|
+
"border rounded-md px-1.5 py-0.5 font-mono text-ui-sm inline-flex items-center justify-center min-w-[1.5rem]",
|
|
20946
|
+
transitions.transform,
|
|
20947
|
+
"active:scale-95 active:shadow-none",
|
|
20948
|
+
themeClass,
|
|
20949
|
+
className
|
|
20950
|
+
),
|
|
20951
|
+
children
|
|
20952
|
+
}
|
|
20953
|
+
);
|
|
20105
20954
|
};
|
|
20106
20955
|
|
|
20107
20956
|
const SIDEBAR_COOKIE_NAME = "sidebar:state";
|
|
@@ -20171,6 +21020,8 @@ function MainSidebarRoot({ children, className }) {
|
|
|
20171
21020
|
{
|
|
20172
21021
|
className: cn(
|
|
20173
21022
|
"flex flex-col h-full px-4 relative overflow-y-auto",
|
|
21023
|
+
// Smooth width transition for collapse/expand
|
|
21024
|
+
"transition-all duration-slow ease-out-custom",
|
|
20174
21025
|
{
|
|
20175
21026
|
"lg:min-w-52 xl:min-w-56 2xl:min-w-60 3xl:min-w-64 4xl:min-w-72": !isCollapsed
|
|
20176
21027
|
},
|
|
@@ -20187,8 +21038,10 @@ function MainSidebarRoot({ children, className }) {
|
|
|
20187
21038
|
onClick: toggleSidebar,
|
|
20188
21039
|
className: cn(
|
|
20189
21040
|
"inline-flex w-auto items-center text-neutral3 h-8 px-3 rounded-md ml-auto",
|
|
20190
|
-
"hover:bg-surface4",
|
|
20191
|
-
"
|
|
21041
|
+
"hover:bg-surface4 hover:text-neutral5",
|
|
21042
|
+
"transition-all duration-normal ease-out-custom",
|
|
21043
|
+
"focus:outline-none focus:ring-1 focus:ring-accent1 focus:shadow-focus-ring",
|
|
21044
|
+
"[&_svg]:w-[1rem] [&_svg]:h-[1rem] [&_svg]:text-neutral3 [&_svg]:transition-transform [&_svg]:duration-normal",
|
|
20192
21045
|
{
|
|
20193
21046
|
"ml-auto": !isCollapsed
|
|
20194
21047
|
}
|
|
@@ -20256,15 +21109,23 @@ function MainSidebarNavLink({
|
|
|
20256
21109
|
"li",
|
|
20257
21110
|
{
|
|
20258
21111
|
className: cn(
|
|
20259
|
-
"flex",
|
|
21112
|
+
"flex relative",
|
|
21113
|
+
// Base link styles with smooth transitions
|
|
20260
21114
|
"[&>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",
|
|
20261
|
-
"[
|
|
21115
|
+
"[&>a]:transition-all [&>a]:duration-normal [&>a]:ease-out-custom",
|
|
21116
|
+
// Icon styles with transitions
|
|
21117
|
+
"[&_svg]:w-4 [&_svg]:h-4 [&_svg]:text-neutral3/60 [&_svg]:transition-colors [&_svg]:duration-normal",
|
|
21118
|
+
// Hover states
|
|
20262
21119
|
"[&>a:hover]:bg-surface4 [&>a:hover]:text-neutral5 [&>a:hover_svg]:text-neutral3",
|
|
20263
21120
|
{
|
|
21121
|
+
// Active state with left indicator bar
|
|
20264
21122
|
"[&>a]:text-neutral5 [&>a]:bg-surface3": isActive,
|
|
20265
21123
|
"[&_svg]:text-neutral5": isActive,
|
|
21124
|
+
// Active indicator bar
|
|
21125
|
+
"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,
|
|
20266
21126
|
"[&>a]:justify-start": !isCollapsed,
|
|
20267
21127
|
"[&_svg]:text-neutral3": isCollapsed,
|
|
21128
|
+
// Featured variant
|
|
20268
21129
|
"[&>a]:rounded-md [&>a]:my-2 [&>a]:bg-accent1/75 [&>a:hover]:bg-accent1/85 [&>a]:text-black [&>a:hover]:text-black": isFeatured,
|
|
20269
21130
|
"[&_svg]:text-black/75 [&>a:hover_svg]:text-black": isFeatured
|
|
20270
21131
|
},
|
|
@@ -21284,6 +22145,7 @@ exports.AgentInformationTabLayout = AgentInformationTabLayout;
|
|
|
21284
22145
|
exports.AgentLayout = AgentLayout;
|
|
21285
22146
|
exports.AgentMemory = AgentMemory;
|
|
21286
22147
|
exports.AgentMetadata = AgentMetadata;
|
|
22148
|
+
exports.AgentMetadataCombinedProcessorList = AgentMetadataCombinedProcessorList;
|
|
21287
22149
|
exports.AgentMetadataList = AgentMetadataList;
|
|
21288
22150
|
exports.AgentMetadataListEmpty = AgentMetadataListEmpty;
|
|
21289
22151
|
exports.AgentMetadataListItem = AgentMetadataListItem;
|
|
@@ -21411,6 +22273,9 @@ exports.PopoverTrigger = PopoverTrigger;
|
|
|
21411
22273
|
exports.ProcessStepList = ProcessStepList;
|
|
21412
22274
|
exports.ProcessStepListItem = ProcessStepListItem;
|
|
21413
22275
|
exports.ProcessStepProgressBar = ProcessStepProgressBar;
|
|
22276
|
+
exports.ProcessorIcon = ProcessorIcon;
|
|
22277
|
+
exports.ProcessorPanel = ProcessorPanel;
|
|
22278
|
+
exports.ProcessorTable = ProcessorTable;
|
|
21414
22279
|
exports.PromptIcon = PromptIcon;
|
|
21415
22280
|
exports.RadioGroup = RadioGroup;
|
|
21416
22281
|
exports.RadioGroupItem = RadioGroupItem;
|
|
@@ -21517,6 +22382,7 @@ exports.WorkingMemoryContext = WorkingMemoryContext;
|
|
|
21517
22382
|
exports.WorkingMemoryProvider = WorkingMemoryProvider;
|
|
21518
22383
|
exports.buttonVariants = buttonVariants;
|
|
21519
22384
|
exports.cn = cn;
|
|
22385
|
+
exports.columns = columns$2;
|
|
21520
22386
|
exports.convertWorkflowRunStateToStreamResult = convertWorkflowRunStateToStreamResult;
|
|
21521
22387
|
exports.extractPrompt = extractPrompt;
|
|
21522
22388
|
exports.fieldConfig = fieldConfig;
|
|
@@ -21553,6 +22419,7 @@ exports.useDeleteThread = useDeleteThread;
|
|
|
21553
22419
|
exports.useDeleteWorkflowRun = useDeleteWorkflowRun;
|
|
21554
22420
|
exports.useExecuteAgentTool = useExecuteAgentTool;
|
|
21555
22421
|
exports.useExecuteMCPTool = useExecuteMCPTool;
|
|
22422
|
+
exports.useExecuteProcessor = useExecuteProcessor;
|
|
21556
22423
|
exports.useExecuteTool = useExecuteTool;
|
|
21557
22424
|
exports.useExecuteWorkflow = useExecuteWorkflow;
|
|
21558
22425
|
exports.useInView = useInView;
|
|
@@ -21568,6 +22435,8 @@ exports.useMemoryConfig = useMemoryConfig;
|
|
|
21568
22435
|
exports.useMemorySearch = useMemorySearch;
|
|
21569
22436
|
exports.usePackageUpdates = usePackageUpdates;
|
|
21570
22437
|
exports.usePlaygroundStore = usePlaygroundStore;
|
|
22438
|
+
exports.useProcessor = useProcessor;
|
|
22439
|
+
exports.useProcessors = useProcessors;
|
|
21571
22440
|
exports.useReorderModelList = useReorderModelList;
|
|
21572
22441
|
exports.useResetAgentModel = useResetAgentModel;
|
|
21573
22442
|
exports.useScorer = useScorer;
|