(nodeData, newNodeId)
| 72 | } |
| 73 | |
| 74 | const createStandardOutputs = (nodeData, newNodeId) => { |
| 75 | if (nodeData.hideOutput) return [] |
| 76 | |
| 77 | if (nodeData.outputs?.length) { |
| 78 | const outputOptions = nodeData.outputs.map((output) => createOutputOption(output, newNodeId)) |
| 79 | |
| 80 | return [ |
| 81 | { |
| 82 | name: 'output', |
| 83 | label: 'Output', |
| 84 | type: 'options', |
| 85 | description: nodeData.outputs[0].description ?? '', |
| 86 | options: outputOptions, |
| 87 | default: nodeData.outputs[0].name |
| 88 | } |
| 89 | ] |
| 90 | } |
| 91 | |
| 92 | return [ |
| 93 | { |
| 94 | id: `${newNodeId}-output-${nodeData.name}-${nodeData.baseClasses.join('|')}`, |
| 95 | name: nodeData.name, |
| 96 | label: nodeData.type, |
| 97 | description: nodeData.description ?? '', |
| 98 | type: nodeData.baseClasses.join(' | ') |
| 99 | } |
| 100 | ] |
| 101 | } |
| 102 | |
| 103 | const initializeOutputAnchors = (nodeData, newNodeId, isAgentflow) => { |
| 104 | return isAgentflow ? createAgentFlowOutputs(nodeData, newNodeId) : createStandardOutputs(nodeData, newNodeId) |
no test coverage detected