MCPcopy Index your code
hub / github.com/deepnote/deepnote / findBlockId

Function findBlockId

packages/cli/src/commands/dag.ts:473–495  ·  view source on GitHub ↗
(query: string, nodes: DagNode[], blockMap: BlockMap)

Source from the content-addressed store, hash-verified

471}
472
473function 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
497function outputDot(dag: BlockDependencyDag, blockMap: BlockMap): void {
498 const lines: string[] = []

Callers 1

outputDagDownstreamFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected