MCPcopy Create free account
hub / github.com/Snapchat/dagger-browser / createdComponent

Function createdComponent

browser/src/components/NodeSummary.tsx:82–96  ·  view source on GitHub ↗
(graphManager: GraphManager, componentName: string, node: Node)

Source from the content-addressed store, hash-verified

80}
81
82function createdComponent(graphManager: GraphManager, componentName: string, node: Node) {
83 if (!node.adjacentNodes) {
84 return ""
85 }
86
87 for (var nodeKey of node.adjacentNodes) {
88 var componentNode = graphManager.getNode(componentName, nodeKey);
89 // Node.Kind will be null for ComponentNodes
90 // Node.key == componentName for parent components
91 if (componentNode && !componentNode.kind && nodeKey != componentName) {
92 return nodeKey
93 }
94 }
95 return ""
96}
97
98export function NodeSearch({ graphManager, weightService, nodeName }: SearchProps) {
99 //search for the top five choices the nodeName could be in the Graph based on the nodeName

Callers 1

NodeSummaryFunction · 0.85

Calls 1

getNodeMethod · 0.80

Tested by

no test coverage detected