@datatechsolutions/ui 2.11.2 → 2.11.3
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 +293 -0
- package/dist/astrlabe/contracts.d.ts +293 -0
- package/dist/astrlabe/graph-node.d.mts +28 -0
- package/dist/astrlabe/graph-node.d.ts +28 -0
- package/dist/astrlabe/index.d.mts +707 -0
- package/dist/astrlabe/index.d.ts +707 -0
- package/dist/astrlabe/index.js +146 -146
- package/dist/astrlabe/index.js.map +1 -1
- package/dist/astrlabe/index.mjs +30 -30
- package/dist/astrlabe/index.mjs.map +1 -1
- package/dist/astrlabe/utils.d.mts +71 -0
- package/dist/astrlabe/utils.d.ts +71 -0
- package/dist/astrlabe/utils.js +4 -4
- package/dist/astrlabe/utils.mjs +1 -1
- package/dist/astrlabe/workflow-canvas.d.mts +5 -0
- package/dist/astrlabe/workflow-canvas.d.ts +5 -0
- package/dist/astrlabe/workflow-canvas.js +6 -6
- package/dist/astrlabe/workflow-canvas.mjs +5 -5
- package/dist/astrlabe/workflow-preview-canvas.d.mts +10 -0
- package/dist/astrlabe/workflow-preview-canvas.d.ts +10 -0
- package/dist/{chunk-ZEYHIEHE.mjs → chunk-LJSJMBLO.mjs} +81 -71
- package/dist/chunk-LJSJMBLO.mjs.map +1 -0
- package/dist/{chunk-NMXHJMGI.js → chunk-PBKTXX4Y.js} +3 -3
- package/dist/{chunk-NMXHJMGI.js.map → chunk-PBKTXX4Y.js.map} +1 -1
- package/dist/{chunk-DFR6CMJH.js → chunk-PWBWP5FJ.js} +2 -2
- package/dist/{chunk-DFR6CMJH.js.map → chunk-PWBWP5FJ.js.map} +1 -1
- package/dist/{chunk-AM2TTPYM.mjs → chunk-TLPPVL3W.mjs} +2 -2
- package/dist/{chunk-AM2TTPYM.mjs.map → chunk-TLPPVL3W.mjs.map} +1 -1
- package/dist/{chunk-4TZNBT5V.js → chunk-XAQME7DD.js} +138 -128
- package/dist/chunk-XAQME7DD.js.map +1 -0
- package/dist/{chunk-VB45EBH5.mjs → chunk-XO7IYJSF.mjs} +3 -3
- package/dist/{chunk-VB45EBH5.mjs.map → chunk-XO7IYJSF.mjs.map} +1 -1
- package/dist/dynamic-island-confirm-Cbxh-sta.d.mts +52 -0
- package/dist/dynamic-island-confirm-Cbxh-sta.d.ts +52 -0
- package/dist/index.d.mts +4771 -0
- package/dist/index.d.ts +4771 -0
- package/dist/index.js +727 -727
- package/dist/index.mjs +2 -2
- package/dist/lib/i18n-context.d.mts +36 -0
- package/dist/lib/i18n-context.d.ts +36 -0
- package/dist/lib/router-context.d.mts +35 -0
- package/dist/lib/router-context.d.ts +35 -0
- package/dist/workflow-canvas-CJwGehdk.d.mts +241 -0
- package/dist/workflow-canvas-DSm0iyof.d.ts +241 -0
- package/package.json +2 -1
- package/dist/chunk-4TZNBT5V.js.map +0 -1
- package/dist/chunk-ZEYHIEHE.mjs.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
var chunkYXN2K77G_js = require('./chunk-YXN2K77G.js');
|
|
4
|
+
var chunkPBKTXX4Y_js = require('./chunk-PBKTXX4Y.js');
|
|
6
5
|
var chunkP4YYEM4B_js = require('./chunk-P4YYEM4B.js');
|
|
7
|
-
var
|
|
6
|
+
var chunkPWBWP5FJ_js = require('./chunk-PWBWP5FJ.js');
|
|
7
|
+
var chunkYXN2K77G_js = require('./chunk-YXN2K77G.js');
|
|
8
8
|
var react = require('react');
|
|
9
9
|
var react$1 = require('@xyflow/react');
|
|
10
10
|
require('@xyflow/react/dist/style.css');
|
|
@@ -210,42 +210,42 @@ var useWorkflowStore = zustand.create((set, get) => ({
|
|
|
210
210
|
});
|
|
211
211
|
}
|
|
212
212
|
}));
|
|
213
|
-
var
|
|
214
|
-
|
|
213
|
+
var useModalStore = zustand.create((set) => ({
|
|
214
|
+
activeModal: null,
|
|
215
215
|
agentData: null,
|
|
216
216
|
subworkflowData: null,
|
|
217
217
|
logicNodeData: null,
|
|
218
218
|
pipelineSettingsData: null,
|
|
219
|
-
|
|
220
|
-
|
|
219
|
+
openAgentModal: (agent, models, isCreateMode = false) => set({
|
|
220
|
+
activeModal: "agent",
|
|
221
221
|
agentData: { agent, models, isCreateMode },
|
|
222
222
|
subworkflowData: null,
|
|
223
223
|
logicNodeData: null,
|
|
224
224
|
pipelineSettingsData: null
|
|
225
225
|
}),
|
|
226
|
-
|
|
227
|
-
|
|
226
|
+
openSubworkflowModal: (tool) => set({
|
|
227
|
+
activeModal: "subworkflow",
|
|
228
228
|
subworkflowData: { tool },
|
|
229
229
|
agentData: null,
|
|
230
230
|
logicNodeData: null,
|
|
231
231
|
pipelineSettingsData: null
|
|
232
232
|
}),
|
|
233
|
-
|
|
234
|
-
|
|
233
|
+
openLogicNodeModal: (nodeId, nodeLabel, config) => set({
|
|
234
|
+
activeModal: "logic-node",
|
|
235
235
|
logicNodeData: { nodeId, nodeLabel, config },
|
|
236
236
|
agentData: null,
|
|
237
237
|
subworkflowData: null,
|
|
238
238
|
pipelineSettingsData: null
|
|
239
239
|
}),
|
|
240
|
-
|
|
241
|
-
|
|
240
|
+
openPipelineSettingsModal: (name, description) => set({
|
|
241
|
+
activeModal: "pipeline-settings",
|
|
242
242
|
pipelineSettingsData: { name, description },
|
|
243
243
|
agentData: null,
|
|
244
244
|
subworkflowData: null,
|
|
245
245
|
logicNodeData: null
|
|
246
246
|
}),
|
|
247
|
-
|
|
248
|
-
|
|
247
|
+
closeModal: () => set({
|
|
248
|
+
activeModal: null,
|
|
249
249
|
agentData: null,
|
|
250
250
|
subworkflowData: null,
|
|
251
251
|
logicNodeData: null,
|
|
@@ -1369,7 +1369,7 @@ var AgentFlowNode = react.memo(function AgentFlowNode2({ id, data, selected }) {
|
|
|
1369
1369
|
/* @__PURE__ */ jsxRuntime.jsx(NodeCardMeta, { compact: isCompact, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-1.5", children: [
|
|
1370
1370
|
/* @__PURE__ */ jsxRuntime.jsx(NodeCardBadge, { className: "rounded-full bg-indigo-100 px-2 py-0.5 text-[10px] font-semibold text-indigo-700 dark:bg-indigo-500/20 dark:text-indigo-300", children: "Agent" }),
|
|
1371
1371
|
(() => {
|
|
1372
|
-
const tier =
|
|
1372
|
+
const tier = chunkPWBWP5FJ_js.getAgentTier(Number(data.agent.elo ?? 0));
|
|
1373
1373
|
return /* @__PURE__ */ jsxRuntime.jsx(NodeCardBadge, { className: `rounded-full px-2 py-0.5 text-[10px] font-bold ${tier.pillColor}`, children: tier.key });
|
|
1374
1374
|
})(),
|
|
1375
1375
|
/* @__PURE__ */ jsxRuntime.jsxs(NodeCardBadge, { className: `inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[10px] font-medium ${frameworkMeta.badgeColor}`, children: [
|
|
@@ -2890,19 +2890,27 @@ var GroupFlowNode = react.memo(function GroupFlowNode2({ id, data, selected }) {
|
|
|
2890
2890
|
/* @__PURE__ */ jsxRuntime.jsx(WorkflowHandle, { type: "source", position: react$1.Position.Right, id: "right-out", colorClass: "!bg-slate-500" })
|
|
2891
2891
|
] });
|
|
2892
2892
|
});
|
|
2893
|
-
|
|
2893
|
+
var LEGACY_WIDTH_MAP = {
|
|
2894
|
+
"max-w-xl": "xl",
|
|
2895
|
+
"max-w-2xl": "2xl",
|
|
2896
|
+
"max-w-4xl": "4xl",
|
|
2897
|
+
"max-w-6xl": "6xl",
|
|
2898
|
+
"max-w-full": "full"
|
|
2899
|
+
};
|
|
2900
|
+
function WorkspaceModal({
|
|
2894
2901
|
open,
|
|
2895
2902
|
onClose,
|
|
2896
2903
|
title,
|
|
2897
2904
|
subtitle,
|
|
2898
2905
|
icon,
|
|
2899
2906
|
gradient = "from-gray-400 to-gray-500",
|
|
2900
|
-
maxWidth = "
|
|
2907
|
+
maxWidth = "2xl",
|
|
2901
2908
|
tabs,
|
|
2902
2909
|
children
|
|
2903
2910
|
}) {
|
|
2904
|
-
|
|
2905
|
-
|
|
2911
|
+
const resolvedSize = LEGACY_WIDTH_MAP[maxWidth] ?? maxWidth;
|
|
2912
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2913
|
+
chunkPBKTXX4Y_js.GlassModalShell,
|
|
2906
2914
|
{
|
|
2907
2915
|
open,
|
|
2908
2916
|
onClose,
|
|
@@ -2910,9 +2918,11 @@ function WorkspaceDrawer({
|
|
|
2910
2918
|
subtitle,
|
|
2911
2919
|
icon,
|
|
2912
2920
|
gradient,
|
|
2913
|
-
maxWidth,
|
|
2914
|
-
|
|
2915
|
-
|
|
2921
|
+
maxWidth: resolvedSize,
|
|
2922
|
+
children: [
|
|
2923
|
+
tabs,
|
|
2924
|
+
children
|
|
2925
|
+
]
|
|
2916
2926
|
}
|
|
2917
2927
|
);
|
|
2918
2928
|
}
|
|
@@ -2945,7 +2955,7 @@ function StartNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
2945
2955
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-2 text-xs text-gray-500 dark:text-gray-400", children: t("inputVariablesHelp") }),
|
|
2946
2956
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
|
|
2947
2957
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2948
|
-
|
|
2958
|
+
chunkPBKTXX4Y_js.Input,
|
|
2949
2959
|
{
|
|
2950
2960
|
value: newVariable,
|
|
2951
2961
|
onChange: (event) => setNewVariable(event.target.value),
|
|
@@ -2955,7 +2965,7 @@ function StartNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
2955
2965
|
}
|
|
2956
2966
|
),
|
|
2957
2967
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2958
|
-
|
|
2968
|
+
chunkPBKTXX4Y_js.Button,
|
|
2959
2969
|
{
|
|
2960
2970
|
type: "button",
|
|
2961
2971
|
onClick: handleAddVariable,
|
|
@@ -2972,7 +2982,7 @@ function StartNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
2972
2982
|
children: [
|
|
2973
2983
|
variable,
|
|
2974
2984
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2975
|
-
|
|
2985
|
+
chunkPBKTXX4Y_js.IconButton,
|
|
2976
2986
|
{
|
|
2977
2987
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.XMarkIcon, { className: "h-3 w-3" }),
|
|
2978
2988
|
label: `Remove ${variable}`,
|
|
@@ -2989,7 +2999,7 @@ function StartNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
2989
2999
|
] }),
|
|
2990
3000
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2 border-t border-gray-200 pt-4 dark:border-gray-700", children: [
|
|
2991
3001
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2992
|
-
|
|
3002
|
+
chunkPBKTXX4Y_js.Button,
|
|
2993
3003
|
{
|
|
2994
3004
|
type: "button",
|
|
2995
3005
|
onClick: onCancel,
|
|
@@ -2999,7 +3009,7 @@ function StartNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
2999
3009
|
}
|
|
3000
3010
|
),
|
|
3001
3011
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3002
|
-
|
|
3012
|
+
chunkPBKTXX4Y_js.Button,
|
|
3003
3013
|
{
|
|
3004
3014
|
type: "button",
|
|
3005
3015
|
onClick: handleSave,
|
|
@@ -3111,8 +3121,8 @@ function ConfigFormActions({
|
|
|
3111
3121
|
saveDisabled = false
|
|
3112
3122
|
}) {
|
|
3113
3123
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2 border-t border-gray-200 pt-4 dark:border-gray-700", children: [
|
|
3114
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3115
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3124
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkPBKTXX4Y_js.Button, { type: "button", outline: true, onClick: onCancel, children: cancelLabel }),
|
|
3125
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkPBKTXX4Y_js.Button, { type: "button", onClick: onSave, disabled: saveDisabled, children: saveLabel })
|
|
3116
3126
|
] });
|
|
3117
3127
|
}
|
|
3118
3128
|
var OPERATOR_OPTIONS = [
|
|
@@ -3161,7 +3171,7 @@ function IfElseNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
3161
3171
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-3 flex items-center justify-between", children: [
|
|
3162
3172
|
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium text-gray-700 dark:text-gray-300", children: t("conditionsLabel") }),
|
|
3163
3173
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3164
|
-
|
|
3174
|
+
chunkPBKTXX4Y_js.Button,
|
|
3165
3175
|
{
|
|
3166
3176
|
type: "button",
|
|
3167
3177
|
onClick: handleAddCondition,
|
|
@@ -3172,7 +3182,7 @@ function IfElseNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
3172
3182
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-3", children: conditions.map((condition, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2 rounded-lg border border-gray-200 bg-gray-50 p-3 dark:border-gray-700 dark:bg-gray-800/50", children: [
|
|
3173
3183
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid flex-1 grid-cols-3 gap-2", children: [
|
|
3174
3184
|
/* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3175
|
-
|
|
3185
|
+
chunkPBKTXX4Y_js.FormInput,
|
|
3176
3186
|
{
|
|
3177
3187
|
type: "text",
|
|
3178
3188
|
label: t("variableLabel"),
|
|
@@ -3183,7 +3193,7 @@ function IfElseNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
3183
3193
|
}
|
|
3184
3194
|
) }),
|
|
3185
3195
|
/* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3186
|
-
|
|
3196
|
+
chunkPBKTXX4Y_js.FormSelect,
|
|
3187
3197
|
{
|
|
3188
3198
|
label: t("operatorLabel"),
|
|
3189
3199
|
value: condition.operator,
|
|
@@ -3193,7 +3203,7 @@ function IfElseNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
3193
3203
|
}
|
|
3194
3204
|
) }),
|
|
3195
3205
|
/* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3196
|
-
|
|
3206
|
+
chunkPBKTXX4Y_js.FormInput,
|
|
3197
3207
|
{
|
|
3198
3208
|
type: "text",
|
|
3199
3209
|
label: t("valueLabel"),
|
|
@@ -3205,7 +3215,7 @@ function IfElseNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
3205
3215
|
) })
|
|
3206
3216
|
] }),
|
|
3207
3217
|
conditions.length > 1 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3208
|
-
|
|
3218
|
+
chunkPBKTXX4Y_js.IconButton,
|
|
3209
3219
|
{
|
|
3210
3220
|
onClick: () => handleRemoveCondition(index),
|
|
3211
3221
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.TrashIcon, { className: "h-4 w-4" }),
|
|
@@ -3360,7 +3370,7 @@ function HttpRequestNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
3360
3370
|
};
|
|
3361
3371
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
3362
3372
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3363
|
-
|
|
3373
|
+
chunkPBKTXX4Y_js.FormSelect,
|
|
3364
3374
|
{
|
|
3365
3375
|
label: t("methodLabel"),
|
|
3366
3376
|
value: method,
|
|
@@ -3369,7 +3379,7 @@ function HttpRequestNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
3369
3379
|
}
|
|
3370
3380
|
),
|
|
3371
3381
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3372
|
-
|
|
3382
|
+
chunkPBKTXX4Y_js.FormInput,
|
|
3373
3383
|
{
|
|
3374
3384
|
type: "text",
|
|
3375
3385
|
label: t("urlLabel"),
|
|
@@ -3382,7 +3392,7 @@ function HttpRequestNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
3382
3392
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-2 flex items-center justify-between", children: [
|
|
3383
3393
|
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium text-gray-700 dark:text-gray-300", children: t("headersLabel") }),
|
|
3384
3394
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3385
|
-
|
|
3395
|
+
chunkPBKTXX4Y_js.Button,
|
|
3386
3396
|
{
|
|
3387
3397
|
type: "button",
|
|
3388
3398
|
onClick: handleAddHeader,
|
|
@@ -3392,7 +3402,7 @@ function HttpRequestNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
3392
3402
|
] }),
|
|
3393
3403
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-2", children: headerEntries.map((entry, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
3394
3404
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3395
|
-
|
|
3405
|
+
chunkPBKTXX4Y_js.FormInput,
|
|
3396
3406
|
{
|
|
3397
3407
|
type: "text",
|
|
3398
3408
|
value: entry.key,
|
|
@@ -3402,7 +3412,7 @@ function HttpRequestNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
3402
3412
|
}
|
|
3403
3413
|
),
|
|
3404
3414
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3405
|
-
|
|
3415
|
+
chunkPBKTXX4Y_js.FormInput,
|
|
3406
3416
|
{
|
|
3407
3417
|
type: "text",
|
|
3408
3418
|
value: entry.value,
|
|
@@ -3412,7 +3422,7 @@ function HttpRequestNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
3412
3422
|
}
|
|
3413
3423
|
),
|
|
3414
3424
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3415
|
-
|
|
3425
|
+
chunkPBKTXX4Y_js.IconButton,
|
|
3416
3426
|
{
|
|
3417
3427
|
onClick: () => handleRemoveHeader(index),
|
|
3418
3428
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.TrashIcon, { className: "h-4 w-4" }),
|
|
@@ -3424,7 +3434,7 @@ function HttpRequestNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
3424
3434
|
] }, index)) })
|
|
3425
3435
|
] }),
|
|
3426
3436
|
method !== "GET" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3427
|
-
|
|
3437
|
+
chunkPBKTXX4Y_js.FormTextarea,
|
|
3428
3438
|
{
|
|
3429
3439
|
label: t("bodyLabel"),
|
|
3430
3440
|
value: body,
|
|
@@ -3435,7 +3445,7 @@ function HttpRequestNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
3435
3445
|
}
|
|
3436
3446
|
),
|
|
3437
3447
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3438
|
-
|
|
3448
|
+
chunkPBKTXX4Y_js.FormInput,
|
|
3439
3449
|
{
|
|
3440
3450
|
type: "number",
|
|
3441
3451
|
label: t("timeoutLabel"),
|
|
@@ -3466,7 +3476,7 @@ function TemplateTransformNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
3466
3476
|
};
|
|
3467
3477
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
3468
3478
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3469
|
-
|
|
3479
|
+
chunkPBKTXX4Y_js.FormTextarea,
|
|
3470
3480
|
{
|
|
3471
3481
|
label: t("templateLabel"),
|
|
3472
3482
|
value: template,
|
|
@@ -3477,7 +3487,7 @@ function TemplateTransformNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
3477
3487
|
}
|
|
3478
3488
|
),
|
|
3479
3489
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3480
|
-
|
|
3490
|
+
chunkPBKTXX4Y_js.FormInput,
|
|
3481
3491
|
{
|
|
3482
3492
|
type: "text",
|
|
3483
3493
|
label: t("outputVariableLabel"),
|
|
@@ -3506,7 +3516,7 @@ function IterationNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
3506
3516
|
};
|
|
3507
3517
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
3508
3518
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3509
|
-
|
|
3519
|
+
chunkPBKTXX4Y_js.FormInput,
|
|
3510
3520
|
{
|
|
3511
3521
|
type: "text",
|
|
3512
3522
|
label: t("iteratorVariableLabel"),
|
|
@@ -3516,7 +3526,7 @@ function IterationNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
3516
3526
|
}
|
|
3517
3527
|
),
|
|
3518
3528
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3519
|
-
|
|
3529
|
+
chunkPBKTXX4Y_js.FormInput,
|
|
3520
3530
|
{
|
|
3521
3531
|
type: "number",
|
|
3522
3532
|
label: t("maxIterationsLabel"),
|
|
@@ -3547,7 +3557,7 @@ function KnowledgeBaseNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
3547
3557
|
};
|
|
3548
3558
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
3549
3559
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3550
|
-
|
|
3560
|
+
chunkPBKTXX4Y_js.FormInput,
|
|
3551
3561
|
{
|
|
3552
3562
|
type: "text",
|
|
3553
3563
|
label: t("sourceIdLabel"),
|
|
@@ -3557,7 +3567,7 @@ function KnowledgeBaseNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
3557
3567
|
}
|
|
3558
3568
|
),
|
|
3559
3569
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3560
|
-
|
|
3570
|
+
chunkPBKTXX4Y_js.FormInput,
|
|
3561
3571
|
{
|
|
3562
3572
|
type: "number",
|
|
3563
3573
|
label: t("topKLabel"),
|
|
@@ -3568,7 +3578,7 @@ function KnowledgeBaseNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
3568
3578
|
}
|
|
3569
3579
|
),
|
|
3570
3580
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3571
|
-
|
|
3581
|
+
chunkPBKTXX4Y_js.FormInput,
|
|
3572
3582
|
{
|
|
3573
3583
|
type: "number",
|
|
3574
3584
|
label: t("similarityThresholdLabel"),
|
|
@@ -3616,7 +3626,7 @@ function AnswerNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
3616
3626
|
};
|
|
3617
3627
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
3618
3628
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3619
|
-
|
|
3629
|
+
chunkPBKTXX4Y_js.FormTextarea,
|
|
3620
3630
|
{
|
|
3621
3631
|
label: t("outputTemplateLabel"),
|
|
3622
3632
|
hint: t("outputTemplateHelp"),
|
|
@@ -3631,7 +3641,7 @@ function AnswerNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
3631
3641
|
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "mb-1 block text-sm font-medium text-gray-700 dark:text-gray-300", children: t("outputVariablesLabel") }),
|
|
3632
3642
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
|
|
3633
3643
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3634
|
-
|
|
3644
|
+
chunkPBKTXX4Y_js.FormInput,
|
|
3635
3645
|
{
|
|
3636
3646
|
type: "text",
|
|
3637
3647
|
value: newVariable,
|
|
@@ -3642,7 +3652,7 @@ function AnswerNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
3642
3652
|
}
|
|
3643
3653
|
),
|
|
3644
3654
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3645
|
-
|
|
3655
|
+
chunkPBKTXX4Y_js.Button,
|
|
3646
3656
|
{
|
|
3647
3657
|
type: "button",
|
|
3648
3658
|
onClick: handleAddVariable,
|
|
@@ -3657,7 +3667,7 @@ function AnswerNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
3657
3667
|
children: [
|
|
3658
3668
|
variable,
|
|
3659
3669
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3660
|
-
|
|
3670
|
+
chunkPBKTXX4Y_js.IconButton,
|
|
3661
3671
|
{
|
|
3662
3672
|
onClick: () => handleRemoveVariable(variable),
|
|
3663
3673
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.XMarkIcon, { className: "h-3 w-3" }),
|
|
@@ -4093,7 +4103,7 @@ function VariableAggregatorNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
4093
4103
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-1 block text-sm font-medium text-gray-700 dark:text-gray-300", children: t("inputVariablesLabel") }),
|
|
4094
4104
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
|
|
4095
4105
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4096
|
-
|
|
4106
|
+
chunkPBKTXX4Y_js.FormInput,
|
|
4097
4107
|
{
|
|
4098
4108
|
type: "text",
|
|
4099
4109
|
value: newVariable,
|
|
@@ -4104,7 +4114,7 @@ function VariableAggregatorNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
4104
4114
|
}
|
|
4105
4115
|
),
|
|
4106
4116
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4107
|
-
|
|
4117
|
+
chunkPBKTXX4Y_js.Button,
|
|
4108
4118
|
{
|
|
4109
4119
|
type: "button",
|
|
4110
4120
|
onClick: handleAddVariable,
|
|
@@ -4112,10 +4122,10 @@ function VariableAggregatorNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
4112
4122
|
}
|
|
4113
4123
|
)
|
|
4114
4124
|
] }),
|
|
4115
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3 space-y-2", children: inputVariables.map((variable, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4125
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3 space-y-2", children: inputVariables.map((variable, index) => /* @__PURE__ */ jsxRuntime.jsx(chunkPBKTXX4Y_js.Card, { className: "border-purple-200/70 dark:border-purple-500/30", children: /* @__PURE__ */ jsxRuntime.jsx(chunkPBKTXX4Y_js.CardContent, { className: "p-3", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
4116
4126
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex min-w-6 items-center justify-center rounded-full bg-purple-100 px-1.5 py-0.5 text-[10px] font-semibold text-purple-700 dark:bg-purple-500/20 dark:text-purple-300", children: index + 1 }),
|
|
4117
4127
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4118
|
-
|
|
4128
|
+
chunkPBKTXX4Y_js.FormInput,
|
|
4119
4129
|
{
|
|
4120
4130
|
type: "text",
|
|
4121
4131
|
value: variable,
|
|
@@ -4125,7 +4135,7 @@ function VariableAggregatorNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
4125
4135
|
}
|
|
4126
4136
|
),
|
|
4127
4137
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4128
|
-
|
|
4138
|
+
chunkPBKTXX4Y_js.IconButton,
|
|
4129
4139
|
{
|
|
4130
4140
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.XMarkIcon, { className: "h-3 w-3" }),
|
|
4131
4141
|
label: `Remove ${variable || index + 1}`,
|
|
@@ -4137,7 +4147,7 @@ function VariableAggregatorNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
4137
4147
|
] }) }) }, `${index}-${variable}`)) })
|
|
4138
4148
|
] }),
|
|
4139
4149
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4140
|
-
|
|
4150
|
+
chunkPBKTXX4Y_js.FormInput,
|
|
4141
4151
|
{
|
|
4142
4152
|
type: "text",
|
|
4143
4153
|
label: t("outputVariableLabel"),
|
|
@@ -4147,7 +4157,7 @@ function VariableAggregatorNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
4147
4157
|
}
|
|
4148
4158
|
),
|
|
4149
4159
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4150
|
-
|
|
4160
|
+
chunkPBKTXX4Y_js.FormSelect,
|
|
4151
4161
|
{
|
|
4152
4162
|
label: t("aggregationModeLabel"),
|
|
4153
4163
|
value: aggregationMode,
|
|
@@ -4180,7 +4190,7 @@ function DocumentExtractorNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
4180
4190
|
};
|
|
4181
4191
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
4182
4192
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4183
|
-
|
|
4193
|
+
chunkPBKTXX4Y_js.FormSelect,
|
|
4184
4194
|
{
|
|
4185
4195
|
label: t("extractionModeLabel"),
|
|
4186
4196
|
value: extractionMode,
|
|
@@ -4189,7 +4199,7 @@ function DocumentExtractorNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
4189
4199
|
}
|
|
4190
4200
|
),
|
|
4191
4201
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4192
|
-
|
|
4202
|
+
chunkPBKTXX4Y_js.FormInput,
|
|
4193
4203
|
{
|
|
4194
4204
|
type: "text",
|
|
4195
4205
|
label: t("outputVariableLabel"),
|
|
@@ -4366,7 +4376,7 @@ function IterationStartNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
4366
4376
|
};
|
|
4367
4377
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
4368
4378
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4369
|
-
|
|
4379
|
+
chunkPBKTXX4Y_js.FormInput,
|
|
4370
4380
|
{
|
|
4371
4381
|
type: "text",
|
|
4372
4382
|
label: t("iteratorVariableLabel"),
|
|
@@ -4376,7 +4386,7 @@ function IterationStartNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
4376
4386
|
}
|
|
4377
4387
|
),
|
|
4378
4388
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4379
|
-
|
|
4389
|
+
chunkPBKTXX4Y_js.FormInput,
|
|
4380
4390
|
{
|
|
4381
4391
|
type: "text",
|
|
4382
4392
|
label: t("itemVariableLabel"),
|
|
@@ -4386,7 +4396,7 @@ function IterationStartNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
4386
4396
|
}
|
|
4387
4397
|
),
|
|
4388
4398
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4389
|
-
|
|
4399
|
+
chunkPBKTXX4Y_js.FormInput,
|
|
4390
4400
|
{
|
|
4391
4401
|
type: "text",
|
|
4392
4402
|
label: t("indexVariableLabel"),
|
|
@@ -4980,7 +4990,7 @@ function GroupNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
4980
4990
|
};
|
|
4981
4991
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
4982
4992
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4983
|
-
|
|
4993
|
+
chunkPBKTXX4Y_js.FormInput,
|
|
4984
4994
|
{
|
|
4985
4995
|
type: "text",
|
|
4986
4996
|
label: translations("labelField"),
|
|
@@ -4990,7 +5000,7 @@ function GroupNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
4990
5000
|
}
|
|
4991
5001
|
),
|
|
4992
5002
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4993
|
-
|
|
5003
|
+
chunkPBKTXX4Y_js.FormTextarea,
|
|
4994
5004
|
{
|
|
4995
5005
|
label: translations("descriptionField"),
|
|
4996
5006
|
value: description,
|
|
@@ -5045,12 +5055,12 @@ var NODE_TITLE_KEYS = {
|
|
|
5045
5055
|
datasource: "datasourceNodeConfig",
|
|
5046
5056
|
group: "groupNodeConfig"
|
|
5047
5057
|
};
|
|
5048
|
-
function
|
|
5058
|
+
function LogicNodeModal({ onSave, entities = [], datasources = [], onLoadTables, onLoadSchema }) {
|
|
5049
5059
|
const t = chunkYXN2K77G_js.useTranslations("agents.workflow");
|
|
5050
|
-
const
|
|
5051
|
-
const logicNodeData =
|
|
5052
|
-
const
|
|
5053
|
-
const open =
|
|
5060
|
+
const activeModal = useModalStore((s) => s.activeModal);
|
|
5061
|
+
const logicNodeData = useModalStore((s) => s.logicNodeData);
|
|
5062
|
+
const closeModal = useModalStore((s) => s.closeModal);
|
|
5063
|
+
const open = activeModal === "logic-node";
|
|
5054
5064
|
const nodeId = logicNodeData?.nodeId ?? null;
|
|
5055
5065
|
const nodeLabel = logicNodeData?.nodeLabel ?? "";
|
|
5056
5066
|
const config = logicNodeData?.config ?? null;
|
|
@@ -5066,37 +5076,37 @@ function LogicNodeDrawer({ onSave, entities = [], datasources = [], onLoadTables
|
|
|
5066
5076
|
const renderForm = () => {
|
|
5067
5077
|
switch (config.type) {
|
|
5068
5078
|
case "start":
|
|
5069
|
-
return /* @__PURE__ */ jsxRuntime.jsx(StartNodeConfigForm, { config, onSave: handleSave, onCancel:
|
|
5079
|
+
return /* @__PURE__ */ jsxRuntime.jsx(StartNodeConfigForm, { config, onSave: handleSave, onCancel: closeModal });
|
|
5070
5080
|
case "end":
|
|
5071
|
-
return /* @__PURE__ */ jsxRuntime.jsx(EndNodeConfigForm, { config, onSave: handleSave, onCancel:
|
|
5081
|
+
return /* @__PURE__ */ jsxRuntime.jsx(EndNodeConfigForm, { config, onSave: handleSave, onCancel: closeModal });
|
|
5072
5082
|
case "if_else":
|
|
5073
|
-
return /* @__PURE__ */ jsxRuntime.jsx(IfElseNodeConfigForm, { config, onSave: handleSave, onCancel:
|
|
5083
|
+
return /* @__PURE__ */ jsxRuntime.jsx(IfElseNodeConfigForm, { config, onSave: handleSave, onCancel: closeModal });
|
|
5074
5084
|
case "code":
|
|
5075
|
-
return /* @__PURE__ */ jsxRuntime.jsx(CodeNodeConfigForm, { config, onSave: handleSave, onCancel:
|
|
5085
|
+
return /* @__PURE__ */ jsxRuntime.jsx(CodeNodeConfigForm, { config, onSave: handleSave, onCancel: closeModal });
|
|
5076
5086
|
case "http_request":
|
|
5077
|
-
return /* @__PURE__ */ jsxRuntime.jsx(HttpRequestNodeConfigForm, { config, onSave: handleSave, onCancel:
|
|
5087
|
+
return /* @__PURE__ */ jsxRuntime.jsx(HttpRequestNodeConfigForm, { config, onSave: handleSave, onCancel: closeModal });
|
|
5078
5088
|
case "template_transform":
|
|
5079
|
-
return /* @__PURE__ */ jsxRuntime.jsx(TemplateTransformNodeConfigForm, { config, onSave: handleSave, onCancel:
|
|
5089
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TemplateTransformNodeConfigForm, { config, onSave: handleSave, onCancel: closeModal });
|
|
5080
5090
|
case "iteration":
|
|
5081
|
-
return /* @__PURE__ */ jsxRuntime.jsx(IterationNodeConfigForm, { config, onSave: handleSave, onCancel:
|
|
5091
|
+
return /* @__PURE__ */ jsxRuntime.jsx(IterationNodeConfigForm, { config, onSave: handleSave, onCancel: closeModal });
|
|
5082
5092
|
case "knowledge_base":
|
|
5083
|
-
return /* @__PURE__ */ jsxRuntime.jsx(KnowledgeBaseNodeConfigForm, { config, onSave: handleSave, onCancel:
|
|
5093
|
+
return /* @__PURE__ */ jsxRuntime.jsx(KnowledgeBaseNodeConfigForm, { config, onSave: handleSave, onCancel: closeModal });
|
|
5084
5094
|
case "answer":
|
|
5085
|
-
return /* @__PURE__ */ jsxRuntime.jsx(AnswerNodeConfigForm, { config, onSave: handleSave, onCancel:
|
|
5095
|
+
return /* @__PURE__ */ jsxRuntime.jsx(AnswerNodeConfigForm, { config, onSave: handleSave, onCancel: closeModal });
|
|
5086
5096
|
case "question_classifier":
|
|
5087
|
-
return /* @__PURE__ */ jsxRuntime.jsx(QuestionClassifierNodeConfigForm, { config, onSave: handleSave, onCancel:
|
|
5097
|
+
return /* @__PURE__ */ jsxRuntime.jsx(QuestionClassifierNodeConfigForm, { config, onSave: handleSave, onCancel: closeModal });
|
|
5088
5098
|
case "parameter_extractor":
|
|
5089
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ParameterExtractorNodeConfigForm, { config, onSave: handleSave, onCancel:
|
|
5099
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ParameterExtractorNodeConfigForm, { config, onSave: handleSave, onCancel: closeModal });
|
|
5090
5100
|
case "variable_assigner":
|
|
5091
|
-
return /* @__PURE__ */ jsxRuntime.jsx(VariableAssignerNodeConfigForm, { config, onSave: handleSave, onCancel:
|
|
5101
|
+
return /* @__PURE__ */ jsxRuntime.jsx(VariableAssignerNodeConfigForm, { config, onSave: handleSave, onCancel: closeModal });
|
|
5092
5102
|
case "variable_aggregator":
|
|
5093
|
-
return /* @__PURE__ */ jsxRuntime.jsx(VariableAggregatorNodeConfigForm, { config, onSave: handleSave, onCancel:
|
|
5103
|
+
return /* @__PURE__ */ jsxRuntime.jsx(VariableAggregatorNodeConfigForm, { config, onSave: handleSave, onCancel: closeModal });
|
|
5094
5104
|
case "document_extractor":
|
|
5095
|
-
return /* @__PURE__ */ jsxRuntime.jsx(DocumentExtractorNodeConfigForm, { config, onSave: handleSave, onCancel:
|
|
5105
|
+
return /* @__PURE__ */ jsxRuntime.jsx(DocumentExtractorNodeConfigForm, { config, onSave: handleSave, onCancel: closeModal });
|
|
5096
5106
|
case "list_operator":
|
|
5097
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ListOperatorNodeConfigForm, { config, onSave: handleSave, onCancel:
|
|
5107
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ListOperatorNodeConfigForm, { config, onSave: handleSave, onCancel: closeModal });
|
|
5098
5108
|
case "iteration_start":
|
|
5099
|
-
return /* @__PURE__ */ jsxRuntime.jsx(IterationStartNodeConfigForm, { config, onSave: handleSave, onCancel:
|
|
5109
|
+
return /* @__PURE__ */ jsxRuntime.jsx(IterationStartNodeConfigForm, { config, onSave: handleSave, onCancel: closeModal });
|
|
5100
5110
|
case "datasource":
|
|
5101
5111
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5102
5112
|
DatasourceNodeConfigForm,
|
|
@@ -5104,25 +5114,25 @@ function LogicNodeDrawer({ onSave, entities = [], datasources = [], onLoadTables
|
|
|
5104
5114
|
nodeId,
|
|
5105
5115
|
config,
|
|
5106
5116
|
onSave: handleSave,
|
|
5107
|
-
onCancel:
|
|
5117
|
+
onCancel: closeModal,
|
|
5108
5118
|
datasources,
|
|
5109
5119
|
onLoadTables: onLoadTables ?? (async () => []),
|
|
5110
5120
|
onLoadSchema: onLoadSchema ?? (async () => [])
|
|
5111
5121
|
}
|
|
5112
5122
|
);
|
|
5113
5123
|
case "entity":
|
|
5114
|
-
return /* @__PURE__ */ jsxRuntime.jsx(EntityNodeConfigForm, { config, entities, onSave: handleSave, onCancel:
|
|
5124
|
+
return /* @__PURE__ */ jsxRuntime.jsx(EntityNodeConfigForm, { config, entities, onSave: handleSave, onCancel: closeModal });
|
|
5115
5125
|
case "group":
|
|
5116
|
-
return /* @__PURE__ */ jsxRuntime.jsx(GroupNodeConfigForm, { config, onSave: handleSave, onCancel:
|
|
5126
|
+
return /* @__PURE__ */ jsxRuntime.jsx(GroupNodeConfigForm, { config, onSave: handleSave, onCancel: closeModal });
|
|
5117
5127
|
default:
|
|
5118
5128
|
return null;
|
|
5119
5129
|
}
|
|
5120
5130
|
};
|
|
5121
5131
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5122
|
-
|
|
5132
|
+
WorkspaceModal,
|
|
5123
5133
|
{
|
|
5124
5134
|
open,
|
|
5125
|
-
onClose:
|
|
5135
|
+
onClose: closeModal,
|
|
5126
5136
|
title,
|
|
5127
5137
|
subtitle: nodeLabel,
|
|
5128
5138
|
icon: IconComponent ? /* @__PURE__ */ jsxRuntime.jsx(IconComponent, { className: "h-5 w-5 text-white" }) : void 0,
|
|
@@ -5177,7 +5187,7 @@ function NodeContextMenu({ position, targetId, onClose, onEdit, onDuplicate, onC
|
|
|
5177
5187
|
}
|
|
5178
5188
|
];
|
|
5179
5189
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5180
|
-
|
|
5190
|
+
chunkPBKTXX4Y_js.ContextMenu,
|
|
5181
5191
|
{
|
|
5182
5192
|
position,
|
|
5183
5193
|
onClose,
|
|
@@ -5234,7 +5244,7 @@ function PanelContextMenu({ position, onClose, onPaste, onSelectAll, onFitView,
|
|
|
5234
5244
|
}
|
|
5235
5245
|
];
|
|
5236
5246
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5237
|
-
|
|
5247
|
+
chunkPBKTXX4Y_js.ContextMenu,
|
|
5238
5248
|
{
|
|
5239
5249
|
position,
|
|
5240
5250
|
onClose,
|
|
@@ -5381,7 +5391,7 @@ function SelectionContextMenu({
|
|
|
5381
5391
|
}
|
|
5382
5392
|
];
|
|
5383
5393
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5384
|
-
|
|
5394
|
+
chunkPBKTXX4Y_js.ContextMenu,
|
|
5385
5395
|
{
|
|
5386
5396
|
position,
|
|
5387
5397
|
onClose,
|
|
@@ -5545,21 +5555,21 @@ function WorkflowCanvasInner({
|
|
|
5545
5555
|
onAgentSaved,
|
|
5546
5556
|
isCreatingAgent = false,
|
|
5547
5557
|
nodeTypes: externalNodeTypes,
|
|
5548
|
-
|
|
5549
|
-
|
|
5558
|
+
renderAgentModal,
|
|
5559
|
+
renderLogicNodeModal: _renderLogicNodeModal
|
|
5550
5560
|
}) {
|
|
5551
5561
|
const { screenToFlowPosition, getNode, toObject, fitView, zoomIn, zoomOut, zoomTo } = react$1.useReactFlow();
|
|
5552
5562
|
const tWorkflow = chunkYXN2K77G_js.useTranslations("agents.workflow");
|
|
5553
5563
|
const sortedAgents = react.useMemo(() => [...agents].sort((agentA, agentB) => (agentA.order ?? 0) - (agentB.order ?? 0)), [agents]);
|
|
5554
5564
|
const [selectedAgentId, setSelectedAgentId] = react.useState(null);
|
|
5555
|
-
const
|
|
5556
|
-
const
|
|
5557
|
-
const
|
|
5558
|
-
const
|
|
5559
|
-
const
|
|
5565
|
+
const openAgentModalAction = useModalStore((s) => s.openAgentModal);
|
|
5566
|
+
const openLogicNodeModalAction = useModalStore((s) => s.openLogicNodeModal);
|
|
5567
|
+
const closeModalAction = useModalStore((s) => s.closeModal);
|
|
5568
|
+
const activeModal = useModalStore((s) => s.activeModal);
|
|
5569
|
+
const modalOpen = activeModal === "agent";
|
|
5560
5570
|
react.useEffect(() => {
|
|
5561
5571
|
if (isCreatingAgent) {
|
|
5562
|
-
|
|
5572
|
+
openAgentModalAction(
|
|
5563
5573
|
{ agentId: "", name: "", order: 0, enabled: true, temperature: 0.7, maxTokens: 4096 },
|
|
5564
5574
|
models,
|
|
5565
5575
|
true
|
|
@@ -5608,10 +5618,10 @@ function WorkflowCanvasInner({
|
|
|
5608
5618
|
const nodeData = node.data;
|
|
5609
5619
|
const config = nodeData.config;
|
|
5610
5620
|
if (config) {
|
|
5611
|
-
|
|
5621
|
+
openLogicNodeModalAction(nodeId, nodeData.label ?? "", config);
|
|
5612
5622
|
}
|
|
5613
5623
|
}
|
|
5614
|
-
}, [getNode,
|
|
5624
|
+
}, [getNode, openLogicNodeModalAction]);
|
|
5615
5625
|
const agentMap = react.useMemo(() => {
|
|
5616
5626
|
const map = /* @__PURE__ */ new Map();
|
|
5617
5627
|
for (const agent of agents) {
|
|
@@ -5702,7 +5712,7 @@ function WorkflowCanvasInner({
|
|
|
5702
5712
|
selected: selectedAgentId === savedNode.id,
|
|
5703
5713
|
onSelect: () => {
|
|
5704
5714
|
setSelectedAgentId(agent.agentId);
|
|
5705
|
-
|
|
5715
|
+
openAgentModalAction(agent, models);
|
|
5706
5716
|
},
|
|
5707
5717
|
onRemoveFromCanvas: handleRemoveNodeFromCanvas
|
|
5708
5718
|
}
|
|
@@ -5813,7 +5823,7 @@ function WorkflowCanvasInner({
|
|
|
5813
5823
|
};
|
|
5814
5824
|
}
|
|
5815
5825
|
if (isLogicNodeType(savedNode.type)) {
|
|
5816
|
-
const config = savedNode.data.config ??
|
|
5826
|
+
const config = savedNode.data.config ?? chunkPWBWP5FJ_js.createDefaultLogicNodeConfig(savedNode.type);
|
|
5817
5827
|
if (config) {
|
|
5818
5828
|
const baseNode = {
|
|
5819
5829
|
id: savedNode.id,
|
|
@@ -5982,7 +5992,7 @@ function WorkflowCanvasInner({
|
|
|
5982
5992
|
}
|
|
5983
5993
|
storeTakeSnapshot();
|
|
5984
5994
|
const isTB = direction === "TB";
|
|
5985
|
-
const repositionedNodes =
|
|
5995
|
+
const repositionedNodes = chunkPWBWP5FJ_js.applyDagreLayout(nodes, edges, direction).map((node) => ({
|
|
5986
5996
|
...node,
|
|
5987
5997
|
sourcePosition: isTB ? react$1.Position.Bottom : react$1.Position.Right,
|
|
5988
5998
|
targetPosition: isTB ? react$1.Position.Top : react$1.Position.Left
|
|
@@ -6053,7 +6063,7 @@ function WorkflowCanvasInner({
|
|
|
6053
6063
|
const agent = targetNode.data?.agent;
|
|
6054
6064
|
if (agent) {
|
|
6055
6065
|
setSelectedAgentId(agent.agentId ?? agent.id ?? null);
|
|
6056
|
-
|
|
6066
|
+
openAgentModalAction(agent, models);
|
|
6057
6067
|
}
|
|
6058
6068
|
} else if (targetNode.type === "tool") {
|
|
6059
6069
|
const tool = targetNode.data?.tool;
|
|
@@ -6063,7 +6073,7 @@ function WorkflowCanvasInner({
|
|
|
6063
6073
|
} else {
|
|
6064
6074
|
handleEditLogicNode(nodeId);
|
|
6065
6075
|
}
|
|
6066
|
-
}, [nodes, setSelectedAgentId,
|
|
6076
|
+
}, [nodes, setSelectedAgentId, openAgentModalAction, models, onEditTool, onEditRule, handleEditLogicNode]);
|
|
6067
6077
|
const DUPLICATE_OFFSET = 40;
|
|
6068
6078
|
const contextMenuDuplicateNode = react.useCallback((nodeId) => {
|
|
6069
6079
|
storeTakeSnapshot();
|
|
@@ -6111,7 +6121,7 @@ function WorkflowCanvasInner({
|
|
|
6111
6121
|
}, [storePaste]);
|
|
6112
6122
|
const contextMenuAddNote = react.useCallback((flowPosition) => {
|
|
6113
6123
|
storeTakeSnapshot();
|
|
6114
|
-
const noteConfig =
|
|
6124
|
+
const noteConfig = chunkPWBWP5FJ_js.createDefaultLogicNodeConfig("note");
|
|
6115
6125
|
const noteNode = {
|
|
6116
6126
|
id: crypto.randomUUID(),
|
|
6117
6127
|
type: "note",
|
|
@@ -6544,7 +6554,7 @@ function WorkflowCanvasInner({
|
|
|
6544
6554
|
selected: false,
|
|
6545
6555
|
onSelect: () => {
|
|
6546
6556
|
setSelectedAgentId(agent.agentId);
|
|
6547
|
-
|
|
6557
|
+
openAgentModalAction(agent, models);
|
|
6548
6558
|
},
|
|
6549
6559
|
onRemoveFromCanvas: handleRemoveNodeFromCanvas
|
|
6550
6560
|
}
|
|
@@ -6614,7 +6624,7 @@ function WorkflowCanvasInner({
|
|
|
6614
6624
|
};
|
|
6615
6625
|
setNodes((currentNodes) => [...currentNodes, newNode]);
|
|
6616
6626
|
} else if (nodeType === "group") {
|
|
6617
|
-
const groupConfig = configRaw ? JSON.parse(configRaw) :
|
|
6627
|
+
const groupConfig = configRaw ? JSON.parse(configRaw) : chunkPWBWP5FJ_js.createDefaultLogicNodeConfig("group");
|
|
6618
6628
|
if (!groupConfig) return;
|
|
6619
6629
|
const newNode = {
|
|
6620
6630
|
id: newNodeId,
|
|
@@ -6631,7 +6641,7 @@ function WorkflowCanvasInner({
|
|
|
6631
6641
|
};
|
|
6632
6642
|
setNodes((currentNodes) => [...currentNodes, newNode]);
|
|
6633
6643
|
} else if (isLogicNodeType(nodeType)) {
|
|
6634
|
-
const config = configRaw ? JSON.parse(configRaw) :
|
|
6644
|
+
const config = configRaw ? JSON.parse(configRaw) : chunkPWBWP5FJ_js.createDefaultLogicNodeConfig(nodeType);
|
|
6635
6645
|
if (!config) return;
|
|
6636
6646
|
const newNode = {
|
|
6637
6647
|
id: newNodeId,
|
|
@@ -6748,7 +6758,7 @@ function WorkflowCanvasInner({
|
|
|
6748
6758
|
(edgeId, nodeType, position) => {
|
|
6749
6759
|
if (!isLogicNodeType(nodeType)) return;
|
|
6750
6760
|
storeTakeSnapshot();
|
|
6751
|
-
const config =
|
|
6761
|
+
const config = chunkPWBWP5FJ_js.createDefaultLogicNodeConfig(nodeType);
|
|
6752
6762
|
if (!config) return;
|
|
6753
6763
|
const newNodeId = crypto.randomUUID();
|
|
6754
6764
|
const newNode = {
|
|
@@ -7000,29 +7010,29 @@ function WorkflowCanvasInner({
|
|
|
7000
7010
|
}
|
|
7001
7011
|
)
|
|
7002
7012
|
] }),
|
|
7003
|
-
|
|
7013
|
+
renderAgentModal?.({
|
|
7004
7014
|
agent: selectedAgent,
|
|
7005
7015
|
models,
|
|
7006
|
-
open:
|
|
7016
|
+
open: modalOpen || isCreatingAgent,
|
|
7007
7017
|
isCreateMode: isCreatingAgent,
|
|
7008
7018
|
onClose: () => {
|
|
7009
|
-
|
|
7019
|
+
closeModalAction();
|
|
7010
7020
|
setSelectedAgentId(null);
|
|
7011
7021
|
if (isCreatingAgent) onCancelCreateAgent?.();
|
|
7012
7022
|
},
|
|
7013
7023
|
onSaved: () => {
|
|
7014
|
-
|
|
7024
|
+
closeModalAction();
|
|
7015
7025
|
setSelectedAgentId(null);
|
|
7016
7026
|
if (isCreatingAgent) onCancelCreateAgent?.();
|
|
7017
7027
|
onAgentSaved?.();
|
|
7018
7028
|
}
|
|
7019
7029
|
}),
|
|
7020
7030
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7021
|
-
|
|
7031
|
+
LogicNodeModal,
|
|
7022
7032
|
{
|
|
7023
7033
|
onSave: (nodeId, config) => {
|
|
7024
7034
|
handleSaveLogicNodeConfig(nodeId, config);
|
|
7025
|
-
|
|
7035
|
+
closeModalAction();
|
|
7026
7036
|
setEditingLogicNodeId(null);
|
|
7027
7037
|
},
|
|
7028
7038
|
entities: allEntities
|
|
@@ -7190,7 +7200,7 @@ exports.LOGIC_NODE_GRADIENTS = LOGIC_NODE_GRADIENTS;
|
|
|
7190
7200
|
exports.LOGIC_NODE_HANDLE_COLORS = LOGIC_NODE_HANDLE_COLORS;
|
|
7191
7201
|
exports.LangChainIcon = LangChainIcon;
|
|
7192
7202
|
exports.ListOperatorFlowNode = ListOperatorFlowNode;
|
|
7193
|
-
exports.
|
|
7203
|
+
exports.LogicNodeModal = LogicNodeModal;
|
|
7194
7204
|
exports.MINIMAP_NODE_COLORS = MINIMAP_NODE_COLORS;
|
|
7195
7205
|
exports.NodeCard = NodeCard;
|
|
7196
7206
|
exports.NodeContextMenu = NodeContextMenu;
|
|
@@ -7210,7 +7220,7 @@ exports.VariableAssignerFlowNode = VariableAssignerFlowNode;
|
|
|
7210
7220
|
exports.WorkflowBuilderProvider = WorkflowBuilderProvider;
|
|
7211
7221
|
exports.WorkflowCanvas = WorkflowCanvas;
|
|
7212
7222
|
exports.Workspace = Workspace;
|
|
7213
|
-
exports.
|
|
7223
|
+
exports.WorkspaceModal = WorkspaceModal;
|
|
7214
7224
|
exports.getCompatibleModels = getCompatibleModels;
|
|
7215
7225
|
exports.getDefaultFrameworkForModel = getDefaultFrameworkForModel;
|
|
7216
7226
|
exports.getEntityBadgeColor = getEntityBadgeColor;
|
|
@@ -7220,9 +7230,9 @@ exports.getEntityIcon = getEntityIcon;
|
|
|
7220
7230
|
exports.getEntityMinimapColor = getEntityMinimapColor;
|
|
7221
7231
|
exports.getFrameworkMeta = getFrameworkMeta;
|
|
7222
7232
|
exports.isModelCompatibleWithFramework = isModelCompatibleWithFramework;
|
|
7223
|
-
exports.
|
|
7233
|
+
exports.useModalStore = useModalStore;
|
|
7224
7234
|
exports.useWorkflowBuilderClient = useWorkflowBuilderClient;
|
|
7225
7235
|
exports.useWorkflowBuilderClientOptional = useWorkflowBuilderClientOptional;
|
|
7226
7236
|
exports.useWorkflowStore = useWorkflowStore;
|
|
7227
|
-
//# sourceMappingURL=chunk-
|
|
7228
|
-
//# sourceMappingURL=chunk-
|
|
7237
|
+
//# sourceMappingURL=chunk-XAQME7DD.js.map
|
|
7238
|
+
//# sourceMappingURL=chunk-XAQME7DD.js.map
|