Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>VS ChatGPTNew to Visual Studio Code? Get it now.
VS ChatGPT

VS ChatGPT

0xFedev

|
9,948 installs
| (1) | Free
VS ChatGPT is a plugin for Visual Studio Code that integrates the powerful ChatGPT language model into the popular code editor. With VS-ChatGPT, developers can leverage the capabilities of ChatGPT to generate snippets, suggest completions for open-ended questions, and even write entire functions or
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

VS ChatGPT README

VS ChatGPT is a plugin for Visual Studio Code that integrates the powerful ChatGPT language model into the popular code editor. With VS-ChatGPT, developers can leverage the capabilities of ChatGPT to generate snippets, suggest completions for open-ended questions, and even write entire functions or modules.

Usage

Run the command ChatGPT: Text completions to run OpenAI GPT-3

run chatgpt

Commands

Explain Regular Expression

Ask OpenAI to explain a regular expression by selecting the code and running the command "ChatGPT: Explain regular expression."

explain regexp

Add comments to code snippet

Ask OpenAI to comment on the selected code by running the command "ChatGPT: Add comments."

add comments

Explain code snippet

Ask OpenAI to explain the selected code by running the command "ChatGPT: Explain code snippet."

explain code

Generate unit tests

Ask OpenAI to generate unit tests for the selected code by running the command "ChatGPT: Generate unit tests."

generate unit tests

Generate JSDoc

Ask OpenAI to generate JsDoc for the selected code by running the command "ChatGPT: Generate JSDoc".

generate jsdoc

Requirements

To use VS ChatGPT you must have an OpenAI account and have generated an API Secret Key.

Extension Settings

This extension contributes the following settings:

  • vs-chatgpt.apikey: Your OpenAI secret API key.
  • vs-chatgpt.model: OpenAI GPT-3 model (Read more about models).
  • vs-chatgpt.max_tokens: The maximum number of tokens to generate in the completion. Most models have a context length of 2048 tokens (except for the newest models, which support 4000) (Read more about tokens).

Shortcuts

Default shortcuts:

  • Windows: alt+ctrl+shift+g
  • Mac: alt+cmd+shift+g

Release Notes

1.2.0

  • New feature: Generate JSDoc

1.3.0

  • Added step-by-step walkthroughs that guide the initial configuration of the plugin.

1.2.0

  • New feature: Explain Regular Expression
  • New feature: Add comments to code snippet
  • New feature: Explain code snippet
  • New feature: Generate unit tests

1.1.0

  • Request #1: Added shortcusts.
  • New feature: Send the selected text to ChatGPT via context menu or command palette.

run via context menu on text selection

run via command palette on text selection

1.0.0

First release.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft