Work distribution under continuous quantum histories