@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,15 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { ToggleSwitch, GlassModal, ContextMenu,
|
|
2
|
+
import { ToggleSwitch, GlassModal, ContextMenu, FormInput, FormTextarea, FormSelect, Button, IconButton } from './chunk-AGGOHPMZ.mjs';
|
|
3
3
|
import { useTranslations, I18nProvider, createI18nFromMessages } from './chunk-7VJ7CMMT.mjs';
|
|
4
|
-
import { listModelProviderCatalog } from './chunk-ZV5EZXXO.mjs';
|
|
5
4
|
import { GraphNodeHeader, GraphNodeMeta, GraphNodeBadge, GraphNodeIconBubble } from './chunk-OZNTQROP.mjs';
|
|
6
|
-
import { getAgentTier, createDefaultLogicNodeConfig, applyDagreLayout } from './chunk-
|
|
5
|
+
import { getAgentTier, createDefaultLogicNodeConfig, applyDagreLayout } from './chunk-G7JQ4OCE.mjs';
|
|
7
6
|
import { memo, useState, useRef, useCallback, useEffect, lazy, createContext, useMemo, useContext } from 'react';
|
|
8
7
|
import { Position, NodeResizer, MarkerType, useReactFlow, getBezierPath, BaseEdge, EdgeLabelRenderer, Handle, ReactFlowProvider, useNodesState, useEdgesState, addEdge, BackgroundVariant } from '@xyflow/react';
|
|
9
8
|
import '@xyflow/react/dist/style.css';
|
|
10
9
|
import { create } from 'zustand';
|
|
11
10
|
import { PlusIcon, XMarkIcon } from '@heroicons/react/24/solid';
|
|
12
|
-
import { Bars2Icon, CursorArrowRaysIcon, HandRaisedIcon, MagnifyingGlassPlusIcon, MagnifyingGlassMinusIcon, ArrowsPointingInIcon, ArrowUturnLeftIcon, ArrowUturnRightIcon, MapIcon, EllipsisHorizontalIcon, 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,
|
|
11
|
+
import { Bars2Icon, CursorArrowRaysIcon, HandRaisedIcon, MagnifyingGlassPlusIcon, MagnifyingGlassMinusIcon, ArrowsPointingInIcon, ArrowUturnLeftIcon, ArrowUturnRightIcon, MapIcon, EllipsisHorizontalIcon, 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, MicrophoneIcon, SpeakerWaveIcon, KeyIcon, CloudArrowUpIcon, PresentationChartBarIcon, ChartPieIcon, ChartBarSquareIcon, CurrencyDollarIcon, ShieldCheckIcon, ClipboardDocumentCheckIcon, ShoppingBagIcon, UsersIcon, BuildingStorefrontIcon, BeakerIcon, PencilIcon, DocumentDuplicateIcon, ClipboardDocumentIcon, ClipboardIcon, PlusIcon as PlusIcon$1, XMarkIcon as XMarkIcon$1, TableCellsIcon, FunnelIcon, Cog6ToothIcon, VariableIcon, MagnifyingGlassIcon, CheckIcon } from '@heroicons/react/24/outline';
|
|
13
12
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
14
13
|
|
|
15
14
|
var DEFAULT_PASTE_OFFSET = 40;
|
|
@@ -371,7 +370,9 @@ var LOGIC_NODE_GRADIENTS = {
|
|
|
371
370
|
datasource: "from-cyan-500 to-blue-600",
|
|
372
371
|
model_provider: "from-slate-500 to-gray-600",
|
|
373
372
|
dashboard_output: "from-fuchsia-500 to-pink-600",
|
|
374
|
-
group: "from-slate-400 to-gray-500"
|
|
373
|
+
group: "from-slate-400 to-gray-500",
|
|
374
|
+
audio_input: "from-teal-400 to-cyan-500",
|
|
375
|
+
speech_transcriber: "from-violet-500 to-purple-600"
|
|
375
376
|
};
|
|
376
377
|
var LOGIC_NODE_BADGE_COLORS = {
|
|
377
378
|
start: "bg-green-100 text-green-700 dark:bg-green-500/20 dark:text-green-300",
|
|
@@ -396,7 +397,9 @@ var LOGIC_NODE_BADGE_COLORS = {
|
|
|
396
397
|
datasource: "bg-cyan-100 text-cyan-700 dark:bg-cyan-500/20 dark:text-cyan-300",
|
|
397
398
|
model_provider: "bg-slate-100 text-slate-700 dark:bg-slate-500/20 dark:text-slate-300",
|
|
398
399
|
dashboard_output: "bg-fuchsia-100 text-fuchsia-700 dark:bg-fuchsia-500/20 dark:text-fuchsia-300",
|
|
399
|
-
group: "bg-slate-100 text-slate-700 dark:bg-slate-500/20 dark:text-slate-300"
|
|
400
|
+
group: "bg-slate-100 text-slate-700 dark:bg-slate-500/20 dark:text-slate-300",
|
|
401
|
+
audio_input: "bg-teal-100 text-teal-700 dark:bg-teal-500/20 dark:text-teal-300",
|
|
402
|
+
speech_transcriber: "bg-violet-100 text-violet-700 dark:bg-violet-500/20 dark:text-violet-300"
|
|
400
403
|
};
|
|
401
404
|
var LOGIC_NODE_BADGE_SOFT_COLORS = {
|
|
402
405
|
start: "bg-green-50 text-green-600 dark:bg-green-500/20 dark:text-green-400",
|
|
@@ -421,7 +424,9 @@ var LOGIC_NODE_BADGE_SOFT_COLORS = {
|
|
|
421
424
|
datasource: "bg-cyan-50 text-cyan-600 dark:bg-cyan-500/20 dark:text-cyan-400",
|
|
422
425
|
model_provider: "bg-slate-50 text-slate-600 dark:bg-slate-500/20 dark:text-slate-400",
|
|
423
426
|
dashboard_output: "bg-fuchsia-50 text-fuchsia-600 dark:bg-fuchsia-500/20 dark:text-fuchsia-400",
|
|
424
|
-
group: "bg-slate-50 text-slate-600 dark:bg-slate-500/20 dark:text-slate-400"
|
|
427
|
+
group: "bg-slate-50 text-slate-600 dark:bg-slate-500/20 dark:text-slate-400",
|
|
428
|
+
audio_input: "bg-teal-50 text-teal-600 dark:bg-teal-500/20 dark:text-teal-400",
|
|
429
|
+
speech_transcriber: "bg-violet-50 text-violet-600 dark:bg-violet-500/20 dark:text-violet-400"
|
|
425
430
|
};
|
|
426
431
|
var LOGIC_ICON_MAP = {
|
|
427
432
|
start: PlayIcon,
|
|
@@ -446,7 +451,9 @@ var LOGIC_ICON_MAP = {
|
|
|
446
451
|
datasource: ServerStackIcon,
|
|
447
452
|
model_provider: KeyIcon,
|
|
448
453
|
dashboard_output: ChartBarIcon,
|
|
449
|
-
group: RectangleGroupIcon
|
|
454
|
+
group: RectangleGroupIcon,
|
|
455
|
+
audio_input: MicrophoneIcon,
|
|
456
|
+
speech_transcriber: SpeakerWaveIcon
|
|
450
457
|
};
|
|
451
458
|
var EXPERIMENTAL_NODE_TYPES = /* @__PURE__ */ new Set([
|
|
452
459
|
"document_extractor",
|
|
@@ -482,7 +489,9 @@ var NODE_BORDER_COLORS = {
|
|
|
482
489
|
list_operator: "border-lime-300/50 dark:border-lime-600/50",
|
|
483
490
|
note: "border-gray-200/50 dark:border-gray-700/50",
|
|
484
491
|
datasource: "border-cyan-300/50 dark:border-cyan-600/50",
|
|
485
|
-
model_provider: "border-slate-300/50 dark:border-slate-600/50"
|
|
492
|
+
model_provider: "border-slate-300/50 dark:border-slate-600/50",
|
|
493
|
+
audio_input: "border-teal-300/50 dark:border-teal-600/50",
|
|
494
|
+
speech_transcriber: "border-violet-300/50 dark:border-violet-600/50"
|
|
486
495
|
};
|
|
487
496
|
function getNodeStateClass(selected, nodeType, customBorder) {
|
|
488
497
|
if (selected) return NODE_SELECTED_CLASS;
|
|
@@ -572,7 +581,9 @@ var INSERTABLE_NODES = [
|
|
|
572
581
|
{ nodeType: "knowledge_base", nameKey: "knowledgeBaseNode", subcategory: "AI" },
|
|
573
582
|
{ nodeType: "answer", nameKey: "answerNode", subcategory: "AI" },
|
|
574
583
|
{ nodeType: "question_classifier", nameKey: "questionClassifierNode", subcategory: "AI" },
|
|
575
|
-
{ nodeType: "parameter_extractor", nameKey: "parameterExtractorNode", subcategory: "AI" }
|
|
584
|
+
{ nodeType: "parameter_extractor", nameKey: "parameterExtractorNode", subcategory: "AI" },
|
|
585
|
+
{ nodeType: "audio_input", nameKey: "audioInputNode", subcategory: "AI" },
|
|
586
|
+
{ nodeType: "speech_transcriber", nameKey: "speechTranscriberNode", subcategory: "AI" }
|
|
576
587
|
];
|
|
577
588
|
function EdgeInsertPopupComponent({ position, onSelect, onClose }) {
|
|
578
589
|
const tWorkflow = useTranslations("agents.workflow");
|
|
@@ -2044,7 +2055,7 @@ function NodeRunningIndicatorComponent({ nodeId }) {
|
|
|
2044
2055
|
borderColor: `rgba(${accentRgb}, 0.55)`,
|
|
2045
2056
|
boxShadow: `0 0 0 1px rgba(${accentRgb}, 0.16), 0 6px 16px rgba(${accentRgb}, 0.18)`
|
|
2046
2057
|
},
|
|
2047
|
-
children: /* @__PURE__ */ jsxs("svg", { className: "h-3 w-3 animate-spin", style: { color: accentColor }, viewBox: "0 0 24 24", fill: "none", children: [
|
|
2058
|
+
children: /* @__PURE__ */ jsxs("svg", { className: "h-3 w-3 animate-spin motion-reduce:animate-none", style: { color: accentColor }, viewBox: "0 0 24 24", fill: "none", children: [
|
|
2048
2059
|
/* @__PURE__ */ jsx("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
|
|
2049
2060
|
/* @__PURE__ */ jsx("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })
|
|
2050
2061
|
] })
|
|
@@ -3529,92 +3540,6 @@ var DatasourceFlowNode = memo(function DatasourceFlowNode2({ id, data, selected
|
|
|
3529
3540
|
/* @__PURE__ */ jsx(WorkflowHandle, { type: "source", position: Position.Right, id: "right-out", colorClass: "!bg-cyan-400" })
|
|
3530
3541
|
] });
|
|
3531
3542
|
});
|
|
3532
|
-
var SI = (slug, color) => `https://cdn.simpleicons.org/${slug}/${color}`;
|
|
3533
|
-
var PROVIDER_LOGOS = {
|
|
3534
|
-
aws_bedrock: "https://www.svgrepo.com/show/448266/aws.svg",
|
|
3535
|
-
openai_api: "https://www.svgrepo.com/show/306500/openai.svg",
|
|
3536
|
-
google_vertex: SI("googlegemini", "8E75B2"),
|
|
3537
|
-
azure_openai: SI("microsoftazure", "0078D4"),
|
|
3538
|
-
anthropic_api: SI("anthropic", "D4A27F"),
|
|
3539
|
-
groq: SI("groq", "000000"),
|
|
3540
|
-
mistral: SI("mistralai", "FF7000"),
|
|
3541
|
-
huggingface: SI("huggingface", "FFD21E"),
|
|
3542
|
-
ollama: SI("ollama", "FFFFFF")
|
|
3543
|
-
};
|
|
3544
|
-
var PROVIDER_TYPE_LABELS = {
|
|
3545
|
-
aws_bedrock: "AWS Bedrock",
|
|
3546
|
-
openai_api: "OpenAI API",
|
|
3547
|
-
google_vertex: "Google Vertex AI",
|
|
3548
|
-
azure_openai: "Azure OpenAI",
|
|
3549
|
-
anthropic_api: "Anthropic API",
|
|
3550
|
-
groq: "Groq Cloud",
|
|
3551
|
-
mistral: "Mistral AI",
|
|
3552
|
-
huggingface: "Hugging Face",
|
|
3553
|
-
ollama: "Ollama (Local)",
|
|
3554
|
-
custom: "Custom"
|
|
3555
|
-
};
|
|
3556
|
-
var ModelProviderFlowNode = memo(function ModelProviderFlowNode2({ id, data, selected }) {
|
|
3557
|
-
const config = data.config;
|
|
3558
|
-
const isCompact = data.displayMode === "compact";
|
|
3559
|
-
if (!config) {
|
|
3560
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3561
|
-
/* @__PURE__ */ jsx(NodeRunningIndicator, { nodeId: id }),
|
|
3562
|
-
/* @__PURE__ */ jsx(WorkflowHandle, { type: "target", position: Position.Left, id: "left-in", colorClass: "!bg-gray-400 dark:!bg-gray-500" }),
|
|
3563
|
-
/* @__PURE__ */ jsx(WorkflowHandle, { type: "target", position: Position.Top, id: "top-in", colorClass: "!bg-gray-400 dark:!bg-gray-500" }),
|
|
3564
|
-
/* @__PURE__ */ jsx(NodeCard, { variant: "error", nodeType: "model_provider", width: "w-[280px]", children: /* @__PURE__ */ jsx(
|
|
3565
|
-
NodeCardHeader,
|
|
3566
|
-
{
|
|
3567
|
-
icon: /* @__PURE__ */ jsx(ExclamationTriangleIcon, { className: "h-6 w-6 text-white" }),
|
|
3568
|
-
title: data.label || "Model Provider",
|
|
3569
|
-
description: "Not configured",
|
|
3570
|
-
iconClassName: "flex h-11 w-11 items-center justify-center rounded-xl bg-gradient-to-br from-amber-400 to-orange-500 shadow-lg"
|
|
3571
|
-
}
|
|
3572
|
-
) }),
|
|
3573
|
-
/* @__PURE__ */ jsx(WorkflowHandle, { type: "source", position: Position.Right, id: "right-out", colorClass: "!bg-slate-500" }),
|
|
3574
|
-
/* @__PURE__ */ jsx(WorkflowHandle, { type: "source", position: Position.Bottom, id: "bottom-out", colorClass: "!bg-slate-500" })
|
|
3575
|
-
] });
|
|
3576
|
-
}
|
|
3577
|
-
const providerLabel = PROVIDER_TYPE_LABELS[config.providerType] ?? config.providerType;
|
|
3578
|
-
const displayName = config.name || providerLabel;
|
|
3579
|
-
const regionLabel = config.region ? config.region : void 0;
|
|
3580
|
-
const isConfigured = !!(config.credentialRef || config.apiKeyRef);
|
|
3581
|
-
const logo = PROVIDER_LOGOS[config.providerType];
|
|
3582
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3583
|
-
/* @__PURE__ */ jsx(NodeRunningIndicator, { nodeId: id }),
|
|
3584
|
-
/* @__PURE__ */ jsx(WorkflowHandle, { type: "target", position: Position.Left, id: "left-in", colorClass: "!bg-gray-400 dark:!bg-gray-500" }),
|
|
3585
|
-
/* @__PURE__ */ jsx(WorkflowHandle, { type: "target", position: Position.Top, id: "top-in", colorClass: "!bg-gray-400 dark:!bg-gray-500" }),
|
|
3586
|
-
/* @__PURE__ */ jsx(
|
|
3587
|
-
"button",
|
|
3588
|
-
{
|
|
3589
|
-
type: "button",
|
|
3590
|
-
onClick: () => data.onEdit?.(id),
|
|
3591
|
-
className: "w-full text-left",
|
|
3592
|
-
children: /* @__PURE__ */ jsxs(NodeCard, { compact: isCompact, selected, nodeType: "model_provider", width: "w-[280px]", children: [
|
|
3593
|
-
/* @__PURE__ */ jsx(
|
|
3594
|
-
NodeCardHeader,
|
|
3595
|
-
{
|
|
3596
|
-
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" }),
|
|
3597
|
-
title: displayName,
|
|
3598
|
-
description: providerLabel,
|
|
3599
|
-
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"}`
|
|
3600
|
-
}
|
|
3601
|
-
),
|
|
3602
|
-
/* @__PURE__ */ jsx(NodeCardMeta, { compact: isCompact, children: /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-1.5", children: [
|
|
3603
|
-
/* @__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 }),
|
|
3604
|
-
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 }),
|
|
3605
|
-
/* @__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" }),
|
|
3606
|
-
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: [
|
|
3607
|
-
config.modelFilter.length,
|
|
3608
|
-
" models"
|
|
3609
|
-
] })
|
|
3610
|
-
] }) })
|
|
3611
|
-
] })
|
|
3612
|
-
}
|
|
3613
|
-
),
|
|
3614
|
-
/* @__PURE__ */ jsx(WorkflowHandle, { type: "source", position: Position.Right, id: "right-out", colorClass: "!bg-slate-500" }),
|
|
3615
|
-
/* @__PURE__ */ jsx(WorkflowHandle, { type: "source", position: Position.Bottom, id: "bottom-out", colorClass: "!bg-slate-500" })
|
|
3616
|
-
] });
|
|
3617
|
-
});
|
|
3618
3543
|
var GROUP_COLORS = {
|
|
3619
3544
|
indigo: {
|
|
3620
3545
|
border: "border-indigo-300/50 dark:border-indigo-600/50",
|
|
@@ -3793,6 +3718,130 @@ var GroupFlowNode = memo(function GroupFlowNode2({ id, data, selected }) {
|
|
|
3793
3718
|
/* @__PURE__ */ jsx(WorkflowHandle, { type: "source", position: Position.Right, id: "right-out", colorClass: "!bg-slate-500" })
|
|
3794
3719
|
] });
|
|
3795
3720
|
});
|
|
3721
|
+
var AudioInputFlowNode = memo(function AudioInputFlowNode2({ id, data, selected }) {
|
|
3722
|
+
const { config, label, onDelete, onEdit } = data;
|
|
3723
|
+
const isCompact = data.displayMode === "compact";
|
|
3724
|
+
const urlPreview = config.url ? config.url.slice(0, 32) : "";
|
|
3725
|
+
const formatLabel = config.format && config.format.length > 0 ? config.format : "auto";
|
|
3726
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3727
|
+
/* @__PURE__ */ jsx(NodeRunningIndicator, { nodeId: id }),
|
|
3728
|
+
/* @__PURE__ */ jsx(WorkflowHandle, { type: "target", position: Position.Left, id: "left-in", colorClass: "!bg-teal-500" }),
|
|
3729
|
+
/* @__PURE__ */ jsxs(
|
|
3730
|
+
NodeInteractiveCard,
|
|
3731
|
+
{
|
|
3732
|
+
nodeId: id,
|
|
3733
|
+
onEdit,
|
|
3734
|
+
compact: isCompact,
|
|
3735
|
+
selected,
|
|
3736
|
+
nodeType: "audio_input",
|
|
3737
|
+
children: [
|
|
3738
|
+
/* @__PURE__ */ jsx(
|
|
3739
|
+
NodeCardHeader,
|
|
3740
|
+
{
|
|
3741
|
+
icon: /* @__PURE__ */ jsx(NodeIconBubble, { tone: "audio_input", children: /* @__PURE__ */ jsx(MicrophoneIcon, { className: "h-5 w-5 text-white" }) }),
|
|
3742
|
+
title: label,
|
|
3743
|
+
description: "Validates an audio source URL for downstream voice nodes",
|
|
3744
|
+
compact: isCompact,
|
|
3745
|
+
iconClassName: ""
|
|
3746
|
+
}
|
|
3747
|
+
),
|
|
3748
|
+
/* @__PURE__ */ jsxs(NodeCardMeta, { compact: isCompact, children: [
|
|
3749
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
3750
|
+
/* @__PURE__ */ jsx(NodeCardBadge, { tone: "audio_input", children: "Audio Input" }),
|
|
3751
|
+
/* @__PURE__ */ jsx(NodeCardBadge, { tone: "audio_input", soft: true, children: formatLabel }),
|
|
3752
|
+
urlPreview && /* @__PURE__ */ jsx("span", { className: "truncate text-[10px] text-gray-400 dark:text-gray-500", children: urlPreview })
|
|
3753
|
+
] }),
|
|
3754
|
+
/* @__PURE__ */ jsx(NodeCardDeleteAction, { nodeId: id, onDelete })
|
|
3755
|
+
] })
|
|
3756
|
+
]
|
|
3757
|
+
}
|
|
3758
|
+
),
|
|
3759
|
+
/* @__PURE__ */ jsx(WorkflowHandle, { type: "source", position: Position.Right, id: "right-out", colorClass: "!bg-teal-500" })
|
|
3760
|
+
] });
|
|
3761
|
+
});
|
|
3762
|
+
var SpeechTranscriberFlowNode = memo(function SpeechTranscriberFlowNode2({ id, data, selected }) {
|
|
3763
|
+
const { config, label, onDelete, onEdit } = data;
|
|
3764
|
+
const isCompact = data.displayMode === "compact";
|
|
3765
|
+
const model = config.model && config.model.length > 0 ? config.model : "whisper-1";
|
|
3766
|
+
const language = config.language && config.language.length > 0 ? config.language : "auto";
|
|
3767
|
+
const audioRefPreview = config.audioUrl ? config.audioUrl.slice(0, 32) : "";
|
|
3768
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3769
|
+
/* @__PURE__ */ jsx(NodeRunningIndicator, { nodeId: id }),
|
|
3770
|
+
/* @__PURE__ */ jsx(WorkflowHandle, { type: "target", position: Position.Left, id: "left-in", colorClass: "!bg-violet-500" }),
|
|
3771
|
+
/* @__PURE__ */ jsxs(
|
|
3772
|
+
NodeInteractiveCard,
|
|
3773
|
+
{
|
|
3774
|
+
nodeId: id,
|
|
3775
|
+
onEdit,
|
|
3776
|
+
compact: isCompact,
|
|
3777
|
+
selected,
|
|
3778
|
+
nodeType: "speech_transcriber",
|
|
3779
|
+
children: [
|
|
3780
|
+
/* @__PURE__ */ jsx(
|
|
3781
|
+
NodeCardHeader,
|
|
3782
|
+
{
|
|
3783
|
+
icon: /* @__PURE__ */ jsx(NodeIconBubble, { tone: "speech_transcriber", children: /* @__PURE__ */ jsx(SpeakerWaveIcon, { className: "h-5 w-5 text-white" }) }),
|
|
3784
|
+
title: label,
|
|
3785
|
+
description: "Transcribes audio via OpenAI Whisper-compatible endpoints",
|
|
3786
|
+
compact: isCompact,
|
|
3787
|
+
iconClassName: ""
|
|
3788
|
+
}
|
|
3789
|
+
),
|
|
3790
|
+
/* @__PURE__ */ jsxs(NodeCardMeta, { compact: isCompact, children: [
|
|
3791
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
3792
|
+
/* @__PURE__ */ jsx(NodeCardBadge, { tone: "speech_transcriber", children: "Whisper" }),
|
|
3793
|
+
/* @__PURE__ */ jsx(NodeCardBadge, { tone: "speech_transcriber", soft: true, children: model }),
|
|
3794
|
+
/* @__PURE__ */ jsx(NodeCardBadge, { tone: "speech_transcriber", soft: true, children: language }),
|
|
3795
|
+
audioRefPreview && /* @__PURE__ */ jsx("span", { className: "truncate text-[10px] text-gray-400 dark:text-gray-500", children: audioRefPreview })
|
|
3796
|
+
] }),
|
|
3797
|
+
/* @__PURE__ */ jsx(NodeCardDeleteAction, { nodeId: id, onDelete })
|
|
3798
|
+
] })
|
|
3799
|
+
]
|
|
3800
|
+
}
|
|
3801
|
+
),
|
|
3802
|
+
/* @__PURE__ */ jsx(WorkflowHandle, { type: "source", position: Position.Right, id: "right-out", colorClass: "!bg-violet-500" })
|
|
3803
|
+
] });
|
|
3804
|
+
});
|
|
3805
|
+
var DashboardOutputFlowNode = memo(function DashboardOutputFlowNode2({ id, data, selected }) {
|
|
3806
|
+
const t = useTranslations("agents.workflow");
|
|
3807
|
+
const { config, label, onDelete, onEdit } = data;
|
|
3808
|
+
const isCompact = data.displayMode === "compact";
|
|
3809
|
+
const source = config?.dashboardFrom ? `\u2190 ${config.dashboardFrom}` : config?.dashboard ? "inline" : "unset";
|
|
3810
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3811
|
+
/* @__PURE__ */ jsx(NodeRunningIndicator, { nodeId: id }),
|
|
3812
|
+
/* @__PURE__ */ jsx(WorkflowHandle, { type: "target", position: Position.Left, id: "left-in", colorClass: "!bg-fuchsia-500" }),
|
|
3813
|
+
/* @__PURE__ */ jsxs(
|
|
3814
|
+
NodeInteractiveCard,
|
|
3815
|
+
{
|
|
3816
|
+
nodeId: id,
|
|
3817
|
+
onEdit,
|
|
3818
|
+
compact: isCompact,
|
|
3819
|
+
selected,
|
|
3820
|
+
nodeType: "dashboard_output",
|
|
3821
|
+
width: "w-[260px]",
|
|
3822
|
+
children: [
|
|
3823
|
+
/* @__PURE__ */ jsx(
|
|
3824
|
+
NodeCardHeader,
|
|
3825
|
+
{
|
|
3826
|
+
icon: /* @__PURE__ */ jsx(NodeIconBubble, { tone: "dashboard_output", children: /* @__PURE__ */ jsx(ChartBarIcon, { className: "h-5 w-5 text-white" }) }),
|
|
3827
|
+
title: label,
|
|
3828
|
+
description: t("dashboardOutputNodeDescription"),
|
|
3829
|
+
compact: isCompact,
|
|
3830
|
+
iconClassName: ""
|
|
3831
|
+
}
|
|
3832
|
+
),
|
|
3833
|
+
/* @__PURE__ */ jsxs(NodeCardMeta, { compact: isCompact, children: [
|
|
3834
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
3835
|
+
/* @__PURE__ */ jsx(NodeCardBadge, { tone: "dashboard_output", children: t("dashboardOutputNode") }),
|
|
3836
|
+
/* @__PURE__ */ jsx(NodeCardBadge, { tone: "dashboard_output", soft: true, children: source })
|
|
3837
|
+
] }),
|
|
3838
|
+
/* @__PURE__ */ jsx(NodeCardDeleteAction, { nodeId: id, onDelete })
|
|
3839
|
+
] })
|
|
3840
|
+
]
|
|
3841
|
+
}
|
|
3842
|
+
)
|
|
3843
|
+
] });
|
|
3844
|
+
});
|
|
3796
3845
|
function ConfigFormActions({
|
|
3797
3846
|
cancelLabel,
|
|
3798
3847
|
saveLabel,
|
|
@@ -5821,215 +5870,6 @@ function GroupNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
5821
5870
|
)
|
|
5822
5871
|
] });
|
|
5823
5872
|
}
|
|
5824
|
-
var catalogCache = null;
|
|
5825
|
-
var catalogPromise = null;
|
|
5826
|
-
async function loadCatalog() {
|
|
5827
|
-
if (catalogCache) return catalogCache;
|
|
5828
|
-
if (!catalogPromise) {
|
|
5829
|
-
catalogPromise = listModelProviderCatalog().then((rows) => {
|
|
5830
|
-
catalogCache = rows;
|
|
5831
|
-
return rows;
|
|
5832
|
-
});
|
|
5833
|
-
}
|
|
5834
|
-
return catalogPromise;
|
|
5835
|
-
}
|
|
5836
|
-
var ENDPOINT_SLUGS = /* @__PURE__ */ new Set(["custom", "azure_openai", "ollama"]);
|
|
5837
|
-
function ModelProviderNodeConfigForm({ config, onSave, onCancel }) {
|
|
5838
|
-
const t = useTranslations("agents.workflow.modelProviderNodeConfig");
|
|
5839
|
-
const [catalog, setCatalog] = useState(catalogCache);
|
|
5840
|
-
const [catalogError, setCatalogError] = useState(null);
|
|
5841
|
-
const [providerType, setProviderType] = useState(config.providerType);
|
|
5842
|
-
const [name, setName] = useState(config.name ?? "");
|
|
5843
|
-
const [region, setRegion] = useState(config.region ?? "");
|
|
5844
|
-
const [endpoint, setEndpoint] = useState(config.endpoint ?? "");
|
|
5845
|
-
const [credentialRef, setCredentialRef] = useState(config.credentialRef ?? "");
|
|
5846
|
-
const [apiKeyRef, setApiKeyRef] = useState(config.apiKeyRef ?? "");
|
|
5847
|
-
const [selectedFamilies, setSelectedFamilies] = useState(/* @__PURE__ */ new Set());
|
|
5848
|
-
useEffect(() => {
|
|
5849
|
-
let cancelled = false;
|
|
5850
|
-
if (catalog) return;
|
|
5851
|
-
void loadCatalog().then((rows) => {
|
|
5852
|
-
if (cancelled) return;
|
|
5853
|
-
setCatalog(rows);
|
|
5854
|
-
}).catch((error) => {
|
|
5855
|
-
if (cancelled) return;
|
|
5856
|
-
const message = error instanceof Error ? error.message : "Failed to load provider catalog";
|
|
5857
|
-
setCatalogError(message);
|
|
5858
|
-
});
|
|
5859
|
-
return () => {
|
|
5860
|
-
cancelled = true;
|
|
5861
|
-
};
|
|
5862
|
-
}, [catalog]);
|
|
5863
|
-
const currentProvider = useMemo(() => {
|
|
5864
|
-
if (!catalog) return void 0;
|
|
5865
|
-
return catalog.find((entry) => entry.slug === providerType);
|
|
5866
|
-
}, [catalog, providerType]);
|
|
5867
|
-
const families = currentProvider?.families ?? [];
|
|
5868
|
-
const regions = Array.isArray(currentProvider?.regions) ? currentProvider.regions : [];
|
|
5869
|
-
const showRegion = regions.length > 0;
|
|
5870
|
-
const showEndpoint = ENDPOINT_SLUGS.has(providerType);
|
|
5871
|
-
const authType = currentProvider?.authType ?? null;
|
|
5872
|
-
const showApiKey = authType === "api_key";
|
|
5873
|
-
const showCredentialRef = authType === "iam_role";
|
|
5874
|
-
useEffect(() => {
|
|
5875
|
-
if (!currentProvider) return;
|
|
5876
|
-
setSelectedFamilies((previous) => {
|
|
5877
|
-
if (previous.size > 0) return previous;
|
|
5878
|
-
const filter = new Set(config.modelFilter ?? []);
|
|
5879
|
-
const next = /* @__PURE__ */ new Set();
|
|
5880
|
-
for (const family of currentProvider.families) {
|
|
5881
|
-
if (filter.size === 0 || family.modelIds.some((id) => filter.has(id))) {
|
|
5882
|
-
next.add(family.id);
|
|
5883
|
-
}
|
|
5884
|
-
}
|
|
5885
|
-
return next;
|
|
5886
|
-
});
|
|
5887
|
-
}, [currentProvider, config.modelFilter]);
|
|
5888
|
-
const handleToggleFamily = (familyId) => {
|
|
5889
|
-
setSelectedFamilies((previous) => {
|
|
5890
|
-
const next = new Set(previous);
|
|
5891
|
-
if (next.has(familyId)) next.delete(familyId);
|
|
5892
|
-
else next.add(familyId);
|
|
5893
|
-
return next;
|
|
5894
|
-
});
|
|
5895
|
-
};
|
|
5896
|
-
const handleProviderChange = (value) => {
|
|
5897
|
-
const newType = value;
|
|
5898
|
-
setProviderType(newType);
|
|
5899
|
-
setRegion("");
|
|
5900
|
-
const next = catalog?.find((entry) => entry.slug === newType);
|
|
5901
|
-
setSelectedFamilies(new Set((next?.families ?? []).map((family) => family.id)));
|
|
5902
|
-
};
|
|
5903
|
-
const handleSave = () => {
|
|
5904
|
-
const modelFilter = families.filter((family) => selectedFamilies.has(family.id)).flatMap((family) => family.modelIds);
|
|
5905
|
-
onSave({
|
|
5906
|
-
...config,
|
|
5907
|
-
providerType,
|
|
5908
|
-
name: name.trim() || void 0,
|
|
5909
|
-
region: region || void 0,
|
|
5910
|
-
endpoint: endpoint.trim() || void 0,
|
|
5911
|
-
credentialRef: credentialRef.trim() || void 0,
|
|
5912
|
-
apiKeyRef: apiKeyRef.trim() || void 0,
|
|
5913
|
-
modelFilter
|
|
5914
|
-
});
|
|
5915
|
-
};
|
|
5916
|
-
if (catalogError) {
|
|
5917
|
-
return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
5918
|
-
/* @__PURE__ */ jsx("div", { className: "rounded-lg border border-red-200 bg-red-50 p-3 text-sm text-red-900 dark:border-red-500/30 dark:bg-red-500/10 dark:text-red-200", children: catalogError }),
|
|
5919
|
-
/* @__PURE__ */ jsx(
|
|
5920
|
-
ConfigFormActions,
|
|
5921
|
-
{
|
|
5922
|
-
cancelLabel: t("cancel"),
|
|
5923
|
-
saveLabel: t("save"),
|
|
5924
|
-
onCancel,
|
|
5925
|
-
onSave: handleSave,
|
|
5926
|
-
saveDisabled: true
|
|
5927
|
-
}
|
|
5928
|
-
)
|
|
5929
|
-
] });
|
|
5930
|
-
}
|
|
5931
|
-
if (!catalog) {
|
|
5932
|
-
return /* @__PURE__ */ jsx("div", { className: "space-y-4 h-32" });
|
|
5933
|
-
}
|
|
5934
|
-
return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
5935
|
-
/* @__PURE__ */ jsx(
|
|
5936
|
-
FormInput,
|
|
5937
|
-
{
|
|
5938
|
-
type: "text",
|
|
5939
|
-
label: t("nameLabel"),
|
|
5940
|
-
value: name,
|
|
5941
|
-
onValueChange: setName,
|
|
5942
|
-
placeholder: t("namePlaceholder")
|
|
5943
|
-
}
|
|
5944
|
-
),
|
|
5945
|
-
/* @__PURE__ */ jsx(
|
|
5946
|
-
FormSelect,
|
|
5947
|
-
{
|
|
5948
|
-
label: t("providerTypeLabel"),
|
|
5949
|
-
value: providerType,
|
|
5950
|
-
onValueChange: handleProviderChange,
|
|
5951
|
-
options: catalog.filter((entry) => entry.enabled).map((entry) => ({ value: entry.slug, label: entry.name }))
|
|
5952
|
-
}
|
|
5953
|
-
),
|
|
5954
|
-
showRegion && /* @__PURE__ */ jsx(
|
|
5955
|
-
FormSelect,
|
|
5956
|
-
{
|
|
5957
|
-
label: t("regionLabel"),
|
|
5958
|
-
value: region,
|
|
5959
|
-
onValueChange: setRegion,
|
|
5960
|
-
options: [
|
|
5961
|
-
{ value: "", label: t("selectRegion") },
|
|
5962
|
-
...regions.map((value) => ({ value, label: value }))
|
|
5963
|
-
]
|
|
5964
|
-
}
|
|
5965
|
-
),
|
|
5966
|
-
showEndpoint && /* @__PURE__ */ jsx(
|
|
5967
|
-
FormInput,
|
|
5968
|
-
{
|
|
5969
|
-
type: "text",
|
|
5970
|
-
label: t("endpointLabel"),
|
|
5971
|
-
value: endpoint,
|
|
5972
|
-
onValueChange: setEndpoint,
|
|
5973
|
-
placeholder: providerType === "ollama" ? "http://localhost:11434" : t("endpointPlaceholder")
|
|
5974
|
-
}
|
|
5975
|
-
),
|
|
5976
|
-
showApiKey && /* @__PURE__ */ jsx(
|
|
5977
|
-
FormInput,
|
|
5978
|
-
{
|
|
5979
|
-
type: "password",
|
|
5980
|
-
label: t("apiKeyLabel"),
|
|
5981
|
-
value: apiKeyRef,
|
|
5982
|
-
onValueChange: setApiKeyRef,
|
|
5983
|
-
placeholder: t("apiKeyPlaceholder")
|
|
5984
|
-
}
|
|
5985
|
-
),
|
|
5986
|
-
showCredentialRef && /* @__PURE__ */ jsx(
|
|
5987
|
-
FormInput,
|
|
5988
|
-
{
|
|
5989
|
-
type: "text",
|
|
5990
|
-
label: t("credentialRefLabel"),
|
|
5991
|
-
value: credentialRef,
|
|
5992
|
-
onValueChange: setCredentialRef,
|
|
5993
|
-
placeholder: providerType === "aws_bedrock" ? "arn:aws:iam::role/bedrock-role" : t("credentialRefPlaceholder")
|
|
5994
|
-
}
|
|
5995
|
-
),
|
|
5996
|
-
families.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
5997
|
-
/* @__PURE__ */ jsx("label", { className: "mb-2 block text-sm font-medium text-gray-700 dark:text-gray-300", children: t("modelFamiliesLabel") }),
|
|
5998
|
-
/* @__PURE__ */ jsx("div", { className: "space-y-1.5", children: families.map((family) => {
|
|
5999
|
-
const isSelected = selectedFamilies.has(family.id);
|
|
6000
|
-
return /* @__PURE__ */ jsxs(
|
|
6001
|
-
"button",
|
|
6002
|
-
{
|
|
6003
|
-
type: "button",
|
|
6004
|
-
onClick: () => handleToggleFamily(family.id),
|
|
6005
|
-
className: `flex w-full items-center gap-3 rounded-lg border px-3 py-2 text-left transition-all ${isSelected ? "border-indigo-500/30 bg-indigo-50/50 dark:border-indigo-400/20 dark:bg-indigo-500/5" : "border-gray-200/50 hover:border-gray-300 dark:border-white/10 dark:hover:border-white/20"}`,
|
|
6006
|
-
children: [
|
|
6007
|
-
/* @__PURE__ */ jsx("div", { className: `flex h-4 w-4 shrink-0 items-center justify-center rounded ${isSelected ? "bg-indigo-500 text-white" : "border border-gray-300 dark:border-gray-600"}`, children: isSelected && /* @__PURE__ */ jsx("svg", { className: "h-3 w-3", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { fillRule: "evenodd", d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z", clipRule: "evenodd" }) }) }),
|
|
6008
|
-
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
6009
|
-
/* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-gray-900 dark:text-white", children: family.name }),
|
|
6010
|
-
/* @__PURE__ */ jsxs("span", { className: "ml-2 text-[10px] text-gray-400 dark:text-gray-500", children: [
|
|
6011
|
-
family.modelIds.length,
|
|
6012
|
-
" models"
|
|
6013
|
-
] })
|
|
6014
|
-
] })
|
|
6015
|
-
]
|
|
6016
|
-
},
|
|
6017
|
-
family.id
|
|
6018
|
-
);
|
|
6019
|
-
}) })
|
|
6020
|
-
] }),
|
|
6021
|
-
/* @__PURE__ */ jsx(
|
|
6022
|
-
ConfigFormActions,
|
|
6023
|
-
{
|
|
6024
|
-
cancelLabel: t("cancel"),
|
|
6025
|
-
saveLabel: t("save"),
|
|
6026
|
-
onCancel,
|
|
6027
|
-
onSave: handleSave,
|
|
6028
|
-
saveDisabled: !providerType
|
|
6029
|
-
}
|
|
6030
|
-
)
|
|
6031
|
-
] });
|
|
6032
|
-
}
|
|
6033
5873
|
function RuleNodeConfigForm({ config, onSave, onCancel, availableRules }) {
|
|
6034
5874
|
const t = useTranslations("agents.workflow.ruleNodeConfig");
|
|
6035
5875
|
const [ruleId, setRuleId] = useState(config.ruleId ?? "");
|
|
@@ -6244,6 +6084,247 @@ function AgentNodeConfigForm({
|
|
|
6244
6084
|
)
|
|
6245
6085
|
] });
|
|
6246
6086
|
}
|
|
6087
|
+
var AUDIO_FORMATS = ["auto", "mp3", "wav", "m4a", "webm", "ogg", "flac", "mp4", "mpga"];
|
|
6088
|
+
function AudioInputNodeConfigForm({ config, onSave, onCancel }) {
|
|
6089
|
+
const t = useTranslations("agents.workflow.audioInputNodeConfig");
|
|
6090
|
+
const [url, setUrl] = useState(config.url ?? "");
|
|
6091
|
+
const [format, setFormat] = useState(config.format && config.format.length > 0 ? config.format : "auto");
|
|
6092
|
+
const handleSave = () => {
|
|
6093
|
+
onSave({
|
|
6094
|
+
...config,
|
|
6095
|
+
url,
|
|
6096
|
+
format: format === "auto" ? void 0 : format
|
|
6097
|
+
});
|
|
6098
|
+
};
|
|
6099
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
6100
|
+
/* @__PURE__ */ jsx(
|
|
6101
|
+
FormInput,
|
|
6102
|
+
{
|
|
6103
|
+
type: "text",
|
|
6104
|
+
label: t("urlLabel"),
|
|
6105
|
+
value: url,
|
|
6106
|
+
onValueChange: setUrl,
|
|
6107
|
+
placeholder: t("urlPlaceholder")
|
|
6108
|
+
}
|
|
6109
|
+
),
|
|
6110
|
+
/* @__PURE__ */ jsx(
|
|
6111
|
+
FormSelect,
|
|
6112
|
+
{
|
|
6113
|
+
label: t("formatLabel"),
|
|
6114
|
+
value: format,
|
|
6115
|
+
onValueChange: setFormat,
|
|
6116
|
+
options: AUDIO_FORMATS.map((option) => ({ value: option, label: option }))
|
|
6117
|
+
}
|
|
6118
|
+
),
|
|
6119
|
+
/* @__PURE__ */ jsx(
|
|
6120
|
+
ConfigFormActions,
|
|
6121
|
+
{
|
|
6122
|
+
cancelLabel: t("cancel"),
|
|
6123
|
+
saveLabel: t("save"),
|
|
6124
|
+
onCancel,
|
|
6125
|
+
onSave: handleSave
|
|
6126
|
+
}
|
|
6127
|
+
)
|
|
6128
|
+
] });
|
|
6129
|
+
}
|
|
6130
|
+
var RESPONSE_FORMATS = [
|
|
6131
|
+
"verbose_json",
|
|
6132
|
+
"json",
|
|
6133
|
+
"text"
|
|
6134
|
+
];
|
|
6135
|
+
function SpeechTranscriberNodeConfigForm({ config, onSave, onCancel }) {
|
|
6136
|
+
const t = useTranslations("agents.workflow.speechTranscriberNodeConfig");
|
|
6137
|
+
const [audioUrl, setAudioUrl] = useState(config.audioUrl ?? "");
|
|
6138
|
+
const [model, setModel] = useState(config.model ?? "whisper-1");
|
|
6139
|
+
const [language, setLanguage] = useState(config.language ?? "");
|
|
6140
|
+
const [prompt, setPrompt] = useState(config.prompt ?? "");
|
|
6141
|
+
const [responseFormat, setResponseFormat] = useState(
|
|
6142
|
+
config.responseFormat ?? "verbose_json"
|
|
6143
|
+
);
|
|
6144
|
+
const [endpoint, setEndpoint] = useState(config.endpoint ?? "");
|
|
6145
|
+
const [timeoutMs, setTimeoutMs] = useState(config.timeoutMs ?? 12e4);
|
|
6146
|
+
const handleSave = () => {
|
|
6147
|
+
onSave({
|
|
6148
|
+
...config,
|
|
6149
|
+
audioUrl,
|
|
6150
|
+
model: model.trim() || void 0,
|
|
6151
|
+
language: language.trim() || void 0,
|
|
6152
|
+
prompt: prompt.trim() || void 0,
|
|
6153
|
+
responseFormat,
|
|
6154
|
+
endpoint: endpoint.trim() || void 0,
|
|
6155
|
+
timeoutMs
|
|
6156
|
+
});
|
|
6157
|
+
};
|
|
6158
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
6159
|
+
/* @__PURE__ */ jsx(
|
|
6160
|
+
FormInput,
|
|
6161
|
+
{
|
|
6162
|
+
type: "text",
|
|
6163
|
+
label: t("audioUrlLabel"),
|
|
6164
|
+
value: audioUrl,
|
|
6165
|
+
onValueChange: setAudioUrl,
|
|
6166
|
+
placeholder: t("audioUrlPlaceholder")
|
|
6167
|
+
}
|
|
6168
|
+
),
|
|
6169
|
+
/* @__PURE__ */ jsx(
|
|
6170
|
+
FormInput,
|
|
6171
|
+
{
|
|
6172
|
+
type: "text",
|
|
6173
|
+
label: t("modelLabel"),
|
|
6174
|
+
value: model,
|
|
6175
|
+
onValueChange: setModel,
|
|
6176
|
+
placeholder: "whisper-1"
|
|
6177
|
+
}
|
|
6178
|
+
),
|
|
6179
|
+
/* @__PURE__ */ jsx(
|
|
6180
|
+
FormInput,
|
|
6181
|
+
{
|
|
6182
|
+
type: "text",
|
|
6183
|
+
label: t("languageLabel"),
|
|
6184
|
+
value: language,
|
|
6185
|
+
onValueChange: setLanguage,
|
|
6186
|
+
placeholder: t("languagePlaceholder")
|
|
6187
|
+
}
|
|
6188
|
+
),
|
|
6189
|
+
/* @__PURE__ */ jsx(
|
|
6190
|
+
FormTextarea,
|
|
6191
|
+
{
|
|
6192
|
+
label: t("promptLabel"),
|
|
6193
|
+
value: prompt,
|
|
6194
|
+
onValueChange: setPrompt,
|
|
6195
|
+
placeholder: t("promptPlaceholder"),
|
|
6196
|
+
rows: 3
|
|
6197
|
+
}
|
|
6198
|
+
),
|
|
6199
|
+
/* @__PURE__ */ jsx(
|
|
6200
|
+
FormSelect,
|
|
6201
|
+
{
|
|
6202
|
+
label: t("responseFormatLabel"),
|
|
6203
|
+
value: responseFormat,
|
|
6204
|
+
onValueChange: (value) => setResponseFormat(value),
|
|
6205
|
+
options: RESPONSE_FORMATS.map((value) => ({ value, label: value }))
|
|
6206
|
+
}
|
|
6207
|
+
),
|
|
6208
|
+
/* @__PURE__ */ jsx(
|
|
6209
|
+
FormInput,
|
|
6210
|
+
{
|
|
6211
|
+
type: "text",
|
|
6212
|
+
label: t("endpointLabel"),
|
|
6213
|
+
value: endpoint,
|
|
6214
|
+
onValueChange: setEndpoint,
|
|
6215
|
+
placeholder: t("endpointPlaceholder")
|
|
6216
|
+
}
|
|
6217
|
+
),
|
|
6218
|
+
/* @__PURE__ */ jsx(
|
|
6219
|
+
FormInput,
|
|
6220
|
+
{
|
|
6221
|
+
type: "number",
|
|
6222
|
+
label: t("timeoutLabel"),
|
|
6223
|
+
value: String(timeoutMs),
|
|
6224
|
+
onValueChange: (value) => setTimeoutMs(Number(value)),
|
|
6225
|
+
min: 1e3,
|
|
6226
|
+
max: 6e5,
|
|
6227
|
+
step: 1e3
|
|
6228
|
+
}
|
|
6229
|
+
),
|
|
6230
|
+
/* @__PURE__ */ jsx(
|
|
6231
|
+
ConfigFormActions,
|
|
6232
|
+
{
|
|
6233
|
+
cancelLabel: t("cancel"),
|
|
6234
|
+
saveLabel: t("save"),
|
|
6235
|
+
onCancel,
|
|
6236
|
+
onSave: handleSave
|
|
6237
|
+
}
|
|
6238
|
+
)
|
|
6239
|
+
] });
|
|
6240
|
+
}
|
|
6241
|
+
function DashboardOutputNodeConfigForm({ config, onSave, onCancel }) {
|
|
6242
|
+
const t = useTranslations("agents.workflow.dashboardOutputNodeConfig");
|
|
6243
|
+
const initialMode = config.dashboard ? "inline" : "reference";
|
|
6244
|
+
const [mode, setMode] = useState(initialMode);
|
|
6245
|
+
const [dashboardFrom, setDashboardFrom] = useState(config.dashboardFrom ?? "");
|
|
6246
|
+
const [inlineJson, setInlineJson] = useState(
|
|
6247
|
+
config.dashboard ? JSON.stringify(config.dashboard, null, 2) : ""
|
|
6248
|
+
);
|
|
6249
|
+
const [parseError, setParseError] = useState(null);
|
|
6250
|
+
const handleSave = () => {
|
|
6251
|
+
if (mode === "reference") {
|
|
6252
|
+
const trimmed = dashboardFrom.trim();
|
|
6253
|
+
onSave({ type: "dashboard_output", dashboardFrom: trimmed });
|
|
6254
|
+
return;
|
|
6255
|
+
}
|
|
6256
|
+
try {
|
|
6257
|
+
const parsed = inlineJson.trim() ? JSON.parse(inlineJson) : {};
|
|
6258
|
+
setParseError(null);
|
|
6259
|
+
onSave({ type: "dashboard_output", dashboard: parsed });
|
|
6260
|
+
} catch (error) {
|
|
6261
|
+
setParseError(error instanceof Error ? error.message : String(error));
|
|
6262
|
+
}
|
|
6263
|
+
};
|
|
6264
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
6265
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs text-gray-500 dark:text-gray-400", children: t("description") }),
|
|
6266
|
+
/* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
|
|
6267
|
+
/* @__PURE__ */ jsx(
|
|
6268
|
+
"button",
|
|
6269
|
+
{
|
|
6270
|
+
type: "button",
|
|
6271
|
+
onClick: () => setMode("reference"),
|
|
6272
|
+
className: `flex-1 rounded-lg border px-3 py-2 text-xs font-medium transition-colors ${mode === "reference" ? "border-fuchsia-500 bg-fuchsia-500/10 text-fuchsia-700 dark:text-fuchsia-300" : "border-gray-200 bg-white text-gray-600 hover:border-fuchsia-300 dark:border-white/10 dark:bg-white/5 dark:text-gray-300"}`,
|
|
6273
|
+
children: t("modeReference")
|
|
6274
|
+
}
|
|
6275
|
+
),
|
|
6276
|
+
/* @__PURE__ */ jsx(
|
|
6277
|
+
"button",
|
|
6278
|
+
{
|
|
6279
|
+
type: "button",
|
|
6280
|
+
onClick: () => setMode("inline"),
|
|
6281
|
+
className: `flex-1 rounded-lg border px-3 py-2 text-xs font-medium transition-colors ${mode === "inline" ? "border-fuchsia-500 bg-fuchsia-500/10 text-fuchsia-700 dark:text-fuchsia-300" : "border-gray-200 bg-white text-gray-600 hover:border-fuchsia-300 dark:border-white/10 dark:bg-white/5 dark:text-gray-300"}`,
|
|
6282
|
+
children: t("modeInline")
|
|
6283
|
+
}
|
|
6284
|
+
)
|
|
6285
|
+
] }),
|
|
6286
|
+
mode === "reference" ? /* @__PURE__ */ jsxs("div", { children: [
|
|
6287
|
+
/* @__PURE__ */ jsx("label", { className: "mb-1 block text-xs font-medium text-gray-700 dark:text-gray-300", children: t("referenceLabel") }),
|
|
6288
|
+
/* @__PURE__ */ jsx(
|
|
6289
|
+
"input",
|
|
6290
|
+
{
|
|
6291
|
+
type: "text",
|
|
6292
|
+
value: dashboardFrom,
|
|
6293
|
+
onChange: (event) => setDashboardFrom(event.target.value),
|
|
6294
|
+
placeholder: t("referencePlaceholder"),
|
|
6295
|
+
className: "w-full rounded-lg border border-gray-300 bg-white px-3 py-2 text-sm font-mono text-gray-900 placeholder:text-gray-400 focus:border-fuchsia-500 focus:outline-none focus:ring-1 focus:ring-fuchsia-500 dark:border-white/10 dark:bg-white/5 dark:text-white"
|
|
6296
|
+
}
|
|
6297
|
+
),
|
|
6298
|
+
/* @__PURE__ */ jsx("p", { className: "mt-1 text-[10px] text-gray-500 dark:text-gray-400", children: t("referenceHelp") })
|
|
6299
|
+
] }) : /* @__PURE__ */ jsxs("div", { children: [
|
|
6300
|
+
/* @__PURE__ */ jsx("label", { className: "mb-1 block text-xs font-medium text-gray-700 dark:text-gray-300", children: t("inlineLabel") }),
|
|
6301
|
+
/* @__PURE__ */ jsx(
|
|
6302
|
+
"textarea",
|
|
6303
|
+
{
|
|
6304
|
+
value: inlineJson,
|
|
6305
|
+
onChange: (event) => setInlineJson(event.target.value),
|
|
6306
|
+
placeholder: '{\\n "kpis": [],\\n "charts": [],\\n "tables": []\\n}',
|
|
6307
|
+
rows: 12,
|
|
6308
|
+
className: "w-full rounded-lg border border-gray-300 bg-white px-3 py-2 text-xs font-mono text-gray-900 placeholder:text-gray-400 focus:border-fuchsia-500 focus:outline-none focus:ring-1 focus:ring-fuchsia-500 dark:border-white/10 dark:bg-white/5 dark:text-white"
|
|
6309
|
+
}
|
|
6310
|
+
),
|
|
6311
|
+
parseError ? /* @__PURE__ */ jsxs("p", { className: "mt-1 text-[10px] font-medium text-red-600 dark:text-red-400", children: [
|
|
6312
|
+
t("parseError"),
|
|
6313
|
+
": ",
|
|
6314
|
+
parseError
|
|
6315
|
+
] }) : /* @__PURE__ */ jsx("p", { className: "mt-1 text-[10px] text-gray-500 dark:text-gray-400", children: t("inlineHelp") })
|
|
6316
|
+
] }),
|
|
6317
|
+
/* @__PURE__ */ jsx(
|
|
6318
|
+
ConfigFormActions,
|
|
6319
|
+
{
|
|
6320
|
+
cancelLabel: t("cancel"),
|
|
6321
|
+
saveLabel: t("save"),
|
|
6322
|
+
onCancel,
|
|
6323
|
+
onSave: handleSave
|
|
6324
|
+
}
|
|
6325
|
+
)
|
|
6326
|
+
] });
|
|
6327
|
+
}
|
|
6247
6328
|
var NODE_TITLE_KEYS = {
|
|
6248
6329
|
start: "startNodeConfig",
|
|
6249
6330
|
end: "endNodeConfig",
|
|
@@ -6265,9 +6346,11 @@ var NODE_TITLE_KEYS = {
|
|
|
6265
6346
|
entity: "entityNodeConfig",
|
|
6266
6347
|
datasource: "datasourceNodeConfig",
|
|
6267
6348
|
group: "groupNodeConfig",
|
|
6268
|
-
model_provider: "modelProviderNodeConfig",
|
|
6269
6349
|
rule: "ruleNodeConfig",
|
|
6270
|
-
agent: "agentNodeConfig"
|
|
6350
|
+
agent: "agentNodeConfig",
|
|
6351
|
+
audio_input: "audioInputNodeConfig",
|
|
6352
|
+
speech_transcriber: "speechTranscriberNodeConfig",
|
|
6353
|
+
dashboard_output: "dashboardOutputNodeConfig"
|
|
6271
6354
|
};
|
|
6272
6355
|
function LogicNodeModal({ onSave, entities = [], datasources = [], onLoadTables, onLoadSchema }) {
|
|
6273
6356
|
const t = useTranslations("agents.workflow");
|
|
@@ -6328,12 +6411,20 @@ function LogicNodeModal({ onSave, entities = [], datasources = [], onLoadTables,
|
|
|
6328
6411
|
return /* @__PURE__ */ jsx(EntityNodeConfigForm, { config, entities, onSave: handleSave, onCancel: closeModal });
|
|
6329
6412
|
case "group":
|
|
6330
6413
|
return /* @__PURE__ */ jsx(GroupNodeConfigForm, { config, onSave: handleSave, onCancel: closeModal });
|
|
6331
|
-
|
|
6332
|
-
|
|
6414
|
+
// model_provider was removed from the canvas — providers are
|
|
6415
|
+
// now account-level credentials configured in Settings, not
|
|
6416
|
+
// draggable nodes. Any legacy graph that still has a
|
|
6417
|
+
// model_provider node falls through to default → no edit form.
|
|
6333
6418
|
case "rule":
|
|
6334
6419
|
return /* @__PURE__ */ jsx(RuleNodeConfigForm, { config, onSave: handleSave, onCancel: closeModal });
|
|
6335
6420
|
case "agent":
|
|
6336
6421
|
return /* @__PURE__ */ jsx(AgentNodeConfigForm, { config, onSave: handleSave, onCancel: closeModal });
|
|
6422
|
+
case "audio_input":
|
|
6423
|
+
return /* @__PURE__ */ jsx(AudioInputNodeConfigForm, { config, onSave: handleSave, onCancel: closeModal });
|
|
6424
|
+
case "speech_transcriber":
|
|
6425
|
+
return /* @__PURE__ */ jsx(SpeechTranscriberNodeConfigForm, { config, onSave: handleSave, onCancel: closeModal });
|
|
6426
|
+
case "dashboard_output":
|
|
6427
|
+
return /* @__PURE__ */ jsx(DashboardOutputNodeConfigForm, { config, onSave: handleSave, onCancel: closeModal });
|
|
6337
6428
|
default:
|
|
6338
6429
|
return null;
|
|
6339
6430
|
}
|
|
@@ -6716,8 +6807,14 @@ var BUILT_IN_NODE_TYPES = {
|
|
|
6716
6807
|
iteration_start: IterationStartFlowNode,
|
|
6717
6808
|
note: NoteFlowNode,
|
|
6718
6809
|
datasource: DatasourceFlowNode,
|
|
6719
|
-
model_provider
|
|
6720
|
-
|
|
6810
|
+
// model_provider removed from canvas — providers are now
|
|
6811
|
+
// account-level credentials (configured in Settings), not draggable
|
|
6812
|
+
// nodes. Agents reference the provider via the `Models` tab in the
|
|
6813
|
+
// agent modal. See agent-modal.tsx + n8n/Dify patterns.
|
|
6814
|
+
group: GroupFlowNode,
|
|
6815
|
+
audio_input: AudioInputFlowNode,
|
|
6816
|
+
speech_transcriber: SpeechTranscriberFlowNode,
|
|
6817
|
+
dashboard_output: DashboardOutputFlowNode
|
|
6721
6818
|
};
|
|
6722
6819
|
var ALL_LOGIC_NODE_TYPES = [
|
|
6723
6820
|
"start",
|
|
@@ -6742,8 +6839,10 @@ var ALL_LOGIC_NODE_TYPES = [
|
|
|
6742
6839
|
"rule",
|
|
6743
6840
|
"entity",
|
|
6744
6841
|
"datasource",
|
|
6745
|
-
"
|
|
6746
|
-
"
|
|
6842
|
+
"group",
|
|
6843
|
+
"audio_input",
|
|
6844
|
+
"speech_transcriber",
|
|
6845
|
+
"dashboard_output"
|
|
6747
6846
|
];
|
|
6748
6847
|
function isLogicNodeType(nodeType) {
|
|
6749
6848
|
return ALL_LOGIC_NODE_TYPES.includes(nodeType);
|
|
@@ -6767,6 +6866,7 @@ var AUTO_SAVE_DEBOUNCE_MS = 2e3;
|
|
|
6767
6866
|
function WorkflowCanvasInner({
|
|
6768
6867
|
agents,
|
|
6769
6868
|
models,
|
|
6869
|
+
modelProviders = [],
|
|
6770
6870
|
tools,
|
|
6771
6871
|
agentTools = [],
|
|
6772
6872
|
rules,
|
|
@@ -6801,7 +6901,9 @@ function WorkflowCanvasInner({
|
|
|
6801
6901
|
openAgentModalAction(
|
|
6802
6902
|
{ agentId: "", name: "", order: 0, enabled: true, temperature: 0.7, maxTokens: 4096 },
|
|
6803
6903
|
models,
|
|
6804
|
-
true
|
|
6904
|
+
true,
|
|
6905
|
+
agentTools,
|
|
6906
|
+
modelProviders
|
|
6805
6907
|
);
|
|
6806
6908
|
}
|
|
6807
6909
|
}, [isCreatingAgent]);
|
|
@@ -6948,7 +7050,7 @@ function WorkflowCanvasInner({
|
|
|
6948
7050
|
providerName: models.find((m) => m.id === agent.modelId)?.provider,
|
|
6949
7051
|
onSelect: () => {
|
|
6950
7052
|
setSelectedAgentId(agent.agentId);
|
|
6951
|
-
openAgentModalAction(agent, models, false, agentTools);
|
|
7053
|
+
openAgentModalAction(agent, models, false, agentTools, modelProviders);
|
|
6952
7054
|
},
|
|
6953
7055
|
onRemoveFromCanvas: handleRemoveNodeFromCanvas
|
|
6954
7056
|
}
|
|
@@ -7331,7 +7433,7 @@ function WorkflowCanvasInner({
|
|
|
7331
7433
|
const agent = targetNode.data?.agent;
|
|
7332
7434
|
if (agent) {
|
|
7333
7435
|
setSelectedAgentId(agent.agentId ?? agent.id ?? null);
|
|
7334
|
-
openAgentModalAction(agent, models, false, agentTools);
|
|
7436
|
+
openAgentModalAction(agent, models, false, agentTools, modelProviders);
|
|
7335
7437
|
}
|
|
7336
7438
|
} else if (targetNode.type === "tool") {
|
|
7337
7439
|
const tool = targetNode.data?.tool;
|
|
@@ -7830,7 +7932,7 @@ function WorkflowCanvasInner({
|
|
|
7830
7932
|
selected: false,
|
|
7831
7933
|
onSelect: () => {
|
|
7832
7934
|
setSelectedAgentId(agent.agentId);
|
|
7833
|
-
openAgentModalAction(agent, models, false, agentTools);
|
|
7935
|
+
openAgentModalAction(agent, models, false, agentTools, modelProviders);
|
|
7834
7936
|
},
|
|
7835
7937
|
onRemoveFromCanvas: handleRemoveNodeFromCanvas
|
|
7836
7938
|
}
|
|
@@ -8490,6 +8592,6 @@ function Workspace({
|
|
|
8490
8592
|
) }) });
|
|
8491
8593
|
}
|
|
8492
8594
|
|
|
8493
|
-
export { AgentFlowNode, AgentToolFlowNode, AnswerFlowNode, AnthropicIcon, CATEGORY_COLORS, CATEGORY_PILL_COLORS, CodeFlowNode, CrewAIIcon, DocumentExtractorFlowNode, EXPERIMENTAL_NODE_TYPES, 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,
|
|
8494
|
-
//# sourceMappingURL=chunk-
|
|
8495
|
-
//# sourceMappingURL=chunk-
|
|
8595
|
+
export { AgentFlowNode, AgentToolFlowNode, AnswerFlowNode, AnthropicIcon, CATEGORY_COLORS, CATEGORY_PILL_COLORS, CodeFlowNode, CrewAIIcon, DocumentExtractorFlowNode, EXPERIMENTAL_NODE_TYPES, 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, NODE_EXECUTION_ACCENT_COLORS, NodeCard, NodeCardBadge, NodeCardDeleteAction, NodeCardHeader, NodeCardMeta, NodeContextMenu, NodeIconBubble, NodeInteractiveCard, NodeRunningIndicator, NoteFlowNode, OpenAIIcon, PanelContextMenu, ParameterExtractorFlowNode, QuestionClassifierFlowNode, RuleFlowNode, SelectionContextMenu, StartFlowNode, StrandsIcon, TemplateTransformFlowNode, ToolFlowNode, VariableAggregatorFlowNode, VariableAssignerFlowNode, WorkflowBuilderProvider, WorkflowCanvas, WorkflowHandle, Workspace, getCompatibleModels, getDefaultFrameworkForModel, getEntityBadgeColor, getEntityGradient, getEntityHandleColor, getEntityIcon, getEntityMinimapColor, getFrameworkMeta, getNodeExecutionAccent, getNodeExecutionAccentRgb, isFrameworkCompatibleWithProviders, isModelCompatibleWithFramework, useModalStore, useWorkflowBuilderClient, useWorkflowBuilderClientOptional, useWorkflowStore };
|
|
8596
|
+
//# sourceMappingURL=chunk-VV6SYMPM.mjs.map
|
|
8597
|
+
//# sourceMappingURL=chunk-VV6SYMPM.mjs.map
|