src/vs/workbench/contrib/notebook/browser/viewModel/notebookViewModel.ts/NotebookViewModel/deleteCell
class NotebookViewModel:	deleteCell(index: number, synchronous: boolean, pushUndoStop: boolean = true) {
		const focusSelectionIndex = this.getFocus()?.start ?? null;
		let endPrimarySelection: number | null = null;

		if (index === focusSelectionIndex) {
			if (focusSelectionIndex < this.length - 1) {
				endPrimarySelection = this._viewCells[focusSelectionIndex + 1].handle;
			} else if (focusSelectionIndex === this.length - 1 && this.length > 1) {
				endPrimarySelection = this._viewCells[focusSelectionIndex - 1].handle;
			}
		}

		let endSelections: number[] = this.selectionHandles.filter(handle => handle !== endPrimarySelection && handle !== this._viewCells[index]?.handle);

		this._notebook.applyEdits([
			{
				editType: CellEditType.Replace,
				index: index,
				count: 1,
				cells: []
			}],
			synchronous,
			{ kind: SelectionStateType.Index, focus: this.getFocus(), selections: this.getSelections() },
			() => ({ kind: SelectionStateType.Handle, primary: endPrimarySelection, selections: endSelections }),
			undefined,
			pushUndoStop
		);
	}