Maybe ChatGPT will mature enough to help with code, but Co-Pilot is filling that bill for me right now.
I’ve been using Github Co-pilot and VS Code for a couple of months now for both long formulas and Scripts. (For Formulas I just tell VS Code to treat them as Javascript).
Your mileage may vary . . . . Co-Pilot isn’t a ‘must have’ but it’s code completion suggestions are often exactly what I want. I wouldn’t pay more than the current monthly rate, but it’s worth the $10 bucks for me.