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

Function getProjectPathFromContextResourceUri

src/resources/uri.ts:31–39  ·  view source on GitHub ↗
(uri: string)

Source from the content-addressed store, hash-verified

29}
30
31export function getProjectPathFromContextResourceUri(uri: string): string | undefined {
32 const normalized = normalizeResourceUri(uri);
33 if (!normalized.startsWith(PROJECT_CONTEXT_RESOURCE_PREFIX)) {
34 return undefined;
35 }
36
37 const encodedProjectPath = normalized.slice(PROJECT_CONTEXT_RESOURCE_PREFIX.length);
38 return encodedProjectPath ? decodeURIComponent(encodedProjectPath) : undefined;
39}
40
41export function getProjectPathFromFullContextResourceUri(uri: string): string | undefined {
42 const normalized = normalizeResourceUri(uri);

Callers 2

registerHandlersFunction · 0.85

Calls 1

normalizeResourceUriFunction · 0.85

Tested by

no test coverage detected