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

Function resolveExplicitProjectSelection

src/index.ts:1399–1419  ·  view source on GitHub ↗
(selection: {
  project?: string;
  projectDirectory?: string;
})

Source from the content-addressed store, hash-verified

1397}
1398
1399async function resolveExplicitProjectSelection(selection: {
1400 project?: string;
1401 projectDirectory?: string;
1402}): Promise<ProjectResolution> {
1403 const explicitProject = selection.project ?? selection.projectDirectory;
1404 if (explicitProject) {
1405 const resolution = await resolveProjectSelector(explicitProject);
1406 if (!resolution.ok) {
1407 return resolution;
1408 }
1409
1410 await initProject(resolution.project.rootPath, watcherDebounceMs, { enableWatcher: true });
1411 setActiveProject(resolution.project.rootPath);
1412 return resolution;
1413 }
1414
1415 return {
1416 ok: false,
1417 response: buildProjectSelectionError('selection_required', 'No project selector was provided.')
1418 };
1419}
1420
1421async function resolveProjectForTool(args: Record<string, unknown>): Promise<ProjectResolution> {
1422 const requestedProject = parseProjectSelector(args.project);

Callers 1

resolveProjectForToolFunction · 0.85

Calls 4

resolveProjectSelectorFunction · 0.85
initProjectFunction · 0.85
setActiveProjectFunction · 0.85

Tested by

no test coverage detected