(query: string, nodes: DagNode[], blockMap: BlockMap)
| 471 | } |
| 472 | |
| 473 | function findBlockId(query: string, nodes: DagNode[], blockMap: BlockMap): string | null { |
| 474 | // Try exact ID match first |
| 475 | if (nodes.some(n => n.id === query)) { |
| 476 | return query |
| 477 | } |
| 478 | |
| 479 | // Try label match (case-insensitive) |
| 480 | const queryLower = query.toLowerCase() |
| 481 | for (const [id, info] of blockMap) { |
| 482 | if (info.label.toLowerCase() === queryLower) { |
| 483 | return id |
| 484 | } |
| 485 | } |
| 486 | |
| 487 | // Try partial label match |
| 488 | for (const [id, info] of blockMap) { |
| 489 | if (info.label.toLowerCase().includes(queryLower)) { |
| 490 | return id |
| 491 | } |
| 492 | } |
| 493 | |
| 494 | return null |
| 495 | } |
| 496 | |
| 497 | function outputDot(dag: BlockDependencyDag, blockMap: BlockMap): void { |
| 498 | const lines: string[] = [] |
no outgoing calls
no test coverage detected