Update (Dec 14): OpenAI made the unofficial API for ChatGPT harder to access and there aren't any good workarounds at the moment so the extension is not functional for the time being. - Abi
This is very much an alpha. The error handling needs to be significantly improved.
An extension that allows you to use ChatGPT right within VSCode.
The goal is to make interaction with the AI seamless via deep integration with VS Code.
Install via the VS Code Marketplace.
Here, we code the popular game, Wordle, in 2 minutes.
final2.mp4
The first time you try to ask ChatGPT a question, you'll be asked for your session token.
Here's how you get the session token:
- Go to ChatGPT and log in or sign up.
- Open Dev Tools (Cmd + Opt + C on Mac/Chrome).
- Go to Application > Cookies
- Copy the value for __Secure-next-auth.session-token
Periodically, the token might expire and you will be prompted for a new session token.
You can also modify this session token at any time by editing chatgpt.token
in settings.
- Streaming, fast responses from ChatGPT
- Send generated code directly to text or terminal buffers
- Comes with useful prompt presets:
- Explain code
- Diagnose error message
- Feed your current selection or active tab into the prompt
- Support for large responses that span multiple messages (using the "continue" prompt trick)
- Workspace detection (tell GPT that you use Yarn, Tailwind, etc. so it generates the most relevant code snippets)
- Full history
- Refactor code and see diff
Forked from chatgpt-vscode.
We use the unofficial API endpoints that power the ChatGPT website. Thanks to Travis Fischer for the ChatGPT package.
While this approach is more robust than earlier UI automation approaches, the endpoints are subject to change as well as rate limits. They might break at any point.
MIT