Change:
a conflict file in 3 way merge the 3 way merge editor Notice dialog ! I do not think we have a need for this dialog any more since we are no longer removing the conflict markers. Thus the user can just close this dialog, there is no data loss? Similarly when the user closes the old editor with conflict markers we do not prompt. fyi
I don't have an opinion about this.
I would leave it for the clarity it creates, however I am open for a "don't ask again" option
"Don't ask again" works for me, especially since I just noticed that when some conflicts get resolved the dialog is "smarter". Would don't ask again write in storage or a setting? I am fine going loco and writing to storage (so users can not revert). Though if all the other "don't ask again" write in settings then I guess I am fine with that.
+1 for "Don't ask again"
Fyi there is a very practical use case for the dialog: if you run with and use VSCode as Git merge editor, you may actually want to resolve the conflicts before closing the editor because Git somewhat expects you to do so. On top of that, given , we currently cannot pass back an exit code to Git, so it helps showing a dialog to avoid returning back to Git with merge conflicts still in the file. Besides, we show a similar dialog when you try to stage a file that has merge conflicts from the SCM view: !
thanks for providing more info, I missed that case. Though I think it does not conflict with our idea to add "Don't Ask Again".
Can we tell the merge editor if it was opened in a modal context (like with --wait)?
Currently not, an editor has no knowledge that it is being utilised for . There is plumbing around the editor where we observe the opened editor for being closed and then delete the wait marker file. Can we get more user feedback on this before jumping onto a conclusion?
Verify that there is an option to not be asked again there is a "Reset Choice for Close with Conflicts" commands in the F1 list <img width="1405" alt="Screenshot 2022-11-25 at 15 24 27" src="https://user-"
Adding verified since this works as expected. Noticed one minor "glitch". "Don't ask again" Cancel The "Don't ask again" choice will be preserved. It should probably be only preserved if I click on "Close with Conflicts". I am not supper passionate about this, but let me know if you would like me to file an issue

Discussion:
import { ITextEditorOptions } from 'vs/platform/editor/common/editor'; import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { IOpenerService } from 'vs/platform/opener/common/opener'; <ins> import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; </ins> import { IEditorIdentifier, IResourceMergeEditorInput } from 'vs/workbench/common/editor'; import { MergeEditorInput, MergeEditorInputData } from 'vs/workbench/contrib/mergeEditor/browser/mergeEditorInput'; import { IMergeEditorInputModel } from 'vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel'; import { MergeEditor } from 'vs/workbench/contrib/mergeEditor/browser/view/mergeEditor'; import { MergeEditorViewModel } from 'vs/workbench/contrib/mergeEditor/browser/view/viewModel'; <del> import { ctxIsMergeEditor, ctxMergeEditorLayout, ctxMergeEditorShowBase, ctxMergeEditorShowBaseAtTop, ctxMergeEditorShowNonConflictingChanges } from 'vs/workbench/contrib/mergeEditor/common/mergeEditor'; </del> <ins> import { ctxIsMergeEditor, ctxMergeEditorLayout, ctxMergeEditorShowBase, ctxMergeEditorShowBaseAtTop, ctxMergeEditorShowNonConflictingChanges, StorageCloseWithConflicts } from 'vs/workbench/contrib/mergeEditor/common/mergeEditor'; </ins> import { IEditorService } from 'vs/workbench/services/editor/common/editorService'; abstract class MergeEditorAction extends Action2 {

} } <ins> export class ResetCloseWithConflictsChoice extends Action2 { constructor() { super({ id: 'mergeEditor.resetCloseWithConflictsChoice', category: mergeEditorCategory, title: { value: localize( 'mergeEditor.resetChoice', 'Reset Choice for 'Close with Conflicts'' ), original: 'Reset Choice for 'Close with Conflicts'', }, f1: true, }); } run(accessor: ServicesAccessor): void { accessor.get(IStorageService).remove(StorageCloseWithConflicts, StorageScope.PROFILE); } } </ins> // this is an API command export class AcceptMerge extends MergeEditorAction2 { constructor() {

AcceptAllInput1, AcceptAllInput2, AcceptMerge, CompareInput1WithBaseCommand, CompareInput2WithBaseCommand, GoToNextUnhandledConflict, GoToPreviousUnhandledConflict, OpenBaseFile, OpenMergeEditor, OpenResultResource, ResetToBaseAndAutoMergeCommand, SetColumnLayout, SetMixedLayout, ShowHideTopBase, ShowHideCenterBase, ShowHideBase, <del> ShowNonConflictingChanges, ToggleActiveConflictInput1, ToggleActiveConflictInput2 </del> <ins> ShowNonConflictingChanges, ToggleActiveConflictInput1, ToggleActiveConflictInput2, ResetCloseWithConflictsChoice </ins> } from 'vs/workbench/contrib/mergeEditor/browser/commands/commands'; import { MergeEditorCopyContentsToJSON, MergeEditorLoadContentsFromFolder, MergeEditorSaveContentsToFolder } from 'vs/workbench/contrib/mergeEditor/browser/commands/devCommands'; import { MergeEditorInput } from 'vs/workbench/contrib/mergeEditor/browser/mergeEditorInput';

registerAction2(ResetToBaseAndAutoMergeCommand); registerAction2(AcceptMerge); <ins> registerAction2(ResetCloseWithConflictsChoice); </ins> // Dev Commands registerAction2(MergeEditorCopyContentsToJSON);

import { ConfirmResult, IDialogOptions, IDialogService } from 'vs/platform/dialogs/common/dialogs'; import { IEditorModel } from 'vs/platform/editor/common/editor'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; <ins> import { IStorageService, StorageScope, StorageTarget } from 'vs/platform/storage/common/storage'; </ins> import { IRevertOptions, SaveSourceRegistry } from 'vs/workbench/common/editor'; import { EditorModel } from 'vs/workbench/common/editor/editorModel'; import { MergeEditorInputData } from 'vs/workbench/contrib/mergeEditor/browser/mergeEditorInput';

import { MergeDiffComputer } from 'vs/workbench/contrib/mergeEditor/browser/model/diffComputer'; import { InputData, MergeEditorModel } from 'vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel'; import { MergeEditorTelemetry } from 'vs/workbench/contrib/mergeEditor/browser/telemetry'; <ins> import { StorageCloseWithConflicts } from 'vs/workbench/contrib/mergeEditor/common/mergeEditor'; </ins> import { IEditorService } from 'vs/workbench/services/editor/common/editorService'; import { ITextFileEditorModel, ITextFileSaveOptions, ITextFileService } from 'vs/workbench/services/textfile/common/textfiles';

private readonly resultTextFileModel: ITextFileEditorModel, private readonly telemetry: MergeEditorTelemetry, @IDialogService private readonly _dialogService: IDialogService, <ins> @IStorageService private readonly _storageService: IStorageService, </ins> ) { super(); }

const { choice } = await this._dialogService.show(Severity.Info, message, actions.map(a => a[0]), { ...options, cancelId: actions.length - 1 }); return actions[choice][1]; <del> } else if (someUnhandledConflicts) { </del> <ins> } else if (someUnhandledConflicts && !this._storageService.getBoolean(StorageCloseWithConflicts, StorageScope.PROFILE, false)) { </ins> const message = isMany ? localize('workspace.messageN.nonDirty', 'Do you want to close {0} merge editors?', inputModels.length) : localize('workspace.message1.nonDirty', 'Do you want to close the merge editor for {0}?', basename(inputModels[0].resultUri));

[localize('workspace.cancel', 'Cancel'), ConfirmResult.CANCEL], ]; <del> const { choice } = await this._dialogService.show(Severity.Info, message, actions.map(a => a[0]), { ...options, cancelId: actions.length - 1 }); </del> <ins> const { choice, checkboxChecked } = await this._dialogService.show(Severity.Info, message, actions.map(a => a[0]), { ...options, cancelId: actions.length - 1, checkbox: { label: localize('noMoreWarn', "Don't ask again") } }); if (checkboxChecked) { this._storageService.store(StorageCloseWithConflicts, true, StorageScope.PROFILE, StorageTarget.USER); } </ins> return actions[choice][1]; } else { // This shouldn't do anything

result: string; initialResult?: string; } <ins> export const StorageCloseWithConflicts = 'mergeEditorCloseWithConflicts'; </ins>