MCPcopy Create free account
hub / github.com/Graphify-Labs/graphify / add_node

Function add_node

graphify/callflow_html.py:1016–1025  ·  view source on GitHub ↗
(nid: str)

Source from the content-addressed store, hash-verified

1014 seen = set()
1015
1016 def add_node(nid: str) -> bool:
1017 node = node_by_id.get(nid)
1018 if not node or nid in seen:
1019 return False
1020 kind = node_kind(node)
1021 if kind == "concept" and len(selected) >= max(4, max_nodes // 3):
1022 return False
1023 selected.append(node)
1024 seen.add(nid)
1025 return len(selected) >= max_nodes
1026
1027 # Start with likely entry points: nodes that call out more than they are called.
1028 entry_candidates = sorted(

Callers 1

select_diagram_nodesFunction · 0.70

Calls 2

node_kindFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected