MCPcopy Create free account
hub / github.com/microsoft/AI-Engineering-Coach / parseWorkspaceFolderPath

Function parseWorkspaceFolderPath

src/core/parser-vscode-files.ts:549–559  ·  view source on GitHub ↗
(wsJsonPath: string)

Source from the content-addressed store, hash-verified

547 * Returns null if the file cannot be read or the path cannot be derived
548 * (e.g. multi-root workspaces without a single folder). */
549export function parseWorkspaceFolderPath(wsJsonPath: string): string | null {
550 try {
551 const location = workspaceLocationFromJson(wsJsonPath);
552 if (!location) return null;
553 if (!location.startsWith('/') && !/^[A-Za-z]:/.test(location)) return null;
554 return location;
555 } catch (e) {
556 debugCore('parser-vscode', `Could not parse workspace folder path from ${wsJsonPath}`, e);
557 return null;
558 }
559}
560
561export function parseCLIWorkspaceName(wsYamlPath: string): string {
562 try {

Calls 2

debugCoreFunction · 0.90

Tested by

no test coverage detected