MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / generateProjectTour

Function generateProjectTour

graph-ui/src/tours/tour-source.ts:52–77  ·  view source on GitHub ↗
(
    source: TourSource,
    root: string,
    opts: ProviderQueryOptions = {},
)

Source from the content-addressed store, hash-verified

50 * from one consistent pair of answers or not offered at all.
51 */
52export async function generateProjectTour(
53 source: TourSource,
54 root: string,
55 opts: ProviderQueryOptions = {},
56): Promise<ActiveTour> {
57 const overview = await source.architectureOverview(root, opts);
58 if (overview.files.length === 0) {
59 throw new Error(NO_INDEX_FOR_TOUR);
60 }
61 const graph = await source.moduleDependencies(root, opts);
62 const document = generateHeuristicTour({
63 files: overview.files,
64 imports: graph.edges,
65 importsTruncated: graph.truncated,
66 layers: overview.layers,
67 groups: overview.groups,
68 entryPoints: overview.entryPoints,
69 });
70 return {
71 kind: 'project',
72 document,
73 endNote: graph.truncated
74 ? 'the dependency read stopped at its bound, so this order was derived from part of the import graph'
75 : '',
76 };
77}

Callers 2

ProjectWindowViewFunction · 0.90

Calls 3

generateHeuristicTourFunction · 0.90
architectureOverviewMethod · 0.65
moduleDependenciesMethod · 0.65

Tested by

no test coverage detected