Unlikely to work particularly well.
Ebike batteries have far greater capacity than hand tools.
And I wonder about the torque the chainsaw can produce.
Chainsaw chains engage in a rather different manner than bike chains.
So there's no obvious, easy conversion.