It'd work better, if you asked it to make a python script that does the transformation, rather than asking it to do the transformation, itself.
Discussion
It isn't consistent, like an algorithm, but it can write simple algorithms well.
junie actually literally does that for some queries, i had it do it on one request one time a few days back
otherwise it's gonna make a request to the LLM for every single transformation, i just used it that way on one file, but if you want to make a change across many files it will fuck it up
They tend to struggle even with search/replace.
yep. for which reason i mostly do it using the IDE's tools for that. those things could improve a lot, like, it should be able to search for a specific syntactic structure regardless of differing whitespace. yes it's possible to write a regex for that but it's clunky to put \s for every space/newline/tab/whatever
maybe I'll try that next time