• Move cells while preserving in-flight kernel futures.

    The underlying jupyter-ydoc moveCells implementation currently serializes cells to JSON and recreates them via a delete + insert transaction, which disposes any active kernel futures attached to the old widgets. This wrapper detaches futures before the move and reattaches them to the new widgets afterwards, and stores them in the undo stack so that undoing the move also restores execution state.

    Parameters

    • notebook: Notebook

      The target notebook.

    • from: number

      Index of the first cell to move.

    • to: number

      Target index (as passed to notebook.moveCell).

    • n: number = 1

      Number of cells to move.

    Returns void