Overview Q & A Rating & Review
AI Studio
AI Studio enhances your coding workflow with ChatGPT-powered features like unit test generation, code refactoring, documentation, and more - accessible via right-click context menu.
Get it from Visual Studio Marketplace
Getting Started
Obtain API Key : Create your API key at OpenAI Platform
Configure Extension : Navigate to Tools/Options/AI Studio and enter your key
Configuration Options
Format Changed Text : Enable to automatically format refactored code
Language Model : Choose between:
ChatGPTTurbo
GPT4_Turbo
GPT4
GPT4o
GPT4_32k_Context
Custom Models : Optionally specify custom models
Features
Code It
Select code or click on a line
Right-click → "AI Studio / Code It "
Get AI-generated implementation
Result :
Select code
Right-click → "AI Studio / Add Comments "
Receive commented code
Refactor
Select method
Right-click → "AI Studio / Refactor "
Get optimized code
Add Summary
Select method or method header
Right-click → "AI Studio / Add Summary "
Receive detailed documentation
Explain
Select code
Right-click → "AI Studio / Explain "
View code explanation popup
Security Check
Select code
Right-click → "AI Studio / Security Check "
Review security suggestions
Advanced Customization
Command Customization
Navigate to Tools/Options/AI Studio/Commands
Modify command behaviors with custom instructions
Customization Result :
Unit Test Generation
Select method
Right-click → "AI Studio / Add Unit Tests "
Get generated tests
Configure test generation at Tools/Options/AI Studio/Unit Test :
Testing Framework Options