diff --git a/ui/src/workflow-canvas/config/node-data.ts b/ui/src/workflow-canvas/config/node-data.ts index 75d3ca8d2d5..36c37390568 100644 --- a/ui/src/workflow-canvas/config/node-data.ts +++ b/ui/src/workflow-canvas/config/node-data.ts @@ -276,7 +276,6 @@ export const parameterExtractionNode = { properties: { stepName: '参数提取', config: { fields: [{ label: '结果', value: 'result' }] } }, } - /* 知识库检索 */ export const searchKnowledgeNode = { type: WorkflowNodeType.SearchKnowledge, @@ -344,7 +343,6 @@ export const rerankerNode = { }, } - /* MCP 调用 */ export const mcpNode = { type: WorkflowNodeType.McpNode, @@ -361,7 +359,6 @@ export const toolCustomNode = { properties: { stepName: '自定义工具', config: { fields: [{ label: '结果', value: 'result' }] } }, } - /* 智能体节点 */ export const applicationNode = { type: WorkflowNodeType.Application, @@ -370,57 +367,23 @@ export const applicationNode = { properties: { stepName: '智能体节点', config: { fields: [{ label: '结果', value: 'result' }] } }, } - /** * 工具配置数据 */ export const toolLibNode = { type: WorkflowNodeType.ToolLib, - text: '通过执行自定义脚本,实现数据处理', - label: '自定义工具', - height: 170, - properties: { stepName: '自定义工具', config: { fields: [{ label: '结果', value: 'result' }] } }, -} - -/** - * 工作流工具配置数据 - */ -export const toolWorkflowLibNode = { - type: WorkflowNodeType.ToolWorkflowLib, - text: '工作流工具', - label: '工作流工具', - height: 170, - properties: { stepName: '工作流工具', config: { fields: [] } }, + text: '工具节点', + label: '工具节点', + properties: { stepName: '工具节点', config: { fields: [{ label: '结果', value: 'result' }] } }, } - - - -export const loopStartNode = { - id: WorkflowNodeType.LoopStartNode, - type: WorkflowNodeType.LoopStartNode, - x: 480, - y: 3340, - properties: { - height: 364, - stepName: '循环开始', - config: { - fields: [ - { label: '下标', value: 'index' }, - { label: '循环元素', value: 'item' }, - ], - globalFields: [], - }, - showNode: true, - }, -} +/* 循环节点 */ export const loopNode = { type: WorkflowNodeType.LoopNode, visible: false, text: '通过设置循环次数和逻辑,重复执行一系列任务', label: '循环节点', - height: 252, properties: { stepName: '循环节点', workflow: { @@ -428,10 +391,10 @@ export const loopNode = { nodes: [ { x: 480, - y: 3340, + y: 200, id: 'loop-start-node', type: 'loop-start-node', - properties: { config: { fields: [], globalFields: [] }, fields: [], height: 361.333, showNode: true, stepName: '开始', globalFields: [] }, + properties: { config: { fields: [], globalFields: [] }, fields: [], showNode: true, stepName: '开始', globalFields: [] }, }, ], }, @@ -439,11 +402,30 @@ export const loopNode = { }, } +export const loopStartNode = { + id: WorkflowNodeType.LoopStartNode, + type: WorkflowNodeType.LoopStartNode, + x: 480, + y: 200, + properties: { + stepName: '循环开始', + config: { + fields: [ + { label: '下标', value: 'index' }, + { label: '循环元素', value: 'item' }, + ], + globalFields: [], + }, + showNode: true, + }, +} + export const loopBodyNode = { type: WorkflowNodeType.LoopBodyNode, text: '循环体', label: '循环体', height: 1080, + properties: { width: 1920, stepName: '循环体', config: { fields: [] } }, } @@ -451,7 +433,6 @@ export const loopContinueNode = { type: WorkflowNodeType.LoopContinueNode, text: '用于终止当前循环,执行下次循环', label: 'Continue', - height: 100, properties: { width: 600, stepName: 'Continue', config: { fields: [] } }, } @@ -459,10 +440,19 @@ export const loopBreakNode = { type: WorkflowNodeType.LoopBreakNode, text: '终止当前循环,跳出循环体', label: 'Break', - height: 100, properties: { width: 600, stepName: 'Break', config: { fields: [] } }, } +/** + * 工作流工具配置数据 + */ +export const toolWorkflowLibNode = { + type: WorkflowNodeType.ToolWorkflowLib, + text: '工作流工具', + label: '工作流工具', + properties: { stepName: '工作流工具', config: { fields: [] } }, +} + /* 文档分段 */ export const documentSplitNode = { type: WorkflowNodeType.DocumentSplitNode, diff --git a/ui/src/workflow-canvas/core/node-container/index.vue b/ui/src/workflow-canvas/core/node-container/index.vue index 279c818f1af..17b0ba105ec 100644 --- a/ui/src/workflow-canvas/core/node-container/index.vue +++ b/ui/src/workflow-canvas/core/node-container/index.vue @@ -273,16 +273,16 @@ onBeforeUnmount(() => { >