The business world is cyclic, and with that "programmer jobs" are also cyclic with the business cycle. So even though things look 'down' now, that does not mean that the down cycle will last forever. However, surviving through a down period as a new graduate will also not be easy in any regards.
As to AI, the current crop of AI (which is bubbling very well, and I believe is running itself quickly towards yet another AI winter [https://en.wikipedia.org/wiki/Ai_winter]), it may be useful for replacing some percentage of "head count" programmers, it is not likely to be replacing the actual creative, good, programmers (i.e., the one's often referred to as 10x). So the best advice I can give is to strive to really learn your craft such that you can function more towards the 10x side of the spectrum than the "head count" side. That will give you the best assurance of success at present.
As to AI, the current crop of AI (which is bubbling very well, and I believe is running itself quickly towards yet another AI winter [https://en.wikipedia.org/wiki/Ai_winter]), it may be useful for replacing some percentage of "head count" programmers, it is not likely to be replacing the actual creative, good, programmers (i.e., the one's often referred to as 10x). So the best advice I can give is to strive to really learn your craft such that you can function more towards the 10x side of the spectrum than the "head count" side. That will give you the best assurance of success at present.