src/vs/workbench/services/clipboard/browser/clipboardService.ts/BrowserClipboardService/readText
class BrowserClipboardService:	override async readText(type?: string): Promise<string> {
		if (type) {
			return super.readText(type);
		}

		try {
			return await navigator.clipboard.readText();
		} catch (error) {
			if (!!this.environmentService.extensionTestsLocationURI) {
				return ''; // do not ask for input in tests (https://github.com/microsoft/vscode/issues/112264)
			}

			if (isSafari) {
				this.logService.error(error);

				return ''; // Safari does not seem to provide anyway to enable cipboard access (https://github.com/microsoft/vscode-internalbacklog/issues/2162#issuecomment-852042867)
			}

			return new Promise<string>(resolve => {

				// Inform user about permissions problem (https://github.com/microsoft/vscode/issues/112089)
				const listener = new DisposableStore();
				const handle = this.notificationService.prompt(
					Severity.Error,
					localize('clipboardError', "Unable to read from the browser's clipboard. Please make sure you have granted access for this website to read from the clipboard."),
					[{
						label: localize('retry', "Retry"),
						run: async () => {
							listener.dispose();
							resolve(await this.readText(type));
						}
					}, {
						label: localize('learnMore', "Learn More"),
						run: () => this.openerService.open('https://go.microsoft.com/fwlink/?linkid=2151362')
					}],
					{
						sticky: true
					}
				);

				// Always resolve the promise once the notification closes
				listener.add(once(handle.onDidClose)(() => resolve('')));
			});
		}
	}