MCPcopy
hub / github.com/FlowiseAI/Flowise / getStartingNode

Function getStartingNode

packages/server/src/utils/index.ts:213–223  ·  view source on GitHub ↗
(nodeDependencies: INodeDependencies)

Source from the content-addressed store, hash-verified

211 * @param {INodeDependencies} nodeDependencies
212 */
213export const getStartingNode = (nodeDependencies: INodeDependencies) => {
214 // Find starting node
215 const startingNodeIds = [] as string[]
216 Object.keys(nodeDependencies).forEach((nodeId) => {
217 if (nodeDependencies[nodeId] === 0) {
218 startingNodeIds.push(nodeId)
219 }
220 })
221
222 return { startingNodeIds }
223}
224
225/**
226 * Get starting nodes and check if flow is valid

Callers 1

executeAgentFlowFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected