- In get tool, we look at Projects and get the workspace path related to the project root
- In install tool, we parse the Uri as is
Based on the description for both tools, the resourcePath is identital.
Also, there's no need to have an optional type for resourcePath in the types as the validation is performed by Copilot, i.e. its not possible for this to be empty.
I.e. the following is not required
const workspacePath = parameters.resourcePath ? Uri.file(parameters.resourcePath) : undefined;
if (!workspacePath) {
throw new Error('Invalid input: workspacePath is required');
}
..
if (parameters.resourcePath === undefined || parameters.resourcePath === '') {
throw new Error('Invalid input: resourcePath is required');
}