Code Commenter is a Visual Studio Code extension that adds comments to highlighted code snippets. It utilizes the OpenAI GPT-3 API to generate comments that explain the functionality of the code.
You can review OpenAI's data storage policies here - https://openai.com/policies/api-data-usage-policies
Launch Visual Studio Code.
Open the Extensions view by clicking on the square icon on the sidebar or by pressing Ctrl+Shift+X.
Search for "Code Commentator" in the Extensions view search bar.
Click on the "Install" button next to the "Code Commentator" extension.
Once installed, the extension will be ready to use.
Select the code snippet you want to add comments to in the Visual Studio Code editor.
Type "Code Commentator" in the Command Pallete (Shift + Command + P (Mac) / Ctrl + Shift + P (Windows/Linux) to open the Command Palette)
Choose the "Code Commentator" option from the context menu. You can also use the shortcut ctrl+shift+c(windows) and cmd+shift+c(mac) to implement the code commentator after highlighting the code.
The extension will generate comments for the selected code snippet and insert them as comments above the selected code snippet.
The Code Commenter extension does not currently have any configurable options. It uses the default settings for generating comments based on the selected code.
If an error occurs while generating comments, a notification will be displayed with an error message. Please ensure that you have an active internet connection.
Contributions to Code Commenter are welcome! If you would like to contribute, please follow these steps:
Fork the repository and clone it to your local machine.
Create a new branch for your changes.
Make your modifications and ensure they are properly tested.
Commit your changes and push them to your forked repository.
Submit a pull request detailing the changes you have made.