This is a Visual Studio Code extension for ChatGPT that was built using only ChatGPT and 5 beers.
The README.md
file for this extension was generated by ChatGPT.
yarn setup
(installs project dependencies)yarn compile
(generates js files)yarn vscode:package
(creates vscode installer package)yarn vscode:install
(installs vscode package)ChatGPT: Query
(will provide a prompt for you to ask a question)ChatGPT: Add tests
(generates tests based on file/text selection)ChatGPT: Why is my code broken?
(analyses your code to highlight any logic/syntax errors)ChatGPT: Explain code
ChatGPT: Refactor
ChatGPT: Set API Key
(set's your API key, auto promted on first use)Everything except Reset Token and Query are available from the context menu when right-clicking in the editor.
To use the extension:
This extension uses the official OpenAI library
Open the VS Code Command Palette and Type ChatGPT: Set API Key
, this will prompt you for your key which can be generated here: https://openai.com/account/api-keys
Once you're authenticated, you can ask ChatGPT any question and supply source code from your current file/selection.
If you need help using this extension, please open an issue on the GitHub repository for this extension.