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

Function getRelativeProjectPath

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

Source from the content-addressed store, hash-verified

328}
329
330function getRelativeProjectPath(rootPath: string): string | undefined {
331 const containingRoot = getContainingKnownRoot(rootPath);
332 if (!containingRoot) return undefined;
333
334 const relativePath = path.relative(containingRoot, rootPath).replace(/\\/g, '/');
335 return relativePath || undefined;
336}
337
338function getProjectIndexStatus(rootPath: string): ProjectDescriptor['indexStatus'] {
339 return getProject(rootPath)?.indexState.status ?? 'idle';

Callers 1

buildProjectDescriptorFunction · 0.85

Calls 1

getContainingKnownRootFunction · 0.85

Tested by

no test coverage detected