Is there an AI that can analyze and refactor a huge file? [closed]

I have a huge JS file (a few thousand lines of code). It is to big for the AI models I know. Is there some free AI that can take the file of this size, analyze and refactor it?