A VSCode extension to fix code errors using multiple AI providers (Gemini, OpenAI) via right-click context menu. Supports all programming languages, optimized for C# and TypeScript.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
A powerful VSCode extension that allows you to fix code errors using multiple AI providers (Google Gemini, OpenAI, Blackbox, and Perplexity) through a right-click context menu and inline quick fixes. Supports all programming languages with optimized prompts.
Note to publisher: You can create a GIF like the one above using a tool like ScreenToGif and place it in your repository. Make sure the link is updated.
Features
Multi-AI Support: Choose between Google Gemini, OpenAI, Blackbox, and Perplexity models.
Inline Quick Fixes: Errors are highlighted with a lightbulb. Click it to get an instant fix.
Safe Diff Preview: Review all suggested changes in a diff view before accepting, ensuring you are always in control.
Context Menu Actions: Right-click to fix a specific selection or an entire file.
Universal Language Support: Works with any programming language detected by VSCode.
Secure: Your API keys are stored securely in VSCode settings and are never shared.
No API Key? No Problem!: Provides a basic, rule-based fix even without an API key.
Installation
Open VSCode.
Go to Extensions (Ctrl+Shift+X).
Search for "Fix by AI".
Click Install.
Setup
After installation, open VSCode settings (Ctrl+,).
Search for "Fix by AI".
Add your API key for the desired AI provider:
fixByGemini.apiKey: Your Google Gemini API key from Google AI Studio.
fixByOpenAI.apiKey: Your OpenAI API key from OpenAI Platform.
fixByBlackbox.apiKey: Your Blackbox.ai API key.
fixByPerplexity.apiKey: Your Perplexity API key.
Usage
Option 1: Quick Fix (Recommended)
Open a code file with an error (indicated by a red squiggle).
Click the lightbulb icon that appears next to the error.
Select a "Fix with..." option from the menu.
A diff view will open, showing the suggested change. You can Accept or Decline the fix from there.
Option 2: Context Menu
To fix a specific part of the code, select it. To fix the entire file, don't select anything.
Right-click in the editor.
Choose a "Fix by..." option for your preferred AI provider.
You will be prompted to "Accept" or "Decline" the fix.
Publishing to the Marketplace
To publish the extension, you need a Microsoft Visual Studio Marketplace publisher account.
Ensure the publisher field in package.json matches your publisher ID.
Run vsce package to create the .vsix file.
Run vsce publish to upload it to the marketplace.
License
This project is licensed under the ISC License. See the LICENSE file for details.