Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Coding GPTNew to Visual Studio Code? Get it now.
Coding GPT

Coding GPT

Rajkumar Arisetty

|
343 installs
| (0) | Free
Generate Code for your project
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Coding GPT

Coding GPT is a Visual Studio Code extension that allows you to generate test cases, refactor code, find issues, and explain code selections using the CODING GPT. This extension provides a set of commands that can be accessed through the command palette or the editor context menu.

Commands

Add API Token

To use the CODING GPT, you need to add your API token. To do this, use the "CODING GPT: Add API Token" command. This will prompt you to enter your API token.

Generate API Token:

  1. Go to OpenAI's Platform website at platform.openai.com and sign in with your OpenAI account.
  2. Once logged in, click on your profile icon located at the top-right corner of the page.
  3. From the dropdown menu, select "View API Keys."
  4. On the API Keys page, you will see an option to Create New Secret Key. Click on it to generate a new API key.

Example to add it to extension:

addToken

  1. Open the command palette in Visual Studio Code by pressing Ctrl+Shift+P (Windows/Linux) or Cmd+Shift+P (macOS).
  2. Type "CODING GPT: Add API Token" and select the command.
  3. Enter your API token when prompted.

Chat

Chat

The "CODING GPT: Chat" command opens a webview that allows you to chat with the CODING GPT using the GPT-3.5-Turbo API. This feature allows you to have a conversation with the CODING GPT and get responses to your questions or requests.

Usage

To use the "CODING GPT: Chat" command, follow these steps:

  1. Open the command palette in Visual Studio Code by pressing Ctrl+Shift+P (Windows/Linux) or Cmd+Shift+P (macOS).
  2. Type "CODING GPT: Chat" and select the command.
  3. A webview will open in a new tab, allowing you to chat with the CODING GPT.

Chatting with the CODING GPT

Once the webview is open, you can start chatting with the CODING GPT. Simply type your message in the input field at the bottom of the webview and press enter to send it. The CODING GPT will then generate a response based on your message using the GPT-3.5-Turbo API.

You can continue the conversation by typing your next message in the input field and pressing enter. The CODING GPT will respond to each message you send.

Send Message

To send a message to the CODING GPT, use the "CODING GPT: Send Message" command. This will prompt you to enter the message you want to send.

Example:

  1. Open the command palette in Visual Studio Code by pressing Ctrl+Shift+P (Windows/Linux) or Cmd+Shift+P (macOS).
  2. Type "CODING GPT: Send Message" and select the command.
  3. Enter the message you want to send when prompted.

Refactor Code

To refactor your code using the CODING GPT, use the "CODING GPT: Refactor Code" command. This will prompt you to select the code you want to refactor. The CODING GPT will then generate a refactored version of the code.

Example: refactor

  1. Select the code you want to refactor.
  2. Right-click on the selected code and select "CODING GPT: Refactor Code" from the context menu.
  3. The CODING GPT will generate a refactored version of the code.

Enzyme Tests

To generate Enzyme tests using the CODING GPT, use the "CODING GPT: Enzyme Tests" command. This will prompt you to select the code you want to test. The CODING GPT will then generate a set of Enzyme tests for the selected code.

Example: refactor

  1. Select the code you want to test.
  2. Right-click on the selected code and select "CODING GPT: Enzyme Tests" from the context menu.
  3. The CODING GPT will generate a set of Enzyme tests for the selected code.

React Testing Library Tests

To generate React Testing Library tests using the CODING GPT, use the "CODING GPT: React Testing Library Tests" command. This will prompt you to select the code you want to test. The CODING GPT will then generate a set of React Testing Library tests for the selected code.

Example: tests

  1. Select the code you want to test.
  2. Right-click on the selected code and select "CODING GPT: React Testing Library Tests" from the context menu.
  3. The CODING GPT will generate a set of React Testing Library tests for the selected code.

Explain

To get an explanation of a code selection using the CODING GPT, use the "CODING GPT: Explain the Selection" command. This will prompt you to select the code you want to explain. The CODING GPT will then generate an explanation of the selected code.

Example: explain

  1. Select the code you want to explain.
  2. Right-click on the selected code and select "CODING GPT: Explain the Selection" from the context menu.
  3. The CODING GPT will generate an explanation of the selected code.

Find the Issue

find issue To find an issue in your code using the CODING GPT, use the "CODING GPT: Find the Issue" command. This will prompt you to select the code you want to check for issues. The CODING GPT will then generate a report of any issues found in the selected code.

Example:

  1. Select the code you want to check for issues.
  2. Right-click on the selected code and select "CODING GPT: Find the Issue" from the context menu.
  3. The CODING GPT will generate a report of any issues found in the selected code.

Configuration

The Coding GPT extension provides additional configuration options that allows you to set the path to your ESLint config and allow you to adjust the randomness of the output and the maximum number of tokens to be generated in the completion. To access these configurations, go to the "Coding GPT" section in your Visual Studio Code settings.

explain

The "codingGPT.temperature" property allows you to set the randomness of the output. The default value is 0, which generates a deterministic output. A higher value between 0 and 1 generates more random outputs.

The "codingGPT.maxTokens" property allows you to set the maximum number of tokens to be generated in the completion. The default value is 2048, with a valid range of 256 to 2048 tokens. Increasing this value allows for longer and potentially more complex completions.

Conclusion

With the Coding GPT extension, you can easily generate test cases, refactor code, find issues, and explain code selections using the CODING GPT. This extension is a powerful tool for developers who want to improve their coding workflow and productivity.

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