This VS Code Extension provides helpful features to assist you with code-related tasks, such as add comments to route methods, explaining code, finding bugs, getting answer for comments, refactoring code, generating cypress test and generating test cases . It leverages the power of OpenAI's GPT-3.5 language model to provide intelligent suggestions and automate repetitive tasks.
Features
Add Comments to Route Methods: This feature helps you add comments to methods in your code. It generates comments based on the method signature and description.
Explain Code: This feature allows you to select a piece of code and get a simplified explanation of the code in simple words.
Find Bugs in Code: This feature helpful in finding bugs in code by analyzing the code snippets provided and offering suggestions or insights based on its language understanding capabilities.
Get Answers for Comments: This feature can be helpful in providing answers and explanations for comments in a code snippet.
Refactor Code: The extension can refactor and optimize your code by suggesting improvements and optimizations. It can also add comments to explain the code.
Generate Cypress Test: With this feature, you can select a code snippet and automatically generate a cypress test for that code.
Generate Test Case: With this feature, you can select a code snippet and automatically generate a test case for that code.
AutoComplete Code: With this feature, you can select a code snippet and automatically generate complete code for that code snippet.
Provide Code Suggestions: With this feature, you can select a comment and easily generate a code
suggestion for that comment.
Generate AI Docs: With this feature, you can select any code folder and can generate document for that code in markdown format automatically.
Usage
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:
Add Comments to Route Methods: This option provides comments to route method.
Explain Code: This option provides a simplified explanation of the selected code.
Find Bug in Code: This option provides bugs in the selected code.
Get code for your comments: This option helps you to get answers for your comment from chat GPT.
Refactor Code: This option refactors and optimizes the selected code, and adds comments to explain the code.
Generate Cypress Test: This option generates a cypress test for the selected code.
Generate Test Case: This option generates a test case for the selected code.
AutoComplete Code: This option automatically complete incomplete code.
Provide Code Suggestions: This option provides code suggetions for any comment.
Right-click on root directory and choose option of "Generate AI Docs". This will help to generate Document for selected folder.
If user want to update the previous openai api key user need to follow two steps-
Go to Visual Studio Code Setting.
Search 'Code Assistant' there and will get the option of 'Your OpenAI API key'.
Now you can update your Openai api key there.
The result will be displayed in a new editor window or will replace the selected code in the active editor.
Requirements
To use this extension, you need an internet connection to access the OpenAI API.
Limitations
The extension relies on the OpenAI GPT-3.5 language model, which may have certain limitations and biases.
The accuracy of the results depends on the quality of the training data and the complexity of the code.
Important Note
We are gathering 'Username', 'Hostname', 'Installation Date' and 'Total token of OPENAI API' used by user.
All the above data we are gathering to check user availabilty and their usage.
We are using this plugin for our organization.
Feedback and Contributions
If you encounter any issues, have suggestions, or want to contribute to the extension, please feel free to submit an issue or pull request on the GitHub repository.
Your feedback and contributions are highly appreciated!