I don't know about other people but the time I spend coding isn't the majority of the time a project takes. Most of the time and effort goes into all the stuff around the coding - investigating the issues being addressed, specifying what a solution would do, testing the solution built, etc.
> Do you think AI is a threat to a developer's job?
I don't think it's a threat to skilled developers. Personally I'm looking forward to a long career fixing up all the code produced by below average developers relying on AIs without any real understanding of the code being produced :D