(filePath: string, maxCount = 3)
| 605 | |
| 606 | // Get up to maxCount named exports for a file from relationships.graph.exports |
| 607 | function getTopExports(filePath: string, maxCount = 3): string[] { |
| 608 | if (!relationships?.graph?.exports) return []; |
| 609 | const normalized = normalizeGraphPath(filePath); |
| 610 | const fileExports = relationships.graph.exports[normalized]; |
| 611 | if (!Array.isArray(fileExports)) return []; |
| 612 | return fileExports |
| 613 | .filter((e) => e.name !== 'default') |
| 614 | .slice(0, maxCount) |
| 615 | .map((e) => e.name); |
| 616 | } |
| 617 | |
| 618 | // Filter memories to only strongly relevant ones for compact mode: |
| 619 | // ≥2 non-stop-word query term matches AND effectiveConfidence ≥ 0.5 |
no test coverage detected