src/vs/workbench/services/dialogs/browser/abstractFileDialogService.ts/AbstractFileDialogService/defaultWorkspacePath
class AbstractFileDialogService:	async defaultWorkspacePath(schemeFilter = this.getSchemeFilterForWindow(), filename?: string): Promise<URI> {
		let defaultWorkspacePath: URI | undefined;
		// Check for current workspace config file first...
		if (this.contextService.getWorkbenchState() === WorkbenchState.WORKSPACE) {
			const configuration = this.contextService.getWorkspace().configuration;
			if (configuration && configuration.scheme === schemeFilter && !isUntitledWorkspace(configuration, this.environmentService)) {
				defaultWorkspacePath = resources.dirname(configuration) || undefined;
			}
		}

		// ...then fallback to default file path
		if (!defaultWorkspacePath) {
			defaultWorkspacePath = await this.defaultFilePath(schemeFilter);
		}

		if (defaultWorkspacePath && filename) {
			defaultWorkspacePath = resources.joinPath(defaultWorkspacePath, filename);
		}

		return defaultWorkspacePath;
	}