Unofficial ChatGPT inside VSCode: ask, refactor, paste
It exists to save you from alt-tabbing between your editor and a browser tab by embedding ChatGPT directly into VSCode.

What it does
The extension parks a ChatGPT chat panel inside VSCode. You can type questions, feed it selected code snippets, and insert answers back into your file. It also carries conversation context across follow-up questions, so you can nag the model repeatedly without losing the thread.
The interesting bit
The whole thing rides the unofficial ChatGPT API via a browser session token you paste from a cookie—no official API key, just a web-scraping workaround. That makes it feel more like a browser automation dressed up as an IDE feature.
Key highlights
- Sidebar chat with persistent conversation memory.
- Right-click commands to explain, refactor, find problems, or optimize selected code.
- Clickable code blocks in responses that drop directly into the active editor.
- Customizable prompt templates for the built-in context-menu commands.
- Built on the unofficial
chatgpt-apipackage.
Caveats
- Authentication requires manually extracting a session token from browser cookies, which is brittle and unofficial.
- The README explicitly labels the extension as a proof of concept that may carry bugs or limitations.
Verdict
Worth a look if you want ChatGPT inside your editor and do not mind the cookie-jar authentication dance. If you need enterprise-grade stability or an official API, this is not your tool.
Frequently asked
- What is mpociot/chatgpt-vscode?
- It exists to save you from alt-tabbing between your editor and a browser tab by embedding ChatGPT directly into VSCode.
- Is chatgpt-vscode open source?
- Yes — mpociot/chatgpt-vscode is an open-source project tracked on heatdrop.
- What language is chatgpt-vscode written in?
- mpociot/chatgpt-vscode is primarily written in TypeScript.
- How popular is chatgpt-vscode?
- mpociot/chatgpt-vscode has 4.9k stars on GitHub.
- Where can I find chatgpt-vscode?
- mpociot/chatgpt-vscode is on GitHub at https://github.com/mpociot/chatgpt-vscode.