This is a pure refactor that somewhat reduces the amount of code needed when handling diff base changes. There's also a small performance gain from reparsing the staged text and computing a new diff in parallel when we weren't previously. Release Notes: - N/A Co-authored-by: Max <max@zed.dev>