MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / getCrossFileDependencyPairs

Method getCrossFileDependencyPairs

src/db/queries.ts:3512–3524  ·  view source on GitHub ↗

* Every ordered pair of files where one reaches into the other, once each. * * `contains` is excluded (a file "contains" its own symbols, which is not a * dependency), and so are same-file edges and low-confidence name matches.

(minConfidence: number)

Source from the content-addressed store, hash-verified

3510 * dependency), and so are same-file edges and low-confidence name matches.
3511 */
3512 getCrossFileDependencyPairs(minConfidence: number): Array<{ source: string; target: string }> {
3513 return this.db
3514 .prepare(
3515 `SELECT DISTINCT sn.file_path AS source, tn.file_path AS target
3516 FROM edges e
3517 JOIN nodes sn ON sn.id = e.source
3518 JOIN nodes tn ON tn.id = e.target
3519 WHERE e.kind <> 'contains'
3520 AND sn.file_path <> tn.file_path
3521 AND COALESCE(json_extract(e.metadata, '$.confidence'), 1) >= ?`
3522 )
3523 .all(minConfidence) as Array<{ source: string; target: string }>;
3524 }
3525
3526 /**
3527 * Every ordered pair of files where one imports the other, once each: the

Callers 1

Calls 2

allMethod · 0.65
prepareMethod · 0.65

Tested by

no test coverage detected