{"record":{"id":"28e608bd48e03af2","repo":"microsoft/vscode","slug":"invalid-input-path-path-be-sure-to-use-an-abs","errorCode":null,"errorMessage":"Invalid input path: ${path}. Be sure to use an absolute path.","messagePattern":"Invalid input path: (.+?)\\. Be sure to use an absolute path\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"extensions/copilot/src/extension/tools/node/toolUtils.ts","lineNumber":158,"sourceCode":" */\nexport function patternContainsWorkspaceFolderPath(pattern: string | undefined, workspaceService: IWorkspaceService): boolean {\n\tif (!pattern) {\n\t\treturn false;\n\t}\n\n\tfor (const folderUri of workspaceService.getWorkspaceFolders()) {\n\t\tif (pattern.includes(folderUri.fsPath) || pattern.includes(folderUri.path)) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\n\nexport function resolveToolInputPath(path: string, promptPathRepresentationService: IPromptPathRepresentationService): URI {\n\tconst uri = promptPathRepresentationService.resolveFilePath(path);\n\tif (!uri) {\n\t\tthrow new Error(`Invalid input path: ${path}. Be sure to use an absolute path.`);\n\t}\n\n\treturn uri;\n}\n\nexport async function isFileOkForTool(accessor: ServicesAccessor, uri: URI, buildPromptContext?: IBuildPromptContext): Promise<boolean> {\n\ttry {\n\t\tawait assertFileOkForTool(accessor, uri, buildPromptContext);\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\n\nexport interface AssertFileOkForToolOptions {\n\treadOnly?: boolean;\n\tworkingDirectory?: URI;\n}","sourceCodeStart":140,"sourceCodeEnd":176,"githubUrl":"https://github.com/microsoft/vscode/blob/a94b963a32aa9749d69504576791fa29700ae46d/extensions/copilot/src/extension/tools/node/toolUtils.ts#L140-L176","documentation":"Error \"Invalid input path: ${path}. Be sure to use an absolute path.\" thrown in microsoft/vscode.","triggerScenarios":"Thrown at extensions/copilot/src/extension/tools/node/toolUtils.ts:158 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"a94b963a32aa9749d69504576791fa29700ae46d","analyzedAt":"2026-08-12T01:08:56.794Z","schemaVersion":2},"datasetVersion":"2026-08-12T06:17:24.410Z"}