@datatechsolutions/ui 3.2.1 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/astrlabe/contracts.d.mts +31 -3
- package/dist/astrlabe/contracts.d.ts +31 -3
- package/dist/astrlabe/index.d.mts +22 -30
- package/dist/astrlabe/index.d.ts +22 -30
- package/dist/astrlabe/index.js +121 -121
- package/dist/astrlabe/index.mjs +7 -7
- package/dist/astrlabe/utils.js +9 -9
- package/dist/astrlabe/utils.mjs +2 -2
- package/dist/astrlabe/workflow-canvas.d.mts +6 -69
- package/dist/astrlabe/workflow-canvas.d.ts +6 -69
- package/dist/astrlabe/workflow-canvas.js +6 -6
- package/dist/astrlabe/workflow-canvas.mjs +5 -5
- package/dist/brand/index.d.mts +1 -15
- package/dist/brand/index.d.ts +1 -15
- package/dist/brand/index.js +0 -14
- package/dist/brand/index.js.map +1 -1
- package/dist/brand/index.mjs +0 -14
- package/dist/brand/index.mjs.map +1 -1
- package/dist/{chunk-FAGDZEKM.js → chunk-2OZZH2IO.js} +2 -2
- package/dist/chunk-2OZZH2IO.js.map +1 -0
- package/dist/{chunk-SYNVNTLJ.mjs → chunk-3AY5HIQ6.mjs} +2 -2
- package/dist/chunk-3AY5HIQ6.mjs.map +1 -0
- package/dist/{chunk-JSNRCYSO.js → chunk-45QAUEYT.js} +4 -4
- package/dist/{chunk-JSNRCYSO.js.map → chunk-45QAUEYT.js.map} +1 -1
- package/dist/{chunk-B67DP7MI.mjs → chunk-4GDWGWHY.mjs} +4 -4
- package/dist/{chunk-B67DP7MI.mjs.map → chunk-4GDWGWHY.mjs.map} +1 -1
- package/dist/{chunk-KR2X2WHJ.js → chunk-4ICEQJH4.js} +53 -53
- package/dist/{chunk-KR2X2WHJ.js.map → chunk-4ICEQJH4.js.map} +1 -1
- package/dist/{chunk-RXZNACMI.js → chunk-6MBWKOPF.js} +33 -33
- package/dist/{chunk-RXZNACMI.js.map → chunk-6MBWKOPF.js.map} +1 -1
- package/dist/{chunk-C3H4FM4A.js → chunk-72SWXOD5.js} +15 -2
- package/dist/chunk-72SWXOD5.js.map +1 -0
- package/dist/{chunk-JN6IL6OH.mjs → chunk-AGGOHPMZ.mjs} +1054 -5229
- package/dist/chunk-AGGOHPMZ.mjs.map +1 -0
- package/dist/{chunk-5GDKCFM5.mjs → chunk-AL73YAV4.mjs} +3 -3
- package/dist/{chunk-5GDKCFM5.mjs.map → chunk-AL73YAV4.mjs.map} +1 -1
- package/dist/{chunk-ZJPNP2YW.mjs → chunk-BUDZNAKL.mjs} +2 -2
- package/dist/chunk-BUDZNAKL.mjs.map +1 -0
- package/dist/{chunk-OL73LBX5.mjs → chunk-BW67WFHT.mjs} +3 -4
- package/dist/chunk-BW67WFHT.mjs.map +1 -0
- package/dist/{chunk-W5OEBO6E.js → chunk-CF7GOUBQ.js} +13 -14
- package/dist/chunk-CF7GOUBQ.js.map +1 -0
- package/dist/{chunk-IRPS5UCS.mjs → chunk-CUWPLPVY.mjs} +3 -3
- package/dist/{chunk-IRPS5UCS.mjs.map → chunk-CUWPLPVY.mjs.map} +1 -1
- package/dist/{chunk-NJS2YC3J.js → chunk-DJDZIRM6.js} +12 -2
- package/dist/chunk-DJDZIRM6.js.map +1 -0
- package/dist/{chunk-RL35XATZ.js → chunk-ERCDMBRT.js} +702 -647
- package/dist/chunk-ERCDMBRT.js.map +1 -0
- package/dist/{chunk-I2NZGVBG.js → chunk-FSBR4RCK.js} +1101 -5313
- package/dist/chunk-FSBR4RCK.js.map +1 -0
- package/dist/{chunk-5W7L7BT7.mjs → chunk-G7JQ4OCE.mjs} +15 -2
- package/dist/chunk-G7JQ4OCE.mjs.map +1 -0
- package/dist/{chunk-5RM6NGZ6.mjs → chunk-IDEM3DYF.mjs} +3 -3
- package/dist/{chunk-5RM6NGZ6.mjs.map → chunk-IDEM3DYF.mjs.map} +1 -1
- package/dist/{chunk-U7XM3N7F.mjs → chunk-LEXBTVGM.mjs} +12 -2
- package/dist/chunk-LEXBTVGM.mjs.map +1 -0
- package/dist/{chunk-EFOXN3LC.js → chunk-M7KSEUZR.js} +490 -389
- package/dist/chunk-M7KSEUZR.js.map +1 -0
- package/dist/{chunk-AOUUZ52N.js → chunk-MO5FBVV3.js} +85 -86
- package/dist/chunk-MO5FBVV3.js.map +1 -0
- package/dist/{chunk-H2D2CRTD.mjs → chunk-NAFWHJCM.mjs} +8 -8
- package/dist/{chunk-H2D2CRTD.mjs.map → chunk-NAFWHJCM.mjs.map} +1 -1
- package/dist/{chunk-3JJWPOK6.js → chunk-NCLZKVJK.js} +9 -10
- package/dist/chunk-NCLZKVJK.js.map +1 -0
- package/dist/{chunk-R4TQWXNG.mjs → chunk-NVQWHJQH.mjs} +6 -5
- package/dist/chunk-NVQWHJQH.mjs.map +1 -0
- package/dist/{chunk-Y6AEE56Q.js → chunk-PGVZKMOA.js} +69 -69
- package/dist/{chunk-Y6AEE56Q.js.map → chunk-PGVZKMOA.js.map} +1 -1
- package/dist/{chunk-UDDZTTLO.mjs → chunk-QBFE7ABE.mjs} +6 -7
- package/dist/chunk-QBFE7ABE.mjs.map +1 -0
- package/dist/{chunk-3ZUMJTDT.mjs → chunk-RFRXS4PC.mjs} +3 -4
- package/dist/{chunk-3JJWPOK6.js.map → chunk-RFRXS4PC.mjs.map} +1 -1
- package/dist/{chunk-ZV5EZXXO.mjs → chunk-RHRJXK5R.mjs} +3 -3
- package/dist/{chunk-ZV5EZXXO.mjs.map → chunk-RHRJXK5R.mjs.map} +1 -1
- package/dist/{chunk-SU3YPWFW.js → chunk-RLLP7VQJ.js} +26 -26
- package/dist/{chunk-SU3YPWFW.js.map → chunk-RLLP7VQJ.js.map} +1 -1
- package/dist/{chunk-YIB2YAM5.mjs → chunk-RLVOG5OQ.mjs} +3 -3
- package/dist/{chunk-YIB2YAM5.mjs.map → chunk-RLVOG5OQ.mjs.map} +1 -1
- package/dist/{chunk-QYA53LUF.mjs → chunk-SEYUYGER.mjs} +571 -517
- package/dist/chunk-SEYUYGER.mjs.map +1 -0
- package/dist/{chunk-YV72JM4B.mjs → chunk-SQ4KGLBZ.mjs} +4 -4
- package/dist/{chunk-YV72JM4B.mjs.map → chunk-SQ4KGLBZ.mjs.map} +1 -1
- package/dist/{chunk-F54Q2YJY.js → chunk-SY4MUT5V.js} +7 -7
- package/dist/{chunk-F54Q2YJY.js.map → chunk-SY4MUT5V.js.map} +1 -1
- package/dist/{chunk-ZM5MVWIT.js → chunk-TUQLZ4QD.js} +5 -6
- package/dist/chunk-TUQLZ4QD.js.map +1 -0
- package/dist/{chunk-TVMLV675.js → chunk-UE2RDQIK.js} +98 -95
- package/dist/chunk-UE2RDQIK.js.map +1 -0
- package/dist/{chunk-HDCUWUNH.js → chunk-UJVDI66K.js} +28 -27
- package/dist/chunk-UJVDI66K.js.map +1 -0
- package/dist/{chunk-IRT4T3CU.mjs → chunk-VV6SYMPM.mjs} +423 -321
- package/dist/chunk-VV6SYMPM.mjs.map +1 -0
- package/dist/{chunk-HZ4LOVHM.js → chunk-VY52Y5GC.js} +2 -2
- package/dist/chunk-VY52Y5GC.js.map +1 -0
- package/dist/{chunk-LEKZUS6N.mjs → chunk-X3GW7UPN.mjs} +4 -5
- package/dist/chunk-X3GW7UPN.mjs.map +1 -0
- package/dist/{chunk-RGI74SQH.js → chunk-Y2AYFG4E.js} +4 -4
- package/dist/{chunk-RGI74SQH.js.map → chunk-Y2AYFG4E.js.map} +1 -1
- package/dist/{chunk-TIJJHW2Z.js → chunk-YV7F7IXG.js} +36 -36
- package/dist/{chunk-TIJJHW2Z.js.map → chunk-YV7F7IXG.js.map} +1 -1
- package/dist/{chunk-MVBIAXVN.mjs → chunk-ZKSDDFHG.mjs} +14 -11
- package/dist/chunk-ZKSDDFHG.mjs.map +1 -0
- package/dist/{index-VI9gyJXl.d.mts → index-BNRGVAS5.d.mts} +9 -2
- package/dist/index-BoebbJ44.d.mts +49 -0
- package/dist/index-BoebbJ44.d.ts +49 -0
- package/dist/{index-CoB18TbG.d.ts → index-CnCY-b5V.d.ts} +9 -2
- package/dist/index.d.mts +399 -548
- package/dist/index.d.ts +399 -548
- package/dist/index.js +727 -887
- package/dist/index.mjs +3 -3
- package/dist/platform/admin/index.js +12 -12
- package/dist/platform/admin/index.mjs +6 -6
- package/dist/platform/agents-workspace.js +10 -10
- package/dist/platform/agents-workspace.mjs +9 -9
- package/dist/platform/app-shell.js +5 -5
- package/dist/platform/app-shell.mjs +4 -4
- package/dist/platform/auth/index.js +29 -29
- package/dist/platform/auth/index.mjs +6 -6
- package/dist/platform/billing/index.js +5 -5
- package/dist/platform/billing/index.mjs +4 -4
- package/dist/platform/impersonation/index.js +5 -5
- package/dist/platform/impersonation/index.mjs +4 -4
- package/dist/platform/index.d.mts +3 -39
- package/dist/platform/index.d.ts +3 -39
- package/dist/platform/index.js +102 -4812
- package/dist/platform/index.js.map +1 -1
- package/dist/platform/index.mjs +25 -4730
- package/dist/platform/index.mjs.map +1 -1
- package/dist/platform/pages/index.d.mts +4 -4
- package/dist/platform/pages/index.d.ts +4 -4
- package/dist/platform/pages/index.js +199 -199
- package/dist/platform/pages/index.mjs +11 -11
- package/dist/platform/rbac.d.mts +2 -1
- package/dist/platform/rbac.d.ts +2 -1
- package/dist/platform/rbac.js +2 -2
- package/dist/platform/rbac.mjs +1 -1
- package/dist/platform/settings/index.js +9 -9
- package/dist/platform/settings/index.mjs +8 -8
- package/dist/platform/utils/index.js +3 -3
- package/dist/platform/utils/index.js.map +1 -1
- package/dist/platform/utils/index.mjs +1 -1
- package/dist/platform/utils/index.mjs.map +1 -1
- package/dist/platform/workflow-api-client.d.mts +2 -2
- package/dist/platform/workflow-api-client.d.ts +2 -2
- package/dist/platform/workflow-api-client.js +62 -62
- package/dist/platform/workflow-api-client.mjs +2 -2
- package/dist/platform/workflow-canvas-shell.js +7 -7
- package/dist/platform/workflow-canvas-shell.mjs +6 -6
- package/dist/{workflow-api-client-DoYj7nHz.d.mts → workflow-api-client-CpFl3WcG.d.mts} +1 -1
- package/dist/{workflow-api-client-BKD8OfP_.d.ts → workflow-api-client-uLICOanv.d.ts} +1 -1
- package/dist/workflow-canvas--qaYKuMm.d.ts +113 -0
- package/dist/workflow-canvas-B80fmD_n.d.mts +113 -0
- package/package.json +15 -5
- package/src/styles/liquid-glass.css +283 -2
- package/dist/chunk-3ZUMJTDT.mjs.map +0 -1
- package/dist/chunk-5W7L7BT7.mjs.map +0 -1
- package/dist/chunk-AOUUZ52N.js.map +0 -1
- package/dist/chunk-C3H4FM4A.js.map +0 -1
- package/dist/chunk-EFOXN3LC.js.map +0 -1
- package/dist/chunk-FAGDZEKM.js.map +0 -1
- package/dist/chunk-HDCUWUNH.js.map +0 -1
- package/dist/chunk-HZ4LOVHM.js.map +0 -1
- package/dist/chunk-I2NZGVBG.js.map +0 -1
- package/dist/chunk-IRT4T3CU.mjs.map +0 -1
- package/dist/chunk-JN6IL6OH.mjs.map +0 -1
- package/dist/chunk-LEKZUS6N.mjs.map +0 -1
- package/dist/chunk-MVBIAXVN.mjs.map +0 -1
- package/dist/chunk-NJS2YC3J.js.map +0 -1
- package/dist/chunk-OL73LBX5.mjs.map +0 -1
- package/dist/chunk-QYA53LUF.mjs.map +0 -1
- package/dist/chunk-R4TQWXNG.mjs.map +0 -1
- package/dist/chunk-RL35XATZ.js.map +0 -1
- package/dist/chunk-SYNVNTLJ.mjs.map +0 -1
- package/dist/chunk-TVMLV675.js.map +0 -1
- package/dist/chunk-U7XM3N7F.mjs.map +0 -1
- package/dist/chunk-UDDZTTLO.mjs.map +0 -1
- package/dist/chunk-W5OEBO6E.js.map +0 -1
- package/dist/chunk-ZJPNP2YW.mjs.map +0 -1
- package/dist/chunk-ZM5MVWIT.js.map +0 -1
- package/src/brand/logos/kori-icon.svg +0 -45
- package/src/brand/logos/kori-logo-dark.svg +0 -40
- package/src/brand/logos/kori-logo.svg +0 -43
|
@@ -1,14 +1,100 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { NodeRunningIndicator, WorkflowHandle,
|
|
3
|
-
import { Button, FormInput, FormSelect, GlassModal, FormTextarea, Badge, FormGrid,
|
|
2
|
+
import { NodeRunningIndicator, WorkflowHandle, NodeCard, NodeCardHeader, NodeCardMeta, NodeCardBadge, NodeInteractiveCard, NodeIconBubble, NodeCardDeleteAction, Workspace, useModalStore, CATEGORY_COLORS, CATEGORY_PILL_COLORS, ICON_MAP, WorkflowCanvas, EXPERIMENTAL_NODE_TYPES, getEntityIcon, getEntityGradient, useWorkflowStore, LOGIC_ICON_MAP, LOGIC_NODE_GRADIENTS, getFrameworkMeta, getCompatibleModels, isModelCompatibleWithFramework, FRAMEWORK_META, isFrameworkCompatibleWithProviders } from './chunk-VV6SYMPM.mjs';
|
|
3
|
+
import { Button, FormInput, FormSelect, ToggleSwitch, HeroBlock, GlassModal, SectionCard, FormTextarea, Badge, FormGrid, Input, DynamicIslandConfirm } from './chunk-AGGOHPMZ.mjs';
|
|
4
4
|
import { useTranslations } from './chunk-7VJ7CMMT.mjs';
|
|
5
|
-
import { getAgentTier, createDefaultLogicNodeConfig } from './chunk-
|
|
5
|
+
import { getAgentTier, createDefaultLogicNodeConfig } from './chunk-G7JQ4OCE.mjs';
|
|
6
6
|
import { memo, useCallback, useMemo, useState, useEffect, useRef, Children } from 'react';
|
|
7
7
|
import { Position } from '@xyflow/react';
|
|
8
|
-
import {
|
|
8
|
+
import { ExclamationTriangleIcon, KeyIcon, CloudArrowUpIcon, Cog6ToothIcon, SparklesIcon, WrenchScrewdriverIcon, CpuChipIcon, ArrowPathRoundedSquareIcon, ArrowsPointingOutIcon, ArrowsPointingInIcon, BoltIcon, ClockIcon, CheckIcon, ArrowPathIcon, MinusCircleIcon, XCircleIcon, CheckCircleIcon, AdjustmentsHorizontalIcon, CircleStackIcon, TrashIcon, PlusIcon, XMarkIcon, EyeIcon, PlayIcon, StopIcon, VariableIcon, ChevronDownIcon, ChevronRightIcon, ExclamationCircleIcon, ClipboardDocumentIcon, ArrowDownTrayIcon, ArrowUpTrayIcon, CommandLineIcon } from '@heroicons/react/24/outline';
|
|
9
9
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
10
10
|
import { create } from 'zustand';
|
|
11
11
|
|
|
12
|
+
var SI = (slug, color) => `https://cdn.simpleicons.org/${slug}/${color}`;
|
|
13
|
+
var PROVIDER_LOGOS = {
|
|
14
|
+
aws_bedrock: "https://www.svgrepo.com/show/448266/aws.svg",
|
|
15
|
+
openai_api: "https://www.svgrepo.com/show/306500/openai.svg",
|
|
16
|
+
google_vertex: SI("googlegemini", "8E75B2"),
|
|
17
|
+
azure_openai: SI("microsoftazure", "0078D4"),
|
|
18
|
+
anthropic_api: SI("anthropic", "D4A27F"),
|
|
19
|
+
groq: SI("groq", "000000"),
|
|
20
|
+
mistral: SI("mistralai", "FF7000"),
|
|
21
|
+
huggingface: SI("huggingface", "FFD21E"),
|
|
22
|
+
ollama: SI("ollama", "FFFFFF")
|
|
23
|
+
};
|
|
24
|
+
var PROVIDER_TYPE_LABELS = {
|
|
25
|
+
aws_bedrock: "AWS Bedrock",
|
|
26
|
+
openai_api: "OpenAI API",
|
|
27
|
+
google_vertex: "Google Vertex AI",
|
|
28
|
+
azure_openai: "Azure OpenAI",
|
|
29
|
+
anthropic_api: "Anthropic API",
|
|
30
|
+
groq: "Groq Cloud",
|
|
31
|
+
mistral: "Mistral AI",
|
|
32
|
+
huggingface: "Hugging Face",
|
|
33
|
+
ollama: "Ollama (Local)",
|
|
34
|
+
custom: "Custom"
|
|
35
|
+
};
|
|
36
|
+
var ModelProviderFlowNode = memo(function ModelProviderFlowNode2({ id, data, selected }) {
|
|
37
|
+
const config = data.config;
|
|
38
|
+
const isCompact = data.displayMode === "compact";
|
|
39
|
+
if (!config) {
|
|
40
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
41
|
+
/* @__PURE__ */ jsx(NodeRunningIndicator, { nodeId: id }),
|
|
42
|
+
/* @__PURE__ */ jsx(WorkflowHandle, { type: "target", position: Position.Left, id: "left-in", colorClass: "!bg-gray-400 dark:!bg-gray-500" }),
|
|
43
|
+
/* @__PURE__ */ jsx(WorkflowHandle, { type: "target", position: Position.Top, id: "top-in", colorClass: "!bg-gray-400 dark:!bg-gray-500" }),
|
|
44
|
+
/* @__PURE__ */ jsx(NodeCard, { variant: "error", nodeType: "model_provider", width: "w-[280px]", children: /* @__PURE__ */ jsx(
|
|
45
|
+
NodeCardHeader,
|
|
46
|
+
{
|
|
47
|
+
icon: /* @__PURE__ */ jsx(ExclamationTriangleIcon, { className: "h-6 w-6 text-white" }),
|
|
48
|
+
title: data.label || "Model Provider",
|
|
49
|
+
description: "Not configured",
|
|
50
|
+
iconClassName: "flex h-11 w-11 items-center justify-center rounded-xl bg-gradient-to-br from-amber-400 to-orange-500 shadow-lg"
|
|
51
|
+
}
|
|
52
|
+
) }),
|
|
53
|
+
/* @__PURE__ */ jsx(WorkflowHandle, { type: "source", position: Position.Right, id: "right-out", colorClass: "!bg-slate-500" }),
|
|
54
|
+
/* @__PURE__ */ jsx(WorkflowHandle, { type: "source", position: Position.Bottom, id: "bottom-out", colorClass: "!bg-slate-500" })
|
|
55
|
+
] });
|
|
56
|
+
}
|
|
57
|
+
const providerLabel = PROVIDER_TYPE_LABELS[config.providerType] ?? config.providerType;
|
|
58
|
+
const displayName = config.name || providerLabel;
|
|
59
|
+
const regionLabel = config.region ? config.region : void 0;
|
|
60
|
+
const isConfigured = !!(config.credentialRef || config.apiKeyRef);
|
|
61
|
+
const logo = PROVIDER_LOGOS[config.providerType];
|
|
62
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
63
|
+
/* @__PURE__ */ jsx(NodeRunningIndicator, { nodeId: id }),
|
|
64
|
+
/* @__PURE__ */ jsx(WorkflowHandle, { type: "target", position: Position.Left, id: "left-in", colorClass: "!bg-gray-400 dark:!bg-gray-500" }),
|
|
65
|
+
/* @__PURE__ */ jsx(WorkflowHandle, { type: "target", position: Position.Top, id: "top-in", colorClass: "!bg-gray-400 dark:!bg-gray-500" }),
|
|
66
|
+
/* @__PURE__ */ jsx(
|
|
67
|
+
"button",
|
|
68
|
+
{
|
|
69
|
+
type: "button",
|
|
70
|
+
onClick: () => data.onEdit?.(id),
|
|
71
|
+
className: "w-full text-left",
|
|
72
|
+
children: /* @__PURE__ */ jsxs(NodeCard, { compact: isCompact, selected, nodeType: "model_provider", width: "w-[280px]", children: [
|
|
73
|
+
/* @__PURE__ */ jsx(
|
|
74
|
+
NodeCardHeader,
|
|
75
|
+
{
|
|
76
|
+
icon: logo ? /* @__PURE__ */ jsx("img", { src: logo, alt: providerLabel, className: "h-6 w-6 object-contain", loading: "lazy" }) : /* @__PURE__ */ jsx(KeyIcon, { className: "h-6 w-6 text-white" }),
|
|
77
|
+
title: displayName,
|
|
78
|
+
description: providerLabel,
|
|
79
|
+
iconClassName: `flex h-11 w-11 items-center justify-center rounded-xl shadow-lg ${logo ? "bg-white/10 dark:bg-white/5 p-2" : "bg-gradient-to-br from-slate-600 to-slate-700 p-1.5"}`
|
|
80
|
+
}
|
|
81
|
+
),
|
|
82
|
+
/* @__PURE__ */ jsx(NodeCardMeta, { compact: isCompact, children: /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-1.5", children: [
|
|
83
|
+
/* @__PURE__ */ jsx(NodeCardBadge, { className: "rounded-full bg-slate-100 px-2 py-0.5 text-[10px] font-semibold text-slate-700 dark:bg-slate-500/20 dark:text-slate-300", children: providerLabel }),
|
|
84
|
+
regionLabel && /* @__PURE__ */ jsx(NodeCardBadge, { className: "rounded-full bg-gray-100 px-2 py-0.5 text-[10px] font-medium text-gray-600 dark:bg-white/10 dark:text-gray-300", children: regionLabel }),
|
|
85
|
+
/* @__PURE__ */ jsx(NodeCardBadge, { className: `rounded-full px-2 py-0.5 text-[10px] font-medium ${isConfigured ? "bg-green-100 text-green-700 dark:bg-green-500/20 dark:text-green-300" : "bg-amber-100 text-amber-700 dark:bg-amber-500/20 dark:text-amber-300"}`, children: isConfigured ? "Configured" : "Setup needed" }),
|
|
86
|
+
config.modelFilter && config.modelFilter.length > 0 && /* @__PURE__ */ jsxs(NodeCardBadge, { className: "rounded-full bg-gray-100 px-2 py-0.5 text-[10px] font-medium text-gray-600 dark:bg-white/10 dark:text-gray-300", children: [
|
|
87
|
+
config.modelFilter.length,
|
|
88
|
+
" models"
|
|
89
|
+
] })
|
|
90
|
+
] }) })
|
|
91
|
+
] })
|
|
92
|
+
}
|
|
93
|
+
),
|
|
94
|
+
/* @__PURE__ */ jsx(WorkflowHandle, { type: "source", position: Position.Right, id: "right-out", colorClass: "!bg-slate-500" }),
|
|
95
|
+
/* @__PURE__ */ jsx(WorkflowHandle, { type: "source", position: Position.Bottom, id: "bottom-out", colorClass: "!bg-slate-500" })
|
|
96
|
+
] });
|
|
97
|
+
});
|
|
12
98
|
var S3WriteFlowNode = memo(function S3WriteFlowNode2({ id, data, selected }) {
|
|
13
99
|
const t = useTranslations("agents.workflow");
|
|
14
100
|
const { config, label, onDelete, onEdit } = data;
|
|
@@ -296,94 +382,6 @@ function rowsToSchema(rows) {
|
|
|
296
382
|
function defaultAgentOutputSchema() {
|
|
297
383
|
return { type: "object", properties: {}, required: [] };
|
|
298
384
|
}
|
|
299
|
-
function StatusBadge({ status }) {
|
|
300
|
-
const colorMap = {
|
|
301
|
-
pending: "bg-gray-100 text-gray-700 dark:bg-gray-800 dark:text-gray-300",
|
|
302
|
-
running: "bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-300",
|
|
303
|
-
success: "bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-300",
|
|
304
|
-
error: "bg-red-100 text-red-700 dark:bg-red-900/30 dark:text-red-300"
|
|
305
|
-
};
|
|
306
|
-
return /* @__PURE__ */ jsx("span", { className: `inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-semibold ${colorMap[status] ?? colorMap.pending}`, children: status });
|
|
307
|
-
}
|
|
308
|
-
function formatDuration(ms) {
|
|
309
|
-
if (ms < 1e3) return `${ms}ms`;
|
|
310
|
-
return `${(ms / 1e3).toFixed(2)}s`;
|
|
311
|
-
}
|
|
312
|
-
function isRecord(value) {
|
|
313
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
314
|
-
}
|
|
315
|
-
function OutputCard({ label, value }) {
|
|
316
|
-
const displayValue = typeof value === "string" ? value : JSON.stringify(value, null, 2);
|
|
317
|
-
const isLong = typeof displayValue === "string" && displayValue.length > 120;
|
|
318
|
-
return /* @__PURE__ */ jsxs("div", { className: "rounded-xl border border-white/20 bg-white/40 p-3 dark:border-white/10 dark:bg-white/5", children: [
|
|
319
|
-
/* @__PURE__ */ jsx("p", { className: "mb-1 text-[10px] font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400", children: label }),
|
|
320
|
-
isLong ? /* @__PURE__ */ jsx("pre", { className: "max-h-40 overflow-auto whitespace-pre-wrap text-xs text-gray-800 dark:text-gray-200", children: displayValue }) : /* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-gray-900 dark:text-white", children: displayValue })
|
|
321
|
-
] });
|
|
322
|
-
}
|
|
323
|
-
function AgentProfileHeader({ agent, models, t, selectedModelId, setSelectedModelId, selectedFramework, temperature, setTemperature, elo, setElo, onChanged }) {
|
|
324
|
-
const modelName = models.find((model) => model.id === selectedModelId)?.name ?? selectedModelId ?? "\u2014";
|
|
325
|
-
const avatarUrl = agent.avatar;
|
|
326
|
-
const frameworkMeta = getFrameworkMeta(selectedFramework);
|
|
327
|
-
const tierInfo = getEloTier(elo);
|
|
328
|
-
const difficultyConfig = {
|
|
329
|
-
beginner: { color: "bg-cyan-100 text-cyan-700 dark:bg-cyan-900/30 dark:text-cyan-400", labelKey: "agentDrawer.tierBeginner" },
|
|
330
|
-
intermediate: { color: "bg-pink-100 text-pink-700 dark:bg-pink-900/30 dark:text-pink-400", labelKey: "agentDrawer.tierIntermediate" },
|
|
331
|
-
advanced: { color: "bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-400", labelKey: "agentDrawer.tierAdvanced" },
|
|
332
|
-
expert: { color: "bg-emerald-100 text-emerald-700 dark:bg-emerald-900/30 dark:text-emerald-400", labelKey: "agentDrawer.tierExpert" }
|
|
333
|
-
};
|
|
334
|
-
const levelConfig = difficultyConfig[tierInfo.tierKey];
|
|
335
|
-
return /* @__PURE__ */ jsxs("div", { className: "relative overflow-hidden bg-gradient-to-br from-indigo-500/20 via-purple-500/10 to-transparent px-6 pb-6 pt-4 dark:from-indigo-500/10 dark:via-purple-500/5", children: [
|
|
336
|
-
levelConfig && /* @__PURE__ */ jsx("div", { className: "mb-4 flex justify-center", children: /* @__PURE__ */ jsx("span", { className: `${levelConfig.color} rounded-full px-4 py-1.5 text-xs font-bold shadow-sm transition-colors`, children: t(levelConfig.labelKey) }) }),
|
|
337
|
-
/* @__PURE__ */ jsx("div", { className: "mb-4 flex justify-center", children: /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
338
|
-
/* @__PURE__ */ jsx("div", { className: "absolute inset-0 rounded-full bg-gradient-to-br from-purple-500 to-blue-500 opacity-40 blur-lg" }),
|
|
339
|
-
avatarUrl ? /* @__PURE__ */ jsx(
|
|
340
|
-
"img",
|
|
341
|
-
{
|
|
342
|
-
src: avatarUrl,
|
|
343
|
-
alt: agent.name,
|
|
344
|
-
loading: "lazy",
|
|
345
|
-
className: "relative h-20 w-20 rounded-full bg-white object-cover shadow-xl ring-4 ring-white dark:bg-gray-800 dark:ring-gray-800"
|
|
346
|
-
}
|
|
347
|
-
) : /* @__PURE__ */ jsx("div", { className: "relative flex h-20 w-20 items-center justify-center rounded-full bg-gradient-to-br from-indigo-400 to-purple-500 shadow-xl ring-4 ring-white dark:ring-gray-800", children: /* @__PURE__ */ jsx(CpuChipIcon, { className: "h-10 w-10 text-white" }) }),
|
|
348
|
-
/* @__PURE__ */ jsx("div", { className: "absolute -bottom-1 -right-1 flex h-6 w-6 items-center justify-center rounded-full bg-indigo-500 ring-2 ring-white dark:ring-gray-900", children: /* @__PURE__ */ jsx(CpuChipIcon, { className: "h-3.5 w-3.5 text-white" }) })
|
|
349
|
-
] }) }),
|
|
350
|
-
/* @__PURE__ */ jsx("h3", { className: "mb-2 text-center text-lg font-bold text-gray-900 dark:text-white", children: agent.name }),
|
|
351
|
-
agent.role && /* @__PURE__ */ jsx("div", { className: "mb-3 flex justify-center", children: /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1.5 rounded-full bg-white/60 px-3 py-1.5 text-xs font-medium text-gray-600 ring-1 ring-gray-200/50 dark:bg-gray-800/60 dark:text-gray-400 dark:ring-gray-700/50", children: [
|
|
352
|
-
/* @__PURE__ */ jsxs("svg", { className: "h-3 w-3", fill: "currentColor", viewBox: "0 0 20 20", children: [
|
|
353
|
-
/* @__PURE__ */ jsx("path", { fillRule: "evenodd", d: "M6 6V5a3 3 0 013-3h2a3 3 0 013 3v1h2a2 2 0 012 2v3.57A22.952 22.952 0 0110 13a22.95 22.95 0 01-8-1.43V8a2 2 0 012-2h2zm2-1a1 1 0 011-1h2a1 1 0 011 1v1H8V5zm1 5a1 1 0 011-1h.01a1 1 0 110 2H10a1 1 0 01-1-1z", clipRule: "evenodd" }),
|
|
354
|
-
/* @__PURE__ */ jsx("path", { d: "M2 13.692V16a2 2 0 002 2h12a2 2 0 002-2v-2.308A24.974 24.974 0 0110 15c-2.796 0-5.487-.46-8-1.308z" })
|
|
355
|
-
] }),
|
|
356
|
-
agent.role
|
|
357
|
-
] }) }),
|
|
358
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-2", children: [
|
|
359
|
-
/* @__PURE__ */ jsxs("div", { className: "inline-flex items-center gap-1.5 rounded bg-white/50 px-2.5 py-1 text-[10px] text-gray-600 dark:bg-gray-800/50 dark:text-gray-400", children: [
|
|
360
|
-
/* @__PURE__ */ jsx(CpuChipIcon, { className: "h-3 w-3" }),
|
|
361
|
-
/* @__PURE__ */ jsx("span", { className: "font-semibold", children: modelName })
|
|
362
|
-
] }),
|
|
363
|
-
elo != null && /* @__PURE__ */ jsxs("div", { className: "inline-flex items-center gap-1 rounded bg-white/50 px-2 py-1 text-[10px] text-gray-600 dark:bg-gray-800/50 dark:text-gray-400", children: [
|
|
364
|
-
/* @__PURE__ */ jsx("span", { className: "opacity-60", children: "ELO:" }),
|
|
365
|
-
/* @__PURE__ */ jsx("span", { className: "font-bold tabular-nums", children: elo })
|
|
366
|
-
] })
|
|
367
|
-
] }),
|
|
368
|
-
/* @__PURE__ */ jsx("div", { className: "mt-3 flex justify-center", children: /* @__PURE__ */ jsxs("span", { className: `inline-flex items-center gap-1.5 rounded-full px-3 py-1 text-[10px] font-semibold ${frameworkMeta.badgeColor}`, children: [
|
|
369
|
-
/* @__PURE__ */ jsx(frameworkMeta.IconComponent, { className: "h-3.5 w-3.5" }),
|
|
370
|
-
frameworkMeta.label
|
|
371
|
-
] }) }),
|
|
372
|
-
/* @__PURE__ */ jsx(AgentCapabilityCard, { elo, setElo, models, selectedModelId, setSelectedModelId, temperature, setTemperature, onChanged, t }),
|
|
373
|
-
/* @__PURE__ */ jsxs("div", { className: "mt-2 flex items-center justify-center gap-2 text-[10px] text-gray-400 dark:text-gray-500", children: [
|
|
374
|
-
/* @__PURE__ */ jsxs("span", { children: [
|
|
375
|
-
"v",
|
|
376
|
-
agent.activePromptVersion
|
|
377
|
-
] }),
|
|
378
|
-
/* @__PURE__ */ jsx("span", { children: "\xB7" }),
|
|
379
|
-
/* @__PURE__ */ jsxs("span", { children: [
|
|
380
|
-
agent.promptCount,
|
|
381
|
-
" prompt",
|
|
382
|
-
agent.promptCount === 1 ? "" : "s"
|
|
383
|
-
] })
|
|
384
|
-
] })
|
|
385
|
-
] });
|
|
386
|
-
}
|
|
387
385
|
var MODEL_FAMILIES = {
|
|
388
386
|
anthropic: [
|
|
389
387
|
{ prefix: "anthropic.claude-haiku", maxTokens: 8192, contextWindow: "200K" },
|
|
@@ -410,8 +408,20 @@ function getProviderFromModelId(modelId) {
|
|
|
410
408
|
if (modelId.startsWith("anthropic.")) return "anthropic";
|
|
411
409
|
if (modelId.startsWith("amazon.")) return "amazon";
|
|
412
410
|
if (modelId.startsWith("meta.")) return "meta";
|
|
411
|
+
if (modelId.startsWith("openai.")) return "openai";
|
|
412
|
+
if (modelId.startsWith("google.")) return "google";
|
|
413
413
|
return "anthropic";
|
|
414
414
|
}
|
|
415
|
+
function getModelFamily(modelId) {
|
|
416
|
+
return getProviderFromModelId(modelId);
|
|
417
|
+
}
|
|
418
|
+
function findCompatibleProviders(modelId, providers) {
|
|
419
|
+
const family = getModelFamily(modelId);
|
|
420
|
+
return providers.filter((p) => {
|
|
421
|
+
const families = p.servedFamilies ?? [p.provider];
|
|
422
|
+
return families.includes(family);
|
|
423
|
+
});
|
|
424
|
+
}
|
|
415
425
|
function getEloTier(elo) {
|
|
416
426
|
if (elo < 1200) return {
|
|
417
427
|
tierKey: "beginner",
|
|
@@ -774,138 +784,6 @@ function PromptTab({
|
|
|
774
784
|
] })
|
|
775
785
|
] });
|
|
776
786
|
}
|
|
777
|
-
function ResultsTab({ agentId, t }) {
|
|
778
|
-
const nodeResults = useWorkflowStore((state) => state.nodeResults);
|
|
779
|
-
const agentResult = useMemo(() => {
|
|
780
|
-
return nodeResults[agentId] ?? null;
|
|
781
|
-
}, [nodeResults, agentId]);
|
|
782
|
-
if (!agentResult) {
|
|
783
|
-
return /* @__PURE__ */ jsx("div", { className: "flex flex-col items-center justify-center px-4 py-12 text-center", children: /* @__PURE__ */ jsx("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: t("agentDrawer.noResults") }) });
|
|
784
|
-
}
|
|
785
|
-
const outputs = isRecord(agentResult.data) ? agentResult.data : null;
|
|
786
|
-
return /* @__PURE__ */ jsxs("div", { className: "space-y-4 p-4", children: [
|
|
787
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
788
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
789
|
-
/* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-gray-500 dark:text-gray-400", children: t("agentDrawer.status") }),
|
|
790
|
-
/* @__PURE__ */ jsx(StatusBadge, { status: agentResult.status })
|
|
791
|
-
] }),
|
|
792
|
-
agentResult.durationMs != null && /* @__PURE__ */ jsxs("span", { className: "text-xs text-gray-500 dark:text-gray-400", children: [
|
|
793
|
-
t("agentDrawer.duration"),
|
|
794
|
-
": ",
|
|
795
|
-
formatDuration(agentResult.durationMs)
|
|
796
|
-
] })
|
|
797
|
-
] }),
|
|
798
|
-
agentResult.error && /* @__PURE__ */ jsx("div", { className: "rounded-xl border border-red-200 bg-red-50 p-3 dark:border-red-900/30 dark:bg-red-900/10", children: /* @__PURE__ */ jsx("p", { className: "text-xs font-medium text-red-800 dark:text-red-300", children: agentResult.error }) }),
|
|
799
|
-
outputs && Object.keys(outputs).length > 0 && /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
|
|
800
|
-
/* @__PURE__ */ jsx("h4", { className: "text-xs font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400", children: t("agentDrawer.outputVariables") }),
|
|
801
|
-
Object.entries(outputs).map(([key, value]) => /* @__PURE__ */ jsx(OutputCard, { label: key, value }, key))
|
|
802
|
-
] })
|
|
803
|
-
] });
|
|
804
|
-
}
|
|
805
|
-
var SI = (slug, color) => `https://cdn.simpleicons.org/${slug}/${color}`;
|
|
806
|
-
var PROVIDER_LOGOS = {
|
|
807
|
-
anthropic: SI("anthropic", "D4A27F"),
|
|
808
|
-
amazon: "https://www.svgrepo.com/show/448266/aws.svg",
|
|
809
|
-
google: SI("googlegemini", "8E75B2"),
|
|
810
|
-
openai: "https://www.svgrepo.com/show/306500/openai.svg",
|
|
811
|
-
meta: SI("meta", "0668E1"),
|
|
812
|
-
aws_bedrock: "https://www.svgrepo.com/show/448266/aws.svg",
|
|
813
|
-
openai_api: "https://www.svgrepo.com/show/306500/openai.svg",
|
|
814
|
-
google_vertex: SI("googlegemini", "8E75B2"),
|
|
815
|
-
azure_openai: SI("microsoftazure", "0078D4"),
|
|
816
|
-
anthropic_api: SI("anthropic", "D4A27F")
|
|
817
|
-
};
|
|
818
|
-
function ModelsTab({ modelProviders, selectedProviderId, onSelectProvider, models, selectedModelId, onSelectModel, agentFramework, t }) {
|
|
819
|
-
if (modelProviders.length === 0) {
|
|
820
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center justify-center px-4 py-12 text-center", children: [
|
|
821
|
-
/* @__PURE__ */ jsx(KeyIcon, { className: "mb-2 h-8 w-8 text-gray-400 dark:text-gray-500" }),
|
|
822
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: t("agentDrawer.noProvidersAvailable") }),
|
|
823
|
-
/* @__PURE__ */ jsx("p", { className: "mt-1 text-xs text-gray-400 dark:text-gray-500", children: t("agentDrawer.dragProviderHint") })
|
|
824
|
-
] });
|
|
825
|
-
}
|
|
826
|
-
const modelsByProvider = modelProviders.map((provider) => ({
|
|
827
|
-
provider,
|
|
828
|
-
models: models.filter((m) => {
|
|
829
|
-
const modelProvider = m.id.split(".")[0];
|
|
830
|
-
return provider.provider === modelProvider || provider.provider === "amazon" && modelProvider === "anthropic" || provider.provider === "amazon" && modelProvider === "amazon" || provider.provider === "amazon" && modelProvider === "meta";
|
|
831
|
-
})
|
|
832
|
-
}));
|
|
833
|
-
return /* @__PURE__ */ jsxs("div", { className: "space-y-4 p-4", children: [
|
|
834
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
835
|
-
/* @__PURE__ */ jsx("label", { className: "mb-2 block text-xs font-medium text-gray-500 dark:text-gray-400", children: t("agentDrawer.selectProvider") }),
|
|
836
|
-
/* @__PURE__ */ jsx("div", { className: "space-y-1.5", children: modelProviders.map((provider) => {
|
|
837
|
-
const isSelected = selectedProviderId === provider.id;
|
|
838
|
-
const logo = PROVIDER_LOGOS[provider.provider];
|
|
839
|
-
return /* @__PURE__ */ jsxs(
|
|
840
|
-
"button",
|
|
841
|
-
{
|
|
842
|
-
type: "button",
|
|
843
|
-
onClick: () => onSelectProvider(provider.id),
|
|
844
|
-
className: `flex w-full items-center gap-3 rounded-xl border px-3 py-2.5 text-left transition-all ${isSelected ? "border-indigo-500/30 bg-indigo-50/50 ring-1 ring-indigo-500/20 dark:border-indigo-400/20 dark:bg-indigo-500/5" : "border-gray-200/50 bg-gray-50/30 hover:border-gray-300 dark:border-white/10 dark:bg-white/[0.02] dark:hover:border-white/20"}`,
|
|
845
|
-
children: [
|
|
846
|
-
logo ? /* @__PURE__ */ jsx("div", { className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-white/10 p-1", children: /* @__PURE__ */ jsx("img", { src: logo, alt: "", className: "h-5 w-5 object-contain", loading: "lazy" }) }) : /* @__PURE__ */ jsx("div", { className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-gradient-to-br from-slate-500 to-gray-600", children: /* @__PURE__ */ jsx(KeyIcon, { className: "h-4 w-4 text-white" }) }),
|
|
847
|
-
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
848
|
-
/* @__PURE__ */ jsx("p", { className: `text-xs font-medium ${isSelected ? "text-gray-900 dark:text-white" : "text-gray-600 dark:text-gray-400"}`, children: provider.name }),
|
|
849
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 text-[10px] text-gray-400 dark:text-gray-500", children: [
|
|
850
|
-
/* @__PURE__ */ jsxs("span", { children: [
|
|
851
|
-
provider.modelCount,
|
|
852
|
-
" models"
|
|
853
|
-
] }),
|
|
854
|
-
provider.configured && /* @__PURE__ */ jsx("span", { className: "h-1.5 w-1.5 rounded-full bg-green-500" })
|
|
855
|
-
] })
|
|
856
|
-
] }),
|
|
857
|
-
/* @__PURE__ */ jsx("div", { className: `flex h-4 w-4 shrink-0 items-center justify-center rounded-full transition-all ${isSelected ? "bg-indigo-500 text-white" : "border border-gray-300 dark:border-gray-600"}`, children: isSelected && /* @__PURE__ */ jsx(CheckIcon, { className: "h-2.5 w-2.5" }) })
|
|
858
|
-
]
|
|
859
|
-
},
|
|
860
|
-
provider.id
|
|
861
|
-
);
|
|
862
|
-
}) })
|
|
863
|
-
] }),
|
|
864
|
-
selectedProviderId && (() => {
|
|
865
|
-
const providerModels = modelsByProvider.find((p) => p.provider.id === selectedProviderId);
|
|
866
|
-
if (!providerModels || providerModels.models.length === 0) return /* @__PURE__ */ jsx("p", { className: "text-xs text-gray-400 dark:text-gray-500", children: t("agentDrawer.noModelsForProvider") });
|
|
867
|
-
const compatibleModels = providerModels.models.filter(
|
|
868
|
-
(m) => isModelCompatibleWithFramework(m.id, agentFramework)
|
|
869
|
-
);
|
|
870
|
-
const incompatibleModels = providerModels.models.filter(
|
|
871
|
-
(m) => !isModelCompatibleWithFramework(m.id, agentFramework)
|
|
872
|
-
);
|
|
873
|
-
return /* @__PURE__ */ jsxs("div", { children: [
|
|
874
|
-
/* @__PURE__ */ jsx("label", { className: "mb-2 block text-xs font-medium text-gray-500 dark:text-gray-400", children: t("agentDrawer.selectModel") }),
|
|
875
|
-
/* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
876
|
-
compatibleModels.map((model) => {
|
|
877
|
-
const isSelected = selectedModelId === model.id;
|
|
878
|
-
const { IconComponent, color, providerLabel } = getModelIcon(model.id);
|
|
879
|
-
return /* @__PURE__ */ jsxs(
|
|
880
|
-
"button",
|
|
881
|
-
{
|
|
882
|
-
type: "button",
|
|
883
|
-
onClick: () => onSelectModel(model.id),
|
|
884
|
-
className: `flex w-full items-center gap-2.5 rounded-lg border px-3 py-2 text-left transition-all ${isSelected ? "border-indigo-500/50 bg-indigo-50/50 ring-1 ring-indigo-500/30 dark:border-indigo-400/40 dark:bg-indigo-500/10" : "border-gray-200/50 bg-gray-50/50 hover:border-gray-300 dark:border-white/10 dark:bg-white/5 dark:hover:border-white/20"}`,
|
|
885
|
-
children: [
|
|
886
|
-
/* @__PURE__ */ jsx(IconComponent, { className: `h-4 w-4 flex-shrink-0 ${isSelected ? color : "text-gray-400 dark:text-gray-500"}` }),
|
|
887
|
-
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
888
|
-
/* @__PURE__ */ jsx("p", { className: `text-xs font-semibold ${isSelected ? "text-gray-900 dark:text-white" : "text-gray-600 dark:text-gray-300"}`, children: model.name }),
|
|
889
|
-
/* @__PURE__ */ jsx("p", { className: "text-[10px] text-gray-400 dark:text-gray-500", children: providerLabel })
|
|
890
|
-
] }),
|
|
891
|
-
isSelected && /* @__PURE__ */ jsx(CheckIcon, { className: "h-3.5 w-3.5 shrink-0 text-indigo-500" })
|
|
892
|
-
]
|
|
893
|
-
},
|
|
894
|
-
model.id
|
|
895
|
-
);
|
|
896
|
-
}),
|
|
897
|
-
incompatibleModels.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
898
|
-
/* @__PURE__ */ jsx("div", { className: "mt-2 mb-1 text-[9px] font-medium text-gray-400 dark:text-gray-500", children: t("agentDrawer.incompatibleWithFramework") }),
|
|
899
|
-
incompatibleModels.map((model) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2.5 rounded-lg border border-gray-200/30 px-3 py-2 opacity-40 dark:border-white/5", children: [
|
|
900
|
-
/* @__PURE__ */ jsx(CpuChipIcon, { className: "h-4 w-4 text-gray-400" }),
|
|
901
|
-
/* @__PURE__ */ jsx("p", { className: "text-xs text-gray-500", children: model.name })
|
|
902
|
-
] }, model.id))
|
|
903
|
-
] })
|
|
904
|
-
] })
|
|
905
|
-
] });
|
|
906
|
-
})()
|
|
907
|
-
] });
|
|
908
|
-
}
|
|
909
787
|
function ToolsTab({ agentTools, enabledToolIds, onToggle, agentFramework, t }) {
|
|
910
788
|
if (agentTools.length === 0) {
|
|
911
789
|
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center justify-center px-4 py-12 text-center", children: [
|
|
@@ -977,143 +855,176 @@ function ToolsTab({ agentTools, enabledToolIds, onToggle, agentFramework, t }) {
|
|
|
977
855
|
})
|
|
978
856
|
] });
|
|
979
857
|
}
|
|
980
|
-
function
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
858
|
+
function EngineTab({
|
|
859
|
+
agent,
|
|
860
|
+
models,
|
|
861
|
+
t,
|
|
862
|
+
selectedModelId,
|
|
863
|
+
setSelectedModelId,
|
|
864
|
+
selectedFramework,
|
|
865
|
+
setSelectedFramework,
|
|
866
|
+
temperature,
|
|
867
|
+
setTemperature,
|
|
868
|
+
elo,
|
|
869
|
+
setElo,
|
|
985
870
|
maxOutputTokens,
|
|
986
871
|
setMaxOutputTokens,
|
|
987
872
|
topP,
|
|
988
873
|
setTopP,
|
|
989
874
|
topK,
|
|
990
875
|
setTopK,
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
avatarUrl,
|
|
996
|
-
setAvatarUrl,
|
|
997
|
-
markDirty,
|
|
998
|
-
t
|
|
876
|
+
modelProviders,
|
|
877
|
+
selectedProviderId,
|
|
878
|
+
onSelectProvider,
|
|
879
|
+
markDirty
|
|
999
880
|
}) {
|
|
1000
|
-
const
|
|
1001
|
-
const
|
|
1002
|
-
const
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
881
|
+
const modelObj = models.find((m) => m.id === selectedModelId);
|
|
882
|
+
const modelName = modelObj?.name ?? selectedModelId ?? "\u2014";
|
|
883
|
+
const family = getModelFamily(selectedModelId);
|
|
884
|
+
const compatibleProviders = findCompatibleProviders(selectedModelId, modelProviders);
|
|
885
|
+
const configuredCompatible = compatibleProviders.filter((p) => p.configured);
|
|
886
|
+
const effectiveProvider = compatibleProviders.find((p) => p.id === selectedProviderId) ?? configuredCompatible[0] ?? compatibleProviders[0];
|
|
887
|
+
const frameworkMeta = getFrameworkMeta(selectedFramework);
|
|
888
|
+
const inputCard = "liquid-surface w-full rounded-lg px-3 py-1.5 text-sm text-gray-800 outline-none transition-colors focus:ring-1 focus:ring-indigo-300/40 dark:text-gray-200 dark:focus:ring-indigo-500/20";
|
|
889
|
+
return /* @__PURE__ */ jsx("div", { className: "p-5", children: /* @__PURE__ */ jsxs("div", { className: "overflow-hidden rounded-2xl border border-indigo-500/20 bg-gradient-to-b from-indigo-500/[0.04] via-violet-500/[0.03] to-purple-500/[0.04] dark:border-indigo-400/20 dark:from-indigo-500/[0.10] dark:via-violet-500/[0.06] dark:to-purple-500/[0.08]", children: [
|
|
890
|
+
/* @__PURE__ */ jsx("div", { className: "px-4 pb-3 pt-4", children: /* @__PURE__ */ jsx(
|
|
891
|
+
AgentCapabilityCard,
|
|
892
|
+
{
|
|
893
|
+
elo,
|
|
894
|
+
setElo,
|
|
895
|
+
models,
|
|
896
|
+
selectedModelId,
|
|
897
|
+
setSelectedModelId,
|
|
898
|
+
temperature,
|
|
899
|
+
setTemperature,
|
|
900
|
+
onChanged: markDirty,
|
|
901
|
+
t
|
|
902
|
+
}
|
|
903
|
+
) }),
|
|
904
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 px-4 text-[9px] font-semibold uppercase tracking-wider text-indigo-500/70 dark:text-indigo-400/70", children: [
|
|
905
|
+
/* @__PURE__ */ jsx("div", { className: "h-px flex-1 bg-gradient-to-r from-transparent via-indigo-500/30 to-transparent" }),
|
|
906
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
907
|
+
"\u2193 ",
|
|
908
|
+
t("agentDrawer.derives", { _: "deriva" })
|
|
1011
909
|
] }),
|
|
1012
|
-
/* @__PURE__ */
|
|
1013
|
-
/* @__PURE__ */ jsx("span", { className: labelCls, children: t("agentDrawer.status", { _: "Status" }) }),
|
|
1014
|
-
/* @__PURE__ */ jsxs("select", { className: wrap, value: status, onChange: (e) => {
|
|
1015
|
-
setStatus(e.target.value);
|
|
1016
|
-
touch();
|
|
1017
|
-
}, children: [
|
|
1018
|
-
/* @__PURE__ */ jsx("option", { value: "draft", children: "draft" }),
|
|
1019
|
-
/* @__PURE__ */ jsx("option", { value: "active", children: "active" }),
|
|
1020
|
-
/* @__PURE__ */ jsx("option", { value: "archived", children: "archived" })
|
|
1021
|
-
] })
|
|
1022
|
-
] })
|
|
1023
|
-
] }),
|
|
1024
|
-
/* @__PURE__ */ jsxs("label", { className: "block", children: [
|
|
1025
|
-
/* @__PURE__ */ jsx("span", { className: labelCls, children: t("agentDrawer.description", { _: "Description" }) }),
|
|
1026
|
-
/* @__PURE__ */ jsx(
|
|
1027
|
-
"textarea",
|
|
1028
|
-
{
|
|
1029
|
-
className: wrap,
|
|
1030
|
-
rows: 3,
|
|
1031
|
-
value: description,
|
|
1032
|
-
onChange: (e) => {
|
|
1033
|
-
setDescription(e.target.value);
|
|
1034
|
-
touch();
|
|
1035
|
-
},
|
|
1036
|
-
placeholder: t("agentDrawer.descriptionPlaceholder", { _: "What this agent does, which tasks it's good at" })
|
|
1037
|
-
}
|
|
1038
|
-
)
|
|
1039
|
-
] }),
|
|
1040
|
-
/* @__PURE__ */ jsxs("label", { className: "block", children: [
|
|
1041
|
-
/* @__PURE__ */ jsx("span", { className: labelCls, children: t("agentDrawer.avatarUrl", { _: "Avatar URL" }) }),
|
|
1042
|
-
/* @__PURE__ */ jsx("input", { className: wrap, value: avatarUrl, onChange: (e) => {
|
|
1043
|
-
setAvatarUrl(e.target.value);
|
|
1044
|
-
touch();
|
|
1045
|
-
}, placeholder: "https://\u2026" })
|
|
910
|
+
/* @__PURE__ */ jsx("div", { className: "h-px flex-1 bg-gradient-to-r from-transparent via-indigo-500/30 to-transparent" })
|
|
1046
911
|
] }),
|
|
1047
|
-
/* @__PURE__ */
|
|
1048
|
-
/* @__PURE__ */ jsxs("
|
|
1049
|
-
/* @__PURE__ */ jsx(
|
|
1050
|
-
/* @__PURE__ */
|
|
1051
|
-
"
|
|
1052
|
-
{
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
912
|
+
/* @__PURE__ */ jsx("div", { className: "px-4 py-3", children: /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-3", children: [
|
|
913
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2", children: [
|
|
914
|
+
/* @__PURE__ */ jsx(CpuChipIcon, { className: "mt-0.5 h-5 w-5 text-indigo-500 dark:text-indigo-400" }),
|
|
915
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
916
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm font-semibold text-gray-900 dark:text-white", children: modelName }),
|
|
917
|
+
compatibleProviders.length === 0 ? /* @__PURE__ */ jsx("p", { className: "text-[10px] text-amber-600 dark:text-amber-400", children: t("agentDrawer.noProviderForFamily", { _: "Nenhum provedor configurado serve a fam\xEDlia " + family }) }) : configuredCompatible.length > 1 ? /* @__PURE__ */ jsxs("div", { className: "mt-1 flex items-center gap-1.5", children: [
|
|
918
|
+
/* @__PURE__ */ jsx("span", { className: "text-[10px] text-gray-500 dark:text-gray-400", children: t("agentDrawer.servedVia", { _: "via" }) }),
|
|
919
|
+
/* @__PURE__ */ jsx(
|
|
920
|
+
"select",
|
|
921
|
+
{
|
|
922
|
+
value: effectiveProvider?.id ?? "",
|
|
923
|
+
onChange: (event) => {
|
|
924
|
+
onSelectProvider(event.target.value);
|
|
925
|
+
markDirty();
|
|
926
|
+
},
|
|
927
|
+
className: "liquid-surface rounded-md px-2 py-0.5 text-[10px] font-semibold text-gray-900 outline-none focus:ring-1 focus:ring-indigo-300/40 dark:text-white",
|
|
928
|
+
children: configuredCompatible.map((p) => /* @__PURE__ */ jsx("option", { value: p.id, children: p.name }, p.id))
|
|
929
|
+
}
|
|
930
|
+
),
|
|
931
|
+
effectiveProvider && /* @__PURE__ */ jsxs("span", { className: `inline-flex items-center gap-1 rounded-full px-1.5 py-0.5 text-[9px] font-semibold ${effectiveProvider.configured ? "bg-emerald-500/10 text-emerald-600 dark:text-emerald-400" : "bg-amber-500/10 text-amber-600 dark:text-amber-400"}`, children: [
|
|
932
|
+
/* @__PURE__ */ jsx("span", { className: `h-1 w-1 rounded-full ${effectiveProvider.configured ? "bg-emerald-500" : "bg-amber-500"}` }),
|
|
933
|
+
effectiveProvider.configured ? t("agentDrawer.configured", { _: "connected" }) : t("agentDrawer.setup", { _: "setup" })
|
|
934
|
+
] })
|
|
935
|
+
] }) : /* @__PURE__ */ jsxs("p", { className: "text-[10px] text-gray-500 dark:text-gray-400", children: [
|
|
936
|
+
t("agentDrawer.servedVia", { _: "via" }),
|
|
937
|
+
" ",
|
|
938
|
+
effectiveProvider?.name ?? family,
|
|
939
|
+
effectiveProvider && /* @__PURE__ */ jsxs("span", { className: `ml-2 inline-flex items-center gap-1 rounded-full px-1.5 py-0.5 text-[9px] font-semibold ${effectiveProvider.configured ? "bg-emerald-500/10 text-emerald-600 dark:text-emerald-400" : "bg-amber-500/10 text-amber-600 dark:text-amber-400"}`, children: [
|
|
940
|
+
/* @__PURE__ */ jsx("span", { className: `h-1 w-1 rounded-full ${effectiveProvider.configured ? "bg-emerald-500" : "bg-amber-500"}` }),
|
|
941
|
+
effectiveProvider.configured ? t("agentDrawer.configured", { _: "connected" }) : t("agentDrawer.setup", { _: "setup" })
|
|
942
|
+
] })
|
|
943
|
+
] })
|
|
944
|
+
] })
|
|
1064
945
|
] }),
|
|
1065
|
-
/* @__PURE__ */ jsxs("
|
|
1066
|
-
/* @__PURE__ */ jsx(
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
onChange: (e) => {
|
|
1077
|
-
setTopP(Number(e.target.value) || 0);
|
|
1078
|
-
touch();
|
|
1079
|
-
}
|
|
1080
|
-
}
|
|
1081
|
-
)
|
|
946
|
+
/* @__PURE__ */ jsxs("span", { className: `inline-flex shrink-0 items-center gap-1.5 rounded-full px-3 py-1 text-[10px] font-semibold ${frameworkMeta.badgeColor}`, children: [
|
|
947
|
+
/* @__PURE__ */ jsx(frameworkMeta.IconComponent, { className: "h-3.5 w-3.5" }),
|
|
948
|
+
frameworkMeta.label
|
|
949
|
+
] })
|
|
950
|
+
] }) }),
|
|
951
|
+
/* @__PURE__ */ jsxs("details", { className: "group border-t border-indigo-500/15 bg-white/30 px-4 py-2.5 dark:border-indigo-400/15 dark:bg-white/[0.02]", children: [
|
|
952
|
+
/* @__PURE__ */ jsxs("summary", { className: "flex cursor-pointer items-center gap-2 text-[10px] font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400", children: [
|
|
953
|
+
/* @__PURE__ */ jsx(Cog6ToothIcon, { className: "h-3 w-3" }),
|
|
954
|
+
/* @__PURE__ */ jsx("span", { children: t("agentDrawer.overrideDerivation", { _: "Override \xB7 ajustes avan\xE7ados" }) }),
|
|
955
|
+
/* @__PURE__ */ jsx("span", { className: "ml-auto font-normal text-gray-400 group-open:hidden", children: "\u25BE" }),
|
|
956
|
+
/* @__PURE__ */ jsx("span", { className: "ml-auto hidden font-normal text-gray-400 group-open:inline", children: "\u25B4" })
|
|
1082
957
|
] }),
|
|
1083
|
-
/* @__PURE__ */
|
|
1084
|
-
|
|
958
|
+
/* @__PURE__ */ jsx("p", { className: "mt-1 text-[10px] italic text-gray-400 dark:text-gray-500", children: t("agentDrawer.overrideHint", { _: "Mude framework, modelo manual ou tokens s\xF3 se a deriva\xE7\xE3o por ELO n\xE3o atender." }) }),
|
|
959
|
+
/* @__PURE__ */ jsxs("div", { className: "mt-3 space-y-4", children: [
|
|
1085
960
|
/* @__PURE__ */ jsx(
|
|
1086
|
-
|
|
961
|
+
ConfigTab,
|
|
1087
962
|
{
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
}
|
|
963
|
+
models,
|
|
964
|
+
t,
|
|
965
|
+
selectedModelId,
|
|
966
|
+
setSelectedModelId,
|
|
967
|
+
selectedFramework,
|
|
968
|
+
setSelectedFramework,
|
|
969
|
+
markDirty,
|
|
970
|
+
connectedProviderTypes: modelProviders.map((p) => p.provider)
|
|
1097
971
|
}
|
|
1098
|
-
)
|
|
972
|
+
),
|
|
973
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
974
|
+
/* @__PURE__ */ jsx("p", { className: "mb-2 text-[10px] font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400", children: t("agentDrawer.generationParams", { _: "Par\xE2metros de gera\xE7\xE3o" }) }),
|
|
975
|
+
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-3 gap-2", children: [
|
|
976
|
+
{ key: "max", labelKey: "agentDrawer.maxOutputTokens", label: "Max output", value: maxOutputTokens, setter: setMaxOutputTokens, step: 1, min: 1, max: 32768 },
|
|
977
|
+
{ key: "topP", labelKey: "agentDrawer.topP", label: "Top-p", value: topP, setter: setTopP, step: 0.05, min: 0, max: 1 },
|
|
978
|
+
{ key: "topK", labelKey: "agentDrawer.topK", label: "Top-k", value: topK, setter: setTopK, step: 1, min: 0, max: 500 }
|
|
979
|
+
].map((field) => /* @__PURE__ */ jsxs("div", { className: `${inputCard} flex flex-col items-center !py-2`, children: [
|
|
980
|
+
/* @__PURE__ */ jsx("span", { className: "text-[8px] font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400", children: t(field.labelKey, { _: field.label }) }),
|
|
981
|
+
/* @__PURE__ */ jsx(
|
|
982
|
+
"input",
|
|
983
|
+
{
|
|
984
|
+
type: "number",
|
|
985
|
+
step: field.step,
|
|
986
|
+
min: field.min,
|
|
987
|
+
max: field.max,
|
|
988
|
+
value: field.value,
|
|
989
|
+
onChange: (event) => {
|
|
990
|
+
field.setter(Number(event.target.value) || 0);
|
|
991
|
+
markDirty();
|
|
992
|
+
},
|
|
993
|
+
className: "w-full bg-transparent text-center text-sm font-semibold tabular-nums text-gray-900 outline-none dark:text-white"
|
|
994
|
+
}
|
|
995
|
+
)
|
|
996
|
+
] }, field.key)) })
|
|
997
|
+
] }),
|
|
998
|
+
modelProviders.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
999
|
+
/* @__PURE__ */ jsxs("div", { className: "mb-2 flex items-center justify-between", children: [
|
|
1000
|
+
/* @__PURE__ */ jsx("p", { className: "text-[10px] font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400", children: t("agentDrawer.providerCredentials", { _: "Credenciais do provedor" }) }),
|
|
1001
|
+
/* @__PURE__ */ jsx(
|
|
1002
|
+
"a",
|
|
1003
|
+
{
|
|
1004
|
+
href: "/settings/integrations",
|
|
1005
|
+
className: "text-[10px] font-medium text-indigo-600 hover:text-indigo-700 dark:text-indigo-400 dark:hover:text-indigo-300",
|
|
1006
|
+
children: t("agentDrawer.manageCredentials", { _: "Gerenciar \u2192" })
|
|
1007
|
+
}
|
|
1008
|
+
)
|
|
1009
|
+
] }),
|
|
1010
|
+
/* @__PURE__ */ jsx("div", { className: "space-y-1", children: modelProviders.map((provider) => /* @__PURE__ */ jsxs(
|
|
1011
|
+
"div",
|
|
1012
|
+
{
|
|
1013
|
+
className: "flex items-center gap-2 rounded-lg border border-gray-200/50 bg-white/40 px-3 py-1.5 dark:border-white/10 dark:bg-white/[0.03]",
|
|
1014
|
+
children: [
|
|
1015
|
+
/* @__PURE__ */ jsx(KeyIcon, { className: "h-3 w-3 shrink-0 text-gray-500 dark:text-gray-400" }),
|
|
1016
|
+
/* @__PURE__ */ jsx("span", { className: "text-[11px] font-semibold text-gray-900 dark:text-white", children: provider.name }),
|
|
1017
|
+
/* @__PURE__ */ jsx("span", { className: `shrink-0 rounded-full px-1.5 py-0.5 text-[8px] font-semibold uppercase ${provider.configured ? "bg-emerald-500/10 text-emerald-600 dark:text-emerald-400" : "bg-amber-500/10 text-amber-600 dark:text-amber-400"}`, children: provider.configured ? t("agentDrawer.configured", { _: "connected" }) : t("agentDrawer.setup", { _: "setup" }) }),
|
|
1018
|
+
provider.apiKeyMasked && /* @__PURE__ */ jsx("span", { className: "ml-auto truncate font-mono text-[9px] text-gray-400 dark:text-gray-500", title: provider.credentialRef, children: provider.apiKeyMasked })
|
|
1019
|
+
]
|
|
1020
|
+
},
|
|
1021
|
+
provider.id
|
|
1022
|
+
)) }),
|
|
1023
|
+
/* @__PURE__ */ jsx("p", { className: "mt-2 text-[10px] text-gray-400 dark:text-gray-500", children: selectedProviderId ? "" : t("agentDrawer.providerHint", { _: "Credenciais s\xE3o configuradas no n\xEDvel da conta. Aqui voc\xEA s\xF3 confere o que est\xE1 conectado." }) })
|
|
1024
|
+
] })
|
|
1099
1025
|
] })
|
|
1100
|
-
] }),
|
|
1101
|
-
/* @__PURE__ */ jsxs("label", { className: "block", children: [
|
|
1102
|
-
/* @__PURE__ */ jsx("span", { className: labelCls, children: t("agentDrawer.tags", { _: "Tags (comma-separated)" }) }),
|
|
1103
|
-
/* @__PURE__ */ jsx(
|
|
1104
|
-
"input",
|
|
1105
|
-
{
|
|
1106
|
-
className: wrap,
|
|
1107
|
-
value: tags,
|
|
1108
|
-
onChange: (e) => {
|
|
1109
|
-
setTags(e.target.value);
|
|
1110
|
-
touch();
|
|
1111
|
-
},
|
|
1112
|
-
placeholder: "pricing, research, internal"
|
|
1113
|
-
}
|
|
1114
|
-
)
|
|
1115
1026
|
] })
|
|
1116
|
-
] });
|
|
1027
|
+
] }) });
|
|
1117
1028
|
}
|
|
1118
1029
|
function AgentModal({ onSaved, onPersist }) {
|
|
1119
1030
|
const t = useTranslations("agents.workflow");
|
|
@@ -1125,7 +1036,7 @@ function AgentModal({ onSaved, onPersist }) {
|
|
|
1125
1036
|
const models = agentData?.models ?? [];
|
|
1126
1037
|
const availableAgentTools = agentData?.agentTools ?? [];
|
|
1127
1038
|
const isCreateMode = agentData?.isCreateMode ?? false;
|
|
1128
|
-
const [activeTab, setActiveTab] = useState("
|
|
1039
|
+
const [activeTab, setActiveTab] = useState("config");
|
|
1129
1040
|
const [selectedModelId, setSelectedModelId] = useState("");
|
|
1130
1041
|
const [selectedFramework, setSelectedFramework] = useState("custom");
|
|
1131
1042
|
const [temperature, setTemperature] = useState(0.7);
|
|
@@ -1153,7 +1064,7 @@ function AgentModal({ onSaved, onPersist }) {
|
|
|
1153
1064
|
setTemperature(agent.temperature ?? 0.7);
|
|
1154
1065
|
setElo(Number(agent.elo ?? 1e3));
|
|
1155
1066
|
setSaved(!isCreateMode);
|
|
1156
|
-
setActiveTab("
|
|
1067
|
+
setActiveTab("config");
|
|
1157
1068
|
const agentToolIds = agent.agentToolIds;
|
|
1158
1069
|
setEnabledToolIds(new Set(agentToolIds ?? availableAgentTools.filter((t2) => t2.enabled).map((t2) => t2.agentToolId)));
|
|
1159
1070
|
setSelectedProviderId(agent.modelProviderId ?? "");
|
|
@@ -1226,7 +1137,6 @@ function AgentModal({ onSaved, onPersist }) {
|
|
|
1226
1137
|
setPersisting(true);
|
|
1227
1138
|
if (onPersist) await onPersist(payload);
|
|
1228
1139
|
markSaved();
|
|
1229
|
-
onSaved?.();
|
|
1230
1140
|
} catch (error) {
|
|
1231
1141
|
console.error("[AgentModal] onPersist failed", error);
|
|
1232
1142
|
} finally {
|
|
@@ -1254,113 +1164,208 @@ function AgentModal({ onSaved, onPersist }) {
|
|
|
1254
1164
|
onSaved,
|
|
1255
1165
|
onPersist
|
|
1256
1166
|
]);
|
|
1167
|
+
useEffect(() => {
|
|
1168
|
+
if (!dirty || persisting) return;
|
|
1169
|
+
const handle = setTimeout(() => {
|
|
1170
|
+
void handleMarkSaved();
|
|
1171
|
+
}, 700);
|
|
1172
|
+
return () => clearTimeout(handle);
|
|
1173
|
+
}, [dirty, persisting, handleMarkSaved]);
|
|
1257
1174
|
if (!agent) return null;
|
|
1258
|
-
const sections = [
|
|
1259
|
-
{ id: "profile", label: t("agentDrawer.profileSection"), icon: UserCircleIcon, group: t("agentDrawer.agentGroup") },
|
|
1260
|
-
{ id: "framework", label: t("agentDrawer.frameworkSection"), icon: Cog6ToothIcon, group: t("agentDrawer.agentGroup") },
|
|
1261
|
-
{ id: "prompt", label: t("agentDrawer.promptSection"), icon: SparklesIcon, group: t("agentDrawer.agentGroup") },
|
|
1262
|
-
{ id: "tools", label: `${t("agentDrawer.toolsTab")}${enabledToolIds.size > 0 ? ` (${enabledToolIds.size})` : ""}`, icon: CommandLineIcon, group: t("agentDrawer.configGroup") },
|
|
1263
|
-
{ id: "models", label: `${t("agentDrawer.modelsTab")}${selectedProviderId ? " \u2713" : ""}`, icon: KeyIcon, group: t("agentDrawer.configGroup") },
|
|
1264
|
-
{ id: "advanced", label: t("agentDrawer.advancedTab", { _: "Advanced" }), icon: Cog6ToothIcon, group: t("agentDrawer.configGroup") },
|
|
1265
|
-
{ id: "results", label: t("agentDrawer.resultsTab"), icon: PlayCircleIcon, group: t("agentDrawer.executionGroup") }
|
|
1266
|
-
];
|
|
1175
|
+
const sections = [];
|
|
1267
1176
|
const effectiveAvatarUrl = avatarUrl || agent.avatar;
|
|
1268
|
-
const
|
|
1269
|
-
|
|
1177
|
+
const fieldCard = "liquid-surface w-full rounded-lg px-2.5 py-1.5 text-xs text-gray-800 outline-none transition-colors focus:ring-1 focus:ring-indigo-300/40 dark:text-gray-200 dark:focus:ring-indigo-500/20";
|
|
1178
|
+
const fieldLabel = "text-[9px] font-semibold uppercase tracking-wider text-slate-500 dark:text-slate-400";
|
|
1179
|
+
const avatarNode = effectiveAvatarUrl ? /* @__PURE__ */ jsx(
|
|
1180
|
+
"img",
|
|
1181
|
+
{
|
|
1182
|
+
src: effectiveAvatarUrl,
|
|
1183
|
+
alt: displayName || agent.name,
|
|
1184
|
+
className: "h-full w-full rounded-full bg-white object-cover ring-2 ring-white shadow-sm dark:bg-gray-800 dark:ring-gray-800",
|
|
1185
|
+
loading: "lazy"
|
|
1186
|
+
}
|
|
1187
|
+
) : /* @__PURE__ */ jsx("span", { className: "flex h-full w-full items-center justify-center rounded-full bg-gradient-to-br from-indigo-400 to-purple-500 text-sm font-bold text-white ring-2 ring-white shadow-sm dark:ring-gray-800", children: (displayName || agent.name).charAt(0).toUpperCase() });
|
|
1188
|
+
const statusPill = /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
1189
|
+
/* @__PURE__ */ jsx("span", { className: `text-[9px] font-semibold ${status === "active" ? "text-emerald-600 dark:text-emerald-400" : "text-slate-500"}`, children: status === "active" ? t("agentDrawer.statusActive", { _: "Active" }) : t("agentDrawer.statusInactive", { _: "Inactive" }) }),
|
|
1270
1190
|
/* @__PURE__ */ jsx(
|
|
1271
|
-
|
|
1191
|
+
ToggleSwitch,
|
|
1272
1192
|
{
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1193
|
+
size: "sm",
|
|
1194
|
+
color: "green",
|
|
1195
|
+
checked: status === "active",
|
|
1196
|
+
onChange: (checked) => {
|
|
1197
|
+
setStatus(checked ? "active" : "draft");
|
|
1198
|
+
markDirty();
|
|
1276
1199
|
},
|
|
1277
|
-
|
|
1278
|
-
className: `rounded-lg px-3 py-1.5 text-xs font-semibold text-white shadow-sm transition-all ${dirty && !persisting ? "bg-gradient-to-r from-indigo-500 to-purple-500 hover:from-indigo-600 hover:to-purple-600" : "cursor-not-allowed bg-gray-300 dark:bg-gray-700"}`,
|
|
1279
|
-
children: persisting ? "\u2026" : t("agentDrawer.save")
|
|
1200
|
+
label: t("agentDrawer.status", { _: "Status" })
|
|
1280
1201
|
}
|
|
1281
1202
|
)
|
|
1282
1203
|
] });
|
|
1283
|
-
|
|
1204
|
+
const identityCard = /* @__PURE__ */ jsx("div", { className: "liquid-surface rounded-2xl p-3 ring-1 ring-slate-200/50 dark:ring-white/10", children: /* @__PURE__ */ jsx(
|
|
1205
|
+
HeroBlock,
|
|
1206
|
+
{
|
|
1207
|
+
icon: avatarNode,
|
|
1208
|
+
iconShape: "round",
|
|
1209
|
+
iconBackground: "none",
|
|
1210
|
+
iconSize: "lg",
|
|
1211
|
+
headingLevel: "h2",
|
|
1212
|
+
title: displayName,
|
|
1213
|
+
onTitleChange: (next) => {
|
|
1214
|
+
setDisplayName(next);
|
|
1215
|
+
markDirty();
|
|
1216
|
+
},
|
|
1217
|
+
titlePlaceholder: agent.name,
|
|
1218
|
+
subtitle: agent.role,
|
|
1219
|
+
rightContent: statusPill,
|
|
1220
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
1221
|
+
/* @__PURE__ */ jsxs("label", { className: "flex flex-col gap-1", children: [
|
|
1222
|
+
/* @__PURE__ */ jsx("span", { className: fieldLabel, children: t("agentDrawer.description", { _: "Description" }) }),
|
|
1223
|
+
/* @__PURE__ */ jsx(
|
|
1224
|
+
"textarea",
|
|
1225
|
+
{
|
|
1226
|
+
rows: 2,
|
|
1227
|
+
value: description,
|
|
1228
|
+
onChange: (event) => {
|
|
1229
|
+
setDescription(event.target.value);
|
|
1230
|
+
markDirty();
|
|
1231
|
+
},
|
|
1232
|
+
placeholder: t("agentDrawer.descriptionPlaceholder", { _: "What this agent does, which tasks it's good at" }),
|
|
1233
|
+
className: `${fieldCard} resize-none`
|
|
1234
|
+
}
|
|
1235
|
+
)
|
|
1236
|
+
] }),
|
|
1237
|
+
/* @__PURE__ */ jsxs("label", { className: "flex flex-col gap-1", children: [
|
|
1238
|
+
/* @__PURE__ */ jsx("span", { className: fieldLabel, children: t("agentDrawer.tags", { _: "Tags" }) }),
|
|
1239
|
+
/* @__PURE__ */ jsx(
|
|
1240
|
+
"input",
|
|
1241
|
+
{
|
|
1242
|
+
type: "text",
|
|
1243
|
+
value: tagsText,
|
|
1244
|
+
onChange: (event) => {
|
|
1245
|
+
setTagsText(event.target.value);
|
|
1246
|
+
markDirty();
|
|
1247
|
+
},
|
|
1248
|
+
placeholder: t("agentDrawer.tagsPlaceholder", { _: "pricing, research, internal" }),
|
|
1249
|
+
className: fieldCard
|
|
1250
|
+
}
|
|
1251
|
+
)
|
|
1252
|
+
] })
|
|
1253
|
+
] })
|
|
1254
|
+
}
|
|
1255
|
+
) });
|
|
1256
|
+
const autosaveLabel = persisting ? t("agentDrawer.saving", { _: "Saving\u2026" }) : dirty ? t("agentDrawer.pendingAutosave", { _: "Saving in a moment\u2026" }) : t("agentDrawer.autoSaved", { _: "Auto-saved" });
|
|
1257
|
+
const autosaveColor = persisting ? "text-indigo-500 dark:text-indigo-400" : dirty ? "text-amber-500 dark:text-amber-400" : "text-emerald-500 dark:text-emerald-400";
|
|
1258
|
+
const sidebarFooter = /* @__PURE__ */ jsxs("div", { role: "status", "aria-live": "polite", className: "flex items-center gap-1.5 px-1 py-2 text-xs", children: [
|
|
1259
|
+
/* @__PURE__ */ jsx("span", { className: `relative inline-flex h-1.5 w-1.5 shrink-0 rounded-full ${persisting ? "bg-indigo-500" : dirty ? "bg-amber-500" : "bg-emerald-500"}`, children: persisting && /* @__PURE__ */ jsx(
|
|
1260
|
+
"span",
|
|
1261
|
+
{
|
|
1262
|
+
"aria-hidden": "true",
|
|
1263
|
+
className: "absolute inset-0 motion-safe:animate-ping rounded-full bg-indigo-500/60"
|
|
1264
|
+
}
|
|
1265
|
+
) }),
|
|
1266
|
+
/* @__PURE__ */ jsx("span", { className: `font-medium ${autosaveColor}`, children: autosaveLabel })
|
|
1267
|
+
] });
|
|
1268
|
+
return /* @__PURE__ */ jsx(
|
|
1284
1269
|
GlassModal,
|
|
1285
1270
|
{
|
|
1286
1271
|
open,
|
|
1287
1272
|
onClose: handleClose,
|
|
1288
1273
|
title: agent.name,
|
|
1289
|
-
subtitle: isCreateMode ? t("agentDrawer.createAgent") : t("agentDrawer.editAgent"),
|
|
1290
1274
|
gradient: "from-indigo-500 to-purple-600",
|
|
1291
|
-
icon: /* @__PURE__ */ jsx(CpuChipIcon, { className: "h-5 w-5 text-white" }),
|
|
1275
|
+
icon: /* @__PURE__ */ jsx(CpuChipIcon, { className: "h-5 w-5 text-slate-700 dark:text-white" }),
|
|
1292
1276
|
label: isCreateMode ? t("agentDrawer.createAgent") : t("agentDrawer.editAgent"),
|
|
1293
1277
|
sidebar: {
|
|
1294
1278
|
sections,
|
|
1295
1279
|
activeSectionId: activeTab,
|
|
1296
1280
|
onSectionChange: (sectionId) => setActiveTab(sectionId),
|
|
1297
|
-
|
|
1298
|
-
displayName: displayName || agent.name,
|
|
1299
|
-
profileInitial: (displayName || agent.name).charAt(0).toUpperCase(),
|
|
1300
|
-
avatarUrl: effectiveAvatarUrl,
|
|
1301
|
-
role: agent.role
|
|
1302
|
-
},
|
|
1281
|
+
identityCard,
|
|
1303
1282
|
footer: sidebarFooter
|
|
1304
1283
|
},
|
|
1305
|
-
children: [
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
activeTab === "prompt" && /* @__PURE__ */ jsx(
|
|
1309
|
-
PromptTab,
|
|
1284
|
+
children: /* @__PURE__ */ jsxs("div", { className: "space-y-5", children: [
|
|
1285
|
+
/* @__PURE__ */ jsx(
|
|
1286
|
+
SectionCard,
|
|
1310
1287
|
{
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1288
|
+
variant: "glass",
|
|
1289
|
+
padded: false,
|
|
1290
|
+
collapsible: true,
|
|
1291
|
+
defaultOpen: true,
|
|
1292
|
+
header: {
|
|
1293
|
+
icon: /* @__PURE__ */ jsx(Cog6ToothIcon, { className: "h-5 w-5 text-slate-700 dark:text-white" }),
|
|
1294
|
+
title: t("agentDrawer.engineTab"),
|
|
1295
|
+
subtitle: t("agentDrawer.engineSubtitle", { _: "Como o agente roda \u2014 capacidade, modelo, credenciais" })
|
|
1296
|
+
},
|
|
1297
|
+
children: /* @__PURE__ */ jsx(
|
|
1298
|
+
EngineTab,
|
|
1299
|
+
{
|
|
1300
|
+
agent,
|
|
1301
|
+
models,
|
|
1302
|
+
t,
|
|
1303
|
+
selectedModelId,
|
|
1304
|
+
setSelectedModelId,
|
|
1305
|
+
selectedFramework,
|
|
1306
|
+
setSelectedFramework: (fw) => setSelectedFramework(fw),
|
|
1307
|
+
temperature,
|
|
1308
|
+
setTemperature,
|
|
1309
|
+
elo,
|
|
1310
|
+
setElo,
|
|
1311
|
+
maxOutputTokens,
|
|
1312
|
+
setMaxOutputTokens,
|
|
1313
|
+
topP,
|
|
1314
|
+
setTopP,
|
|
1315
|
+
topK,
|
|
1316
|
+
setTopK,
|
|
1317
|
+
modelProviders: availableModelProviders,
|
|
1318
|
+
selectedProviderId,
|
|
1319
|
+
onSelectProvider: handleSelectProvider,
|
|
1320
|
+
markDirty
|
|
1321
|
+
}
|
|
1322
|
+
)
|
|
1320
1323
|
}
|
|
1321
1324
|
),
|
|
1322
|
-
|
|
1323
|
-
|
|
1325
|
+
/* @__PURE__ */ jsx(
|
|
1326
|
+
SectionCard,
|
|
1324
1327
|
{
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1328
|
+
variant: "glass",
|
|
1329
|
+
padded: false,
|
|
1330
|
+
collapsible: true,
|
|
1331
|
+
defaultOpen: true,
|
|
1332
|
+
header: {
|
|
1333
|
+
icon: /* @__PURE__ */ jsx(SparklesIcon, { className: "h-5 w-5 text-slate-700 dark:text-white" }),
|
|
1334
|
+
title: t("agentDrawer.brainTab"),
|
|
1335
|
+
subtitle: t("agentDrawer.brainSubtitle", { _: "Como o agente pensa \u2014 prompt + criatividade" })
|
|
1336
|
+
},
|
|
1337
|
+
children: /* @__PURE__ */ jsx(
|
|
1338
|
+
PromptTab,
|
|
1339
|
+
{
|
|
1340
|
+
agent,
|
|
1341
|
+
temperature,
|
|
1342
|
+
setTemperature,
|
|
1343
|
+
markDirty,
|
|
1344
|
+
t,
|
|
1345
|
+
promptText: systemPrompt,
|
|
1346
|
+
setPromptText: setSystemPrompt,
|
|
1347
|
+
outputSchema,
|
|
1348
|
+
setOutputSchema
|
|
1349
|
+
}
|
|
1350
|
+
)
|
|
1343
1351
|
}
|
|
1344
1352
|
),
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
ModelsTab,
|
|
1353
|
+
/* @__PURE__ */ jsx(
|
|
1354
|
+
SectionCard,
|
|
1348
1355
|
{
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1356
|
+
variant: "glass",
|
|
1357
|
+
padded: false,
|
|
1358
|
+
collapsible: true,
|
|
1359
|
+
defaultOpen: true,
|
|
1360
|
+
header: {
|
|
1361
|
+
icon: /* @__PURE__ */ jsx(WrenchScrewdriverIcon, { className: "h-5 w-5 text-slate-700 dark:text-white" }),
|
|
1362
|
+
title: `${t("agentDrawer.toolsTab")}${enabledToolIds.size > 0 ? ` (${enabledToolIds.size})` : ""}`,
|
|
1363
|
+
subtitle: t("agentDrawer.toolsSubtitle", { _: "O que o agente pode invocar durante a execu\xE7\xE3o" })
|
|
1357
1364
|
},
|
|
1358
|
-
agentFramework: selectedFramework,
|
|
1359
|
-
t
|
|
1365
|
+
children: /* @__PURE__ */ jsx(ToolsTab, { agentTools: availableAgentTools, enabledToolIds, onToggle: handleToggleTool, agentFramework: selectedFramework, t })
|
|
1360
1366
|
}
|
|
1361
|
-
)
|
|
1362
|
-
|
|
1363
|
-
]
|
|
1367
|
+
)
|
|
1368
|
+
] })
|
|
1364
1369
|
}
|
|
1365
1370
|
);
|
|
1366
1371
|
}
|
|
@@ -2116,7 +2121,7 @@ function ExecutionTimelinePanel({
|
|
|
2116
2121
|
] })
|
|
2117
2122
|
] }),
|
|
2118
2123
|
/* @__PURE__ */ jsxs("div", { className: "mt-2 flex items-center gap-3 text-xs text-slate-500 dark:text-slate-400", children: [
|
|
2119
|
-
/* @__PURE__ */ jsx("span", { children:
|
|
2124
|
+
/* @__PURE__ */ jsx("span", { children: formatDuration(entry.durationMs) }),
|
|
2120
2125
|
/* @__PURE__ */ jsx("span", { children: "\xB7" }),
|
|
2121
2126
|
/* @__PURE__ */ jsx("span", { children: formatTimestamp(entry.startedAt) })
|
|
2122
2127
|
] })
|
|
@@ -2153,7 +2158,7 @@ function NodeInspector({
|
|
|
2153
2158
|
] }),
|
|
2154
2159
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
2155
2160
|
/* @__PURE__ */ jsx("dt", { className: "font-semibold", children: labels.duration }),
|
|
2156
|
-
/* @__PURE__ */ jsx("dd", { className: "mt-0.5 text-slate-700 dark:text-slate-200", children:
|
|
2161
|
+
/* @__PURE__ */ jsx("dd", { className: "mt-0.5 text-slate-700 dark:text-slate-200", children: formatDuration(entry.durationMs) })
|
|
2157
2162
|
] }),
|
|
2158
2163
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
2159
2164
|
/* @__PURE__ */ jsx("dt", { className: "font-semibold", children: labels.status }),
|
|
@@ -2207,7 +2212,7 @@ function hasMetrics(metrics) {
|
|
|
2207
2212
|
metrics.model || metrics.tokensIn !== void 0 || metrics.tokensOut !== void 0 || metrics.costUsd !== void 0
|
|
2208
2213
|
);
|
|
2209
2214
|
}
|
|
2210
|
-
function
|
|
2215
|
+
function formatDuration(ms) {
|
|
2211
2216
|
if (ms === null) return "\u2014";
|
|
2212
2217
|
if (ms < 1e3) return `${ms}ms`;
|
|
2213
2218
|
if (ms < 6e4) return `${(ms / 1e3).toFixed(1)}s`;
|
|
@@ -2907,7 +2912,7 @@ function getDatasourceLogo(entityId) {
|
|
|
2907
2912
|
}
|
|
2908
2913
|
return null;
|
|
2909
2914
|
}
|
|
2910
|
-
var
|
|
2915
|
+
var PROVIDER_LOGOS3 = {
|
|
2911
2916
|
anthropic: "/logos/providers/anthropic.svg",
|
|
2912
2917
|
amazon: "/logos/providers/aws.svg",
|
|
2913
2918
|
google: "/logos/providers/google-gemini.svg",
|
|
@@ -2949,6 +2954,8 @@ var LOGIC_NODE_ITEMS = [
|
|
|
2949
2954
|
{ nodeType: "answer", nameKey: "answerNode", descriptionKey: "answerNodeDescription", subcategory: "ai_ml" },
|
|
2950
2955
|
{ nodeType: "question_classifier", nameKey: "questionClassifierNode", descriptionKey: "questionClassifierNodeDescription", subcategory: "ai_ml" },
|
|
2951
2956
|
{ nodeType: "parameter_extractor", nameKey: "parameterExtractorNode", descriptionKey: "parameterExtractorNodeDescription", subcategory: "ai_ml" },
|
|
2957
|
+
{ nodeType: "audio_input", nameKey: "audioInputNode", descriptionKey: "audioInputNodeDescription", subcategory: "ai_ml" },
|
|
2958
|
+
{ nodeType: "speech_transcriber", nameKey: "speechTranscriberNode", descriptionKey: "speechTranscriberNodeDescription", subcategory: "ai_ml" },
|
|
2952
2959
|
// Annotation
|
|
2953
2960
|
{ nodeType: "note", nameKey: "noteNode", descriptionKey: "noteNodeDescription", subcategory: "annotation" },
|
|
2954
2961
|
// Output
|
|
@@ -3138,31 +3145,70 @@ function NodePalette({ agents, tools, agentTools = [], rules, entities = [], mod
|
|
|
3138
3145
|
onAdd: onCreateAgent,
|
|
3139
3146
|
addLabel: t("newAgent"),
|
|
3140
3147
|
count: filteredAgents.length,
|
|
3141
|
-
children: filteredAgents.length === 0 && filteredAgentTools.length === 0 ? /* @__PURE__ */ jsx("p", { className: "text-[10px] text-gray-400 dark:text-gray-500", children: t("noAgents") }) : /* @__PURE__ */
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
3153
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
3154
|
-
/* @__PURE__ */ jsx("p", { className: "truncate text-xs font-medium text-gray-900 dark:text-white", children: agent.name }),
|
|
3155
|
-
(() => {
|
|
3156
|
-
const tier = getAgentTier(Number(agent.elo ?? 0));
|
|
3157
|
-
return /* @__PURE__ */ jsx("span", { className: `shrink-0 rounded-full px-1.5 py-px text-[8px] font-bold ${tier.pillColor}`, children: t(`agentDrawer.tier${tier.key.charAt(0).toUpperCase()}${tier.key.slice(1)}`) });
|
|
3158
|
-
})()
|
|
3148
|
+
children: filteredAgents.length === 0 && filteredAgentTools.length === 0 && filteredProviders.length === 0 ? /* @__PURE__ */ jsx("p", { className: "text-[10px] text-gray-400 dark:text-gray-500", children: t("noAgents") }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3149
|
+
filteredAgents.map((agent) => /* @__PURE__ */ jsxs(
|
|
3150
|
+
"div",
|
|
3151
|
+
{
|
|
3152
|
+
draggable: true,
|
|
3153
|
+
onDragStart: (event) => onDragStart(event, "agent", agent.agentId, agent.name),
|
|
3154
|
+
className: "liquid-surface group flex items-center gap-2 rounded-lg px-3 py-2 transition-all cursor-grab hover:shadow-md active:cursor-grabbing",
|
|
3155
|
+
children: [
|
|
3156
|
+
/* @__PURE__ */ jsxs("div", { className: "relative flex-shrink-0", children: [
|
|
3157
|
+
agent.avatar ? /* @__PURE__ */ jsx("img", { src: agent.avatar, alt: agent.name, className: "h-7 w-7 rounded-full bg-white shadow-sm ring-1 ring-gray-200/50 dark:bg-gray-800 dark:ring-white/10" }) : /* @__PURE__ */ jsx("div", { className: "flex h-7 w-7 items-center justify-center rounded-full bg-gradient-to-br from-indigo-400 to-purple-500 shadow-sm", children: /* @__PURE__ */ jsx(CpuChipIcon, { className: "h-3.5 w-3.5 text-white" }) }),
|
|
3158
|
+
/* @__PURE__ */ jsx("div", { className: "absolute -bottom-0.5 -right-0.5 flex h-3.5 w-3.5 items-center justify-center rounded-full bg-indigo-500 ring-1.5 ring-white dark:ring-gray-900", children: /* @__PURE__ */ jsx(CpuChipIcon, { className: "h-2 w-2 text-white" }) })
|
|
3159
3159
|
] }),
|
|
3160
|
-
/* @__PURE__ */
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3160
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
3161
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
3162
|
+
/* @__PURE__ */ jsx("p", { className: "truncate text-xs font-medium text-gray-900 dark:text-white", children: agent.name }),
|
|
3163
|
+
(() => {
|
|
3164
|
+
const tier = getAgentTier(Number(agent.elo ?? 0));
|
|
3165
|
+
return /* @__PURE__ */ jsx("span", { className: `shrink-0 rounded-full px-1.5 py-px text-[8px] font-bold ${tier.pillColor}`, children: t(`agentDrawer.tier${tier.key.charAt(0).toUpperCase()}${tier.key.slice(1)}`) });
|
|
3166
|
+
})()
|
|
3167
|
+
] }),
|
|
3168
|
+
/* @__PURE__ */ jsx("p", { className: "truncate text-[10px] text-gray-400 dark:text-gray-500", children: agent.role ?? agent.agentId })
|
|
3169
|
+
] })
|
|
3170
|
+
]
|
|
3171
|
+
},
|
|
3172
|
+
agent.agentId
|
|
3173
|
+
)),
|
|
3174
|
+
filteredProviders.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mt-2 border-t border-gray-200/40 pt-2 dark:border-white/5", children: [
|
|
3175
|
+
/* @__PURE__ */ jsx("p", { className: "mb-1.5 px-1 text-[9px] font-semibold uppercase tracking-wider text-slate-500 dark:text-slate-400", children: t("connectionsSection") }),
|
|
3176
|
+
filteredProviders.map((provider) => {
|
|
3177
|
+
const providerLogo = PROVIDER_LOGOS3[provider.provider];
|
|
3178
|
+
return /* @__PURE__ */ jsxs(
|
|
3179
|
+
"div",
|
|
3180
|
+
{
|
|
3181
|
+
draggable: true,
|
|
3182
|
+
onDragStart: (event) => {
|
|
3183
|
+
const defaultConfig = JSON.stringify({
|
|
3184
|
+
type: "model_provider",
|
|
3185
|
+
providerType: provider.provider === "amazon" ? "aws_bedrock" : provider.provider === "google" ? "google_vertex" : provider.provider === "meta" ? "custom" : `${provider.provider}_api`,
|
|
3186
|
+
name: provider.name,
|
|
3187
|
+
modelFilter: []
|
|
3188
|
+
});
|
|
3189
|
+
onDragStart(event, "model_provider", provider.id, provider.name, defaultConfig);
|
|
3190
|
+
},
|
|
3191
|
+
onClick: () => onConfigureProvider?.(provider.id),
|
|
3192
|
+
className: "liquid-surface group mb-1 flex items-center gap-2 rounded-lg px-3 py-2 transition-all cursor-grab hover:shadow-md active:cursor-grabbing",
|
|
3193
|
+
role: "button",
|
|
3194
|
+
tabIndex: 0,
|
|
3195
|
+
children: [
|
|
3196
|
+
providerLogo ? /* @__PURE__ */ jsx("div", { className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-md bg-white/10 p-1", children: /* @__PURE__ */ jsx("img", { src: providerLogo, alt: "", className: "h-4 w-4 object-contain", loading: "lazy" }) }) : /* @__PURE__ */ jsx("div", { className: "flex h-6 w-6 items-center justify-center rounded-md bg-gradient-to-br from-rose-400 to-pink-500 shadow-sm", children: /* @__PURE__ */ jsx(KeyIcon, { className: "h-3.5 w-3.5 text-white" }) }),
|
|
3197
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
3198
|
+
/* @__PURE__ */ jsx("p", { className: "truncate text-xs font-medium text-gray-900 dark:text-white", children: provider.name }),
|
|
3199
|
+
/* @__PURE__ */ jsxs("p", { className: "truncate text-[10px] text-gray-400 dark:text-gray-500", children: [
|
|
3200
|
+
provider.modelCount,
|
|
3201
|
+
" models"
|
|
3202
|
+
] })
|
|
3203
|
+
] }),
|
|
3204
|
+
provider.configured ? /* @__PURE__ */ jsx("span", { className: "rounded-full bg-green-100 px-1.5 py-0.5 text-[9px] font-medium text-green-600 dark:bg-green-500/10 dark:text-green-400", children: t("configured") }) : /* @__PURE__ */ jsx("span", { className: "rounded-full bg-amber-100 px-1.5 py-0.5 text-[9px] font-medium text-amber-600 dark:bg-amber-500/10 dark:text-amber-400", children: t("setup") })
|
|
3205
|
+
]
|
|
3206
|
+
},
|
|
3207
|
+
provider.id
|
|
3208
|
+
);
|
|
3209
|
+
})
|
|
3210
|
+
] })
|
|
3211
|
+
] })
|
|
3166
3212
|
}
|
|
3167
3213
|
),
|
|
3168
3214
|
/* @__PURE__ */ jsx(
|
|
@@ -3303,49 +3349,6 @@ function NodePalette({ agents, tools, agentTools = [], rules, entities = [], mod
|
|
|
3303
3349
|
})
|
|
3304
3350
|
}
|
|
3305
3351
|
),
|
|
3306
|
-
filteredProviders.length > 0 && /* @__PURE__ */ jsx(
|
|
3307
|
-
CollapsibleSection,
|
|
3308
|
-
{
|
|
3309
|
-
title: t("connectionsSection"),
|
|
3310
|
-
icon: /* @__PURE__ */ jsx(KeyIcon, { className: "h-3 w-3" }),
|
|
3311
|
-
colorClass: "text-slate-600 dark:text-slate-400",
|
|
3312
|
-
count: filteredProviders.length,
|
|
3313
|
-
children: filteredProviders.map((provider) => {
|
|
3314
|
-
const providerLogo = PROVIDER_LOGOS2[provider.provider];
|
|
3315
|
-
return /* @__PURE__ */ jsxs(
|
|
3316
|
-
"div",
|
|
3317
|
-
{
|
|
3318
|
-
draggable: true,
|
|
3319
|
-
onDragStart: (event) => {
|
|
3320
|
-
const defaultConfig = JSON.stringify({
|
|
3321
|
-
type: "model_provider",
|
|
3322
|
-
providerType: provider.provider === "amazon" ? "aws_bedrock" : provider.provider === "google" ? "google_vertex" : provider.provider === "meta" ? "custom" : `${provider.provider}_api`,
|
|
3323
|
-
name: provider.name,
|
|
3324
|
-
modelFilter: []
|
|
3325
|
-
});
|
|
3326
|
-
onDragStart(event, "model_provider", provider.id, provider.name, defaultConfig);
|
|
3327
|
-
},
|
|
3328
|
-
onClick: () => onConfigureProvider?.(provider.id),
|
|
3329
|
-
className: "liquid-surface group flex items-center gap-2 rounded-lg px-3 py-2 transition-all cursor-grab hover:shadow-md active:cursor-grabbing",
|
|
3330
|
-
role: "button",
|
|
3331
|
-
tabIndex: 0,
|
|
3332
|
-
children: [
|
|
3333
|
-
providerLogo ? /* @__PURE__ */ jsx("div", { className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-md bg-white/10 p-1", children: /* @__PURE__ */ jsx("img", { src: providerLogo, alt: "", className: "h-4 w-4 object-contain", loading: "lazy" }) }) : /* @__PURE__ */ jsx("div", { className: "flex h-6 w-6 items-center justify-center rounded-md bg-gradient-to-br from-rose-400 to-pink-500 shadow-sm", children: /* @__PURE__ */ jsx(KeyIcon, { className: "h-3.5 w-3.5 text-white" }) }),
|
|
3334
|
-
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
3335
|
-
/* @__PURE__ */ jsx("p", { className: "truncate text-xs font-medium text-gray-900 dark:text-white", children: provider.name }),
|
|
3336
|
-
/* @__PURE__ */ jsxs("p", { className: "truncate text-[10px] text-gray-400 dark:text-gray-500", children: [
|
|
3337
|
-
provider.modelCount,
|
|
3338
|
-
" models"
|
|
3339
|
-
] })
|
|
3340
|
-
] }),
|
|
3341
|
-
provider.configured ? /* @__PURE__ */ jsx("span", { className: "rounded-full bg-green-100 px-1.5 py-0.5 text-[9px] font-medium text-green-600 dark:bg-green-500/10 dark:text-green-400", children: t("configured") }) : /* @__PURE__ */ jsx("span", { className: "rounded-full bg-amber-100 px-1.5 py-0.5 text-[9px] font-medium text-amber-600 dark:bg-amber-500/10 dark:text-amber-400", children: t("setup") })
|
|
3342
|
-
]
|
|
3343
|
-
},
|
|
3344
|
-
provider.id
|
|
3345
|
-
);
|
|
3346
|
-
})
|
|
3347
|
-
}
|
|
3348
|
-
),
|
|
3349
3352
|
/* @__PURE__ */ jsxs(
|
|
3350
3353
|
CollapsibleSection,
|
|
3351
3354
|
{
|
|
@@ -3540,7 +3543,7 @@ function VersionHistoryPanel({
|
|
|
3540
3543
|
)
|
|
3541
3544
|
] }),
|
|
3542
3545
|
/* @__PURE__ */ jsxs("div", { className: "flex-1 overflow-y-auto", children: [
|
|
3543
|
-
isLoading && /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center py-12", "data-testid": "version-history-loading", children: /* @__PURE__ */ jsx("div", { className: "h-6 w-6 animate-spin rounded-full border-2 border-blue-500 border-t-transparent" }) }),
|
|
3546
|
+
isLoading && /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center py-12", "data-testid": "version-history-loading", children: /* @__PURE__ */ jsx("div", { className: "h-6 w-6 animate-spin motion-reduce:animate-none rounded-full border-2 border-blue-500 border-t-transparent" }) }),
|
|
3544
3547
|
loadError && /* @__PURE__ */ jsxs("div", { className: "px-4 py-8 text-center", "data-testid": "version-history-error", children: [
|
|
3545
3548
|
/* @__PURE__ */ jsx("p", { className: "text-sm text-red-500 dark:text-red-400", children: loadError }),
|
|
3546
3549
|
/* @__PURE__ */ jsx(
|
|
@@ -3653,7 +3656,7 @@ var STATUS_CONFIG = {
|
|
|
3653
3656
|
label: "error"
|
|
3654
3657
|
}
|
|
3655
3658
|
};
|
|
3656
|
-
function
|
|
3659
|
+
function formatDuration2(durationMs) {
|
|
3657
3660
|
if (durationMs < 1e3) {
|
|
3658
3661
|
return `${durationMs}ms`;
|
|
3659
3662
|
}
|
|
@@ -3683,10 +3686,24 @@ function RunPanel({ open, onClose, onRun, onStop }) {
|
|
|
3683
3686
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
3684
3687
|
/* @__PURE__ */ jsx(PlayIcon, { className: "h-4 w-4 text-gray-500 dark:text-gray-400" }),
|
|
3685
3688
|
/* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-gray-900 dark:text-white", children: translations("title") }),
|
|
3686
|
-
isRunning && /* @__PURE__ */ jsxs(
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3689
|
+
isRunning && /* @__PURE__ */ jsxs(
|
|
3690
|
+
"span",
|
|
3691
|
+
{
|
|
3692
|
+
role: "status",
|
|
3693
|
+
"aria-live": "polite",
|
|
3694
|
+
className: "flex items-center gap-1 rounded-full bg-blue-100 px-2 py-0.5 text-[11px] font-medium text-blue-800 dark:bg-blue-500/20 dark:text-blue-200",
|
|
3695
|
+
children: [
|
|
3696
|
+
/* @__PURE__ */ jsx(
|
|
3697
|
+
"span",
|
|
3698
|
+
{
|
|
3699
|
+
"aria-hidden": "true",
|
|
3700
|
+
className: "h-1.5 w-1.5 motion-safe:animate-pulse rounded-full bg-blue-500"
|
|
3701
|
+
}
|
|
3702
|
+
),
|
|
3703
|
+
translations("executing")
|
|
3704
|
+
]
|
|
3705
|
+
}
|
|
3706
|
+
)
|
|
3690
3707
|
] }),
|
|
3691
3708
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
3692
3709
|
isRunning ? /* @__PURE__ */ jsxs(
|
|
@@ -3747,7 +3764,7 @@ function RunPanel({ open, onClose, onRun, onStop }) {
|
|
|
3747
3764
|
] }),
|
|
3748
3765
|
result?.error && /* @__PURE__ */ jsx("p", { className: "mt-0.5 truncate text-xs text-red-500 dark:text-red-400", children: result.error })
|
|
3749
3766
|
] }),
|
|
3750
|
-
result?.durationMs !== void 0 && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0 text-xs text-gray-500 dark:text-gray-400", children:
|
|
3767
|
+
result?.durationMs !== void 0 && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0 text-xs text-gray-500 dark:text-gray-400", children: formatDuration2(result.durationMs) })
|
|
3751
3768
|
]
|
|
3752
3769
|
},
|
|
3753
3770
|
node.id
|
|
@@ -3761,7 +3778,7 @@ function SpinnerIcon({ className }) {
|
|
|
3761
3778
|
return /* @__PURE__ */ jsxs(
|
|
3762
3779
|
"svg",
|
|
3763
3780
|
{
|
|
3764
|
-
className: `animate-spin ${className ?? ""}`,
|
|
3781
|
+
className: `animate-spin motion-reduce:animate-none ${className ?? ""}`,
|
|
3765
3782
|
viewBox: "0 0 24 24",
|
|
3766
3783
|
fill: "none",
|
|
3767
3784
|
stroke: "currentColor",
|
|
@@ -3847,6 +3864,21 @@ function inferVariables(config, nodeType) {
|
|
|
3847
3864
|
variables.push({ name: "body", direction: "input", variableType: "string" });
|
|
3848
3865
|
}
|
|
3849
3866
|
break;
|
|
3867
|
+
case "audio_input":
|
|
3868
|
+
variables.push({ name: "url", direction: "input", variableType: "string" });
|
|
3869
|
+
variables.push({ name: "url", direction: "output", variableType: "string" });
|
|
3870
|
+
variables.push({ name: "format", direction: "output", variableType: "string" });
|
|
3871
|
+
variables.push({ name: "sourceType", direction: "output", variableType: "string" });
|
|
3872
|
+
break;
|
|
3873
|
+
case "speech_transcriber":
|
|
3874
|
+
variables.push({ name: "audioUrl", direction: "input", variableType: "string" });
|
|
3875
|
+
variables.push({ name: "text", direction: "output", variableType: "string" });
|
|
3876
|
+
variables.push({ name: "language", direction: "output", variableType: "string" });
|
|
3877
|
+
variables.push({ name: "durationMs", direction: "output", variableType: "number" });
|
|
3878
|
+
variables.push({ name: "segments", direction: "output", variableType: "array" });
|
|
3879
|
+
variables.push({ name: "model", direction: "output", variableType: "string" });
|
|
3880
|
+
variables.push({ name: "provider", direction: "output", variableType: "string" });
|
|
3881
|
+
break;
|
|
3850
3882
|
case "s3_write":
|
|
3851
3883
|
variables.push({ name: "key", direction: "input", variableType: "string" });
|
|
3852
3884
|
if (config.sourceUrl) {
|
|
@@ -4156,13 +4188,13 @@ function RunInputDialog({
|
|
|
4156
4188
|
var STATUS_STYLES = {
|
|
4157
4189
|
completed: { icon: CheckCircleIcon, colorClass: "text-green-500" },
|
|
4158
4190
|
failed: { icon: ExclamationCircleIcon, colorClass: "text-red-500" },
|
|
4159
|
-
running: { icon: ArrowPathIcon, colorClass: "text-blue-500 animate-spin" },
|
|
4191
|
+
running: { icon: ArrowPathIcon, colorClass: "text-blue-500 animate-spin motion-reduce:animate-none" },
|
|
4160
4192
|
pending: { icon: ClockIcon, colorClass: "text-gray-400" },
|
|
4161
4193
|
success: { icon: CheckCircleIcon, colorClass: "text-green-500" },
|
|
4162
4194
|
error: { icon: ExclamationCircleIcon, colorClass: "text-red-500" },
|
|
4163
4195
|
skipped: { icon: ClockIcon, colorClass: "text-gray-400" }
|
|
4164
4196
|
};
|
|
4165
|
-
function
|
|
4197
|
+
function formatDuration3(durationMs) {
|
|
4166
4198
|
if (durationMs === null) return "\u2014";
|
|
4167
4199
|
if (durationMs < 1e3) return `${durationMs}ms`;
|
|
4168
4200
|
return `${(durationMs / 1e3).toFixed(1)}s`;
|
|
@@ -4213,7 +4245,7 @@ function PreviewPanel({ open, onClose, workflowId, loadRuns }) {
|
|
|
4213
4245
|
/* @__PURE__ */ jsxs("div", { className: "flex h-full flex-col overflow-hidden", children: [
|
|
4214
4246
|
isRunning && /* @__PURE__ */ jsxs("div", { className: "border-b border-gray-200/50 px-4 py-3 dark:border-gray-700/50", children: [
|
|
4215
4247
|
/* @__PURE__ */ jsxs("div", { className: "mb-2 flex items-center gap-2", children: [
|
|
4216
|
-
/* @__PURE__ */ jsx(ArrowPathIcon, { className: "h-4 w-4 animate-spin text-blue-500" }),
|
|
4248
|
+
/* @__PURE__ */ jsx(ArrowPathIcon, { className: "h-4 w-4 animate-spin motion-reduce:animate-none text-blue-500" }),
|
|
4217
4249
|
/* @__PURE__ */ jsx("span", { className: "text-xs font-semibold text-blue-600 dark:text-blue-400", children: t("activeRun") })
|
|
4218
4250
|
] }),
|
|
4219
4251
|
/* @__PURE__ */ jsx("div", { className: "max-h-60 space-y-1 overflow-y-auto", children: Object.entries(nodeResults).map(([nodeId, result]) => {
|
|
@@ -4224,7 +4256,7 @@ function PreviewPanel({ open, onClose, workflowId, loadRuns }) {
|
|
|
4224
4256
|
/* @__PURE__ */ jsx(StatusIcon, { className: `h-3.5 w-3.5 ${statusStyle.colorClass}` }),
|
|
4225
4257
|
/* @__PURE__ */ jsx("span", { className: "truncate text-gray-700 dark:text-gray-300", children: nodeId.slice(0, 8) })
|
|
4226
4258
|
] }),
|
|
4227
|
-
result.durationMs !== void 0 && /* @__PURE__ */ jsx("span", { className: "text-gray-400", children:
|
|
4259
|
+
result.durationMs !== void 0 && /* @__PURE__ */ jsx("span", { className: "text-gray-400", children: formatDuration3(result.durationMs) })
|
|
4228
4260
|
] }, nodeId);
|
|
4229
4261
|
}) })
|
|
4230
4262
|
] }),
|
|
@@ -4240,7 +4272,7 @@ function PreviewPanel({ open, onClose, workflowId, loadRuns }) {
|
|
|
4240
4272
|
] }),
|
|
4241
4273
|
/* @__PURE__ */ jsxs("div", { className: "flex justify-between", children: [
|
|
4242
4274
|
/* @__PURE__ */ jsx("span", { className: "text-gray-500", children: t("duration") }),
|
|
4243
|
-
/* @__PURE__ */ jsx("span", { className: "text-gray-700 dark:text-gray-300", children:
|
|
4275
|
+
/* @__PURE__ */ jsx("span", { className: "text-gray-700 dark:text-gray-300", children: formatDuration3(selectedNode.durationMs) })
|
|
4244
4276
|
] }),
|
|
4245
4277
|
selectedNode.error && /* @__PURE__ */ jsxs("div", { children: [
|
|
4246
4278
|
/* @__PURE__ */ jsx("span", { className: "text-red-500", children: t("error") }),
|
|
@@ -4279,7 +4311,7 @@ function PreviewPanel({ open, onClose, workflowId, loadRuns }) {
|
|
|
4279
4311
|
/* @__PURE__ */ jsx(StatusIcon, { className: `h-3.5 w-3.5 ${statusStyle.colorClass}` }),
|
|
4280
4312
|
/* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-gray-900 dark:text-white", children: formatTimestamp2(run.createdAt) })
|
|
4281
4313
|
] }),
|
|
4282
|
-
/* @__PURE__ */ jsx("span", { className: "text-[10px] text-gray-400", children:
|
|
4314
|
+
/* @__PURE__ */ jsx("span", { className: "text-[10px] text-gray-400", children: formatDuration3(run.totalDurationMs) })
|
|
4283
4315
|
] }),
|
|
4284
4316
|
run.error && /* @__PURE__ */ jsx("p", { className: "mt-1 truncate text-[10px] text-red-500", children: run.error })
|
|
4285
4317
|
]
|
|
@@ -4303,7 +4335,7 @@ function PreviewPanel({ open, onClose, workflowId, loadRuns }) {
|
|
|
4303
4335
|
/* @__PURE__ */ jsx(NodeStatusIcon, { className: `h-3 w-3 ${nodeStatusStyle.colorClass}` }),
|
|
4304
4336
|
/* @__PURE__ */ jsx("span", { className: "text-gray-700 dark:text-gray-300", children: nodeResult.nodeType })
|
|
4305
4337
|
] }),
|
|
4306
|
-
/* @__PURE__ */ jsx("span", { className: "text-[10px] text-gray-400", children:
|
|
4338
|
+
/* @__PURE__ */ jsx("span", { className: "text-[10px] text-gray-400", children: formatDuration3(nodeResult.durationMs) })
|
|
4307
4339
|
]
|
|
4308
4340
|
},
|
|
4309
4341
|
nodeResult.nodeId
|
|
@@ -4315,12 +4347,34 @@ function PreviewPanel({ open, onClose, workflowId, loadRuns }) {
|
|
|
4315
4347
|
] })
|
|
4316
4348
|
] });
|
|
4317
4349
|
}
|
|
4318
|
-
function SaveStatusBadge({ status }) {
|
|
4350
|
+
function SaveStatusBadge({ status, labels }) {
|
|
4351
|
+
const savingLabel = labels?.saving ?? "Salvando\u2026";
|
|
4352
|
+
const savedLabel = labels?.saved ?? "Salvo";
|
|
4319
4353
|
if (status === "saving") {
|
|
4320
|
-
return /* @__PURE__ */
|
|
4354
|
+
return /* @__PURE__ */ jsxs("span", { role: "status", "aria-live": "polite", className: "inline-flex items-center", children: [
|
|
4355
|
+
/* @__PURE__ */ jsx(
|
|
4356
|
+
"span",
|
|
4357
|
+
{
|
|
4358
|
+
"aria-hidden": "true",
|
|
4359
|
+
className: "motion-safe:animate-pulse text-[11px] text-gray-500 dark:text-gray-400",
|
|
4360
|
+
children: "\u2022"
|
|
4361
|
+
}
|
|
4362
|
+
),
|
|
4363
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: savingLabel })
|
|
4364
|
+
] });
|
|
4321
4365
|
}
|
|
4322
4366
|
if (status === "saved") {
|
|
4323
|
-
return /* @__PURE__ */
|
|
4367
|
+
return /* @__PURE__ */ jsxs("span", { role: "status", "aria-live": "polite", className: "inline-flex items-center", children: [
|
|
4368
|
+
/* @__PURE__ */ jsx(
|
|
4369
|
+
"span",
|
|
4370
|
+
{
|
|
4371
|
+
"aria-hidden": "true",
|
|
4372
|
+
className: "text-[11px] text-emerald-600 dark:text-emerald-400",
|
|
4373
|
+
children: "\u2713"
|
|
4374
|
+
}
|
|
4375
|
+
),
|
|
4376
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: savedLabel })
|
|
4377
|
+
] });
|
|
4324
4378
|
}
|
|
4325
4379
|
return null;
|
|
4326
4380
|
}
|
|
@@ -4990,6 +5044,6 @@ function useHelpLines() {
|
|
|
4990
5044
|
};
|
|
4991
5045
|
}
|
|
4992
5046
|
|
|
4993
|
-
export { AgentModal, AmazonNovaIcon, AnthropicModelIcon, AutoSaveWorkspace, DslExportModal, DslImportModal, DynamicIslandConfirm2 as DynamicIslandConfirm, ExecutionTimelinePanel, MetaLlamaIcon, NodePalette, OutputSchemaBuilder, PipelineSettingsModal, PreviewPanel, RULE_STATUS_OPTIONS, RuleActionBuilder, RuleConditionBuilder, RuleForm, RunInputDialog, RunPanel, RunReplayModal, S3WriteFlowNode, SaveStatusBadge, SubworkflowModal, TIMEZONE_OPTIONS, VariableInspector, VersionHistoryPanel, WorkflowListBar, defaultAgentOutputSchema, defaultRuleAction, defaultRuleCondition, defaultRuleForm, getModelIcon, useCanRedo, useCanUndo, useCanvasShortcuts, useClipboard, useContextMenu, useEditingNodeId, useHasCopied, useHelpLines, useIsRunning, useNodeResults, useSelectedNodeCount, useSubworkflowStore, useUndoRedo };
|
|
4994
|
-
//# sourceMappingURL=chunk-
|
|
4995
|
-
//# sourceMappingURL=chunk-
|
|
5047
|
+
export { AgentModal, AmazonNovaIcon, AnthropicModelIcon, AutoSaveWorkspace, DslExportModal, DslImportModal, DynamicIslandConfirm2 as DynamicIslandConfirm, ExecutionTimelinePanel, MetaLlamaIcon, ModelProviderFlowNode, NodePalette, OutputSchemaBuilder, PipelineSettingsModal, PreviewPanel, RULE_STATUS_OPTIONS, RuleActionBuilder, RuleConditionBuilder, RuleForm, RunInputDialog, RunPanel, RunReplayModal, S3WriteFlowNode, SaveStatusBadge, SubworkflowModal, TIMEZONE_OPTIONS, VariableInspector, VersionHistoryPanel, WorkflowListBar, defaultAgentOutputSchema, defaultRuleAction, defaultRuleCondition, defaultRuleForm, getModelIcon, useCanRedo, useCanUndo, useCanvasShortcuts, useClipboard, useContextMenu, useEditingNodeId, useHasCopied, useHelpLines, useIsRunning, useNodeResults, useSelectedNodeCount, useSubworkflowStore, useUndoRedo };
|
|
5048
|
+
//# sourceMappingURL=chunk-SEYUYGER.mjs.map
|
|
5049
|
+
//# sourceMappingURL=chunk-SEYUYGER.mjs.map
|