src/vs/workbench/browser/actions/workspaceActions.ts/CloseWorkspaceAction/run
class CloseWorkspaceAction:	override async run(accessor: ServicesAccessor): Promise<void> {
		const contextService = accessor.get(IWorkspaceContextService);
		const dialogService = accessor.get(IDialogService);
		const hostService = accessor.get(IHostService);
		const environmentService = accessor.get(IWorkbenchEnvironmentService);

		if (contextService.getWorkbenchState() === WorkbenchState.EMPTY) {
			dialogService.show(Severity.Error, localize('noWorkspaceOrFolderOpened', "There is currently no workspace or folder opened in this instance to close."));
			return;
		}

		return hostService.openWindow({ forceReuseWindow: true, remoteAuthority: environmentService.remoteAuthority });
	}