@datatechsolutions/ui 2.7.114 → 2.7.115
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 +40 -19
- package/dist/workflow/index.d.ts +40 -19
- package/dist/workflow/index.js +149 -86
- package/dist/workflow/index.js.map +1 -1
- package/dist/workflow/index.mjs +149 -87
- package/dist/workflow/index.mjs.map +1 -1
- package/dist/workflow/workflow-canvas.js +117 -62
- package/dist/workflow/workflow-canvas.js.map +1 -1
- package/dist/workflow/workflow-canvas.mjs +117 -62
- package/dist/workflow/workflow-canvas.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -199,14 +199,9 @@ declare const GroupFlowNode: React$1.NamedExoticComponent<{
|
|
|
199
199
|
}>;
|
|
200
200
|
|
|
201
201
|
type AgentDrawerProps = {
|
|
202
|
-
|
|
203
|
-
models: AgentModel[];
|
|
204
|
-
open: boolean;
|
|
205
|
-
isCreateMode?: boolean;
|
|
206
|
-
onClose: () => void;
|
|
207
|
-
onSaved: () => void;
|
|
202
|
+
onSaved?: () => void;
|
|
208
203
|
};
|
|
209
|
-
declare function AgentDrawer({
|
|
204
|
+
declare function AgentDrawer({ onSaved }: AgentDrawerProps): react_jsx_runtime.JSX.Element | null;
|
|
210
205
|
|
|
211
206
|
type SubworkflowDrawerProps = {
|
|
212
207
|
/** Called when save/create is clicked — receives the merged subworkflow with updated graph */
|
|
@@ -217,15 +212,10 @@ type SubworkflowDrawerProps = {
|
|
|
217
212
|
declare function SubworkflowDrawer({ onSaved, onMaximize }: SubworkflowDrawerProps): react_jsx_runtime.JSX.Element | null;
|
|
218
213
|
|
|
219
214
|
type LogicNodeDrawerProps = {
|
|
220
|
-
nodeId: string | null;
|
|
221
|
-
nodeLabel: string;
|
|
222
|
-
config: LogicNodeConfig | null;
|
|
223
|
-
open: boolean;
|
|
224
|
-
onClose: () => void;
|
|
225
215
|
onSave: (nodeId: string, updatedConfig: LogicNodeConfig) => void;
|
|
226
216
|
entities?: WorkflowEntityDefinition[];
|
|
227
217
|
};
|
|
228
|
-
declare function LogicNodeDrawer({
|
|
218
|
+
declare function LogicNodeDrawer({ onSave, entities }: LogicNodeDrawerProps): react_jsx_runtime.JSX.Element | null;
|
|
229
219
|
|
|
230
220
|
type WorkspaceDrawerProps = {
|
|
231
221
|
open: boolean;
|
|
@@ -241,13 +231,9 @@ type WorkspaceDrawerProps = {
|
|
|
241
231
|
declare function WorkspaceDrawer({ open, onClose, title, subtitle, icon, gradient, maxWidth, tabs, children, }: WorkspaceDrawerProps): react_jsx_runtime.JSX.Element;
|
|
242
232
|
|
|
243
233
|
type PipelineSettingsDrawerProps = {
|
|
244
|
-
open: boolean;
|
|
245
|
-
onClose: () => void;
|
|
246
|
-
name: string;
|
|
247
|
-
description: string;
|
|
248
234
|
onSave: (name: string, description: string) => Promise<void>;
|
|
249
235
|
};
|
|
250
|
-
declare function PipelineSettingsDrawer({
|
|
236
|
+
declare function PipelineSettingsDrawer({ onSave }: PipelineSettingsDrawerProps): react_jsx_runtime.JSX.Element;
|
|
251
237
|
|
|
252
238
|
type NodePaletteProps = {
|
|
253
239
|
agents: AgentWithPrompts[];
|
|
@@ -501,6 +487,41 @@ type SubworkflowStoreActions = {
|
|
|
501
487
|
type SubworkflowStore = SubworkflowStoreState & SubworkflowStoreActions;
|
|
502
488
|
declare const useSubworkflowStore: zustand.UseBoundStore<zustand.StoreApi<SubworkflowStore>>;
|
|
503
489
|
|
|
490
|
+
type DrawerType = 'agent' | 'subworkflow' | 'logic-node' | 'pipeline-settings' | null;
|
|
491
|
+
type AgentDrawerData = {
|
|
492
|
+
agent: AgentWithPrompts;
|
|
493
|
+
models: AgentModel[];
|
|
494
|
+
isCreateMode: boolean;
|
|
495
|
+
};
|
|
496
|
+
type SubworkflowDrawerData = {
|
|
497
|
+
tool: Subworkflow;
|
|
498
|
+
};
|
|
499
|
+
type LogicNodeDrawerData = {
|
|
500
|
+
nodeId: string;
|
|
501
|
+
nodeLabel: string;
|
|
502
|
+
config: LogicNodeConfig;
|
|
503
|
+
};
|
|
504
|
+
type PipelineSettingsDrawerData = {
|
|
505
|
+
name: string;
|
|
506
|
+
description: string;
|
|
507
|
+
};
|
|
508
|
+
type DrawerStoreState = {
|
|
509
|
+
activeDrawer: DrawerType;
|
|
510
|
+
agentData: AgentDrawerData | null;
|
|
511
|
+
subworkflowData: SubworkflowDrawerData | null;
|
|
512
|
+
logicNodeData: LogicNodeDrawerData | null;
|
|
513
|
+
pipelineSettingsData: PipelineSettingsDrawerData | null;
|
|
514
|
+
};
|
|
515
|
+
type DrawerStoreActions = {
|
|
516
|
+
openAgentDrawer: (agent: AgentWithPrompts, models: AgentModel[], isCreateMode?: boolean) => void;
|
|
517
|
+
openSubworkflowDrawer: (tool: Subworkflow) => void;
|
|
518
|
+
openLogicNodeDrawer: (nodeId: string, nodeLabel: string, config: LogicNodeConfig) => void;
|
|
519
|
+
openPipelineSettingsDrawer: (name: string, description: string) => void;
|
|
520
|
+
closeDrawer: () => void;
|
|
521
|
+
};
|
|
522
|
+
type DrawerStore = DrawerStoreState & DrawerStoreActions;
|
|
523
|
+
declare const useDrawerStore: zustand.UseBoundStore<zustand.StoreApi<DrawerStore>>;
|
|
524
|
+
|
|
504
525
|
/**
|
|
505
526
|
* Workflow Store Selectors
|
|
506
527
|
* ========================
|
|
@@ -670,4 +691,4 @@ declare function getEntityBadgeColor(entityKey: string | undefined): string;
|
|
|
670
691
|
declare function getEntityHandleColor(entityKey: string | undefined): string;
|
|
671
692
|
declare function getEntityMinimapColor(entityKey: string | undefined): string;
|
|
672
693
|
|
|
673
|
-
export { AgentDrawer, AgentFlowNode, type AgentFramework, AgentNodeData, AgentToolFlowNode, AgentWithPrompts, AmazonNovaIcon, AnswerFlowNode, AnswerNodeData, AnthropicIcon, AnthropicModelIcon, AutoSaveWorkspace, type AutoSaveWorkspaceProps, CodeFlowNode, CodeNodeData, CrewAIIcon, DocumentExtractorFlowNode, DocumentExtractorNodeData, DslExportModal, DslImportModal, DynamicIslandConfirm, type DynamicIslandConfirmProps, EndFlowNode, EndNodeData, EntityFlowNode, EntityNodeData, FRAMEWORK_META, GoogleADKIcon, GroupFlowNode, GroupNodeData, HttpRequestFlowNode, HttpRequestNodeData, IfElseFlowNode, IfElseNodeData, IterationFlowNode, IterationNodeData, IterationStartFlowNode, IterationStartNodeData, KnowledgeBaseFlowNode, KnowledgeBaseNodeData, LOGIC_ICON_MAP, LOGIC_NODE_BADGE_COLORS, LOGIC_NODE_GRADIENTS, LOGIC_NODE_HANDLE_COLORS, LangChainIcon, LayoutDirection, ListOperatorFlowNode, ListOperatorNodeData, LogicNodeDrawer, MINIMAP_NODE_COLORS, MetaLlamaIcon, NodeCard, NodeContextMenu, NodePalette, type NodeRunResult, NoteFlowNode, NoteNodeData, OpenAIIcon, PanelContextMenu, ParameterExtractorFlowNode, ParameterExtractorNodeData, PipelineSettingsDrawer, PreviewPanel, type PreviewPanelProps, QuestionClassifierFlowNode, QuestionClassifierNodeData, RuleFlowNode, RuleNodeData, RunInputDialog, type RunInputDialogProps, RunPanel, SaveStatusBadge, type SaveStatusBadgeProps, SelectionContextMenu, StartFlowNode, StartNodeData, StrandsIcon, SubworkflowDrawer, TemplateTransformFlowNode, TemplateTransformNodeData, ToolFlowNode, ToolNodeData, VariableAggregatorFlowNode, VariableAggregatorNodeData, VariableAssignerFlowNode, VariableAssignerNodeData, VariableInspector, VersionHistoryPanel, type WorkflowBuilderClient, WorkflowBuilderProvider, type WorkflowBuilderProviderProps, WorkflowGraph, WorkflowListBar, type WorkflowStore, type WorkspaceBootstrapPayload, WorkspaceDrawer, WorkspaceProps, getCompatibleModels, getDefaultFrameworkForModel, getEntityBadgeColor, getEntityGradient, getEntityHandleColor, getEntityIcon, getEntityMinimapColor, getFrameworkMeta, getModelIcon, isModelCompatibleWithFramework, useCanRedo, useCanUndo, useCanvasShortcuts, useClipboard, useContextMenu, useEditingNodeId, useHasCopied, useHelpLines, useIsRunning, useNodeResults, useSelectedNodeCount, useSubworkflowStore, useUndoRedo, useWorkflowBuilderClient, useWorkflowBuilderClientOptional, useWorkflowStore };
|
|
694
|
+
export { AgentDrawer, AgentFlowNode, type AgentFramework, AgentNodeData, AgentToolFlowNode, AgentWithPrompts, AmazonNovaIcon, AnswerFlowNode, AnswerNodeData, AnthropicIcon, AnthropicModelIcon, AutoSaveWorkspace, type AutoSaveWorkspaceProps, CodeFlowNode, CodeNodeData, CrewAIIcon, DocumentExtractorFlowNode, DocumentExtractorNodeData, DslExportModal, DslImportModal, DynamicIslandConfirm, type DynamicIslandConfirmProps, EndFlowNode, EndNodeData, EntityFlowNode, EntityNodeData, FRAMEWORK_META, GoogleADKIcon, GroupFlowNode, GroupNodeData, HttpRequestFlowNode, HttpRequestNodeData, IfElseFlowNode, IfElseNodeData, IterationFlowNode, IterationNodeData, IterationStartFlowNode, IterationStartNodeData, KnowledgeBaseFlowNode, KnowledgeBaseNodeData, LOGIC_ICON_MAP, LOGIC_NODE_BADGE_COLORS, LOGIC_NODE_GRADIENTS, LOGIC_NODE_HANDLE_COLORS, LangChainIcon, LayoutDirection, ListOperatorFlowNode, ListOperatorNodeData, LogicNodeDrawer, MINIMAP_NODE_COLORS, MetaLlamaIcon, NodeCard, NodeContextMenu, NodePalette, type NodeRunResult, NoteFlowNode, NoteNodeData, OpenAIIcon, PanelContextMenu, ParameterExtractorFlowNode, ParameterExtractorNodeData, PipelineSettingsDrawer, PreviewPanel, type PreviewPanelProps, QuestionClassifierFlowNode, QuestionClassifierNodeData, RuleFlowNode, RuleNodeData, RunInputDialog, type RunInputDialogProps, RunPanel, SaveStatusBadge, type SaveStatusBadgeProps, SelectionContextMenu, StartFlowNode, StartNodeData, StrandsIcon, SubworkflowDrawer, TemplateTransformFlowNode, TemplateTransformNodeData, ToolFlowNode, ToolNodeData, VariableAggregatorFlowNode, VariableAggregatorNodeData, VariableAssignerFlowNode, VariableAssignerNodeData, VariableInspector, VersionHistoryPanel, type WorkflowBuilderClient, WorkflowBuilderProvider, type WorkflowBuilderProviderProps, WorkflowGraph, WorkflowListBar, type WorkflowStore, type WorkspaceBootstrapPayload, WorkspaceDrawer, WorkspaceProps, getCompatibleModels, getDefaultFrameworkForModel, getEntityBadgeColor, getEntityGradient, getEntityHandleColor, getEntityIcon, getEntityMinimapColor, getFrameworkMeta, getModelIcon, isModelCompatibleWithFramework, useCanRedo, useCanUndo, useCanvasShortcuts, useClipboard, useContextMenu, useDrawerStore, useEditingNodeId, useHasCopied, useHelpLines, useIsRunning, useNodeResults, useSelectedNodeCount, useSubworkflowStore, useUndoRedo, useWorkflowBuilderClient, useWorkflowBuilderClientOptional, useWorkflowStore };
|
package/dist/workflow/index.d.ts
CHANGED
|
@@ -199,14 +199,9 @@ declare const GroupFlowNode: React$1.NamedExoticComponent<{
|
|
|
199
199
|
}>;
|
|
200
200
|
|
|
201
201
|
type AgentDrawerProps = {
|
|
202
|
-
|
|
203
|
-
models: AgentModel[];
|
|
204
|
-
open: boolean;
|
|
205
|
-
isCreateMode?: boolean;
|
|
206
|
-
onClose: () => void;
|
|
207
|
-
onSaved: () => void;
|
|
202
|
+
onSaved?: () => void;
|
|
208
203
|
};
|
|
209
|
-
declare function AgentDrawer({
|
|
204
|
+
declare function AgentDrawer({ onSaved }: AgentDrawerProps): react_jsx_runtime.JSX.Element | null;
|
|
210
205
|
|
|
211
206
|
type SubworkflowDrawerProps = {
|
|
212
207
|
/** Called when save/create is clicked — receives the merged subworkflow with updated graph */
|
|
@@ -217,15 +212,10 @@ type SubworkflowDrawerProps = {
|
|
|
217
212
|
declare function SubworkflowDrawer({ onSaved, onMaximize }: SubworkflowDrawerProps): react_jsx_runtime.JSX.Element | null;
|
|
218
213
|
|
|
219
214
|
type LogicNodeDrawerProps = {
|
|
220
|
-
nodeId: string | null;
|
|
221
|
-
nodeLabel: string;
|
|
222
|
-
config: LogicNodeConfig | null;
|
|
223
|
-
open: boolean;
|
|
224
|
-
onClose: () => void;
|
|
225
215
|
onSave: (nodeId: string, updatedConfig: LogicNodeConfig) => void;
|
|
226
216
|
entities?: WorkflowEntityDefinition[];
|
|
227
217
|
};
|
|
228
|
-
declare function LogicNodeDrawer({
|
|
218
|
+
declare function LogicNodeDrawer({ onSave, entities }: LogicNodeDrawerProps): react_jsx_runtime.JSX.Element | null;
|
|
229
219
|
|
|
230
220
|
type WorkspaceDrawerProps = {
|
|
231
221
|
open: boolean;
|
|
@@ -241,13 +231,9 @@ type WorkspaceDrawerProps = {
|
|
|
241
231
|
declare function WorkspaceDrawer({ open, onClose, title, subtitle, icon, gradient, maxWidth, tabs, children, }: WorkspaceDrawerProps): react_jsx_runtime.JSX.Element;
|
|
242
232
|
|
|
243
233
|
type PipelineSettingsDrawerProps = {
|
|
244
|
-
open: boolean;
|
|
245
|
-
onClose: () => void;
|
|
246
|
-
name: string;
|
|
247
|
-
description: string;
|
|
248
234
|
onSave: (name: string, description: string) => Promise<void>;
|
|
249
235
|
};
|
|
250
|
-
declare function PipelineSettingsDrawer({
|
|
236
|
+
declare function PipelineSettingsDrawer({ onSave }: PipelineSettingsDrawerProps): react_jsx_runtime.JSX.Element;
|
|
251
237
|
|
|
252
238
|
type NodePaletteProps = {
|
|
253
239
|
agents: AgentWithPrompts[];
|
|
@@ -501,6 +487,41 @@ type SubworkflowStoreActions = {
|
|
|
501
487
|
type SubworkflowStore = SubworkflowStoreState & SubworkflowStoreActions;
|
|
502
488
|
declare const useSubworkflowStore: zustand.UseBoundStore<zustand.StoreApi<SubworkflowStore>>;
|
|
503
489
|
|
|
490
|
+
type DrawerType = 'agent' | 'subworkflow' | 'logic-node' | 'pipeline-settings' | null;
|
|
491
|
+
type AgentDrawerData = {
|
|
492
|
+
agent: AgentWithPrompts;
|
|
493
|
+
models: AgentModel[];
|
|
494
|
+
isCreateMode: boolean;
|
|
495
|
+
};
|
|
496
|
+
type SubworkflowDrawerData = {
|
|
497
|
+
tool: Subworkflow;
|
|
498
|
+
};
|
|
499
|
+
type LogicNodeDrawerData = {
|
|
500
|
+
nodeId: string;
|
|
501
|
+
nodeLabel: string;
|
|
502
|
+
config: LogicNodeConfig;
|
|
503
|
+
};
|
|
504
|
+
type PipelineSettingsDrawerData = {
|
|
505
|
+
name: string;
|
|
506
|
+
description: string;
|
|
507
|
+
};
|
|
508
|
+
type DrawerStoreState = {
|
|
509
|
+
activeDrawer: DrawerType;
|
|
510
|
+
agentData: AgentDrawerData | null;
|
|
511
|
+
subworkflowData: SubworkflowDrawerData | null;
|
|
512
|
+
logicNodeData: LogicNodeDrawerData | null;
|
|
513
|
+
pipelineSettingsData: PipelineSettingsDrawerData | null;
|
|
514
|
+
};
|
|
515
|
+
type DrawerStoreActions = {
|
|
516
|
+
openAgentDrawer: (agent: AgentWithPrompts, models: AgentModel[], isCreateMode?: boolean) => void;
|
|
517
|
+
openSubworkflowDrawer: (tool: Subworkflow) => void;
|
|
518
|
+
openLogicNodeDrawer: (nodeId: string, nodeLabel: string, config: LogicNodeConfig) => void;
|
|
519
|
+
openPipelineSettingsDrawer: (name: string, description: string) => void;
|
|
520
|
+
closeDrawer: () => void;
|
|
521
|
+
};
|
|
522
|
+
type DrawerStore = DrawerStoreState & DrawerStoreActions;
|
|
523
|
+
declare const useDrawerStore: zustand.UseBoundStore<zustand.StoreApi<DrawerStore>>;
|
|
524
|
+
|
|
504
525
|
/**
|
|
505
526
|
* Workflow Store Selectors
|
|
506
527
|
* ========================
|
|
@@ -670,4 +691,4 @@ declare function getEntityBadgeColor(entityKey: string | undefined): string;
|
|
|
670
691
|
declare function getEntityHandleColor(entityKey: string | undefined): string;
|
|
671
692
|
declare function getEntityMinimapColor(entityKey: string | undefined): string;
|
|
672
693
|
|
|
673
|
-
export { AgentDrawer, AgentFlowNode, type AgentFramework, AgentNodeData, AgentToolFlowNode, AgentWithPrompts, AmazonNovaIcon, AnswerFlowNode, AnswerNodeData, AnthropicIcon, AnthropicModelIcon, AutoSaveWorkspace, type AutoSaveWorkspaceProps, CodeFlowNode, CodeNodeData, CrewAIIcon, DocumentExtractorFlowNode, DocumentExtractorNodeData, DslExportModal, DslImportModal, DynamicIslandConfirm, type DynamicIslandConfirmProps, EndFlowNode, EndNodeData, EntityFlowNode, EntityNodeData, FRAMEWORK_META, GoogleADKIcon, GroupFlowNode, GroupNodeData, HttpRequestFlowNode, HttpRequestNodeData, IfElseFlowNode, IfElseNodeData, IterationFlowNode, IterationNodeData, IterationStartFlowNode, IterationStartNodeData, KnowledgeBaseFlowNode, KnowledgeBaseNodeData, LOGIC_ICON_MAP, LOGIC_NODE_BADGE_COLORS, LOGIC_NODE_GRADIENTS, LOGIC_NODE_HANDLE_COLORS, LangChainIcon, LayoutDirection, ListOperatorFlowNode, ListOperatorNodeData, LogicNodeDrawer, MINIMAP_NODE_COLORS, MetaLlamaIcon, NodeCard, NodeContextMenu, NodePalette, type NodeRunResult, NoteFlowNode, NoteNodeData, OpenAIIcon, PanelContextMenu, ParameterExtractorFlowNode, ParameterExtractorNodeData, PipelineSettingsDrawer, PreviewPanel, type PreviewPanelProps, QuestionClassifierFlowNode, QuestionClassifierNodeData, RuleFlowNode, RuleNodeData, RunInputDialog, type RunInputDialogProps, RunPanel, SaveStatusBadge, type SaveStatusBadgeProps, SelectionContextMenu, StartFlowNode, StartNodeData, StrandsIcon, SubworkflowDrawer, TemplateTransformFlowNode, TemplateTransformNodeData, ToolFlowNode, ToolNodeData, VariableAggregatorFlowNode, VariableAggregatorNodeData, VariableAssignerFlowNode, VariableAssignerNodeData, VariableInspector, VersionHistoryPanel, type WorkflowBuilderClient, WorkflowBuilderProvider, type WorkflowBuilderProviderProps, WorkflowGraph, WorkflowListBar, type WorkflowStore, type WorkspaceBootstrapPayload, WorkspaceDrawer, WorkspaceProps, getCompatibleModels, getDefaultFrameworkForModel, getEntityBadgeColor, getEntityGradient, getEntityHandleColor, getEntityIcon, getEntityMinimapColor, getFrameworkMeta, getModelIcon, isModelCompatibleWithFramework, useCanRedo, useCanUndo, useCanvasShortcuts, useClipboard, useContextMenu, useEditingNodeId, useHasCopied, useHelpLines, useIsRunning, useNodeResults, useSelectedNodeCount, useSubworkflowStore, useUndoRedo, useWorkflowBuilderClient, useWorkflowBuilderClientOptional, useWorkflowStore };
|
|
694
|
+
export { AgentDrawer, AgentFlowNode, type AgentFramework, AgentNodeData, AgentToolFlowNode, AgentWithPrompts, AmazonNovaIcon, AnswerFlowNode, AnswerNodeData, AnthropicIcon, AnthropicModelIcon, AutoSaveWorkspace, type AutoSaveWorkspaceProps, CodeFlowNode, CodeNodeData, CrewAIIcon, DocumentExtractorFlowNode, DocumentExtractorNodeData, DslExportModal, DslImportModal, DynamicIslandConfirm, type DynamicIslandConfirmProps, EndFlowNode, EndNodeData, EntityFlowNode, EntityNodeData, FRAMEWORK_META, GoogleADKIcon, GroupFlowNode, GroupNodeData, HttpRequestFlowNode, HttpRequestNodeData, IfElseFlowNode, IfElseNodeData, IterationFlowNode, IterationNodeData, IterationStartFlowNode, IterationStartNodeData, KnowledgeBaseFlowNode, KnowledgeBaseNodeData, LOGIC_ICON_MAP, LOGIC_NODE_BADGE_COLORS, LOGIC_NODE_GRADIENTS, LOGIC_NODE_HANDLE_COLORS, LangChainIcon, LayoutDirection, ListOperatorFlowNode, ListOperatorNodeData, LogicNodeDrawer, MINIMAP_NODE_COLORS, MetaLlamaIcon, NodeCard, NodeContextMenu, NodePalette, type NodeRunResult, NoteFlowNode, NoteNodeData, OpenAIIcon, PanelContextMenu, ParameterExtractorFlowNode, ParameterExtractorNodeData, PipelineSettingsDrawer, PreviewPanel, type PreviewPanelProps, QuestionClassifierFlowNode, QuestionClassifierNodeData, RuleFlowNode, RuleNodeData, RunInputDialog, type RunInputDialogProps, RunPanel, SaveStatusBadge, type SaveStatusBadgeProps, SelectionContextMenu, StartFlowNode, StartNodeData, StrandsIcon, SubworkflowDrawer, TemplateTransformFlowNode, TemplateTransformNodeData, ToolFlowNode, ToolNodeData, VariableAggregatorFlowNode, VariableAggregatorNodeData, VariableAssignerFlowNode, VariableAssignerNodeData, VariableInspector, VersionHistoryPanel, type WorkflowBuilderClient, WorkflowBuilderProvider, type WorkflowBuilderProviderProps, WorkflowGraph, WorkflowListBar, type WorkflowStore, type WorkspaceBootstrapPayload, WorkspaceDrawer, WorkspaceProps, getCompatibleModels, getDefaultFrameworkForModel, getEntityBadgeColor, getEntityGradient, getEntityHandleColor, getEntityIcon, getEntityMinimapColor, getFrameworkMeta, getModelIcon, isModelCompatibleWithFramework, useCanRedo, useCanUndo, useCanvasShortcuts, useClipboard, useContextMenu, useDrawerStore, useEditingNodeId, useHasCopied, useHelpLines, useIsRunning, useNodeResults, useSelectedNodeCount, useSubworkflowStore, useUndoRedo, useWorkflowBuilderClient, useWorkflowBuilderClientOptional, useWorkflowStore };
|
package/dist/workflow/index.js
CHANGED
|
@@ -284,6 +284,48 @@ var useWorkflowStore = zustand.create((set, get) => ({
|
|
|
284
284
|
});
|
|
285
285
|
}
|
|
286
286
|
}));
|
|
287
|
+
var useDrawerStore = zustand.create((set) => ({
|
|
288
|
+
activeDrawer: null,
|
|
289
|
+
agentData: null,
|
|
290
|
+
subworkflowData: null,
|
|
291
|
+
logicNodeData: null,
|
|
292
|
+
pipelineSettingsData: null,
|
|
293
|
+
openAgentDrawer: (agent, models, isCreateMode = false) => set({
|
|
294
|
+
activeDrawer: "agent",
|
|
295
|
+
agentData: { agent, models, isCreateMode },
|
|
296
|
+
subworkflowData: null,
|
|
297
|
+
logicNodeData: null,
|
|
298
|
+
pipelineSettingsData: null
|
|
299
|
+
}),
|
|
300
|
+
openSubworkflowDrawer: (tool) => set({
|
|
301
|
+
activeDrawer: "subworkflow",
|
|
302
|
+
subworkflowData: { tool },
|
|
303
|
+
agentData: null,
|
|
304
|
+
logicNodeData: null,
|
|
305
|
+
pipelineSettingsData: null
|
|
306
|
+
}),
|
|
307
|
+
openLogicNodeDrawer: (nodeId, nodeLabel, config) => set({
|
|
308
|
+
activeDrawer: "logic-node",
|
|
309
|
+
logicNodeData: { nodeId, nodeLabel, config },
|
|
310
|
+
agentData: null,
|
|
311
|
+
subworkflowData: null,
|
|
312
|
+
pipelineSettingsData: null
|
|
313
|
+
}),
|
|
314
|
+
openPipelineSettingsDrawer: (name, description) => set({
|
|
315
|
+
activeDrawer: "pipeline-settings",
|
|
316
|
+
pipelineSettingsData: { name, description },
|
|
317
|
+
agentData: null,
|
|
318
|
+
subworkflowData: null,
|
|
319
|
+
logicNodeData: null
|
|
320
|
+
}),
|
|
321
|
+
closeDrawer: () => set({
|
|
322
|
+
activeDrawer: null,
|
|
323
|
+
agentData: null,
|
|
324
|
+
subworkflowData: null,
|
|
325
|
+
logicNodeData: null,
|
|
326
|
+
pipelineSettingsData: null
|
|
327
|
+
})
|
|
328
|
+
}));
|
|
287
329
|
var GRAPH_ACTIVE_EDGE_COLOR = "#14b8a6";
|
|
288
330
|
var GRAPH_TRUE_EDGE_COLOR = "#22c55e";
|
|
289
331
|
var GRAPH_FALSE_EDGE_COLOR = "#ef4444";
|
|
@@ -8340,8 +8382,15 @@ var NODE_TITLE_KEYS = {
|
|
|
8340
8382
|
entity: "entityNodeConfig",
|
|
8341
8383
|
group: "groupNodeConfig"
|
|
8342
8384
|
};
|
|
8343
|
-
function LogicNodeDrawer({
|
|
8385
|
+
function LogicNodeDrawer({ onSave, entities = [] }) {
|
|
8344
8386
|
const t = nextIntl.useTranslations("agents.workflow");
|
|
8387
|
+
const activeDrawer = useDrawerStore((s) => s.activeDrawer);
|
|
8388
|
+
const logicNodeData = useDrawerStore((s) => s.logicNodeData);
|
|
8389
|
+
const closeDrawer = useDrawerStore((s) => s.closeDrawer);
|
|
8390
|
+
const open = activeDrawer === "logic-node";
|
|
8391
|
+
const nodeId = logicNodeData?.nodeId ?? null;
|
|
8392
|
+
const nodeLabel = logicNodeData?.nodeLabel ?? "";
|
|
8393
|
+
const config = logicNodeData?.config ?? null;
|
|
8345
8394
|
if (!config || !nodeId) return null;
|
|
8346
8395
|
const entityMasterId = config.type === "entity" ? config.entityMasterId : void 0;
|
|
8347
8396
|
const IconComponent = entityMasterId ? getEntityIcon(entityMasterId) : LOGIC_ICON_MAP[config.type];
|
|
@@ -8354,41 +8403,41 @@ function LogicNodeDrawer({ nodeId, nodeLabel, config, open, onClose, onSave, ent
|
|
|
8354
8403
|
const renderForm = () => {
|
|
8355
8404
|
switch (config.type) {
|
|
8356
8405
|
case "start":
|
|
8357
|
-
return /* @__PURE__ */ jsxRuntime.jsx(StartNodeConfigForm, { config, onSave: handleSave, onCancel:
|
|
8406
|
+
return /* @__PURE__ */ jsxRuntime.jsx(StartNodeConfigForm, { config, onSave: handleSave, onCancel: closeDrawer });
|
|
8358
8407
|
case "end":
|
|
8359
|
-
return /* @__PURE__ */ jsxRuntime.jsx(EndNodeConfigForm, { config, onSave: handleSave, onCancel:
|
|
8408
|
+
return /* @__PURE__ */ jsxRuntime.jsx(EndNodeConfigForm, { config, onSave: handleSave, onCancel: closeDrawer });
|
|
8360
8409
|
case "if_else":
|
|
8361
|
-
return /* @__PURE__ */ jsxRuntime.jsx(IfElseNodeConfigForm, { config, onSave: handleSave, onCancel:
|
|
8410
|
+
return /* @__PURE__ */ jsxRuntime.jsx(IfElseNodeConfigForm, { config, onSave: handleSave, onCancel: closeDrawer });
|
|
8362
8411
|
case "code":
|
|
8363
|
-
return /* @__PURE__ */ jsxRuntime.jsx(CodeNodeConfigForm, { config, onSave: handleSave, onCancel:
|
|
8412
|
+
return /* @__PURE__ */ jsxRuntime.jsx(CodeNodeConfigForm, { config, onSave: handleSave, onCancel: closeDrawer });
|
|
8364
8413
|
case "http_request":
|
|
8365
|
-
return /* @__PURE__ */ jsxRuntime.jsx(HttpRequestNodeConfigForm, { config, onSave: handleSave, onCancel:
|
|
8414
|
+
return /* @__PURE__ */ jsxRuntime.jsx(HttpRequestNodeConfigForm, { config, onSave: handleSave, onCancel: closeDrawer });
|
|
8366
8415
|
case "template_transform":
|
|
8367
|
-
return /* @__PURE__ */ jsxRuntime.jsx(TemplateTransformNodeConfigForm, { config, onSave: handleSave, onCancel:
|
|
8416
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TemplateTransformNodeConfigForm, { config, onSave: handleSave, onCancel: closeDrawer });
|
|
8368
8417
|
case "iteration":
|
|
8369
|
-
return /* @__PURE__ */ jsxRuntime.jsx(IterationNodeConfigForm, { config, onSave: handleSave, onCancel:
|
|
8418
|
+
return /* @__PURE__ */ jsxRuntime.jsx(IterationNodeConfigForm, { config, onSave: handleSave, onCancel: closeDrawer });
|
|
8370
8419
|
case "knowledge_base":
|
|
8371
|
-
return /* @__PURE__ */ jsxRuntime.jsx(KnowledgeBaseNodeConfigForm, { config, onSave: handleSave, onCancel:
|
|
8420
|
+
return /* @__PURE__ */ jsxRuntime.jsx(KnowledgeBaseNodeConfigForm, { config, onSave: handleSave, onCancel: closeDrawer });
|
|
8372
8421
|
case "answer":
|
|
8373
|
-
return /* @__PURE__ */ jsxRuntime.jsx(AnswerNodeConfigForm, { config, onSave: handleSave, onCancel:
|
|
8422
|
+
return /* @__PURE__ */ jsxRuntime.jsx(AnswerNodeConfigForm, { config, onSave: handleSave, onCancel: closeDrawer });
|
|
8374
8423
|
case "question_classifier":
|
|
8375
|
-
return /* @__PURE__ */ jsxRuntime.jsx(QuestionClassifierNodeConfigForm, { config, onSave: handleSave, onCancel:
|
|
8424
|
+
return /* @__PURE__ */ jsxRuntime.jsx(QuestionClassifierNodeConfigForm, { config, onSave: handleSave, onCancel: closeDrawer });
|
|
8376
8425
|
case "parameter_extractor":
|
|
8377
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ParameterExtractorNodeConfigForm, { config, onSave: handleSave, onCancel:
|
|
8426
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ParameterExtractorNodeConfigForm, { config, onSave: handleSave, onCancel: closeDrawer });
|
|
8378
8427
|
case "variable_assigner":
|
|
8379
|
-
return /* @__PURE__ */ jsxRuntime.jsx(VariableAssignerNodeConfigForm, { config, onSave: handleSave, onCancel:
|
|
8428
|
+
return /* @__PURE__ */ jsxRuntime.jsx(VariableAssignerNodeConfigForm, { config, onSave: handleSave, onCancel: closeDrawer });
|
|
8380
8429
|
case "variable_aggregator":
|
|
8381
|
-
return /* @__PURE__ */ jsxRuntime.jsx(VariableAggregatorNodeConfigForm, { config, onSave: handleSave, onCancel:
|
|
8430
|
+
return /* @__PURE__ */ jsxRuntime.jsx(VariableAggregatorNodeConfigForm, { config, onSave: handleSave, onCancel: closeDrawer });
|
|
8382
8431
|
case "document_extractor":
|
|
8383
|
-
return /* @__PURE__ */ jsxRuntime.jsx(DocumentExtractorNodeConfigForm, { config, onSave: handleSave, onCancel:
|
|
8432
|
+
return /* @__PURE__ */ jsxRuntime.jsx(DocumentExtractorNodeConfigForm, { config, onSave: handleSave, onCancel: closeDrawer });
|
|
8384
8433
|
case "list_operator":
|
|
8385
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ListOperatorNodeConfigForm, { config, onSave: handleSave, onCancel:
|
|
8434
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ListOperatorNodeConfigForm, { config, onSave: handleSave, onCancel: closeDrawer });
|
|
8386
8435
|
case "iteration_start":
|
|
8387
|
-
return /* @__PURE__ */ jsxRuntime.jsx(IterationStartNodeConfigForm, { config, onSave: handleSave, onCancel:
|
|
8436
|
+
return /* @__PURE__ */ jsxRuntime.jsx(IterationStartNodeConfigForm, { config, onSave: handleSave, onCancel: closeDrawer });
|
|
8388
8437
|
case "entity":
|
|
8389
|
-
return /* @__PURE__ */ jsxRuntime.jsx(EntityNodeConfigForm, { config, entities, onSave: handleSave, onCancel:
|
|
8438
|
+
return /* @__PURE__ */ jsxRuntime.jsx(EntityNodeConfigForm, { config, entities, onSave: handleSave, onCancel: closeDrawer });
|
|
8390
8439
|
case "group":
|
|
8391
|
-
return /* @__PURE__ */ jsxRuntime.jsx(GroupNodeConfigForm, { config, onSave: handleSave, onCancel:
|
|
8440
|
+
return /* @__PURE__ */ jsxRuntime.jsx(GroupNodeConfigForm, { config, onSave: handleSave, onCancel: closeDrawer });
|
|
8392
8441
|
default:
|
|
8393
8442
|
return null;
|
|
8394
8443
|
}
|
|
@@ -8397,7 +8446,7 @@ function LogicNodeDrawer({ nodeId, nodeLabel, config, open, onClose, onSave, ent
|
|
|
8397
8446
|
WorkspaceDrawer,
|
|
8398
8447
|
{
|
|
8399
8448
|
open,
|
|
8400
|
-
onClose,
|
|
8449
|
+
onClose: closeDrawer,
|
|
8401
8450
|
title,
|
|
8402
8451
|
subtitle: nodeLabel,
|
|
8403
8452
|
icon: IconComponent ? /* @__PURE__ */ jsxRuntime.jsx(IconComponent, { className: "h-5 w-5 text-white" }) : void 0,
|
|
@@ -8826,23 +8875,26 @@ function WorkflowCanvasInner({
|
|
|
8826
8875
|
isCreatingAgent = false,
|
|
8827
8876
|
nodeTypes: externalNodeTypes,
|
|
8828
8877
|
renderAgentDrawer,
|
|
8829
|
-
renderLogicNodeDrawer
|
|
8878
|
+
renderLogicNodeDrawer: _renderLogicNodeDrawer
|
|
8830
8879
|
}) {
|
|
8831
8880
|
const { screenToFlowPosition, getNode, toObject, fitView, zoomIn, zoomOut, zoomTo } = react.useReactFlow();
|
|
8832
8881
|
const tWorkflow = nextIntl.useTranslations("agents.workflow");
|
|
8833
8882
|
const sortedAgents = React8.useMemo(() => [...agents].sort((agentA, agentB) => (agentA.order ?? 0) - (agentB.order ?? 0)), [agents]);
|
|
8834
8883
|
const [selectedAgentId, setSelectedAgentId] = React8.useState(null);
|
|
8835
|
-
const
|
|
8836
|
-
const
|
|
8837
|
-
|
|
8838
|
-
|
|
8839
|
-
|
|
8840
|
-
|
|
8841
|
-
|
|
8842
|
-
|
|
8843
|
-
|
|
8844
|
-
|
|
8845
|
-
|
|
8884
|
+
const openAgentDrawerAction = useDrawerStore((s) => s.openAgentDrawer);
|
|
8885
|
+
const openLogicNodeDrawerAction = useDrawerStore((s) => s.openLogicNodeDrawer);
|
|
8886
|
+
const closeDrawerAction = useDrawerStore((s) => s.closeDrawer);
|
|
8887
|
+
const activeDrawer = useDrawerStore((s) => s.activeDrawer);
|
|
8888
|
+
const drawerOpen = activeDrawer === "agent";
|
|
8889
|
+
React8.useEffect(() => {
|
|
8890
|
+
if (isCreatingAgent) {
|
|
8891
|
+
openAgentDrawerAction(
|
|
8892
|
+
{ agentId: "", name: "", order: 0, enabled: true, temperature: 0.7, maxTokens: 4096 },
|
|
8893
|
+
models,
|
|
8894
|
+
true
|
|
8895
|
+
);
|
|
8896
|
+
}
|
|
8897
|
+
}, [isCreatingAgent]);
|
|
8846
8898
|
const graphChangeTimerRef = React8.useRef(null);
|
|
8847
8899
|
const insertNodeOnEdgeRef = React8.useRef(() => {
|
|
8848
8900
|
});
|
|
@@ -8879,9 +8931,16 @@ function WorkflowCanvasInner({
|
|
|
8879
8931
|
const setLayoutDirection = useWorkflowStore((s) => s.setLayoutDirection);
|
|
8880
8932
|
const [editingLogicNodeId, setEditingLogicNodeId] = React8.useState(null);
|
|
8881
8933
|
const handleEditLogicNode = React8.useCallback((nodeId) => {
|
|
8882
|
-
closeAllDrawers();
|
|
8883
8934
|
setEditingLogicNodeId(nodeId);
|
|
8884
|
-
|
|
8935
|
+
const node = getNode(nodeId);
|
|
8936
|
+
if (node) {
|
|
8937
|
+
const nodeData = node.data;
|
|
8938
|
+
const config = nodeData.config;
|
|
8939
|
+
if (config) {
|
|
8940
|
+
openLogicNodeDrawerAction(nodeId, nodeData.label ?? "", config);
|
|
8941
|
+
}
|
|
8942
|
+
}
|
|
8943
|
+
}, [getNode, openLogicNodeDrawerAction]);
|
|
8885
8944
|
const agentMap = React8.useMemo(() => {
|
|
8886
8945
|
const map = /* @__PURE__ */ new Map();
|
|
8887
8946
|
for (const agent of agents) {
|
|
@@ -8965,8 +9024,7 @@ function WorkflowCanvasInner({
|
|
|
8965
9024
|
selected: selectedAgentId === savedNode.id,
|
|
8966
9025
|
onSelect: () => {
|
|
8967
9026
|
setSelectedAgentId(agent.agentId);
|
|
8968
|
-
|
|
8969
|
-
openAgentDrawer(agent, models);
|
|
9027
|
+
openAgentDrawerAction(agent, models);
|
|
8970
9028
|
},
|
|
8971
9029
|
onRemoveFromCanvas: handleRemoveNodeFromCanvas
|
|
8972
9030
|
}
|
|
@@ -9315,11 +9373,9 @@ function WorkflowCanvasInner({
|
|
|
9315
9373
|
if (!targetNode) return;
|
|
9316
9374
|
if (targetNode.type === "agent") {
|
|
9317
9375
|
const agent = targetNode.data?.agent;
|
|
9318
|
-
|
|
9319
|
-
|
|
9320
|
-
|
|
9321
|
-
setDrawerOpen(true);
|
|
9322
|
-
openAgentDrawer(agent, models);
|
|
9376
|
+
if (agent) {
|
|
9377
|
+
setSelectedAgentId(agent.agentId ?? agent.id ?? null);
|
|
9378
|
+
openAgentDrawerAction(agent, models);
|
|
9323
9379
|
}
|
|
9324
9380
|
} else if (targetNode.type === "tool") {
|
|
9325
9381
|
const tool = targetNode.data?.tool;
|
|
@@ -9329,7 +9385,7 @@ function WorkflowCanvasInner({
|
|
|
9329
9385
|
} else {
|
|
9330
9386
|
handleEditLogicNode(nodeId);
|
|
9331
9387
|
}
|
|
9332
|
-
}, [nodes, setSelectedAgentId,
|
|
9388
|
+
}, [nodes, setSelectedAgentId, openAgentDrawerAction, models, onEditTool, onEditRule, handleEditLogicNode]);
|
|
9333
9389
|
const DUPLICATE_OFFSET = 40;
|
|
9334
9390
|
const contextMenuDuplicateNode = React8.useCallback((nodeId) => {
|
|
9335
9391
|
storeTakeSnapshot();
|
|
@@ -9810,8 +9866,7 @@ function WorkflowCanvasInner({
|
|
|
9810
9866
|
selected: false,
|
|
9811
9867
|
onSelect: () => {
|
|
9812
9868
|
setSelectedAgentId(agent.agentId);
|
|
9813
|
-
|
|
9814
|
-
openAgentDrawer(agent, models);
|
|
9869
|
+
openAgentDrawerAction(agent, models);
|
|
9815
9870
|
},
|
|
9816
9871
|
onRemoveFromCanvas: handleRemoveNodeFromCanvas
|
|
9817
9872
|
}
|
|
@@ -10106,7 +10161,7 @@ function WorkflowCanvasInner({
|
|
|
10106
10161
|
const handleEdgeClick = React8.useCallback(() => {
|
|
10107
10162
|
closeContextMenu();
|
|
10108
10163
|
}, [closeContextMenu]);
|
|
10109
|
-
|
|
10164
|
+
React8.useMemo(() => {
|
|
10110
10165
|
if (!editingLogicNodeId) return null;
|
|
10111
10166
|
const node = nodes.find((matchingNode) => matchingNode.id === editingLogicNodeId);
|
|
10112
10167
|
if (!node) return null;
|
|
@@ -10259,28 +10314,28 @@ function WorkflowCanvasInner({
|
|
|
10259
10314
|
open: drawerOpen || isCreatingAgent,
|
|
10260
10315
|
isCreateMode: isCreatingAgent,
|
|
10261
10316
|
onClose: () => {
|
|
10262
|
-
|
|
10263
|
-
|
|
10264
|
-
|
|
10265
|
-
}
|
|
10317
|
+
closeDrawerAction();
|
|
10318
|
+
setSelectedAgentId(null);
|
|
10319
|
+
if (isCreatingAgent) onCancelCreateAgent?.();
|
|
10266
10320
|
},
|
|
10267
10321
|
onSaved: () => {
|
|
10268
|
-
|
|
10269
|
-
|
|
10270
|
-
|
|
10271
|
-
}
|
|
10322
|
+
closeDrawerAction();
|
|
10323
|
+
setSelectedAgentId(null);
|
|
10324
|
+
if (isCreatingAgent) onCancelCreateAgent?.();
|
|
10272
10325
|
onAgentSaved?.();
|
|
10273
10326
|
}
|
|
10274
10327
|
}),
|
|
10275
|
-
|
|
10276
|
-
|
|
10277
|
-
|
|
10278
|
-
|
|
10279
|
-
|
|
10280
|
-
|
|
10281
|
-
|
|
10282
|
-
|
|
10283
|
-
|
|
10328
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10329
|
+
LogicNodeDrawer,
|
|
10330
|
+
{
|
|
10331
|
+
onSave: (nodeId, config) => {
|
|
10332
|
+
handleSaveLogicNodeConfig(nodeId, config);
|
|
10333
|
+
closeDrawerAction();
|
|
10334
|
+
setEditingLogicNodeId(null);
|
|
10335
|
+
},
|
|
10336
|
+
entities: allEntities
|
|
10337
|
+
}
|
|
10338
|
+
)
|
|
10284
10339
|
] });
|
|
10285
10340
|
}
|
|
10286
10341
|
function WorkflowCanvas(props) {
|
|
@@ -10958,18 +11013,25 @@ function ResultsTab({ agentId, t }) {
|
|
|
10958
11013
|
] })
|
|
10959
11014
|
] });
|
|
10960
11015
|
}
|
|
10961
|
-
function AgentDrawer({
|
|
11016
|
+
function AgentDrawer({ onSaved }) {
|
|
10962
11017
|
const t = nextIntl.useTranslations("agents.workflow");
|
|
11018
|
+
const activeDrawer = useDrawerStore((s) => s.activeDrawer);
|
|
11019
|
+
const agentData = useDrawerStore((s) => s.agentData);
|
|
11020
|
+
const closeDrawer = useDrawerStore((s) => s.closeDrawer);
|
|
11021
|
+
const open = activeDrawer === "agent";
|
|
11022
|
+
const agent = agentData?.agent ?? null;
|
|
11023
|
+
const models = agentData?.models ?? [];
|
|
11024
|
+
const isCreateMode = agentData?.isCreateMode ?? false;
|
|
10963
11025
|
const [activeTab, setActiveTab] = React8.useState("config");
|
|
10964
|
-
const [selectedModelId, setSelectedModelId] = React8.useState(
|
|
10965
|
-
const [selectedFramework, setSelectedFramework] = React8.useState(
|
|
10966
|
-
const [temperature, setTemperature] = React8.useState(
|
|
10967
|
-
const [elo, setElo] = React8.useState(
|
|
10968
|
-
const [saved, setSaved] = React8.useState(
|
|
11026
|
+
const [selectedModelId, setSelectedModelId] = React8.useState("");
|
|
11027
|
+
const [selectedFramework, setSelectedFramework] = React8.useState("custom");
|
|
11028
|
+
const [temperature, setTemperature] = React8.useState(0.7);
|
|
11029
|
+
const [elo, setElo] = React8.useState(1e3);
|
|
11030
|
+
const [saved, setSaved] = React8.useState(true);
|
|
10969
11031
|
const agentId = agent?.agentId ?? agent?.id ?? "";
|
|
10970
11032
|
React8.useEffect(() => {
|
|
10971
11033
|
if (!agent) return;
|
|
10972
|
-
setSelectedModelId(agent.modelId ?? "");
|
|
11034
|
+
setSelectedModelId(agent.modelId ?? models[0]?.id ?? "");
|
|
10973
11035
|
setSelectedFramework(String(agent.framework ?? "custom"));
|
|
10974
11036
|
setTemperature(agent.temperature ?? 0.7);
|
|
10975
11037
|
setElo(Number(agent.elo ?? 1e3));
|
|
@@ -10980,11 +11042,11 @@ function AgentDrawer({ agent, models, open, isCreateMode = false, onClose, onSav
|
|
|
10980
11042
|
const markDirty = React8.useCallback(() => setSaved(false), []);
|
|
10981
11043
|
const markSaved = React8.useCallback(() => setSaved(true), []);
|
|
10982
11044
|
const handleClose = React8.useCallback(() => {
|
|
10983
|
-
|
|
10984
|
-
}, [
|
|
11045
|
+
closeDrawer();
|
|
11046
|
+
}, [closeDrawer]);
|
|
10985
11047
|
const handleMarkSaved = React8.useCallback(() => {
|
|
10986
11048
|
markSaved();
|
|
10987
|
-
onSaved();
|
|
11049
|
+
onSaved?.();
|
|
10988
11050
|
}, [markSaved, onSaved]);
|
|
10989
11051
|
if (!agent) return null;
|
|
10990
11052
|
const tabs = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex border-b border-white/20 dark:border-white/10", children: ["config", "results"].map((tab) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -11291,21 +11353,21 @@ function SubworkflowDrawer({ onSaved, onMaximize }) {
|
|
|
11291
11353
|
}
|
|
11292
11354
|
);
|
|
11293
11355
|
}
|
|
11294
|
-
function PipelineSettingsDrawer({
|
|
11295
|
-
open,
|
|
11296
|
-
onClose,
|
|
11297
|
-
name,
|
|
11298
|
-
description,
|
|
11299
|
-
onSave
|
|
11300
|
-
}) {
|
|
11356
|
+
function PipelineSettingsDrawer({ onSave }) {
|
|
11301
11357
|
const t = nextIntl.useTranslations("agents.workflow");
|
|
11302
|
-
const
|
|
11303
|
-
const
|
|
11358
|
+
const activeDrawer = useDrawerStore((s) => s.activeDrawer);
|
|
11359
|
+
const data = useDrawerStore((s) => s.pipelineSettingsData);
|
|
11360
|
+
const closeDrawer = useDrawerStore((s) => s.closeDrawer);
|
|
11361
|
+
const open = activeDrawer === "pipeline-settings";
|
|
11362
|
+
const [nameValue, setNameValue] = React8.useState("");
|
|
11363
|
+
const [descriptionValue, setDescriptionValue] = React8.useState("");
|
|
11304
11364
|
const [isSaving, setIsSaving] = React8.useState(false);
|
|
11305
11365
|
React8.useEffect(() => {
|
|
11306
|
-
|
|
11307
|
-
|
|
11308
|
-
|
|
11366
|
+
if (data) {
|
|
11367
|
+
setNameValue(data.name);
|
|
11368
|
+
setDescriptionValue(data.description);
|
|
11369
|
+
}
|
|
11370
|
+
}, [data]);
|
|
11309
11371
|
const handleSubmit = async (event) => {
|
|
11310
11372
|
event.preventDefault();
|
|
11311
11373
|
const trimmedName = nameValue.trim();
|
|
@@ -11313,7 +11375,7 @@ function PipelineSettingsDrawer({
|
|
|
11313
11375
|
setIsSaving(true);
|
|
11314
11376
|
try {
|
|
11315
11377
|
await onSave(trimmedName, descriptionValue.trim());
|
|
11316
|
-
|
|
11378
|
+
closeDrawer();
|
|
11317
11379
|
} catch {
|
|
11318
11380
|
} finally {
|
|
11319
11381
|
setIsSaving(false);
|
|
@@ -11323,7 +11385,7 @@ function PipelineSettingsDrawer({
|
|
|
11323
11385
|
WorkspaceDrawer,
|
|
11324
11386
|
{
|
|
11325
11387
|
open,
|
|
11326
|
-
onClose,
|
|
11388
|
+
onClose: closeDrawer,
|
|
11327
11389
|
title: t("pipelineSettings"),
|
|
11328
11390
|
subtitle: t("pipelineSettingsSubtitle"),
|
|
11329
11391
|
icon: /* @__PURE__ */ jsxRuntime.jsx(HeroIcons.Cog6ToothIcon, { className: "h-5 w-5 text-white" }),
|
|
@@ -13794,6 +13856,7 @@ exports.useCanUndo = useCanUndo;
|
|
|
13794
13856
|
exports.useCanvasShortcuts = useCanvasShortcuts;
|
|
13795
13857
|
exports.useClipboard = useClipboard;
|
|
13796
13858
|
exports.useContextMenu = useContextMenu;
|
|
13859
|
+
exports.useDrawerStore = useDrawerStore;
|
|
13797
13860
|
exports.useEditingNodeId = useEditingNodeId;
|
|
13798
13861
|
exports.useHasCopied = useHasCopied;
|
|
13799
13862
|
exports.useHelpLines = useHelpLines;
|