MCPcopy Index your code
hub / github.com/PatrickSys/codebase-context / buildProjectDescriptor

Function buildProjectDescriptor

src/index.ts:342–355  ·  view source on GitHub ↗
(rootPath: string)

Source from the content-addressed store, hash-verified

340}
341
342function buildProjectDescriptor(rootPath: string): ProjectDescriptor {
343 const resolvedRootPath = path.resolve(rootPath);
344 const rootKey = normalizeRootKey(resolvedRootPath);
345 rememberProjectPath(resolvedRootPath, classifyProjectSource(resolvedRootPath), { touch: false });
346 return {
347 project: resolvedRootPath,
348 label: formatProjectLabel(resolvedRootPath),
349 rootPath: resolvedRootPath,
350 relativePath: getRelativeProjectPath(resolvedRootPath),
351 active: activeProjectKey === rootKey,
352 source: projectSourcesByKey.get(rootKey) ?? classifyProjectSource(resolvedRootPath),
353 indexStatus: getProjectIndexStatus(resolvedRootPath)
354 };
355}
356
357function listProjectDescriptors(): ProjectDescriptor[] {
358 const rootPaths = new Map<string, string>();

Callers 5

listProjectDescriptorsFunction · 0.85
createToolContextFunction · 0.85
registerHandlersFunction · 0.85

Calls 7

normalizeRootKeyFunction · 0.85
rememberProjectPathFunction · 0.85
classifyProjectSourceFunction · 0.85
formatProjectLabelFunction · 0.85
getRelativeProjectPathFunction · 0.85
getProjectIndexStatusFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected