Skip to content

AI Studio helps you with the power of chatGPT in many subjects such as adding unit tests, refactoring code, adding summary, etc. while writing code, just by right click on the code.

License

Notifications You must be signed in to change notification settings

ekondur/AI-Studio

Repository files navigation

AI Studio

Codacy Badge

AI Studio helps you with the power of chatGPT in many subjects such as adding unit tests, refactoring code, adding summary, etc. while writing code, just by right clicking on the code.

Get it from Visual Studio Marketplace

image

image

  • If you prefer refactoring the code changes, keep Format Changed Text as True.
  • Choose a Language Model options: "ChatGPTTurbo", GPT4_Turbo, "GPT4", "GPT4o" or "GPT4_32k_Context"

Code It:

Write a use case where you want to write the code, select the statement (if it's a single line just click on the line), right-click, and click "AI Studio / Code It".

image

Prints the result after a short time:

image

Add Comments:

Select the lines of code you want to comment on, right-click, and click "AI Studio / Add Comments".

Returns the selected code with detailed comments.

image

Refactor:

Select the whole method, right-click, and click "AI Studio / Refactor".

The refactored result:

image

Add Summary:

Select the whole method or just the first line of the method, right-click, and click "AI Studio / Add Summary".

Gives a very detailed and logical result:

image

Explain:

Select the lines of code you want to explain, right-click, and click "AI Studio / Explain".

Shows a popup that includes explanations of the selected code:

image

Customizable Commands

  • AI studio is a flexible tool that allows you to customize all commands. Go to Tools/Options/AI Studio/Commands,
  • Write something to help chatGPT about the behaviors of the commands.

image

Then trigger the command again, and you will see the results affected by your comments:

image

Add Unit Tests:

Select the whole method, right-click, and click "AI Studio / Add Unit Tests".

Prints the unit test(s) based on your choices:

image

You can also customize the unit tests on Tools/Options/AI Studio/Unit Test

image

  • Unit Testing Framework: Select unit testing framework to set up main functionalities.
  • Isolation Framework: An isolation framework is a set of programmable APIs that makes creating fake objects much simpler, faster, and shorter than hand-coding them.
  • Test/Dummy Data Framework: Test Data Builders and Dummy Data Generators.
  • Fluent Assertions Framework: Fluent assertions frameworks is a set of .NET extension methods that allow you to more naturally specify the expected outcome of a TDD or BDD-style unit test.
  • Customize: Add any other details to customize unit tests.

Security Check:

Select the code line(s), right-click, and click "AI Studio / Security Check".

Gives some information and suggestions:

image

About

AI Studio helps you with the power of chatGPT in many subjects such as adding unit tests, refactoring code, adding summary, etc. while writing code, just by right click on the code.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages