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

Function getOrCreateProject

src/project-state.ts:77–85  ·  view source on GitHub ↗
(rootPath: string)

Source from the content-addressed store, hash-verified

75}
76
77export function getOrCreateProject(rootPath: string): ProjectState {
78 const key = normalizeRootKey(rootPath);
79 let project = projects.get(key);
80 if (!project) {
81 project = createProjectState(rootPath);
82 projects.set(key, project);
83 }
84 return project;
85}
86
87export function getProject(rootPath: string): ProjectState | undefined {
88 return projects.get(normalizeRootKey(rootPath));

Callers 7

resolveProjectSelectorFunction · 0.85
resolveProjectForToolFunction · 0.85
initProjectFunction · 0.85
applyServerConfigFunction · 0.85

Calls 4

normalizeRootKeyFunction · 0.85
createProjectStateFunction · 0.85
setMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected