src/vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel.ts/MergeEditorModel/constructor
class MergeEditorModel:	constructor(
		readonly base: ITextModel,
		readonly input1: ITextModel,
		readonly input1Title: string | undefined,
		readonly input1Detail: string | undefined,
		readonly input1Description: string | undefined,
		readonly input2: ITextModel,
		readonly input2Title: string | undefined,
		readonly input2Detail: string | undefined,
		readonly input2Description: string | undefined,
		readonly result: ITextModel,
		private readonly diffComputer: IDiffComputer,
		@IModelService private readonly modelService: IModelService,
		@ILanguageService private readonly languageService: ILanguageService,
	) {
		super();

		this._register(keepAlive(this.modifiedBaseRangeStateStores));
		this._register(keepAlive(this.modifiedBaseRangeHandlingStateStores));
		this._register(keepAlive(this.input1ResultMapping));
		this._register(keepAlive(this.input2ResultMapping));

		let shouldResetHandlingState = true;
		this._register(
			autorunHandleChanges(
				'Recompute State',
				{
					handleChange: (ctx) => {
						if (ctx.didChange(this.modifiedBaseRangeHandlingStateStores)) {
							shouldResetHandlingState = true;
						}
						return ctx.didChange(this.resultTextModelDiffs.diffs)
							// Ignore non-text changes as we update the state directly
							? ctx.change === TextModelDiffChangeReason.textChange
							: true;
					},
				},
				(reader) => {
					const modifiedBaseRangeHandlingStateStores = this.modifiedBaseRangeHandlingStateStores.read(reader);
					if (!this.isUpToDate.read(reader)) {
						return;
					}
					const resultDiffs = this.resultTextModelDiffs.diffs.read(reader);
					const stores = this.modifiedBaseRangeStateStores.read(reader);
					transaction(tx => {
						this.recomputeState(resultDiffs, stores, tx);
						if (shouldResetHandlingState) {
							shouldResetHandlingState = false;
							for (const [range, store] of stores) {
								const state = store.get();
								modifiedBaseRangeHandlingStateStores.get(range)
									?.set(!(state.isEmpty || state.conflicting), tx);
							}
						}
					});
				}
			)
		);

		this.onInitialized.then(() => {
			this.resetUnknown();
		});
	}