I'm using the ChatGPT mac app to write some code, but copying and pasting from ChatGPT to IDE is getting old* - especially when multiple files are involved.
One solution is to ask ChatGPT to produce a git patch file for all code changes. It's much better but the limitation is that ChatGPT can't create a downloadable link - just the text of the patch file.
I want to:
- Send a ChatGPT prompt describing desired changes
- Use a KM macro to wait for ChatGPT to finish writing all patch text
- Click the Copy button.
I've tried obvious stuff like waiting for a button or an image:
My current ill-advised method involves a loop where I wait a few seconds, click a fixed point, and then check to see if the clipboard changed:
This is not advised, since it clicks specific coordinates that may change depending on multiple factors.
Is there a better way to do this?
What's interesting is that if I scroll up to a previous reply containing a Copy button, then KM will recognize it. Unfortunately it will not recognize a new Copy button.
Finally, note that in the case of producing a patch, only one Copy button is visible after a reply.
*Can you believe the nerve of an AI making me do work?