@datatechsolutions/ui 2.11.5 → 2.11.7
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/index.js +273 -174
- package/dist/astrlabe/index.js.map +1 -1
- package/dist/astrlabe/index.mjs +162 -60
- package/dist/astrlabe/index.mjs.map +1 -1
- package/dist/astrlabe/workflow-canvas.js +3 -3
- package/dist/astrlabe/workflow-canvas.mjs +2 -2
- package/dist/{chunk-F6EBSQF6.mjs → chunk-46ZM5VJJ.mjs} +5 -5
- package/dist/chunk-46ZM5VJJ.mjs.map +1 -0
- package/dist/{chunk-EVX2CFNL.js → chunk-4XID6LOC.js} +5 -5
- package/dist/chunk-4XID6LOC.js.map +1 -0
- package/dist/{chunk-45UHTVTJ.mjs → chunk-76MHUX4T.mjs} +207 -334
- package/dist/chunk-76MHUX4T.mjs.map +1 -0
- package/dist/{chunk-BONTO5LJ.js → chunk-TKLALDY4.js} +239 -367
- package/dist/chunk-TKLALDY4.js.map +1 -0
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +710 -710
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-45UHTVTJ.mjs.map +0 -1
- package/dist/chunk-BONTO5LJ.js.map +0 -1
- package/dist/chunk-EVX2CFNL.js.map +0 -1
- package/dist/chunk-F6EBSQF6.mjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { GlassModalShell, ContextMenu, FormInput, FormTextarea, FormSelect, Button,
|
|
2
|
+
import { GlassModalShell, ContextMenu, FormInput, FormTextarea, FormSelect, Button, IconButton } from './chunk-46ZM5VJJ.mjs';
|
|
3
3
|
import { GraphNodeHeader, GraphNodeMeta, GraphNodeBadge, GraphNodeIconBubble } from './chunk-OZNTQROP.mjs';
|
|
4
4
|
import { getAgentTier, createDefaultLogicNodeConfig, applyDagreLayout } from './chunk-TLPPVL3W.mjs';
|
|
5
5
|
import { useTranslations, I18nProvider, createI18nFromMessages } from './chunk-7VJ7CMMT.mjs';
|
|
@@ -2888,239 +2888,214 @@ var GroupFlowNode = memo(function GroupFlowNode2({ id, data, selected }) {
|
|
|
2888
2888
|
/* @__PURE__ */ jsx(WorkflowHandle, { type: "source", position: Position.Right, id: "right-out", colorClass: "!bg-slate-500" })
|
|
2889
2889
|
] });
|
|
2890
2890
|
});
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
};
|
|
2898
|
-
function WorkspaceModal({
|
|
2899
|
-
open,
|
|
2900
|
-
onClose,
|
|
2901
|
-
title,
|
|
2902
|
-
subtitle,
|
|
2903
|
-
icon,
|
|
2904
|
-
gradient = "from-gray-400 to-gray-500",
|
|
2905
|
-
maxWidth = "2xl",
|
|
2906
|
-
tabs,
|
|
2907
|
-
children
|
|
2891
|
+
function ConfigFormActions({
|
|
2892
|
+
cancelLabel,
|
|
2893
|
+
saveLabel,
|
|
2894
|
+
onCancel,
|
|
2895
|
+
onSave,
|
|
2896
|
+
saveDisabled = false
|
|
2908
2897
|
}) {
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
open,
|
|
2914
|
-
onClose,
|
|
2915
|
-
title,
|
|
2916
|
-
subtitle,
|
|
2917
|
-
icon,
|
|
2918
|
-
gradient,
|
|
2919
|
-
maxWidth: resolvedSize,
|
|
2920
|
-
children: [
|
|
2921
|
-
tabs,
|
|
2922
|
-
children
|
|
2923
|
-
]
|
|
2924
|
-
}
|
|
2925
|
-
);
|
|
2898
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2 border-t border-gray-200 pt-4 dark:border-gray-700", children: [
|
|
2899
|
+
/* @__PURE__ */ jsx(Button, { type: "button", outline: true, onClick: onCancel, children: cancelLabel }),
|
|
2900
|
+
/* @__PURE__ */ jsx(Button, { type: "button", onClick: onSave, disabled: saveDisabled, children: saveLabel })
|
|
2901
|
+
] });
|
|
2926
2902
|
}
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2903
|
+
var COLOR_CLASSES = {
|
|
2904
|
+
green: {
|
|
2905
|
+
badge: "bg-green-100 text-green-700 dark:bg-green-500/20 dark:text-green-300",
|
|
2906
|
+
input: "focus:border-green-400 focus:ring-green-400/20",
|
|
2907
|
+
row: "border-green-200/30 dark:border-green-500/15",
|
|
2908
|
+
add: "text-green-600 hover:text-green-700 dark:text-green-400 dark:hover:text-green-300",
|
|
2909
|
+
dot: "bg-green-500"
|
|
2910
|
+
},
|
|
2911
|
+
blue: {
|
|
2912
|
+
badge: "bg-blue-100 text-blue-700 dark:bg-blue-500/20 dark:text-blue-300",
|
|
2913
|
+
input: "focus:border-blue-400 focus:ring-blue-400/20",
|
|
2914
|
+
row: "border-blue-200/30 dark:border-blue-500/15",
|
|
2915
|
+
add: "text-blue-600 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300",
|
|
2916
|
+
dot: "bg-blue-500"
|
|
2917
|
+
},
|
|
2918
|
+
purple: {
|
|
2919
|
+
badge: "bg-purple-100 text-purple-700 dark:bg-purple-500/20 dark:text-purple-300",
|
|
2920
|
+
input: "focus:border-purple-400 focus:ring-purple-400/20",
|
|
2921
|
+
row: "border-purple-200/30 dark:border-purple-500/15",
|
|
2922
|
+
add: "text-purple-600 hover:text-purple-700 dark:text-purple-400 dark:hover:text-purple-300",
|
|
2923
|
+
dot: "bg-purple-500"
|
|
2924
|
+
},
|
|
2925
|
+
red: {
|
|
2926
|
+
badge: "bg-red-100 text-red-700 dark:bg-red-500/20 dark:text-red-300",
|
|
2927
|
+
input: "focus:border-red-400 focus:ring-red-400/20",
|
|
2928
|
+
row: "border-red-200/30 dark:border-red-500/15",
|
|
2929
|
+
add: "text-red-600 hover:text-red-700 dark:text-red-400 dark:hover:text-red-300",
|
|
2930
|
+
dot: "bg-red-500"
|
|
2931
|
+
},
|
|
2932
|
+
teal: {
|
|
2933
|
+
badge: "bg-teal-100 text-teal-700 dark:bg-teal-500/20 dark:text-teal-300",
|
|
2934
|
+
input: "focus:border-teal-400 focus:ring-teal-400/20",
|
|
2935
|
+
row: "border-teal-200/30 dark:border-teal-500/15",
|
|
2936
|
+
add: "text-teal-600 hover:text-teal-700 dark:text-teal-400 dark:hover:text-teal-300",
|
|
2937
|
+
dot: "bg-teal-500"
|
|
2938
|
+
}
|
|
2939
|
+
};
|
|
2940
|
+
function VariableListEditor({
|
|
2941
|
+
variables,
|
|
2942
|
+
onChange,
|
|
2943
|
+
placeholder = "Variable name",
|
|
2944
|
+
label,
|
|
2945
|
+
addLabel = "Add",
|
|
2946
|
+
color = "green",
|
|
2947
|
+
numbered = false,
|
|
2948
|
+
editable = false,
|
|
2949
|
+
max = 0
|
|
2950
|
+
}) {
|
|
2930
2951
|
const [newVariable, setNewVariable] = useState("");
|
|
2931
|
-
const
|
|
2952
|
+
const inputRef = useRef(null);
|
|
2953
|
+
const colors = COLOR_CLASSES[color];
|
|
2954
|
+
const canAdd = max === 0 || variables.length < max;
|
|
2955
|
+
const handleAdd = useCallback(() => {
|
|
2932
2956
|
const trimmed = newVariable.trim();
|
|
2933
|
-
if (trimmed
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
};
|
|
2938
|
-
const
|
|
2939
|
-
|
|
2940
|
-
};
|
|
2941
|
-
const
|
|
2957
|
+
if (!trimmed || variables.includes(trimmed)) return;
|
|
2958
|
+
onChange([...variables, trimmed]);
|
|
2959
|
+
setNewVariable("");
|
|
2960
|
+
inputRef.current?.focus();
|
|
2961
|
+
}, [newVariable, variables, onChange]);
|
|
2962
|
+
const handleRemove = useCallback((index) => {
|
|
2963
|
+
onChange(variables.filter((_, i) => i !== index));
|
|
2964
|
+
}, [variables, onChange]);
|
|
2965
|
+
const handleEdit = useCallback((index, value) => {
|
|
2966
|
+
const updated = [...variables];
|
|
2967
|
+
updated[index] = value;
|
|
2968
|
+
onChange(updated);
|
|
2969
|
+
}, [variables, onChange]);
|
|
2970
|
+
const handleKeyDown = useCallback((event) => {
|
|
2942
2971
|
if (event.key === "Enter") {
|
|
2943
2972
|
event.preventDefault();
|
|
2944
|
-
|
|
2973
|
+
handleAdd();
|
|
2945
2974
|
}
|
|
2946
|
-
};
|
|
2975
|
+
}, [handleAdd]);
|
|
2976
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
2977
|
+
label && /* @__PURE__ */ jsx("label", { className: "mb-2 block text-xs font-medium text-gray-500 dark:text-gray-400", children: label }),
|
|
2978
|
+
variables.length > 0 && /* @__PURE__ */ jsx("div", { className: "mb-2 space-y-1", children: variables.map((variable, index) => /* @__PURE__ */ jsxs(
|
|
2979
|
+
"div",
|
|
2980
|
+
{
|
|
2981
|
+
className: `group flex items-center gap-2 rounded-lg border px-2.5 py-1.5 transition-colors ${colors.row} hover:bg-white/5`,
|
|
2982
|
+
children: [
|
|
2983
|
+
numbered ? /* @__PURE__ */ jsx("span", { className: `inline-flex h-5 min-w-5 items-center justify-center rounded-full text-[10px] font-bold ${colors.badge}`, children: index + 1 }) : /* @__PURE__ */ jsx("span", { className: `h-1.5 w-1.5 shrink-0 rounded-full ${colors.dot}` }),
|
|
2984
|
+
editable ? /* @__PURE__ */ jsx(
|
|
2985
|
+
"input",
|
|
2986
|
+
{
|
|
2987
|
+
type: "text",
|
|
2988
|
+
value: variable,
|
|
2989
|
+
onChange: (event) => handleEdit(index, event.target.value),
|
|
2990
|
+
className: `flex-1 rounded-md border-0 bg-transparent px-1 py-0.5 text-sm font-medium text-gray-900 outline-none ${colors.input} focus:ring-1 dark:text-white`
|
|
2991
|
+
}
|
|
2992
|
+
) : /* @__PURE__ */ jsx("span", { className: "flex-1 text-sm font-medium text-gray-900 dark:text-white", children: variable }),
|
|
2993
|
+
/* @__PURE__ */ jsx(
|
|
2994
|
+
"button",
|
|
2995
|
+
{
|
|
2996
|
+
type: "button",
|
|
2997
|
+
onClick: () => handleRemove(index),
|
|
2998
|
+
className: "shrink-0 rounded p-0.5 text-gray-400 opacity-0 transition-all hover:bg-red-100 hover:text-red-500 group-hover:opacity-100 dark:hover:bg-red-500/10 dark:hover:text-red-400",
|
|
2999
|
+
"aria-label": `Remove ${variable}`,
|
|
3000
|
+
children: /* @__PURE__ */ jsx(XMarkIcon$1, { className: "h-3.5 w-3.5" })
|
|
3001
|
+
}
|
|
3002
|
+
)
|
|
3003
|
+
]
|
|
3004
|
+
},
|
|
3005
|
+
`${index}-${variable}`
|
|
3006
|
+
)) }),
|
|
3007
|
+
canAdd && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
3008
|
+
/* @__PURE__ */ jsx(
|
|
3009
|
+
"input",
|
|
3010
|
+
{
|
|
3011
|
+
ref: inputRef,
|
|
3012
|
+
type: "text",
|
|
3013
|
+
value: newVariable,
|
|
3014
|
+
onChange: (event) => setNewVariable(event.target.value),
|
|
3015
|
+
onKeyDown: handleKeyDown,
|
|
3016
|
+
placeholder,
|
|
3017
|
+
className: "flex-1 rounded-lg border border-gray-200/50 bg-gray-50/50 px-3 py-1.5 text-sm text-gray-700 outline-none transition-colors placeholder:text-gray-400 focus:border-gray-300 focus:ring-1 focus:ring-gray-300/30 dark:border-white/10 dark:bg-white/5 dark:text-gray-300 dark:placeholder:text-gray-600"
|
|
3018
|
+
}
|
|
3019
|
+
),
|
|
3020
|
+
/* @__PURE__ */ jsxs(
|
|
3021
|
+
"button",
|
|
3022
|
+
{
|
|
3023
|
+
type: "button",
|
|
3024
|
+
onClick: handleAdd,
|
|
3025
|
+
disabled: !newVariable.trim(),
|
|
3026
|
+
className: `flex items-center gap-1 rounded-lg px-3 py-1.5 text-xs font-semibold transition-all disabled:cursor-not-allowed disabled:opacity-40 ${colors.add} hover:bg-white/10`,
|
|
3027
|
+
children: [
|
|
3028
|
+
/* @__PURE__ */ jsx(PlusIcon$1, { className: "h-3.5 w-3.5" }),
|
|
3029
|
+
addLabel
|
|
3030
|
+
]
|
|
3031
|
+
}
|
|
3032
|
+
)
|
|
3033
|
+
] }),
|
|
3034
|
+
variables.length === 0 && !canAdd && /* @__PURE__ */ jsx("p", { className: "text-xs text-gray-400 dark:text-gray-500", children: "No variables defined" })
|
|
3035
|
+
] });
|
|
3036
|
+
}
|
|
3037
|
+
function StartNodeConfigForm({ config, onSave, onCancel }) {
|
|
3038
|
+
const t = useTranslations("agents.workflow.startNodeConfig");
|
|
3039
|
+
const [inputVariables, setInputVariables] = useState([...config.inputVariables]);
|
|
2947
3040
|
const handleSave = () => {
|
|
2948
3041
|
onSave({ ...config, inputVariables });
|
|
2949
3042
|
};
|
|
2950
3043
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
2951
3044
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
2952
|
-
/* @__PURE__ */ jsx("label", { className: "mb-1 block text-sm font-medium text-gray-700 dark:text-gray-300", children: t("inputVariablesLabel") }),
|
|
2953
3045
|
/* @__PURE__ */ jsx("p", { className: "mb-2 text-xs text-gray-500 dark:text-gray-400", children: t("inputVariablesHelp") }),
|
|
2954
|
-
/* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
|
|
2955
|
-
/* @__PURE__ */ jsx(
|
|
2956
|
-
Input,
|
|
2957
|
-
{
|
|
2958
|
-
value: newVariable,
|
|
2959
|
-
onChange: (event) => setNewVariable(event.target.value),
|
|
2960
|
-
onKeyDown: handleKeyDown,
|
|
2961
|
-
placeholder: t("variablePlaceholder"),
|
|
2962
|
-
className: "flex-1"
|
|
2963
|
-
}
|
|
2964
|
-
),
|
|
2965
|
-
/* @__PURE__ */ jsx(
|
|
2966
|
-
Button,
|
|
2967
|
-
{
|
|
2968
|
-
type: "button",
|
|
2969
|
-
onClick: handleAddVariable,
|
|
2970
|
-
outline: true,
|
|
2971
|
-
size: "sm",
|
|
2972
|
-
children: t("addVariable")
|
|
2973
|
-
}
|
|
2974
|
-
)
|
|
2975
|
-
] }),
|
|
2976
|
-
/* @__PURE__ */ jsx("div", { className: "mt-2 flex flex-wrap gap-2", children: inputVariables.map((variable) => /* @__PURE__ */ jsxs(
|
|
2977
|
-
"span",
|
|
2978
|
-
{
|
|
2979
|
-
className: "inline-flex items-center gap-1 rounded-full bg-green-100 px-2.5 py-1 text-xs font-medium text-green-700 dark:bg-green-500/20 dark:text-green-300",
|
|
2980
|
-
children: [
|
|
2981
|
-
variable,
|
|
2982
|
-
/* @__PURE__ */ jsx(
|
|
2983
|
-
IconButton,
|
|
2984
|
-
{
|
|
2985
|
-
icon: /* @__PURE__ */ jsx(XMarkIcon$1, { className: "h-3 w-3" }),
|
|
2986
|
-
label: `Remove ${variable}`,
|
|
2987
|
-
onClick: () => handleRemoveVariable(variable),
|
|
2988
|
-
variant: "ghost",
|
|
2989
|
-
size: "sm",
|
|
2990
|
-
className: "!p-0"
|
|
2991
|
-
}
|
|
2992
|
-
)
|
|
2993
|
-
]
|
|
2994
|
-
},
|
|
2995
|
-
variable
|
|
2996
|
-
)) })
|
|
2997
|
-
] }),
|
|
2998
|
-
/* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2 border-t border-gray-200 pt-4 dark:border-gray-700", children: [
|
|
2999
|
-
/* @__PURE__ */ jsx(
|
|
3000
|
-
Button,
|
|
3001
|
-
{
|
|
3002
|
-
type: "button",
|
|
3003
|
-
onClick: onCancel,
|
|
3004
|
-
outline: true,
|
|
3005
|
-
size: "sm",
|
|
3006
|
-
children: t("cancel")
|
|
3007
|
-
}
|
|
3008
|
-
),
|
|
3009
3046
|
/* @__PURE__ */ jsx(
|
|
3010
|
-
|
|
3047
|
+
VariableListEditor,
|
|
3011
3048
|
{
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3049
|
+
variables: inputVariables,
|
|
3050
|
+
onChange: setInputVariables,
|
|
3051
|
+
label: t("inputVariablesLabel"),
|
|
3052
|
+
placeholder: t("variablePlaceholder"),
|
|
3053
|
+
addLabel: t("addVariable"),
|
|
3054
|
+
color: "green"
|
|
3017
3055
|
}
|
|
3018
3056
|
)
|
|
3019
|
-
] })
|
|
3057
|
+
] }),
|
|
3058
|
+
/* @__PURE__ */ jsx(
|
|
3059
|
+
ConfigFormActions,
|
|
3060
|
+
{
|
|
3061
|
+
cancelLabel: t("cancel"),
|
|
3062
|
+
saveLabel: t("save"),
|
|
3063
|
+
onCancel,
|
|
3064
|
+
onSave: handleSave
|
|
3065
|
+
}
|
|
3066
|
+
)
|
|
3020
3067
|
] });
|
|
3021
3068
|
}
|
|
3022
3069
|
function EndNodeConfigForm({ config, onSave, onCancel }) {
|
|
3023
3070
|
const t = useTranslations("agents.workflow.endNodeConfig");
|
|
3024
3071
|
const [outputVariables, setOutputVariables] = useState([...config.outputVariables]);
|
|
3025
|
-
const [newVariable, setNewVariable] = useState("");
|
|
3026
|
-
const handleAddVariable = () => {
|
|
3027
|
-
const trimmed = newVariable.trim();
|
|
3028
|
-
if (trimmed && !outputVariables.includes(trimmed)) {
|
|
3029
|
-
setOutputVariables([...outputVariables, trimmed]);
|
|
3030
|
-
setNewVariable("");
|
|
3031
|
-
}
|
|
3032
|
-
};
|
|
3033
|
-
const handleRemoveVariable = (variable) => {
|
|
3034
|
-
setOutputVariables(outputVariables.filter((existingVariable) => existingVariable !== variable));
|
|
3035
|
-
};
|
|
3036
|
-
const handleKeyDown = (event) => {
|
|
3037
|
-
if (event.key === "Enter") {
|
|
3038
|
-
event.preventDefault();
|
|
3039
|
-
handleAddVariable();
|
|
3040
|
-
}
|
|
3041
|
-
};
|
|
3042
3072
|
const handleSave = () => {
|
|
3043
3073
|
onSave({ ...config, outputVariables });
|
|
3044
3074
|
};
|
|
3045
3075
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
3046
3076
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
3047
|
-
/* @__PURE__ */ jsx("label", { className: "mb-1 block text-sm font-medium text-gray-700 dark:text-gray-300", children: t("outputVariablesLabel") }),
|
|
3048
3077
|
/* @__PURE__ */ jsx("p", { className: "mb-2 text-xs text-gray-500 dark:text-gray-400", children: t("outputVariablesHelp") }),
|
|
3049
|
-
/* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
|
|
3050
|
-
/* @__PURE__ */ jsx(
|
|
3051
|
-
"input",
|
|
3052
|
-
{
|
|
3053
|
-
type: "text",
|
|
3054
|
-
value: newVariable,
|
|
3055
|
-
onChange: (event) => setNewVariable(event.target.value),
|
|
3056
|
-
onKeyDown: handleKeyDown,
|
|
3057
|
-
placeholder: t("variablePlaceholder"),
|
|
3058
|
-
className: "w-full flex-1 rounded-lg border border-gray-300 bg-white px-3 py-2 text-sm text-gray-900 placeholder-gray-400 outline-none focus:border-indigo-400 focus:ring-2 focus:ring-indigo-400/20 dark:border-gray-600 dark:bg-gray-800 dark:text-white dark:placeholder-gray-500"
|
|
3059
|
-
}
|
|
3060
|
-
),
|
|
3061
|
-
/* @__PURE__ */ jsx(
|
|
3062
|
-
"button",
|
|
3063
|
-
{
|
|
3064
|
-
type: "button",
|
|
3065
|
-
onClick: handleAddVariable,
|
|
3066
|
-
className: "text-sm text-indigo-600 hover:text-indigo-700 dark:text-indigo-400",
|
|
3067
|
-
children: t("addVariable")
|
|
3068
|
-
}
|
|
3069
|
-
)
|
|
3070
|
-
] }),
|
|
3071
|
-
/* @__PURE__ */ jsx("div", { className: "mt-2 flex flex-wrap gap-2", children: outputVariables.map((variable) => /* @__PURE__ */ jsxs(
|
|
3072
|
-
"span",
|
|
3073
|
-
{
|
|
3074
|
-
className: "inline-flex items-center gap-1 rounded-full bg-red-100 px-2.5 py-1 text-xs font-medium text-red-700 dark:bg-red-500/20 dark:text-red-300",
|
|
3075
|
-
children: [
|
|
3076
|
-
variable,
|
|
3077
|
-
/* @__PURE__ */ jsx(
|
|
3078
|
-
"button",
|
|
3079
|
-
{
|
|
3080
|
-
type: "button",
|
|
3081
|
-
onClick: () => handleRemoveVariable(variable),
|
|
3082
|
-
className: "text-sm text-red-500 hover:text-red-600",
|
|
3083
|
-
"aria-label": `Remove ${variable}`,
|
|
3084
|
-
children: /* @__PURE__ */ jsx(XMarkIcon$1, { className: "h-3 w-3" })
|
|
3085
|
-
}
|
|
3086
|
-
)
|
|
3087
|
-
]
|
|
3088
|
-
},
|
|
3089
|
-
variable
|
|
3090
|
-
)) })
|
|
3091
|
-
] }),
|
|
3092
|
-
/* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2 pt-4 border-t border-gray-200 dark:border-gray-700", children: [
|
|
3093
|
-
/* @__PURE__ */ jsx(
|
|
3094
|
-
"button",
|
|
3095
|
-
{
|
|
3096
|
-
type: "button",
|
|
3097
|
-
onClick: onCancel,
|
|
3098
|
-
className: "rounded-lg border border-gray-300 px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 dark:border-gray-600 dark:text-gray-300 dark:hover:bg-gray-800",
|
|
3099
|
-
children: t("cancel")
|
|
3100
|
-
}
|
|
3101
|
-
),
|
|
3102
3078
|
/* @__PURE__ */ jsx(
|
|
3103
|
-
|
|
3079
|
+
VariableListEditor,
|
|
3104
3080
|
{
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3081
|
+
variables: outputVariables,
|
|
3082
|
+
onChange: setOutputVariables,
|
|
3083
|
+
label: t("outputVariablesLabel"),
|
|
3084
|
+
placeholder: t("variablePlaceholder"),
|
|
3085
|
+
addLabel: t("addVariable"),
|
|
3086
|
+
color: "red"
|
|
3109
3087
|
}
|
|
3110
3088
|
)
|
|
3111
|
-
] })
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2 border-t border-gray-200 pt-4 dark:border-gray-700", children: [
|
|
3122
|
-
/* @__PURE__ */ jsx(Button, { type: "button", outline: true, onClick: onCancel, children: cancelLabel }),
|
|
3123
|
-
/* @__PURE__ */ jsx(Button, { type: "button", onClick: onSave, disabled: saveDisabled, children: saveLabel })
|
|
3089
|
+
] }),
|
|
3090
|
+
/* @__PURE__ */ jsx(
|
|
3091
|
+
ConfigFormActions,
|
|
3092
|
+
{
|
|
3093
|
+
cancelLabel: t("cancel"),
|
|
3094
|
+
saveLabel: t("save"),
|
|
3095
|
+
onCancel,
|
|
3096
|
+
onSave: handleSave
|
|
3097
|
+
}
|
|
3098
|
+
)
|
|
3124
3099
|
] });
|
|
3125
3100
|
}
|
|
3126
3101
|
var OPERATOR_OPTIONS = [
|
|
@@ -3602,23 +3577,6 @@ function AnswerNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
3602
3577
|
const t = useTranslations("agents.workflow.answerNodeConfig");
|
|
3603
3578
|
const [outputTemplate, setOutputTemplate] = useState(config.outputTemplate);
|
|
3604
3579
|
const [outputVariables, setOutputVariables] = useState([...config.outputVariables]);
|
|
3605
|
-
const [newVariable, setNewVariable] = useState("");
|
|
3606
|
-
const handleAddVariable = () => {
|
|
3607
|
-
const trimmed = newVariable.trim();
|
|
3608
|
-
if (trimmed && !outputVariables.includes(trimmed)) {
|
|
3609
|
-
setOutputVariables([...outputVariables, trimmed]);
|
|
3610
|
-
setNewVariable("");
|
|
3611
|
-
}
|
|
3612
|
-
};
|
|
3613
|
-
const handleRemoveVariable = (variable) => {
|
|
3614
|
-
setOutputVariables(outputVariables.filter((existingVariable) => existingVariable !== variable));
|
|
3615
|
-
};
|
|
3616
|
-
const handleKeyDown = (event) => {
|
|
3617
|
-
if (event.key === "Enter") {
|
|
3618
|
-
event.preventDefault();
|
|
3619
|
-
handleAddVariable();
|
|
3620
|
-
}
|
|
3621
|
-
};
|
|
3622
3580
|
const handleSave = () => {
|
|
3623
3581
|
onSave({ ...config, outputTemplate, outputVariables });
|
|
3624
3582
|
};
|
|
@@ -3635,50 +3593,17 @@ function AnswerNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
3635
3593
|
className: "font-mono text-xs"
|
|
3636
3594
|
}
|
|
3637
3595
|
),
|
|
3638
|
-
/* @__PURE__ */
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
className: "flex-1"
|
|
3650
|
-
}
|
|
3651
|
-
),
|
|
3652
|
-
/* @__PURE__ */ jsx(
|
|
3653
|
-
Button,
|
|
3654
|
-
{
|
|
3655
|
-
type: "button",
|
|
3656
|
-
onClick: handleAddVariable,
|
|
3657
|
-
children: t("addVariable")
|
|
3658
|
-
}
|
|
3659
|
-
)
|
|
3660
|
-
] }),
|
|
3661
|
-
/* @__PURE__ */ jsx("div", { className: "mt-2 flex flex-wrap gap-2", children: outputVariables.map((variable) => /* @__PURE__ */ jsxs(
|
|
3662
|
-
"span",
|
|
3663
|
-
{
|
|
3664
|
-
className: "inline-flex items-center gap-1 rounded-full bg-blue-100 px-2.5 py-1 text-xs font-medium text-blue-700 dark:bg-blue-500/20 dark:text-blue-300",
|
|
3665
|
-
children: [
|
|
3666
|
-
variable,
|
|
3667
|
-
/* @__PURE__ */ jsx(
|
|
3668
|
-
IconButton,
|
|
3669
|
-
{
|
|
3670
|
-
onClick: () => handleRemoveVariable(variable),
|
|
3671
|
-
icon: /* @__PURE__ */ jsx(XMarkIcon$1, { className: "h-3 w-3" }),
|
|
3672
|
-
label: `Remove ${variable}`,
|
|
3673
|
-
size: "sm",
|
|
3674
|
-
color: "ios-red"
|
|
3675
|
-
}
|
|
3676
|
-
)
|
|
3677
|
-
]
|
|
3678
|
-
},
|
|
3679
|
-
variable
|
|
3680
|
-
)) })
|
|
3681
|
-
] }),
|
|
3596
|
+
/* @__PURE__ */ jsx(
|
|
3597
|
+
VariableListEditor,
|
|
3598
|
+
{
|
|
3599
|
+
variables: outputVariables,
|
|
3600
|
+
onChange: setOutputVariables,
|
|
3601
|
+
label: t("outputVariablesLabel"),
|
|
3602
|
+
placeholder: t("variablePlaceholder"),
|
|
3603
|
+
addLabel: t("addVariable"),
|
|
3604
|
+
color: "blue"
|
|
3605
|
+
}
|
|
3606
|
+
),
|
|
3682
3607
|
/* @__PURE__ */ jsx(
|
|
3683
3608
|
ConfigFormActions,
|
|
3684
3609
|
{
|
|
@@ -4073,77 +3998,23 @@ function VariableAggregatorNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
4073
3998
|
const [inputVariables, setInputVariables] = useState([...config.inputVariables]);
|
|
4074
3999
|
const [outputVariable, setOutputVariable] = useState(config.outputVariable);
|
|
4075
4000
|
const [aggregationMode, setAggregationMode] = useState(config.aggregationMode);
|
|
4076
|
-
const [newVariable, setNewVariable] = useState("");
|
|
4077
|
-
const handleAddVariable = () => {
|
|
4078
|
-
const trimmed = newVariable.trim();
|
|
4079
|
-
if (trimmed && !inputVariables.includes(trimmed)) {
|
|
4080
|
-
setInputVariables([...inputVariables, trimmed]);
|
|
4081
|
-
setNewVariable("");
|
|
4082
|
-
}
|
|
4083
|
-
};
|
|
4084
|
-
const handleRemoveVariable = (index) => {
|
|
4085
|
-
setInputVariables(inputVariables.filter((_, variableIndex) => variableIndex !== index));
|
|
4086
|
-
};
|
|
4087
|
-
const handleVariableChange = (index, value) => {
|
|
4088
|
-
setInputVariables(inputVariables.map((variable, variableIndex) => variableIndex === index ? value : variable));
|
|
4089
|
-
};
|
|
4090
|
-
const handleKeyDown = (event) => {
|
|
4091
|
-
if (event.key === "Enter") {
|
|
4092
|
-
event.preventDefault();
|
|
4093
|
-
handleAddVariable();
|
|
4094
|
-
}
|
|
4095
|
-
};
|
|
4096
4001
|
const handleSave = () => {
|
|
4097
4002
|
onSave({ ...config, inputVariables, outputVariable, aggregationMode });
|
|
4098
4003
|
};
|
|
4099
4004
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
4100
|
-
/* @__PURE__ */
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
),
|
|
4114
|
-
/* @__PURE__ */ jsx(
|
|
4115
|
-
Button,
|
|
4116
|
-
{
|
|
4117
|
-
type: "button",
|
|
4118
|
-
onClick: handleAddVariable,
|
|
4119
|
-
children: t("addInputVariable")
|
|
4120
|
-
}
|
|
4121
|
-
)
|
|
4122
|
-
] }),
|
|
4123
|
-
/* @__PURE__ */ jsx("div", { className: "mt-3 space-y-2", children: inputVariables.map((variable, index) => /* @__PURE__ */ jsx(Card, { className: "border-purple-200/70 dark:border-purple-500/30", children: /* @__PURE__ */ jsx(CardContent, { className: "p-3", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
4124
|
-
/* @__PURE__ */ 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 }),
|
|
4125
|
-
/* @__PURE__ */ jsx(
|
|
4126
|
-
FormInput,
|
|
4127
|
-
{
|
|
4128
|
-
type: "text",
|
|
4129
|
-
value: variable,
|
|
4130
|
-
onValueChange: (value) => handleVariableChange(index, value),
|
|
4131
|
-
placeholder: t("variablePlaceholder"),
|
|
4132
|
-
className: "flex-1"
|
|
4133
|
-
}
|
|
4134
|
-
),
|
|
4135
|
-
/* @__PURE__ */ jsx(
|
|
4136
|
-
IconButton,
|
|
4137
|
-
{
|
|
4138
|
-
icon: /* @__PURE__ */ jsx(XMarkIcon$1, { className: "h-3 w-3" }),
|
|
4139
|
-
label: `Remove ${variable || index + 1}`,
|
|
4140
|
-
onClick: () => handleRemoveVariable(index),
|
|
4141
|
-
size: "sm",
|
|
4142
|
-
color: "ios-red"
|
|
4143
|
-
}
|
|
4144
|
-
)
|
|
4145
|
-
] }) }) }, `${index}-${variable}`)) })
|
|
4146
|
-
] }),
|
|
4005
|
+
/* @__PURE__ */ jsx(
|
|
4006
|
+
VariableListEditor,
|
|
4007
|
+
{
|
|
4008
|
+
variables: inputVariables,
|
|
4009
|
+
onChange: setInputVariables,
|
|
4010
|
+
label: t("inputVariablesLabel"),
|
|
4011
|
+
placeholder: t("variablePlaceholder"),
|
|
4012
|
+
addLabel: t("addInputVariable"),
|
|
4013
|
+
color: "purple",
|
|
4014
|
+
numbered: true,
|
|
4015
|
+
editable: true
|
|
4016
|
+
}
|
|
4017
|
+
),
|
|
4147
4018
|
/* @__PURE__ */ jsx(
|
|
4148
4019
|
FormInput,
|
|
4149
4020
|
{
|
|
@@ -5127,14 +4998,16 @@ function LogicNodeModal({ onSave, entities = [], datasources = [], onLoadTables,
|
|
|
5127
4998
|
}
|
|
5128
4999
|
};
|
|
5129
5000
|
return /* @__PURE__ */ jsx(
|
|
5130
|
-
|
|
5001
|
+
GlassModalShell,
|
|
5131
5002
|
{
|
|
5132
5003
|
open,
|
|
5133
5004
|
onClose: closeModal,
|
|
5134
5005
|
title,
|
|
5135
5006
|
subtitle: nodeLabel,
|
|
5007
|
+
label: t("nodeConfig"),
|
|
5136
5008
|
icon: IconComponent ? /* @__PURE__ */ jsx(IconComponent, { className: "h-5 w-5 text-white" }) : void 0,
|
|
5137
5009
|
gradient,
|
|
5010
|
+
maxWidth: "2xl",
|
|
5138
5011
|
children: renderForm()
|
|
5139
5012
|
}
|
|
5140
5013
|
);
|
|
@@ -7172,6 +7045,6 @@ function Workspace({
|
|
|
7172
7045
|
) }) });
|
|
7173
7046
|
}
|
|
7174
7047
|
|
|
7175
|
-
export { AgentFlowNode, AgentToolFlowNode, AnswerFlowNode, AnthropicIcon, CATEGORY_COLORS, CATEGORY_PILL_COLORS, CodeFlowNode, CrewAIIcon, DocumentExtractorFlowNode, EndFlowNode, EntityFlowNode, FRAMEWORK_META, GoogleADKIcon, GroupFlowNode, HttpRequestFlowNode, ICON_MAP, IfElseFlowNode, IterationFlowNode, IterationStartFlowNode, KnowledgeBaseFlowNode, LOGIC_ICON_MAP, LOGIC_NODE_BADGE_COLORS, LOGIC_NODE_GRADIENTS, LOGIC_NODE_HANDLE_COLORS, LangChainIcon, ListOperatorFlowNode, LogicNodeModal, MINIMAP_NODE_COLORS, NodeCard, NodeContextMenu, NoteFlowNode, OpenAIIcon, PanelContextMenu, ParameterExtractorFlowNode, QuestionClassifierFlowNode, RuleFlowNode, SelectionContextMenu, StartFlowNode, StrandsIcon, TemplateTransformFlowNode, ToolFlowNode, VariableAggregatorFlowNode, VariableAssignerFlowNode, WorkflowBuilderProvider, WorkflowCanvas, Workspace,
|
|
7176
|
-
//# sourceMappingURL=chunk-
|
|
7177
|
-
//# sourceMappingURL=chunk-
|
|
7048
|
+
export { AgentFlowNode, AgentToolFlowNode, AnswerFlowNode, AnthropicIcon, CATEGORY_COLORS, CATEGORY_PILL_COLORS, CodeFlowNode, CrewAIIcon, DocumentExtractorFlowNode, EndFlowNode, EntityFlowNode, FRAMEWORK_META, GoogleADKIcon, GroupFlowNode, HttpRequestFlowNode, ICON_MAP, IfElseFlowNode, IterationFlowNode, IterationStartFlowNode, KnowledgeBaseFlowNode, LOGIC_ICON_MAP, LOGIC_NODE_BADGE_COLORS, LOGIC_NODE_GRADIENTS, LOGIC_NODE_HANDLE_COLORS, LangChainIcon, ListOperatorFlowNode, LogicNodeModal, MINIMAP_NODE_COLORS, NodeCard, NodeContextMenu, NoteFlowNode, OpenAIIcon, PanelContextMenu, ParameterExtractorFlowNode, QuestionClassifierFlowNode, RuleFlowNode, SelectionContextMenu, StartFlowNode, StrandsIcon, TemplateTransformFlowNode, ToolFlowNode, VariableAggregatorFlowNode, VariableAssignerFlowNode, WorkflowBuilderProvider, WorkflowCanvas, Workspace, getCompatibleModels, getDefaultFrameworkForModel, getEntityBadgeColor, getEntityGradient, getEntityHandleColor, getEntityIcon, getEntityMinimapColor, getFrameworkMeta, isModelCompatibleWithFramework, useModalStore, useWorkflowBuilderClient, useWorkflowBuilderClientOptional, useWorkflowStore };
|
|
7049
|
+
//# sourceMappingURL=chunk-76MHUX4T.mjs.map
|
|
7050
|
+
//# sourceMappingURL=chunk-76MHUX4T.mjs.map
|