@datatechsolutions/ui 2.7.110 → 2.7.112
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/workflow/index.d.mts +19 -100
- package/dist/workflow/index.d.ts +19 -100
- package/dist/workflow/index.js +37 -145
- package/dist/workflow/index.js.map +1 -1
- package/dist/workflow/index.mjs +38 -143
- package/dist/workflow/index.mjs.map +1 -1
- package/dist/workflow/workflow-canvas.js +5 -89
- package/dist/workflow/workflow-canvas.js.map +1 -1
- package/dist/workflow/workflow-canvas.mjs +5 -89
- package/dist/workflow/workflow-canvas.mjs.map +1 -1
- package/package.json +1 -1
package/dist/workflow/index.mjs
CHANGED
|
@@ -254,71 +254,6 @@ var useWorkflowStore = create((set, get) => ({
|
|
|
254
254
|
});
|
|
255
255
|
}
|
|
256
256
|
}));
|
|
257
|
-
var useAgentDrawerStore = create((set) => ({
|
|
258
|
-
// State
|
|
259
|
-
agent: null,
|
|
260
|
-
models: [],
|
|
261
|
-
open: false,
|
|
262
|
-
isCreateMode: false,
|
|
263
|
-
activeTab: "config",
|
|
264
|
-
selectedModelId: "",
|
|
265
|
-
selectedFramework: "",
|
|
266
|
-
temperature: 0,
|
|
267
|
-
elo: 0,
|
|
268
|
-
dirty: false,
|
|
269
|
-
// Actions
|
|
270
|
-
openDrawer: (agent, models, isCreateMode = false) => set({
|
|
271
|
-
agent,
|
|
272
|
-
models,
|
|
273
|
-
open: true,
|
|
274
|
-
isCreateMode,
|
|
275
|
-
activeTab: "config",
|
|
276
|
-
selectedModelId: agent.modelId ?? "",
|
|
277
|
-
selectedFramework: String(agent.framework ?? ""),
|
|
278
|
-
temperature: agent.temperature ?? 0,
|
|
279
|
-
elo: Number(agent.elo ?? 0),
|
|
280
|
-
dirty: isCreateMode
|
|
281
|
-
}),
|
|
282
|
-
closeDrawer: () => set({
|
|
283
|
-
agent: null,
|
|
284
|
-
models: [],
|
|
285
|
-
open: false,
|
|
286
|
-
isCreateMode: false,
|
|
287
|
-
activeTab: "config",
|
|
288
|
-
selectedModelId: "",
|
|
289
|
-
selectedFramework: "",
|
|
290
|
-
temperature: 0,
|
|
291
|
-
elo: 0,
|
|
292
|
-
dirty: false
|
|
293
|
-
}),
|
|
294
|
-
setActiveTab: (activeTab) => set({ activeTab, dirty: true }),
|
|
295
|
-
setSelectedModelId: (selectedModelId) => set({ selectedModelId, dirty: true }),
|
|
296
|
-
setSelectedFramework: (selectedFramework) => set({ selectedFramework, dirty: true }),
|
|
297
|
-
setTemperature: (temperature) => set({ temperature, dirty: true }),
|
|
298
|
-
setElo: (elo) => set({ elo, dirty: true }),
|
|
299
|
-
markDirty: () => set({ dirty: true }),
|
|
300
|
-
markSaved: () => set({ dirty: false })
|
|
301
|
-
}));
|
|
302
|
-
var useLogicNodeDrawerStore = create((set) => ({
|
|
303
|
-
// State
|
|
304
|
-
nodeId: null,
|
|
305
|
-
nodeLabel: "",
|
|
306
|
-
config: null,
|
|
307
|
-
open: false,
|
|
308
|
-
// Actions
|
|
309
|
-
openDrawer: (nodeId, nodeLabel, config) => set({
|
|
310
|
-
nodeId,
|
|
311
|
-
nodeLabel,
|
|
312
|
-
config,
|
|
313
|
-
open: true
|
|
314
|
-
}),
|
|
315
|
-
closeDrawer: () => set({
|
|
316
|
-
nodeId: null,
|
|
317
|
-
nodeLabel: "",
|
|
318
|
-
config: null,
|
|
319
|
-
open: false
|
|
320
|
-
})
|
|
321
|
-
}));
|
|
322
257
|
var GRAPH_ACTIVE_EDGE_COLOR = "#14b8a6";
|
|
323
258
|
var GRAPH_TRUE_EDGE_COLOR = "#22c55e";
|
|
324
259
|
var GRAPH_FALSE_EDGE_COLOR = "#ef4444";
|
|
@@ -8375,8 +8310,7 @@ var NODE_TITLE_KEYS = {
|
|
|
8375
8310
|
entity: "entityNodeConfig",
|
|
8376
8311
|
group: "groupNodeConfig"
|
|
8377
8312
|
};
|
|
8378
|
-
function LogicNodeDrawer({ onSave, entities = [] }) {
|
|
8379
|
-
const { nodeId, nodeLabel, config, open, closeDrawer: onClose } = useLogicNodeDrawerStore();
|
|
8313
|
+
function LogicNodeDrawer({ nodeId, nodeLabel, config, open, onClose, onSave, entities = [] }) {
|
|
8380
8314
|
const t = useTranslations("agents.workflow");
|
|
8381
8315
|
if (!config || !nodeId) return null;
|
|
8382
8316
|
const entityMasterId = config.type === "entity" ? config.entityMasterId : void 0;
|
|
@@ -8869,27 +8803,16 @@ function WorkflowCanvasInner({
|
|
|
8869
8803
|
const sortedAgents = useMemo(() => [...agents].sort((agentA, agentB) => (agentA.order ?? 0) - (agentB.order ?? 0)), [agents]);
|
|
8870
8804
|
const [selectedAgentId, setSelectedAgentId] = useState(null);
|
|
8871
8805
|
const [drawerOpen, setDrawerOpen] = useState(false);
|
|
8872
|
-
const openAgentDrawerRaw = useAgentDrawerStore((s) => s.openDrawer);
|
|
8873
|
-
const closeAgentDrawer = useAgentDrawerStore((s) => s.closeDrawer);
|
|
8874
|
-
const closeLogicNodeDrawerAction = useLogicNodeDrawerStore((s) => s.closeDrawer);
|
|
8875
8806
|
const closeAllDrawers = useCallback(() => {
|
|
8876
|
-
closeAgentDrawer();
|
|
8877
|
-
closeLogicNodeDrawerAction();
|
|
8878
8807
|
setEditingLogicNodeId(null);
|
|
8879
8808
|
setDrawerOpen(false);
|
|
8880
8809
|
setSelectedAgentId(null);
|
|
8881
|
-
}, [
|
|
8882
|
-
const openAgentDrawer = useCallback((agent,
|
|
8883
|
-
closeLogicNodeDrawerAction();
|
|
8810
|
+
}, []);
|
|
8811
|
+
const openAgentDrawer = useCallback((agent, _agentModels, _isCreate = false) => {
|
|
8884
8812
|
setEditingLogicNodeId(null);
|
|
8885
8813
|
setDrawerOpen(true);
|
|
8886
|
-
|
|
8887
|
-
}, [
|
|
8888
|
-
useEffect(() => {
|
|
8889
|
-
if (isCreatingAgent) {
|
|
8890
|
-
openAgentDrawer({ agentId: "", name: "", order: 0, enabled: true, temperature: 0.7, maxTokens: 4096 }, models, true);
|
|
8891
|
-
}
|
|
8892
|
-
}, [isCreatingAgent]);
|
|
8814
|
+
setSelectedAgentId(agent.agentId);
|
|
8815
|
+
}, []);
|
|
8893
8816
|
const graphChangeTimerRef = useRef(null);
|
|
8894
8817
|
const insertNodeOnEdgeRef = useRef(() => {
|
|
8895
8818
|
});
|
|
@@ -8925,8 +8848,6 @@ function WorkflowCanvasInner({
|
|
|
8925
8848
|
const layoutDirection = useWorkflowStore((s) => s.layoutDirection);
|
|
8926
8849
|
const setLayoutDirection = useWorkflowStore((s) => s.setLayoutDirection);
|
|
8927
8850
|
const [editingLogicNodeId, setEditingLogicNodeId] = useState(null);
|
|
8928
|
-
const openLogicNodeDrawer = useLogicNodeDrawerStore((s) => s.openDrawer);
|
|
8929
|
-
useLogicNodeDrawerStore((s) => s.closeDrawer);
|
|
8930
8851
|
const handleEditLogicNode = useCallback((nodeId) => {
|
|
8931
8852
|
closeAllDrawers();
|
|
8932
8853
|
setEditingLogicNodeId(nodeId);
|
|
@@ -10164,11 +10085,6 @@ function WorkflowCanvasInner({
|
|
|
10164
10085
|
const label = nodeData.label ?? "";
|
|
10165
10086
|
return { nodeId: editingLogicNodeId, config, label };
|
|
10166
10087
|
}, [editingLogicNodeId, nodes]);
|
|
10167
|
-
useEffect(() => {
|
|
10168
|
-
if (editingLogicNode) {
|
|
10169
|
-
openLogicNodeDrawer(editingLogicNode.nodeId, editingLogicNode.label, editingLogicNode.config);
|
|
10170
|
-
}
|
|
10171
|
-
}, [editingLogicNode]);
|
|
10172
10088
|
const handleSaveLogicNodeConfig = useCallback((nodeId, updatedConfig) => {
|
|
10173
10089
|
storeTakeSnapshot();
|
|
10174
10090
|
setNodes(
|
|
@@ -11012,31 +10928,23 @@ function ResultsTab({ agentId, t }) {
|
|
|
11012
10928
|
] })
|
|
11013
10929
|
] });
|
|
11014
10930
|
}
|
|
11015
|
-
function AgentDrawer({ onSaved }) {
|
|
10931
|
+
function AgentDrawer({ agent, models, open, isCreateMode = false, onClose, onSaved }) {
|
|
11016
10932
|
const t = useTranslations("agents.workflow");
|
|
11017
|
-
const
|
|
11018
|
-
const
|
|
11019
|
-
const
|
|
11020
|
-
const
|
|
11021
|
-
const
|
|
11022
|
-
const
|
|
11023
|
-
const
|
|
11024
|
-
const
|
|
11025
|
-
const
|
|
11026
|
-
const setActiveTab = useAgentDrawerStore((state) => state.setActiveTab);
|
|
11027
|
-
const setSelectedModelId = useAgentDrawerStore((state) => state.setSelectedModelId);
|
|
11028
|
-
const setSelectedFramework = useAgentDrawerStore((state) => state.setSelectedFramework);
|
|
11029
|
-
const setTemperature = useAgentDrawerStore((state) => state.setTemperature);
|
|
11030
|
-
const setElo = useAgentDrawerStore((state) => state.setElo);
|
|
11031
|
-
const markDirty = useAgentDrawerStore((state) => state.markDirty);
|
|
11032
|
-
const markSaved = useAgentDrawerStore((state) => state.markSaved);
|
|
11033
|
-
const closeDrawer = useAgentDrawerStore((state) => state.closeDrawer);
|
|
10933
|
+
const [activeTab, setActiveTab] = useState("config");
|
|
10934
|
+
const [selectedModelId, setSelectedModelId] = useState(agent?.modelId ?? "");
|
|
10935
|
+
const [selectedFramework, setSelectedFramework] = useState(String(agent?.framework ?? ""));
|
|
10936
|
+
const [temperature, setTemperature] = useState(agent?.temperature ?? 0);
|
|
10937
|
+
const [elo, setElo] = useState(Number(agent?.elo ?? 0));
|
|
10938
|
+
const [saved, setSaved] = useState(!isCreateMode);
|
|
10939
|
+
const dirty = !saved;
|
|
10940
|
+
const markDirty = useCallback(() => setSaved(false), []);
|
|
10941
|
+
const markSaved = useCallback(() => setSaved(true), []);
|
|
11034
10942
|
const handleClose = useCallback(() => {
|
|
11035
|
-
|
|
11036
|
-
}, [
|
|
10943
|
+
onClose();
|
|
10944
|
+
}, [onClose]);
|
|
11037
10945
|
const handleMarkSaved = useCallback(() => {
|
|
11038
10946
|
markSaved();
|
|
11039
|
-
onSaved
|
|
10947
|
+
onSaved();
|
|
11040
10948
|
}, [markSaved, onSaved]);
|
|
11041
10949
|
if (!agent) return null;
|
|
11042
10950
|
const tabs = /* @__PURE__ */ jsx("div", { className: "flex border-b border-white/20 dark:border-white/10", children: ["config", "results"].map((tab) => /* @__PURE__ */ jsx(
|
|
@@ -11343,42 +11251,29 @@ function SubworkflowDrawer({ onSaved, onMaximize }) {
|
|
|
11343
11251
|
}
|
|
11344
11252
|
);
|
|
11345
11253
|
}
|
|
11346
|
-
var usePipelineSettingsStore = create((set) => ({
|
|
11347
|
-
// State
|
|
11348
|
-
open: false,
|
|
11349
|
-
name: "",
|
|
11350
|
-
description: "",
|
|
11351
|
-
isSaving: false,
|
|
11352
|
-
// Actions
|
|
11353
|
-
openDrawer: (name, description) => set({
|
|
11354
|
-
open: true,
|
|
11355
|
-
name,
|
|
11356
|
-
description,
|
|
11357
|
-
isSaving: false
|
|
11358
|
-
}),
|
|
11359
|
-
closeDrawer: () => set({
|
|
11360
|
-
open: false,
|
|
11361
|
-
name: "",
|
|
11362
|
-
description: "",
|
|
11363
|
-
isSaving: false
|
|
11364
|
-
}),
|
|
11365
|
-
setName: (name) => set({ name }),
|
|
11366
|
-
setDescription: (description) => set({ description }),
|
|
11367
|
-
setIsSaving: (isSaving) => set({ isSaving })
|
|
11368
|
-
}));
|
|
11369
11254
|
function PipelineSettingsDrawer({
|
|
11255
|
+
open,
|
|
11256
|
+
onClose,
|
|
11257
|
+
name,
|
|
11258
|
+
description,
|
|
11370
11259
|
onSave
|
|
11371
11260
|
}) {
|
|
11372
11261
|
const t = useTranslations("agents.workflow");
|
|
11373
|
-
const
|
|
11262
|
+
const [nameValue, setNameValue] = useState(name);
|
|
11263
|
+
const [descriptionValue, setDescriptionValue] = useState(description);
|
|
11264
|
+
const [isSaving, setIsSaving] = useState(false);
|
|
11265
|
+
useEffect(() => {
|
|
11266
|
+
setNameValue(name);
|
|
11267
|
+
setDescriptionValue(description);
|
|
11268
|
+
}, [name, description]);
|
|
11374
11269
|
const handleSubmit = async (event) => {
|
|
11375
11270
|
event.preventDefault();
|
|
11376
|
-
const trimmedName =
|
|
11271
|
+
const trimmedName = nameValue.trim();
|
|
11377
11272
|
if (!trimmedName) return;
|
|
11378
11273
|
setIsSaving(true);
|
|
11379
11274
|
try {
|
|
11380
|
-
await onSave(trimmedName,
|
|
11381
|
-
|
|
11275
|
+
await onSave(trimmedName, descriptionValue.trim());
|
|
11276
|
+
onClose();
|
|
11382
11277
|
} catch {
|
|
11383
11278
|
} finally {
|
|
11384
11279
|
setIsSaving(false);
|
|
@@ -11388,7 +11283,7 @@ function PipelineSettingsDrawer({
|
|
|
11388
11283
|
WorkspaceDrawer,
|
|
11389
11284
|
{
|
|
11390
11285
|
open,
|
|
11391
|
-
onClose
|
|
11286
|
+
onClose,
|
|
11392
11287
|
title: t("pipelineSettings"),
|
|
11393
11288
|
subtitle: t("pipelineSettingsSubtitle"),
|
|
11394
11289
|
icon: /* @__PURE__ */ jsx(Cog6ToothIcon, { className: "h-5 w-5 text-white" }),
|
|
@@ -11398,8 +11293,8 @@ function PipelineSettingsDrawer({
|
|
|
11398
11293
|
FormInput,
|
|
11399
11294
|
{
|
|
11400
11295
|
label: t("pipelineName"),
|
|
11401
|
-
value:
|
|
11402
|
-
onValueChange:
|
|
11296
|
+
value: nameValue,
|
|
11297
|
+
onValueChange: setNameValue,
|
|
11403
11298
|
placeholder: t("pipelineNamePlaceholder"),
|
|
11404
11299
|
required: true
|
|
11405
11300
|
}
|
|
@@ -11408,8 +11303,8 @@ function PipelineSettingsDrawer({
|
|
|
11408
11303
|
FormTextarea,
|
|
11409
11304
|
{
|
|
11410
11305
|
label: t("pipelineDescription"),
|
|
11411
|
-
value:
|
|
11412
|
-
onValueChange:
|
|
11306
|
+
value: descriptionValue,
|
|
11307
|
+
onValueChange: setDescriptionValue,
|
|
11413
11308
|
placeholder: t("pipelineDescriptionPlaceholder"),
|
|
11414
11309
|
rows: 4
|
|
11415
11310
|
}
|
|
@@ -13776,6 +13671,6 @@ var AgentToolFlowNode = memo(function AgentToolFlowNode2({ id, data, selected })
|
|
|
13776
13671
|
] });
|
|
13777
13672
|
});
|
|
13778
13673
|
|
|
13779
|
-
export { AgentDrawer, AgentFlowNode, AgentToolFlowNode, AmazonNovaIcon, AnswerFlowNode, AnthropicIcon, AnthropicModelIcon, AutoSaveWorkspace, CodeFlowNode, CrewAIIcon, DocumentExtractorFlowNode, DslExportModal, DslImportModal, DynamicIslandConfirm2 as DynamicIslandConfirm, EndFlowNode, EntityFlowNode, FRAMEWORK_META, GoogleADKIcon, GraphNodeBadge, GraphNodeHeader, GraphNodeIconBubble, GraphNodeMeta, GroupFlowNode, HttpRequestFlowNode, IfElseFlowNode, IterationFlowNode, IterationStartFlowNode, KnowledgeBaseFlowNode, LOGIC_ICON_MAP, LOGIC_NODE_BADGE_COLORS, LOGIC_NODE_GRADIENTS, LOGIC_NODE_HANDLE_COLORS, LangChainIcon, ListOperatorFlowNode, LogicNodeDrawer, MINIMAP_NODE_COLORS, MetaLlamaIcon, NodeCard, NodeContextMenu, NodePalette, NoteFlowNode, OpenAIIcon, PanelContextMenu, ParameterExtractorFlowNode, PipelineSettingsDrawer, PreviewPanel, QuestionClassifierFlowNode, RuleFlowNode, RunInputDialog, RunPanel, SaveStatusBadge, SelectionContextMenu, StartFlowNode, StrandsIcon, SubworkflowDrawer, TemplateTransformFlowNode, ToolFlowNode, VariableAggregatorFlowNode, VariableAssignerFlowNode, VariableInspector, VersionHistoryPanel, WorkflowBuilderProvider, WorkflowListBar, Workspace, WorkspaceDrawer, applyDagreLayout, createDefaultLogicNodeConfig, getCompatibleModels, getDefaultFrameworkForModel, getEntityBadgeColor, getEntityGradient, getEntityHandleColor, getEntityIcon, getEntityMinimapColor, getFrameworkMeta, getModelIcon, isModelCompatibleWithFramework, topologicalSortAgents,
|
|
13674
|
+
export { AgentDrawer, AgentFlowNode, AgentToolFlowNode, AmazonNovaIcon, AnswerFlowNode, AnthropicIcon, AnthropicModelIcon, AutoSaveWorkspace, CodeFlowNode, CrewAIIcon, DocumentExtractorFlowNode, DslExportModal, DslImportModal, DynamicIslandConfirm2 as DynamicIslandConfirm, EndFlowNode, EntityFlowNode, FRAMEWORK_META, GoogleADKIcon, GraphNodeBadge, GraphNodeHeader, GraphNodeIconBubble, GraphNodeMeta, GroupFlowNode, HttpRequestFlowNode, IfElseFlowNode, IterationFlowNode, IterationStartFlowNode, KnowledgeBaseFlowNode, LOGIC_ICON_MAP, LOGIC_NODE_BADGE_COLORS, LOGIC_NODE_GRADIENTS, LOGIC_NODE_HANDLE_COLORS, LangChainIcon, ListOperatorFlowNode, LogicNodeDrawer, MINIMAP_NODE_COLORS, MetaLlamaIcon, NodeCard, NodeContextMenu, NodePalette, NoteFlowNode, OpenAIIcon, PanelContextMenu, ParameterExtractorFlowNode, PipelineSettingsDrawer, PreviewPanel, QuestionClassifierFlowNode, RuleFlowNode, RunInputDialog, RunPanel, SaveStatusBadge, SelectionContextMenu, StartFlowNode, StrandsIcon, SubworkflowDrawer, TemplateTransformFlowNode, ToolFlowNode, VariableAggregatorFlowNode, VariableAssignerFlowNode, VariableInspector, VersionHistoryPanel, WorkflowBuilderProvider, WorkflowListBar, Workspace, WorkspaceDrawer, applyDagreLayout, createDefaultLogicNodeConfig, getCompatibleModels, getDefaultFrameworkForModel, getEntityBadgeColor, getEntityGradient, getEntityHandleColor, getEntityIcon, getEntityMinimapColor, getFrameworkMeta, getModelIcon, isModelCompatibleWithFramework, topologicalSortAgents, useCanRedo, useCanUndo, useCanvasShortcuts, useClipboard, useContextMenu, useEditingNodeId, useHasCopied, useHelpLines, useIsRunning, useNodeResults, useSelectedNodeCount, useSubworkflowStore, useUndoRedo, useWorkflowBuilderClient, useWorkflowBuilderClientOptional, useWorkflowStore, validateWorkflowGraph };
|
|
13780
13675
|
//# sourceMappingURL=index.mjs.map
|
|
13781
13676
|
//# sourceMappingURL=index.mjs.map
|