@datatechsolutions/ui 2.7.111 → 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 -105
- package/dist/workflow/index.d.ts +19 -105
- package/dist/workflow/index.js +37 -149
- package/dist/workflow/index.js.map +1 -1
- package/dist/workflow/index.mjs +38 -147
- 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,35 +10928,23 @@ function ResultsTab({ agentId, t }) {
|
|
|
11012
10928
|
] })
|
|
11013
10929
|
] });
|
|
11014
10930
|
}
|
|
11015
|
-
function AgentDrawer({ agent
|
|
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 temperature = useAgentDrawerStore((state) => state.temperature);
|
|
11027
|
-
const elo = useAgentDrawerStore((state) => state.elo);
|
|
11028
|
-
const dirty = useAgentDrawerStore((state) => state.dirty);
|
|
11029
|
-
const setActiveTab = useAgentDrawerStore((state) => state.setActiveTab);
|
|
11030
|
-
const setSelectedModelId = useAgentDrawerStore((state) => state.setSelectedModelId);
|
|
11031
|
-
const setSelectedFramework = useAgentDrawerStore((state) => state.setSelectedFramework);
|
|
11032
|
-
const setTemperature = useAgentDrawerStore((state) => state.setTemperature);
|
|
11033
|
-
const setElo = useAgentDrawerStore((state) => state.setElo);
|
|
11034
|
-
const markDirty = useAgentDrawerStore((state) => state.markDirty);
|
|
11035
|
-
const markSaved = useAgentDrawerStore((state) => state.markSaved);
|
|
11036
|
-
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), []);
|
|
11037
10942
|
const handleClose = useCallback(() => {
|
|
11038
|
-
|
|
11039
|
-
|
|
11040
|
-
}, [onCloseProp, closeDrawer]);
|
|
10943
|
+
onClose();
|
|
10944
|
+
}, [onClose]);
|
|
11041
10945
|
const handleMarkSaved = useCallback(() => {
|
|
11042
10946
|
markSaved();
|
|
11043
|
-
onSaved
|
|
10947
|
+
onSaved();
|
|
11044
10948
|
}, [markSaved, onSaved]);
|
|
11045
10949
|
if (!agent) return null;
|
|
11046
10950
|
const tabs = /* @__PURE__ */ jsx("div", { className: "flex border-b border-white/20 dark:border-white/10", children: ["config", "results"].map((tab) => /* @__PURE__ */ jsx(
|
|
@@ -11347,42 +11251,29 @@ function SubworkflowDrawer({ onSaved, onMaximize }) {
|
|
|
11347
11251
|
}
|
|
11348
11252
|
);
|
|
11349
11253
|
}
|
|
11350
|
-
var usePipelineSettingsStore = create((set) => ({
|
|
11351
|
-
// State
|
|
11352
|
-
open: false,
|
|
11353
|
-
name: "",
|
|
11354
|
-
description: "",
|
|
11355
|
-
isSaving: false,
|
|
11356
|
-
// Actions
|
|
11357
|
-
openDrawer: (name, description) => set({
|
|
11358
|
-
open: true,
|
|
11359
|
-
name,
|
|
11360
|
-
description,
|
|
11361
|
-
isSaving: false
|
|
11362
|
-
}),
|
|
11363
|
-
closeDrawer: () => set({
|
|
11364
|
-
open: false,
|
|
11365
|
-
name: "",
|
|
11366
|
-
description: "",
|
|
11367
|
-
isSaving: false
|
|
11368
|
-
}),
|
|
11369
|
-
setName: (name) => set({ name }),
|
|
11370
|
-
setDescription: (description) => set({ description }),
|
|
11371
|
-
setIsSaving: (isSaving) => set({ isSaving })
|
|
11372
|
-
}));
|
|
11373
11254
|
function PipelineSettingsDrawer({
|
|
11255
|
+
open,
|
|
11256
|
+
onClose,
|
|
11257
|
+
name,
|
|
11258
|
+
description,
|
|
11374
11259
|
onSave
|
|
11375
11260
|
}) {
|
|
11376
11261
|
const t = useTranslations("agents.workflow");
|
|
11377
|
-
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]);
|
|
11378
11269
|
const handleSubmit = async (event) => {
|
|
11379
11270
|
event.preventDefault();
|
|
11380
|
-
const trimmedName =
|
|
11271
|
+
const trimmedName = nameValue.trim();
|
|
11381
11272
|
if (!trimmedName) return;
|
|
11382
11273
|
setIsSaving(true);
|
|
11383
11274
|
try {
|
|
11384
|
-
await onSave(trimmedName,
|
|
11385
|
-
|
|
11275
|
+
await onSave(trimmedName, descriptionValue.trim());
|
|
11276
|
+
onClose();
|
|
11386
11277
|
} catch {
|
|
11387
11278
|
} finally {
|
|
11388
11279
|
setIsSaving(false);
|
|
@@ -11392,7 +11283,7 @@ function PipelineSettingsDrawer({
|
|
|
11392
11283
|
WorkspaceDrawer,
|
|
11393
11284
|
{
|
|
11394
11285
|
open,
|
|
11395
|
-
onClose
|
|
11286
|
+
onClose,
|
|
11396
11287
|
title: t("pipelineSettings"),
|
|
11397
11288
|
subtitle: t("pipelineSettingsSubtitle"),
|
|
11398
11289
|
icon: /* @__PURE__ */ jsx(Cog6ToothIcon, { className: "h-5 w-5 text-white" }),
|
|
@@ -11402,8 +11293,8 @@ function PipelineSettingsDrawer({
|
|
|
11402
11293
|
FormInput,
|
|
11403
11294
|
{
|
|
11404
11295
|
label: t("pipelineName"),
|
|
11405
|
-
value:
|
|
11406
|
-
onValueChange:
|
|
11296
|
+
value: nameValue,
|
|
11297
|
+
onValueChange: setNameValue,
|
|
11407
11298
|
placeholder: t("pipelineNamePlaceholder"),
|
|
11408
11299
|
required: true
|
|
11409
11300
|
}
|
|
@@ -11412,8 +11303,8 @@ function PipelineSettingsDrawer({
|
|
|
11412
11303
|
FormTextarea,
|
|
11413
11304
|
{
|
|
11414
11305
|
label: t("pipelineDescription"),
|
|
11415
|
-
value:
|
|
11416
|
-
onValueChange:
|
|
11306
|
+
value: descriptionValue,
|
|
11307
|
+
onValueChange: setDescriptionValue,
|
|
11417
11308
|
placeholder: t("pipelineDescriptionPlaceholder"),
|
|
11418
11309
|
rows: 4
|
|
11419
11310
|
}
|
|
@@ -13780,6 +13671,6 @@ var AgentToolFlowNode = memo(function AgentToolFlowNode2({ id, data, selected })
|
|
|
13780
13671
|
] });
|
|
13781
13672
|
});
|
|
13782
13673
|
|
|
13783
|
-
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 };
|
|
13784
13675
|
//# sourceMappingURL=index.mjs.map
|
|
13785
13676
|
//# sourceMappingURL=index.mjs.map
|