@datatechsolutions/ui 2.7.114 → 2.7.116
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 +151 -86
- package/dist/workflow/index.js.map +1 -1
- package/dist/workflow/index.mjs +151 -87
- package/dist/workflow/index.mjs.map +1 -1
- package/dist/workflow/workflow-canvas.js +118 -62
- package/dist/workflow/workflow-canvas.js.map +1 -1
- package/dist/workflow/workflow-canvas.mjs +118 -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) {
|
|
@@ -8964,9 +9023,9 @@ function WorkflowCanvasInner({
|
|
|
8964
9023
|
order: agent.order ?? 0,
|
|
8965
9024
|
selected: selectedAgentId === savedNode.id,
|
|
8966
9025
|
onSelect: () => {
|
|
9026
|
+
console.log("[Canvas] onSelect agent:", agent.name, agent.agentId);
|
|
8967
9027
|
setSelectedAgentId(agent.agentId);
|
|
8968
|
-
|
|
8969
|
-
openAgentDrawer(agent, models);
|
|
9028
|
+
openAgentDrawerAction(agent, models);
|
|
8970
9029
|
},
|
|
8971
9030
|
onRemoveFromCanvas: handleRemoveNodeFromCanvas
|
|
8972
9031
|
}
|
|
@@ -9315,11 +9374,9 @@ function WorkflowCanvasInner({
|
|
|
9315
9374
|
if (!targetNode) return;
|
|
9316
9375
|
if (targetNode.type === "agent") {
|
|
9317
9376
|
const agent = targetNode.data?.agent;
|
|
9318
|
-
|
|
9319
|
-
|
|
9320
|
-
|
|
9321
|
-
setDrawerOpen(true);
|
|
9322
|
-
openAgentDrawer(agent, models);
|
|
9377
|
+
if (agent) {
|
|
9378
|
+
setSelectedAgentId(agent.agentId ?? agent.id ?? null);
|
|
9379
|
+
openAgentDrawerAction(agent, models);
|
|
9323
9380
|
}
|
|
9324
9381
|
} else if (targetNode.type === "tool") {
|
|
9325
9382
|
const tool = targetNode.data?.tool;
|
|
@@ -9329,7 +9386,7 @@ function WorkflowCanvasInner({
|
|
|
9329
9386
|
} else {
|
|
9330
9387
|
handleEditLogicNode(nodeId);
|
|
9331
9388
|
}
|
|
9332
|
-
}, [nodes, setSelectedAgentId,
|
|
9389
|
+
}, [nodes, setSelectedAgentId, openAgentDrawerAction, models, onEditTool, onEditRule, handleEditLogicNode]);
|
|
9333
9390
|
const DUPLICATE_OFFSET = 40;
|
|
9334
9391
|
const contextMenuDuplicateNode = React8.useCallback((nodeId) => {
|
|
9335
9392
|
storeTakeSnapshot();
|
|
@@ -9810,8 +9867,7 @@ function WorkflowCanvasInner({
|
|
|
9810
9867
|
selected: false,
|
|
9811
9868
|
onSelect: () => {
|
|
9812
9869
|
setSelectedAgentId(agent.agentId);
|
|
9813
|
-
|
|
9814
|
-
openAgentDrawer(agent, models);
|
|
9870
|
+
openAgentDrawerAction(agent, models);
|
|
9815
9871
|
},
|
|
9816
9872
|
onRemoveFromCanvas: handleRemoveNodeFromCanvas
|
|
9817
9873
|
}
|
|
@@ -10106,7 +10162,7 @@ function WorkflowCanvasInner({
|
|
|
10106
10162
|
const handleEdgeClick = React8.useCallback(() => {
|
|
10107
10163
|
closeContextMenu();
|
|
10108
10164
|
}, [closeContextMenu]);
|
|
10109
|
-
|
|
10165
|
+
React8.useMemo(() => {
|
|
10110
10166
|
if (!editingLogicNodeId) return null;
|
|
10111
10167
|
const node = nodes.find((matchingNode) => matchingNode.id === editingLogicNodeId);
|
|
10112
10168
|
if (!node) return null;
|
|
@@ -10259,28 +10315,28 @@ function WorkflowCanvasInner({
|
|
|
10259
10315
|
open: drawerOpen || isCreatingAgent,
|
|
10260
10316
|
isCreateMode: isCreatingAgent,
|
|
10261
10317
|
onClose: () => {
|
|
10262
|
-
|
|
10263
|
-
|
|
10264
|
-
|
|
10265
|
-
}
|
|
10318
|
+
closeDrawerAction();
|
|
10319
|
+
setSelectedAgentId(null);
|
|
10320
|
+
if (isCreatingAgent) onCancelCreateAgent?.();
|
|
10266
10321
|
},
|
|
10267
10322
|
onSaved: () => {
|
|
10268
|
-
|
|
10269
|
-
|
|
10270
|
-
|
|
10271
|
-
}
|
|
10323
|
+
closeDrawerAction();
|
|
10324
|
+
setSelectedAgentId(null);
|
|
10325
|
+
if (isCreatingAgent) onCancelCreateAgent?.();
|
|
10272
10326
|
onAgentSaved?.();
|
|
10273
10327
|
}
|
|
10274
10328
|
}),
|
|
10275
|
-
|
|
10276
|
-
|
|
10277
|
-
|
|
10278
|
-
|
|
10279
|
-
|
|
10280
|
-
|
|
10281
|
-
|
|
10282
|
-
|
|
10283
|
-
|
|
10329
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10330
|
+
LogicNodeDrawer,
|
|
10331
|
+
{
|
|
10332
|
+
onSave: (nodeId, config) => {
|
|
10333
|
+
handleSaveLogicNodeConfig(nodeId, config);
|
|
10334
|
+
closeDrawerAction();
|
|
10335
|
+
setEditingLogicNodeId(null);
|
|
10336
|
+
},
|
|
10337
|
+
entities: allEntities
|
|
10338
|
+
}
|
|
10339
|
+
)
|
|
10284
10340
|
] });
|
|
10285
10341
|
}
|
|
10286
10342
|
function WorkflowCanvas(props) {
|
|
@@ -10958,18 +11014,26 @@ function ResultsTab({ agentId, t }) {
|
|
|
10958
11014
|
] })
|
|
10959
11015
|
] });
|
|
10960
11016
|
}
|
|
10961
|
-
function AgentDrawer({
|
|
11017
|
+
function AgentDrawer({ onSaved }) {
|
|
10962
11018
|
const t = nextIntl.useTranslations("agents.workflow");
|
|
11019
|
+
const activeDrawer = useDrawerStore((s) => s.activeDrawer);
|
|
11020
|
+
const agentData = useDrawerStore((s) => s.agentData);
|
|
11021
|
+
const closeDrawer = useDrawerStore((s) => s.closeDrawer);
|
|
11022
|
+
const open = activeDrawer === "agent";
|
|
11023
|
+
console.log("[AgentDrawer] activeDrawer:", activeDrawer, "agentData:", agentData?.agent?.name ?? "null");
|
|
11024
|
+
const agent = agentData?.agent ?? null;
|
|
11025
|
+
const models = agentData?.models ?? [];
|
|
11026
|
+
const isCreateMode = agentData?.isCreateMode ?? false;
|
|
10963
11027
|
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(
|
|
11028
|
+
const [selectedModelId, setSelectedModelId] = React8.useState("");
|
|
11029
|
+
const [selectedFramework, setSelectedFramework] = React8.useState("custom");
|
|
11030
|
+
const [temperature, setTemperature] = React8.useState(0.7);
|
|
11031
|
+
const [elo, setElo] = React8.useState(1e3);
|
|
11032
|
+
const [saved, setSaved] = React8.useState(true);
|
|
10969
11033
|
const agentId = agent?.agentId ?? agent?.id ?? "";
|
|
10970
11034
|
React8.useEffect(() => {
|
|
10971
11035
|
if (!agent) return;
|
|
10972
|
-
setSelectedModelId(agent.modelId ?? "");
|
|
11036
|
+
setSelectedModelId(agent.modelId ?? models[0]?.id ?? "");
|
|
10973
11037
|
setSelectedFramework(String(agent.framework ?? "custom"));
|
|
10974
11038
|
setTemperature(agent.temperature ?? 0.7);
|
|
10975
11039
|
setElo(Number(agent.elo ?? 1e3));
|
|
@@ -10980,11 +11044,11 @@ function AgentDrawer({ agent, models, open, isCreateMode = false, onClose, onSav
|
|
|
10980
11044
|
const markDirty = React8.useCallback(() => setSaved(false), []);
|
|
10981
11045
|
const markSaved = React8.useCallback(() => setSaved(true), []);
|
|
10982
11046
|
const handleClose = React8.useCallback(() => {
|
|
10983
|
-
|
|
10984
|
-
}, [
|
|
11047
|
+
closeDrawer();
|
|
11048
|
+
}, [closeDrawer]);
|
|
10985
11049
|
const handleMarkSaved = React8.useCallback(() => {
|
|
10986
11050
|
markSaved();
|
|
10987
|
-
onSaved();
|
|
11051
|
+
onSaved?.();
|
|
10988
11052
|
}, [markSaved, onSaved]);
|
|
10989
11053
|
if (!agent) return null;
|
|
10990
11054
|
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 +11355,21 @@ function SubworkflowDrawer({ onSaved, onMaximize }) {
|
|
|
11291
11355
|
}
|
|
11292
11356
|
);
|
|
11293
11357
|
}
|
|
11294
|
-
function PipelineSettingsDrawer({
|
|
11295
|
-
open,
|
|
11296
|
-
onClose,
|
|
11297
|
-
name,
|
|
11298
|
-
description,
|
|
11299
|
-
onSave
|
|
11300
|
-
}) {
|
|
11358
|
+
function PipelineSettingsDrawer({ onSave }) {
|
|
11301
11359
|
const t = nextIntl.useTranslations("agents.workflow");
|
|
11302
|
-
const
|
|
11303
|
-
const
|
|
11360
|
+
const activeDrawer = useDrawerStore((s) => s.activeDrawer);
|
|
11361
|
+
const data = useDrawerStore((s) => s.pipelineSettingsData);
|
|
11362
|
+
const closeDrawer = useDrawerStore((s) => s.closeDrawer);
|
|
11363
|
+
const open = activeDrawer === "pipeline-settings";
|
|
11364
|
+
const [nameValue, setNameValue] = React8.useState("");
|
|
11365
|
+
const [descriptionValue, setDescriptionValue] = React8.useState("");
|
|
11304
11366
|
const [isSaving, setIsSaving] = React8.useState(false);
|
|
11305
11367
|
React8.useEffect(() => {
|
|
11306
|
-
|
|
11307
|
-
|
|
11308
|
-
|
|
11368
|
+
if (data) {
|
|
11369
|
+
setNameValue(data.name);
|
|
11370
|
+
setDescriptionValue(data.description);
|
|
11371
|
+
}
|
|
11372
|
+
}, [data]);
|
|
11309
11373
|
const handleSubmit = async (event) => {
|
|
11310
11374
|
event.preventDefault();
|
|
11311
11375
|
const trimmedName = nameValue.trim();
|
|
@@ -11313,7 +11377,7 @@ function PipelineSettingsDrawer({
|
|
|
11313
11377
|
setIsSaving(true);
|
|
11314
11378
|
try {
|
|
11315
11379
|
await onSave(trimmedName, descriptionValue.trim());
|
|
11316
|
-
|
|
11380
|
+
closeDrawer();
|
|
11317
11381
|
} catch {
|
|
11318
11382
|
} finally {
|
|
11319
11383
|
setIsSaving(false);
|
|
@@ -11323,7 +11387,7 @@ function PipelineSettingsDrawer({
|
|
|
11323
11387
|
WorkspaceDrawer,
|
|
11324
11388
|
{
|
|
11325
11389
|
open,
|
|
11326
|
-
onClose,
|
|
11390
|
+
onClose: closeDrawer,
|
|
11327
11391
|
title: t("pipelineSettings"),
|
|
11328
11392
|
subtitle: t("pipelineSettingsSubtitle"),
|
|
11329
11393
|
icon: /* @__PURE__ */ jsxRuntime.jsx(HeroIcons.Cog6ToothIcon, { className: "h-5 w-5 text-white" }),
|
|
@@ -13794,6 +13858,7 @@ exports.useCanUndo = useCanUndo;
|
|
|
13794
13858
|
exports.useCanvasShortcuts = useCanvasShortcuts;
|
|
13795
13859
|
exports.useClipboard = useClipboard;
|
|
13796
13860
|
exports.useContextMenu = useContextMenu;
|
|
13861
|
+
exports.useDrawerStore = useDrawerStore;
|
|
13797
13862
|
exports.useEditingNodeId = useEditingNodeId;
|
|
13798
13863
|
exports.useHasCopied = useHasCopied;
|
|
13799
13864
|
exports.useHelpLines = useHelpLines;
|