(layout: GraphData | undefined, selected: GraphNode)
| 5 | |
| 6 | /** Hierarchy render IDs are local to a projection; symbol names carry identity. */ |
| 7 | export function layoutNodeForSelection(layout: GraphData | undefined, selected: GraphNode): GraphNode | undefined { |
| 8 | return selected.qualified_name |
| 9 | ? layout?.nodes.find(node => node.qualified_name === selected.qualified_name) |
| 10 | : layout?.nodes.find(node => node === selected); |
| 11 | } |
| 12 | |
| 13 | /** Keep selected hierarchy evidence usable when its symbol is outside the loaded layout. */ |
| 14 | export function selectedGraphContext(layout: GraphData | undefined, selected: GraphNode, project: string, snapshotId: string): BrowserChatContext { |
no outgoing calls
no test coverage detected