(selection: {
project?: string;
projectDirectory?: string;
})
| 1397 | } |
| 1398 | |
| 1399 | async 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 | |
| 1421 | async function resolveProjectForTool(args: Record<string, unknown>): Promise<ProjectResolution> { |
| 1422 | const requestedProject = parseProjectSelector(args.project); |
no test coverage detected