in src/utils/uiUtils.ts [28:42]
export async function showFolderDialog(): Promise<vscode.Uri | undefined> {
const defaultUri: vscode.Uri | undefined = vscode.workspace.rootPath ? vscode.Uri.file(vscode.workspace.rootPath) : undefined;
const options: vscode.OpenDialogOptions = {
canSelectFiles: false,
canSelectFolders: true,
canSelectMany: false,
openLabel: "Select",
defaultUri,
};
const result: vscode.Uri[] | undefined = await vscode.window.showOpenDialog(options);
if (!result || result.length === 0) {
return undefined;
}
return result[0];
}