src/vs/workbench/contrib/userDataSync/browser/userDataSync.ts/AcceptChangesContribution/createAcceptChangesWidgetRenderer
class AcceptChangesContribution:	private createAcceptChangesWidgetRenderer(): void {
		if (!this.acceptChangesButton) {
			const resource = this.editor.getModel()!.uri;
			const [syncResource, conflicts] = this.getSyncResourceConflicts(resource)!;
			const isRemote = conflicts.some(({ remoteResource }) => isEqual(remoteResource, resource));
			const acceptRemoteLabel = localize('accept remote', "Accept Remote");
			const acceptMergesLabel = localize('accept merges', "Accept Merges");
			const acceptRemoteButtonLabel = localize('accept remote button', "Accept &&Remote");
			const acceptMergesButtonLabel = localize('accept merges button', "Accept &&Merges");
			this.acceptChangesButton = this.instantiationService.createInstance(FloatingClickWidget, this.editor, isRemote ? acceptRemoteLabel : acceptMergesLabel, null);
			this._register(this.acceptChangesButton.onClick(async () => {
				const model = this.editor.getModel();
				if (model) {
					this.telemetryService.publicLog2<{ source: string, action: string }, SyncConflictsClassification>('sync/handleConflicts', { source: syncResource, action: isRemote ? 'acceptRemote' : 'acceptLocal' });
					const syncAreaLabel = getSyncAreaLabel(syncResource);
					const result = await this.dialogService.confirm({
						type: 'info',
						title: isRemote
							? localize('Sync accept remote', "{0}: {1}", SYNC_TITLE, acceptRemoteLabel)
							: localize('Sync accept merges', "{0}: {1}", SYNC_TITLE, acceptMergesLabel),
						message: isRemote
							? localize('confirm replace and overwrite local', "Would you like to accept remote {0} and replace local {1}?", syncAreaLabel.toLowerCase(), syncAreaLabel.toLowerCase())
							: localize('confirm replace and overwrite remote', "Would you like to accept merges and replace remote {0}?", syncAreaLabel.toLowerCase()),
						primaryButton: isRemote ? acceptRemoteButtonLabel : acceptMergesButtonLabel
					});
					if (result.confirmed) {
						try {
							await this.userDataSyncService.accept(syncResource, model.uri, model.getValue(), true);
						} catch (e) {
							if (e instanceof UserDataSyncError && e.code === UserDataSyncErrorCode.LocalPreconditionFailed) {
								const syncResourceCoflicts = this.userDataSyncService.conflicts.filter(syncResourceCoflicts => syncResourceCoflicts[0] === syncResource)[0];
								if (syncResourceCoflicts && conflicts.some(conflict => isEqual(conflict.previewResource, model.uri) || isEqual(conflict.remoteResource, model.uri))) {
									this.notificationService.warn(localize('update conflicts', "Could not resolve conflicts as there is new local version available. Please try again."));
								}
							} else {
								this.notificationService.error(localize('accept failed', "Error while accepting changes. Please check [logs]({0}) for more details.", `command:${SHOW_SYNC_LOG_COMMAND_ID}`));
							}
						}
					}
				}
			}));

			this.acceptChangesButton.render();
		}
	}