src/vs/platform/issue/electron-main/issueMainService.ts/IssueMainService/registerListeners
class IssueMainService:	private registerListeners(): void {
		validatedIpcMain.on('vscode:issueSystemInfoRequest', async event => {
			const [info, remoteData] = await Promise.all([this.launchMainService.getMainProcessInfo(), this.diagnosticsMainService.getRemoteDiagnostics({ includeProcesses: false, includeWorkspaceMetadata: false })]);
			const msg = await this.diagnosticsService.getSystemInfo(info, remoteData);

			this.safeSend(event, 'vscode:issueSystemInfoResponse', msg);
		});

		validatedIpcMain.on('vscode:listProcesses', async event => {
			const processes = [];

			try {
				const mainPid = await this.launchMainService.getMainProcessId();
				processes.push({ name: localize('local', "Local"), rootProcess: await listProcesses(mainPid) });

				const remoteDiagnostics = await this.diagnosticsMainService.getRemoteDiagnostics({ includeProcesses: true });
				remoteDiagnostics.forEach(data => {
					if (isRemoteDiagnosticError(data)) {
						processes.push({
							name: data.hostName,
							rootProcess: data
						});
					} else {
						if (data.processes) {
							processes.push({
								name: data.hostName,
								rootProcess: data.processes
							});
						}
					}
				});
			} catch (e) {
				this.logService.error(`Listing processes failed: ${e}`);
			}

			this.safeSend(event, 'vscode:listProcessesResponse', processes);
		});

		validatedIpcMain.on('vscode:issueReporterClipboard', async event => {
			const messageOptions = {
				title: this.productService.nameLong,
				message: localize('issueReporterWriteToClipboard', "There is too much data to send to GitHub directly. The data will be copied to the clipboard, please paste it into the GitHub issue page that is opened."),
				type: 'warning',
				buttons: [
					mnemonicButtonLabel(localize({ key: 'ok', comment: ['&& denotes a mnemonic'] }, "&&OK")),
					mnemonicButtonLabel(localize({ key: 'cancel', comment: ['&& denotes a mnemonic'] }, "&&Cancel")),
				],
				defaultId: 0,
				cancelId: 1,
				noLink: true
			};

			if (this.issueReporterWindow) {
				const result = await this.dialogMainService.showMessageBox(messageOptions, this.issueReporterWindow);
				this.safeSend(event, 'vscode:issueReporterClipboardResponse', result.response === 0);
			}
		});

		validatedIpcMain.on('vscode:issuePerformanceInfoRequest', async event => {
			const performanceInfo = await this.getPerformanceInfo();
			this.safeSend(event, 'vscode:issuePerformanceInfoResponse', performanceInfo);
		});

		validatedIpcMain.on('vscode:issueReporterConfirmClose', async () => {
			const messageOptions = {
				title: this.productService.nameLong,
				message: localize('confirmCloseIssueReporter', "Your input will not be saved. Are you sure you want to close this window?"),
				type: 'warning',
				buttons: [
					mnemonicButtonLabel(localize({ key: 'yes', comment: ['&& denotes a mnemonic'] }, "&&Yes")),
					mnemonicButtonLabel(localize({ key: 'cancel', comment: ['&& denotes a mnemonic'] }, "&&Cancel")),
				],
				defaultId: 0,
				cancelId: 1,
				noLink: true
			};

			if (this.issueReporterWindow) {
				const result = await this.dialogMainService.showMessageBox(messageOptions, this.issueReporterWindow);
				if (result.response === 0) {
					if (this.issueReporterWindow) {
						this.issueReporterWindow.destroy();
						this.issueReporterWindow = null;
					}
				}
			}
		});

		validatedIpcMain.on('vscode:workbenchCommand', (_: unknown, commandInfo: { id: any; from: any; args: any }) => {
			const { id, from, args } = commandInfo;

			let parentWindow: BrowserWindow | null;
			switch (from) {
				case 'issueReporter':
					parentWindow = this.issueReporterParentWindow;
					break;
				case 'processExplorer':
					parentWindow = this.processExplorerParentWindow;
					break;
				default:
					throw new Error(`Unexpected command source: ${from}`);
			}

			if (parentWindow) {
				parentWindow.webContents.send('vscode:runAction', { id, from, args });
			}
		});

		validatedIpcMain.on('vscode:openExternal', (_: unknown, arg: string) => {
			this.nativeHostMainService.openExternal(undefined, arg);
		});

		validatedIpcMain.on('vscode:closeIssueReporter', event => {
			if (this.issueReporterWindow) {
				this.issueReporterWindow.close();
			}
		});

		validatedIpcMain.on('vscode:closeProcessExplorer', event => {
			if (this.processExplorerWindow) {
				this.processExplorerWindow.close();
			}
		});

		validatedIpcMain.on('vscode:windowsInfoRequest', async event => {
			const mainProcessInfo = await this.launchMainService.getMainProcessInfo();
			this.safeSend(event, 'vscode:windowsInfoResponse', mainProcessInfo.windows);
		});
	}