I have been thinking about this a lot lately, and I don't think that AI will replace programmers soon.
Software is an unlimited space, sky is the limit to what you can accomplish. AI will be available to each and every company, so every company will try to compete by adding more features exponentially as AI makes adding them easier.
As a programmer your role will gradually turn into more of an architect. You will put things/systems together and make sure everything works, and you will focus less on the coding part as AI does that for you.