Right now the companion's AI is admittedly pretty basic: It will choose from any of its available attacks at random, including its normal attack.
This is definitely something I'm looking to improve and rework as development continues! I apologize that the companion AI currently in place is rather simple at the moment.