AI QuickFix READMEAI QuickFix is a Visual Studio Code extension that provides quick fixes to code issues using Artificial Intelligence, powered by GPT-4 and GPT-3.5-turbo. How to useWrite buggy code that VSCode, Typescript, or a linter like SonarLint identifies as a problem. Click on the little lightbulb that appears when you mouse over the problem, or click the Quick Fix button. Wait ~5 seconds. ChatGPT will try to fix your bug. FeaturesThe extension provides quick fixes to code issues using ChatGPT's API. Code issues are not found by this extension, but this extension adds a fix command to issues found by VSCode, Typescript, ESLint, and any other linter you might have like SonarLint. When you ask it to fix a problem, it attempts to ask VSCode to find the beginning and end of the current function context. If VSCode can't do that for your language, it grabs the problem range (the red underlines) plus 10 lines on either side. It then passes the problem as described by the linter and that context to ChatGPT, and asks it to respond only with fixed code. GPT-4 is great at this. GPT-3.5-turbo likes to add extra chatty comments, which the extension attempts to remove but can't always manage it. You can edit the prompts in the config settings, more information is below. They default to prompts that work great on GPT-4 and are designed to be as effective as possible on GPT-3.5-turbo. RequirementsYou'll need an OpenAI API account, sign up here: https://platform.openai.com It works a lot better with GPT-4 access, request that here: https://openai.com/waitlist/gpt-4-api Extension SettingsThis extension contributes the following settings:
The default settings work pretty well for me but I encourage you to prompt engineer and if you find a significantly better performing version open an issue and let me know! Known Issues
Tips
Release Notes0.0.1Initial release of AI QuickFix |