OpenAI Codex Edit
This extension allows you to use the "Edit" endpoint of the OpenAI Codex API to make changes to your code that already exists in a file. It's a great way to quickly make small changes to your code without having to write it from scratch. For example, you can have the extension add all the comments that you didn't bother to write, or you can have it remove a bunch of statements that you don't need anymore. Or you can try having it do more interesting things. The possibilities are endless!
You can either select some text in your editor and then right-click and select the "OpenAI Codex Edit" command from the context menu, or you can just right-click with nothing selected and the extension will assume you want to use everything in the file (or at least as much as it can send to the API). You'll be prompted to enter a prompt, which is the text that will be sent to OpenAI to generate the response. This should be a description of what you want to happen to the selected code, written in natural language.
For example, you might say "Add comments to this code" or "Remove all the print statements" or "Add a function that does X".
Be as specific with the instruction as possible.
The extension will then send the selected text to OpenAI and replace it with the response from the API.
In order to use this extension, you must have an account with OpenAI.
From the Account Settings in the OpenAI dashboard, you can generate an API key, which must be set in the extension settings. Additionally, you will need your Organization ID, which can also be found in the Account Settings on the OpenAI dashboard.