@datatechsolutions/ui 2.11.14 → 2.11.16
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 +15 -3
- package/dist/astrlabe/contracts.d.ts +15 -3
- package/dist/astrlabe/index.d.mts +9 -3
- package/dist/astrlabe/index.d.ts +9 -3
- package/dist/astrlabe/index.js +238 -166
- package/dist/astrlabe/index.js.map +1 -1
- package/dist/astrlabe/index.mjs +137 -69
- package/dist/astrlabe/index.mjs.map +1 -1
- package/dist/astrlabe/workflow-canvas.d.mts +1 -1
- package/dist/astrlabe/workflow-canvas.d.ts +1 -1
- package/dist/astrlabe/workflow-canvas.js +2 -2
- package/dist/astrlabe/workflow-canvas.mjs +1 -1
- package/dist/{chunk-JT2JCLN5.js → chunk-2JK7GQYA.js} +224 -4
- package/dist/chunk-2JK7GQYA.js.map +1 -0
- package/dist/{chunk-OL7PEDJG.mjs → chunk-4B47R7VI.mjs} +226 -7
- package/dist/chunk-4B47R7VI.mjs.map +1 -0
- package/dist/{workflow-canvas-BUpiBzxZ.d.ts → workflow-canvas-CEfOHTzN.d.ts} +13 -2
- package/dist/{workflow-canvas-CooSZh-g.d.mts → workflow-canvas-Dfj5MOAY.d.mts} +13 -2
- package/package.json +1 -1
- package/dist/chunk-JT2JCLN5.js.map +0 -1
- package/dist/chunk-OL7PEDJG.mjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { GlassModalShell, ContextMenu, FormInput,
|
|
2
|
+
import { GlassModalShell, ContextMenu, FormInput, FormSelect, FormTextarea, Button, IconButton } from './chunk-46ZM5VJJ.mjs';
|
|
3
3
|
import { GraphNodeHeader, GraphNodeMeta, GraphNodeBadge, GraphNodeIconBubble } from './chunk-OZNTQROP.mjs';
|
|
4
4
|
import { getAgentTier, createDefaultLogicNodeConfig, applyDagreLayout } from './chunk-TLPPVL3W.mjs';
|
|
5
5
|
import { useTranslations, I18nProvider, createI18nFromMessages } from './chunk-7VJ7CMMT.mjs';
|
|
@@ -8,7 +8,7 @@ import { Position, NodeResizer, MarkerType, useReactFlow, getBezierPath, BaseEdg
|
|
|
8
8
|
import '@xyflow/react/dist/style.css';
|
|
9
9
|
import { create } from 'zustand';
|
|
10
10
|
import { PlusIcon, XMarkIcon } from '@heroicons/react/24/solid';
|
|
11
|
-
import { Bars2Icon, CursorArrowRaysIcon, HandRaisedIcon, MagnifyingGlassPlusIcon, MagnifyingGlassMinusIcon, ArrowsPointingInIcon, ArrowUturnLeftIcon, ArrowUturnRightIcon, MapIcon, Squares2X2Icon, ArrowsRightLeftIcon, CommandLineIcon, ExclamationTriangleIcon, CpuChipIcon, TrashIcon, WrenchScrewdriverIcon, NewspaperIcon, ChartBarIcon, CloudIcon, ScaleIcon, AdjustmentsHorizontalIcon, CircleStackIcon, PlayIcon, StopIcon, ArrowsPointingOutIcon, CodeBracketIcon, GlobeAltIcon, DocumentTextIcon, ArrowPathIcon, BookOpenIcon, ChatBubbleLeftRightIcon, QuestionMarkCircleIcon, AdjustmentsVerticalIcon, Square3Stack3DIcon, DocumentMagnifyingGlassIcon, ListBulletIcon, PlayCircleIcon, PencilSquareIcon, ServerStackIcon, RectangleGroupIcon, ChevronDownIcon, ChevronUpIcon, PresentationChartBarIcon, ChartPieIcon, ChartBarSquareIcon, CurrencyDollarIcon, ShieldCheckIcon, ClipboardDocumentCheckIcon, FireIcon, ShoppingBagIcon, UsersIcon, BuildingStorefrontIcon, PencilIcon, DocumentDuplicateIcon, ClipboardDocumentIcon, ClipboardIcon, PlusIcon as PlusIcon$1, XMarkIcon as XMarkIcon$1 } from '@heroicons/react/24/outline';
|
|
11
|
+
import { Bars2Icon, CursorArrowRaysIcon, HandRaisedIcon, MagnifyingGlassPlusIcon, MagnifyingGlassMinusIcon, ArrowsPointingInIcon, ArrowUturnLeftIcon, ArrowUturnRightIcon, MapIcon, Squares2X2Icon, ArrowsRightLeftIcon, CommandLineIcon, ExclamationTriangleIcon, CpuChipIcon, TrashIcon, WrenchScrewdriverIcon, NewspaperIcon, ChartBarIcon, CloudIcon, ScaleIcon, AdjustmentsHorizontalIcon, CircleStackIcon, PlayIcon, StopIcon, ArrowsPointingOutIcon, CodeBracketIcon, GlobeAltIcon, DocumentTextIcon, ArrowPathIcon, BookOpenIcon, ChatBubbleLeftRightIcon, QuestionMarkCircleIcon, AdjustmentsVerticalIcon, Square3Stack3DIcon, DocumentMagnifyingGlassIcon, ListBulletIcon, PlayCircleIcon, PencilSquareIcon, ServerStackIcon, KeyIcon, RectangleGroupIcon, ChevronDownIcon, ChevronUpIcon, PresentationChartBarIcon, ChartPieIcon, ChartBarSquareIcon, CurrencyDollarIcon, ShieldCheckIcon, ClipboardDocumentCheckIcon, FireIcon, ShoppingBagIcon, UsersIcon, BuildingStorefrontIcon, PencilIcon, DocumentDuplicateIcon, ClipboardDocumentIcon, ClipboardIcon, PlusIcon as PlusIcon$1, XMarkIcon as XMarkIcon$1 } from '@heroicons/react/24/outline';
|
|
12
12
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
13
13
|
|
|
14
14
|
var DEFAULT_PASTE_OFFSET = 40;
|
|
@@ -338,6 +338,7 @@ var LOGIC_NODE_GRADIENTS = {
|
|
|
338
338
|
note: "from-yellow-400 to-amber-500",
|
|
339
339
|
entity: "from-blue-400 to-cyan-500",
|
|
340
340
|
datasource: "from-cyan-500 to-blue-600",
|
|
341
|
+
model_provider: "from-rose-500 to-pink-600",
|
|
341
342
|
group: "from-slate-400 to-gray-500"
|
|
342
343
|
};
|
|
343
344
|
var LOGIC_NODE_BADGE_COLORS = {
|
|
@@ -360,6 +361,7 @@ var LOGIC_NODE_BADGE_COLORS = {
|
|
|
360
361
|
note: "bg-yellow-100 text-yellow-700 dark:bg-yellow-500/20 dark:text-yellow-300",
|
|
361
362
|
entity: "bg-blue-100 text-blue-700 dark:bg-blue-500/20 dark:text-blue-300",
|
|
362
363
|
datasource: "bg-cyan-100 text-cyan-700 dark:bg-cyan-500/20 dark:text-cyan-300",
|
|
364
|
+
model_provider: "bg-rose-100 text-rose-700 dark:bg-rose-500/20 dark:text-rose-300",
|
|
363
365
|
group: "bg-slate-100 text-slate-700 dark:bg-slate-500/20 dark:text-slate-300"
|
|
364
366
|
};
|
|
365
367
|
var LOGIC_NODE_BADGE_SOFT_COLORS = {
|
|
@@ -382,6 +384,7 @@ var LOGIC_NODE_BADGE_SOFT_COLORS = {
|
|
|
382
384
|
note: "bg-yellow-50 text-yellow-600 dark:bg-yellow-500/20 dark:text-yellow-400",
|
|
383
385
|
entity: "bg-blue-50 text-blue-600 dark:bg-blue-500/20 dark:text-blue-400",
|
|
384
386
|
datasource: "bg-cyan-50 text-cyan-600 dark:bg-cyan-500/20 dark:text-cyan-400",
|
|
387
|
+
model_provider: "bg-rose-50 text-rose-600 dark:bg-rose-500/20 dark:text-rose-400",
|
|
385
388
|
group: "bg-slate-50 text-slate-600 dark:bg-slate-500/20 dark:text-slate-400"
|
|
386
389
|
};
|
|
387
390
|
var LOGIC_ICON_MAP = {
|
|
@@ -404,6 +407,7 @@ var LOGIC_ICON_MAP = {
|
|
|
404
407
|
note: PencilSquareIcon,
|
|
405
408
|
entity: CircleStackIcon,
|
|
406
409
|
datasource: ServerStackIcon,
|
|
410
|
+
model_provider: KeyIcon,
|
|
407
411
|
group: RectangleGroupIcon
|
|
408
412
|
};
|
|
409
413
|
var NODE_SELECTED_CLASS = "node-card-selected";
|
|
@@ -431,7 +435,8 @@ var NODE_BORDER_COLORS = {
|
|
|
431
435
|
document_extractor: "border-rose-300/50 dark:border-rose-600/50",
|
|
432
436
|
list_operator: "border-lime-300/50 dark:border-lime-600/50",
|
|
433
437
|
note: "border-gray-200/50 dark:border-gray-700/50",
|
|
434
|
-
datasource: "border-cyan-300/50 dark:border-cyan-600/50"
|
|
438
|
+
datasource: "border-cyan-300/50 dark:border-cyan-600/50",
|
|
439
|
+
model_provider: "border-rose-300/50 dark:border-rose-600/50"
|
|
435
440
|
};
|
|
436
441
|
function getNodeStateClass(selected, nodeType, customBorder) {
|
|
437
442
|
if (selected) return NODE_SELECTED_CLASS;
|
|
@@ -462,6 +467,7 @@ var MINIMAP_NODE_COLORS = {
|
|
|
462
467
|
note: "#eab308",
|
|
463
468
|
entity: "#3b82f6",
|
|
464
469
|
datasource: "#06b6d4",
|
|
470
|
+
model_provider: "#f43f5e",
|
|
465
471
|
group: "#64748b"
|
|
466
472
|
};
|
|
467
473
|
var LOGIC_NODE_HANDLE_COLORS = {
|
|
@@ -484,6 +490,7 @@ var LOGIC_NODE_HANDLE_COLORS = {
|
|
|
484
490
|
note: "!bg-yellow-500",
|
|
485
491
|
entity: "!bg-blue-500",
|
|
486
492
|
datasource: "!bg-cyan-500",
|
|
493
|
+
model_provider: "!bg-rose-500",
|
|
487
494
|
group: "!bg-slate-500"
|
|
488
495
|
};
|
|
489
496
|
var INSERTABLE_NODES = [
|
|
@@ -2758,6 +2765,84 @@ var DatasourceFlowNode = memo(function DatasourceFlowNode2({ id, data, selected
|
|
|
2758
2765
|
/* @__PURE__ */ jsx(WorkflowHandle, { type: "source", position: Position.Right, id: "right-out", colorClass: "!bg-cyan-400" })
|
|
2759
2766
|
] });
|
|
2760
2767
|
});
|
|
2768
|
+
var SI = (slug, color) => `https://cdn.simpleicons.org/${slug}/${color}`;
|
|
2769
|
+
var PROVIDER_LOGOS = {
|
|
2770
|
+
aws_bedrock: "https://www.svgrepo.com/show/448266/aws.svg",
|
|
2771
|
+
openai_api: "https://www.svgrepo.com/show/306500/openai.svg",
|
|
2772
|
+
google_vertex: SI("googlegemini", "8E75B2"),
|
|
2773
|
+
azure_openai: SI("microsoftazure", "0078D4"),
|
|
2774
|
+
anthropic_api: SI("anthropic", "D4A27F")
|
|
2775
|
+
};
|
|
2776
|
+
var PROVIDER_TYPE_LABELS = {
|
|
2777
|
+
aws_bedrock: "AWS Bedrock",
|
|
2778
|
+
openai_api: "OpenAI API",
|
|
2779
|
+
google_vertex: "Google Vertex AI",
|
|
2780
|
+
azure_openai: "Azure OpenAI",
|
|
2781
|
+
anthropic_api: "Anthropic API",
|
|
2782
|
+
custom: "Custom"
|
|
2783
|
+
};
|
|
2784
|
+
var ModelProviderFlowNode = memo(function ModelProviderFlowNode2({ id, data, selected }) {
|
|
2785
|
+
const config = data.config;
|
|
2786
|
+
const isCompact = data.displayMode === "compact";
|
|
2787
|
+
if (!config) {
|
|
2788
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2789
|
+
/* @__PURE__ */ jsx(NodeRunningIndicator, { nodeId: id }),
|
|
2790
|
+
/* @__PURE__ */ jsx(WorkflowHandle, { type: "target", position: Position.Left, id: "left-in", colorClass: "!bg-gray-400 dark:!bg-gray-500" }),
|
|
2791
|
+
/* @__PURE__ */ jsx(WorkflowHandle, { type: "target", position: Position.Top, id: "top-in", colorClass: "!bg-gray-400 dark:!bg-gray-500" }),
|
|
2792
|
+
/* @__PURE__ */ jsx(NodeCard, { variant: "error", nodeType: "model_provider", width: "w-[280px]", children: /* @__PURE__ */ jsx(
|
|
2793
|
+
NodeCardHeader,
|
|
2794
|
+
{
|
|
2795
|
+
icon: /* @__PURE__ */ jsx(ExclamationTriangleIcon, { className: "h-6 w-6 text-white" }),
|
|
2796
|
+
title: data.label || "Model Provider",
|
|
2797
|
+
description: "Not configured",
|
|
2798
|
+
iconClassName: "flex h-11 w-11 items-center justify-center rounded-xl bg-gradient-to-br from-amber-400 to-orange-500 shadow-lg"
|
|
2799
|
+
}
|
|
2800
|
+
) }),
|
|
2801
|
+
/* @__PURE__ */ jsx(WorkflowHandle, { type: "source", position: Position.Right, id: "right-out", colorClass: "!bg-rose-500" }),
|
|
2802
|
+
/* @__PURE__ */ jsx(WorkflowHandle, { type: "source", position: Position.Bottom, id: "bottom-out", colorClass: "!bg-rose-500" })
|
|
2803
|
+
] });
|
|
2804
|
+
}
|
|
2805
|
+
const providerLabel = PROVIDER_TYPE_LABELS[config.providerType] ?? config.providerType;
|
|
2806
|
+
const displayName = config.name || providerLabel;
|
|
2807
|
+
const regionLabel = config.region ? config.region : void 0;
|
|
2808
|
+
const isConfigured = !!(config.credentialRef || config.apiKeyRef);
|
|
2809
|
+
const logo = PROVIDER_LOGOS[config.providerType];
|
|
2810
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2811
|
+
/* @__PURE__ */ jsx(NodeRunningIndicator, { nodeId: id }),
|
|
2812
|
+
/* @__PURE__ */ jsx(WorkflowHandle, { type: "target", position: Position.Left, id: "left-in", colorClass: "!bg-gray-400 dark:!bg-gray-500" }),
|
|
2813
|
+
/* @__PURE__ */ jsx(WorkflowHandle, { type: "target", position: Position.Top, id: "top-in", colorClass: "!bg-gray-400 dark:!bg-gray-500" }),
|
|
2814
|
+
/* @__PURE__ */ jsx(
|
|
2815
|
+
"button",
|
|
2816
|
+
{
|
|
2817
|
+
type: "button",
|
|
2818
|
+
onClick: () => data.onEdit?.(id),
|
|
2819
|
+
className: "w-full text-left",
|
|
2820
|
+
children: /* @__PURE__ */ jsxs(NodeCard, { compact: isCompact, selected, nodeType: "model_provider", width: "w-[280px]", children: [
|
|
2821
|
+
/* @__PURE__ */ jsx(
|
|
2822
|
+
NodeCardHeader,
|
|
2823
|
+
{
|
|
2824
|
+
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" }),
|
|
2825
|
+
title: displayName,
|
|
2826
|
+
description: providerLabel,
|
|
2827
|
+
iconClassName: "flex h-11 w-11 items-center justify-center rounded-xl bg-gradient-to-br from-rose-500 to-pink-600 shadow-lg p-1.5"
|
|
2828
|
+
}
|
|
2829
|
+
),
|
|
2830
|
+
/* @__PURE__ */ jsx(NodeCardMeta, { compact: isCompact, children: /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-1.5", children: [
|
|
2831
|
+
/* @__PURE__ */ jsx(NodeCardBadge, { className: "rounded-full bg-rose-100 px-2 py-0.5 text-[10px] font-semibold text-rose-700 dark:bg-rose-500/20 dark:text-rose-300", children: providerLabel }),
|
|
2832
|
+
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 }),
|
|
2833
|
+
/* @__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" }),
|
|
2834
|
+
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: [
|
|
2835
|
+
config.modelFilter.length,
|
|
2836
|
+
" models"
|
|
2837
|
+
] })
|
|
2838
|
+
] }) })
|
|
2839
|
+
] })
|
|
2840
|
+
}
|
|
2841
|
+
),
|
|
2842
|
+
/* @__PURE__ */ jsx(WorkflowHandle, { type: "source", position: Position.Right, id: "right-out", colorClass: "!bg-rose-500" }),
|
|
2843
|
+
/* @__PURE__ */ jsx(WorkflowHandle, { type: "source", position: Position.Bottom, id: "bottom-out", colorClass: "!bg-rose-500" })
|
|
2844
|
+
] });
|
|
2845
|
+
});
|
|
2761
2846
|
var GROUP_COLORS = {
|
|
2762
2847
|
indigo: {
|
|
2763
2848
|
border: "border-indigo-300/50 dark:border-indigo-600/50",
|
|
@@ -4951,6 +5036,135 @@ function GroupNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
4951
5036
|
)
|
|
4952
5037
|
] });
|
|
4953
5038
|
}
|
|
5039
|
+
var PROVIDER_TYPES = [
|
|
5040
|
+
{ value: "aws_bedrock", label: "AWS Bedrock" },
|
|
5041
|
+
{ value: "openai_api", label: "OpenAI API" },
|
|
5042
|
+
{ value: "google_vertex", label: "Google Vertex AI" },
|
|
5043
|
+
{ value: "azure_openai", label: "Azure OpenAI" },
|
|
5044
|
+
{ value: "anthropic_api", label: "Anthropic API" },
|
|
5045
|
+
{ value: "custom", label: "Custom" }
|
|
5046
|
+
];
|
|
5047
|
+
var REGION_OPTIONS = {
|
|
5048
|
+
aws_bedrock: [
|
|
5049
|
+
{ value: "us-east-1", label: "US East (N. Virginia)" },
|
|
5050
|
+
{ value: "us-west-2", label: "US West (Oregon)" },
|
|
5051
|
+
{ value: "eu-west-1", label: "Europe (Ireland)" },
|
|
5052
|
+
{ value: "eu-central-1", label: "Europe (Frankfurt)" },
|
|
5053
|
+
{ value: "ap-northeast-1", label: "Asia Pacific (Tokyo)" },
|
|
5054
|
+
{ value: "ap-southeast-1", label: "Asia Pacific (Singapore)" },
|
|
5055
|
+
{ value: "sa-east-1", label: "South America (S\xE3o Paulo)" }
|
|
5056
|
+
],
|
|
5057
|
+
google_vertex: [
|
|
5058
|
+
{ value: "us-central1", label: "US Central (Iowa)" },
|
|
5059
|
+
{ value: "us-east4", label: "US East (Virginia)" },
|
|
5060
|
+
{ value: "europe-west4", label: "Europe West (Netherlands)" },
|
|
5061
|
+
{ value: "asia-northeast1", label: "Asia NE (Tokyo)" }
|
|
5062
|
+
],
|
|
5063
|
+
azure_openai: [
|
|
5064
|
+
{ value: "eastus", label: "East US" },
|
|
5065
|
+
{ value: "westeurope", label: "West Europe" },
|
|
5066
|
+
{ value: "swedencentral", label: "Sweden Central" },
|
|
5067
|
+
{ value: "japaneast", label: "Japan East" }
|
|
5068
|
+
]
|
|
5069
|
+
};
|
|
5070
|
+
function ModelProviderNodeConfigForm({ config, onSave, onCancel }) {
|
|
5071
|
+
const t = useTranslations("agents.workflow.modelProviderNodeConfig");
|
|
5072
|
+
const [providerType, setProviderType] = useState(config.providerType);
|
|
5073
|
+
const [name, setName] = useState(config.name ?? "");
|
|
5074
|
+
const [region, setRegion] = useState(config.region ?? "");
|
|
5075
|
+
const [endpoint, setEndpoint] = useState(config.endpoint ?? "");
|
|
5076
|
+
const [credentialRef, setCredentialRef] = useState(config.credentialRef ?? "");
|
|
5077
|
+
const [apiKeyRef, setApiKeyRef] = useState(config.apiKeyRef ?? "");
|
|
5078
|
+
const regions = REGION_OPTIONS[providerType] ?? [];
|
|
5079
|
+
const showRegion = regions.length > 0;
|
|
5080
|
+
const showEndpoint = providerType === "custom" || providerType === "azure_openai";
|
|
5081
|
+
const showApiKey = providerType === "openai_api" || providerType === "anthropic_api" || providerType === "custom";
|
|
5082
|
+
const showCredentialRef = providerType === "aws_bedrock" || providerType === "google_vertex";
|
|
5083
|
+
const handleSave = () => {
|
|
5084
|
+
onSave({
|
|
5085
|
+
...config,
|
|
5086
|
+
providerType,
|
|
5087
|
+
name: name.trim() || void 0,
|
|
5088
|
+
region: region || void 0,
|
|
5089
|
+
endpoint: endpoint.trim() || void 0,
|
|
5090
|
+
credentialRef: credentialRef.trim() || void 0,
|
|
5091
|
+
apiKeyRef: apiKeyRef.trim() || void 0
|
|
5092
|
+
});
|
|
5093
|
+
};
|
|
5094
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
5095
|
+
/* @__PURE__ */ jsx(
|
|
5096
|
+
FormInput,
|
|
5097
|
+
{
|
|
5098
|
+
type: "text",
|
|
5099
|
+
label: t("nameLabel"),
|
|
5100
|
+
value: name,
|
|
5101
|
+
onValueChange: setName,
|
|
5102
|
+
placeholder: t("namePlaceholder")
|
|
5103
|
+
}
|
|
5104
|
+
),
|
|
5105
|
+
/* @__PURE__ */ jsx(
|
|
5106
|
+
FormSelect,
|
|
5107
|
+
{
|
|
5108
|
+
label: t("providerTypeLabel"),
|
|
5109
|
+
value: providerType,
|
|
5110
|
+
onValueChange: (value) => {
|
|
5111
|
+
setProviderType(value);
|
|
5112
|
+
setRegion("");
|
|
5113
|
+
},
|
|
5114
|
+
options: PROVIDER_TYPES.map((pt) => ({ value: pt.value, label: pt.label }))
|
|
5115
|
+
}
|
|
5116
|
+
),
|
|
5117
|
+
showRegion && /* @__PURE__ */ jsx(
|
|
5118
|
+
FormSelect,
|
|
5119
|
+
{
|
|
5120
|
+
label: t("regionLabel"),
|
|
5121
|
+
value: region,
|
|
5122
|
+
onValueChange: setRegion,
|
|
5123
|
+
options: [{ value: "", label: t("selectRegion") }, ...regions]
|
|
5124
|
+
}
|
|
5125
|
+
),
|
|
5126
|
+
showEndpoint && /* @__PURE__ */ jsx(
|
|
5127
|
+
FormInput,
|
|
5128
|
+
{
|
|
5129
|
+
type: "text",
|
|
5130
|
+
label: t("endpointLabel"),
|
|
5131
|
+
value: endpoint,
|
|
5132
|
+
onValueChange: setEndpoint,
|
|
5133
|
+
placeholder: t("endpointPlaceholder")
|
|
5134
|
+
}
|
|
5135
|
+
),
|
|
5136
|
+
showApiKey && /* @__PURE__ */ jsx(
|
|
5137
|
+
FormInput,
|
|
5138
|
+
{
|
|
5139
|
+
type: "password",
|
|
5140
|
+
label: t("apiKeyLabel"),
|
|
5141
|
+
value: apiKeyRef,
|
|
5142
|
+
onValueChange: setApiKeyRef,
|
|
5143
|
+
placeholder: t("apiKeyPlaceholder")
|
|
5144
|
+
}
|
|
5145
|
+
),
|
|
5146
|
+
showCredentialRef && /* @__PURE__ */ jsx(
|
|
5147
|
+
FormInput,
|
|
5148
|
+
{
|
|
5149
|
+
type: "text",
|
|
5150
|
+
label: t("credentialRefLabel"),
|
|
5151
|
+
value: credentialRef,
|
|
5152
|
+
onValueChange: setCredentialRef,
|
|
5153
|
+
placeholder: t("credentialRefPlaceholder")
|
|
5154
|
+
}
|
|
5155
|
+
),
|
|
5156
|
+
/* @__PURE__ */ jsx(
|
|
5157
|
+
ConfigFormActions,
|
|
5158
|
+
{
|
|
5159
|
+
cancelLabel: t("cancel"),
|
|
5160
|
+
saveLabel: t("save"),
|
|
5161
|
+
onCancel,
|
|
5162
|
+
onSave: handleSave,
|
|
5163
|
+
saveDisabled: !providerType
|
|
5164
|
+
}
|
|
5165
|
+
)
|
|
5166
|
+
] });
|
|
5167
|
+
}
|
|
4954
5168
|
var NODE_TITLE_KEYS = {
|
|
4955
5169
|
start: "startNodeConfig",
|
|
4956
5170
|
end: "endNodeConfig",
|
|
@@ -4970,7 +5184,8 @@ var NODE_TITLE_KEYS = {
|
|
|
4970
5184
|
iteration_start: "iterationStartNodeConfig",
|
|
4971
5185
|
entity: "entityNodeConfig",
|
|
4972
5186
|
datasource: "datasourceNodeConfig",
|
|
4973
|
-
group: "groupNodeConfig"
|
|
5187
|
+
group: "groupNodeConfig",
|
|
5188
|
+
model_provider: "modelProviderNodeConfig"
|
|
4974
5189
|
};
|
|
4975
5190
|
function LogicNodeModal({ onSave, entities = [], datasources = [], onLoadTables, onLoadSchema }) {
|
|
4976
5191
|
const t = useTranslations("agents.workflow");
|
|
@@ -5041,6 +5256,8 @@ function LogicNodeModal({ onSave, entities = [], datasources = [], onLoadTables,
|
|
|
5041
5256
|
return /* @__PURE__ */ jsx(EntityNodeConfigForm, { config, entities, onSave: handleSave, onCancel: closeModal });
|
|
5042
5257
|
case "group":
|
|
5043
5258
|
return /* @__PURE__ */ jsx(GroupNodeConfigForm, { config, onSave: handleSave, onCancel: closeModal });
|
|
5259
|
+
case "model_provider":
|
|
5260
|
+
return /* @__PURE__ */ jsx(ModelProviderNodeConfigForm, { config, onSave: handleSave, onCancel: closeModal });
|
|
5044
5261
|
default:
|
|
5045
5262
|
return null;
|
|
5046
5263
|
}
|
|
@@ -5411,6 +5628,7 @@ var BUILT_IN_NODE_TYPES = {
|
|
|
5411
5628
|
iteration_start: IterationStartFlowNode,
|
|
5412
5629
|
note: NoteFlowNode,
|
|
5413
5630
|
datasource: DatasourceFlowNode,
|
|
5631
|
+
model_provider: ModelProviderFlowNode,
|
|
5414
5632
|
group: GroupFlowNode
|
|
5415
5633
|
};
|
|
5416
5634
|
var ALL_LOGIC_NODE_TYPES = [
|
|
@@ -5436,6 +5654,7 @@ var ALL_LOGIC_NODE_TYPES = [
|
|
|
5436
5654
|
"rule",
|
|
5437
5655
|
"entity",
|
|
5438
5656
|
"datasource",
|
|
5657
|
+
"model_provider",
|
|
5439
5658
|
"group"
|
|
5440
5659
|
];
|
|
5441
5660
|
function isLogicNodeType(nodeType) {
|
|
@@ -7095,6 +7314,6 @@ function Workspace({
|
|
|
7095
7314
|
) }) });
|
|
7096
7315
|
}
|
|
7097
7316
|
|
|
7098
|
-
export { AgentFlowNode, AgentToolFlowNode, AnswerFlowNode, AnthropicIcon, CATEGORY_COLORS, CATEGORY_PILL_COLORS, CodeFlowNode, CrewAIIcon, DocumentExtractorFlowNode, EndFlowNode, EntityFlowNode, FRAMEWORK_META, GoogleADKIcon, GroupFlowNode, HttpRequestFlowNode, ICON_MAP, IfElseFlowNode, IterationFlowNode, IterationStartFlowNode, KnowledgeBaseFlowNode, LOGIC_ICON_MAP, LOGIC_NODE_BADGE_COLORS, LOGIC_NODE_GRADIENTS, LOGIC_NODE_HANDLE_COLORS, LangChainIcon, ListOperatorFlowNode, LogicNodeModal, MINIMAP_NODE_COLORS, NodeCard, NodeContextMenu, NoteFlowNode, OpenAIIcon, PanelContextMenu, ParameterExtractorFlowNode, QuestionClassifierFlowNode, RuleFlowNode, SelectionContextMenu, StartFlowNode, StrandsIcon, TemplateTransformFlowNode, ToolFlowNode, VariableAggregatorFlowNode, VariableAssignerFlowNode, WorkflowBuilderProvider, WorkflowCanvas, Workspace, getCompatibleModels, getDefaultFrameworkForModel, getEntityBadgeColor, getEntityGradient, getEntityHandleColor, getEntityIcon, getEntityMinimapColor, getFrameworkMeta, isModelCompatibleWithFramework, useModalStore, useWorkflowBuilderClient, useWorkflowBuilderClientOptional, useWorkflowStore };
|
|
7099
|
-
//# sourceMappingURL=chunk-
|
|
7100
|
-
//# sourceMappingURL=chunk-
|
|
7317
|
+
export { AgentFlowNode, AgentToolFlowNode, AnswerFlowNode, AnthropicIcon, CATEGORY_COLORS, CATEGORY_PILL_COLORS, CodeFlowNode, CrewAIIcon, DocumentExtractorFlowNode, EndFlowNode, EntityFlowNode, FRAMEWORK_META, GoogleADKIcon, GroupFlowNode, HttpRequestFlowNode, ICON_MAP, IfElseFlowNode, IterationFlowNode, IterationStartFlowNode, KnowledgeBaseFlowNode, LOGIC_ICON_MAP, LOGIC_NODE_BADGE_COLORS, LOGIC_NODE_GRADIENTS, LOGIC_NODE_HANDLE_COLORS, LangChainIcon, ListOperatorFlowNode, LogicNodeModal, MINIMAP_NODE_COLORS, ModelProviderFlowNode, NodeCard, NodeContextMenu, NoteFlowNode, OpenAIIcon, PanelContextMenu, ParameterExtractorFlowNode, QuestionClassifierFlowNode, RuleFlowNode, SelectionContextMenu, StartFlowNode, StrandsIcon, TemplateTransformFlowNode, ToolFlowNode, VariableAggregatorFlowNode, VariableAssignerFlowNode, WorkflowBuilderProvider, WorkflowCanvas, Workspace, getCompatibleModels, getDefaultFrameworkForModel, getEntityBadgeColor, getEntityGradient, getEntityHandleColor, getEntityIcon, getEntityMinimapColor, getFrameworkMeta, isModelCompatibleWithFramework, useModalStore, useWorkflowBuilderClient, useWorkflowBuilderClientOptional, useWorkflowStore };
|
|
7318
|
+
//# sourceMappingURL=chunk-4B47R7VI.mjs.map
|
|
7319
|
+
//# sourceMappingURL=chunk-4B47R7VI.mjs.map
|