The VS Code Code Helper Extension provides helpful features to assist you with code-related tasks, such as explaining code, generating test cases, refactoring code, and adding comments to methods. It leverages the power of OpenAI's GPT-3.5 language model to provide intelligent suggestions and automate repetitive tasks.
Explain Code: This feature allows you to select a piece of code and get a simplified explanation of the code in simple words.
Generate Test Case: With this feature, you can select a code snippet and automatically generate a test case for that code.
Refactor Code: The extension can refactor and optimize your code by suggesting improvements and optimizations. It can also add comments to explain the code.
Add Comments to Methods: This feature helps you add comments to methods in your code. It generates comments based on the method signature and description.
To use the extension, follow these steps:
Install the extension in your VS Code editor.
Open a code file in the editor.
Select the desired code snippet.
Right-click on the selected code and choose one of the available options from the context menu:
Explain Code: This option provides a simplified explanation of the selected code.
Generate Test Case: This option generates a test case for the selected code.
Refactor Code: This option refactors and optimizes the selected code, and adds comments to explain the code.
Get code for your comments: This option helps you to get answers for your comment from chat GPT.