CodeGPT Chat
The CodeGPT Chat feature enhances your development experience by allowing you to engage in conversations with a Large Language Models (LLM) directly within your text editor. This tutorial will guide you through the steps to make the most of this powerful tool.
How to Use:
- Open the Chat Tab
- Navigate to the tools tab and click on
Chat
By default,Gemini-2.5-Flash
will answer on the chat. - Once the chat tab opens, you can start a conversation by typing a message and hitting
Enter
. - If you request code, copy or paste it directly into the file with the
Insert code
button which is the arrow on the top right of the code. - You can clean the chat by clicking on
New chat
button orReload
the question
Using Code Selection:
Select the desired code in your editor by level to share code snippets. The selected code will be automatically inserted into the chat interface, allowing CodeGPT to provide more accurate and context-specific responses. Call the function using @
.
To read the name of the file or segment, you can use the slide bar to navigate through the name.
Context level
Please enable it, and AI will be able to understand the context of your code.
You have three levels of context:
Selected code
: manually selected codeCodebase
: we auto-select the codebase. Please index the codebase before on theCodebase
buttonCode Graphs
: we enrich the responses with code knowledge graphs.
Using Custom Context
Using custom contexts allows you to tailor the responses to specific situations.
Add Files
- Click the
+Add Context
button - Choose
#Files
to add a file from your current project as context - Click outside the window to save the changes
You can also add the current file to the workshop automatically by clicking on the right ⚙️ icon and enabling the corresponding option
My agents
- Click the
+Add Context
button - Choose
My agents
to get the list of agents and click the one that you want to use - Click outside the window to save the changes
Docs
- Click the
+Add Context
button - Choose
Docs
to get the list of CodeGPT Marketplace agents and click the one that you want to use - Click outside the window to save the changes
Shortcuts
You can use the shortcuts to make the most of the CodeGPT Chat feature. Here are some of the most useful shortcuts:
/Explain
: Explain the code selected/Comment
: Comment the code selected/Fix
: Fix the code selected/Document
: Generate documentation for the code selected/Refactor
: Refactor the code selected/Unit Test
: Test the code selected/Debug
: Debug the code selected
To use any of the above features, log in to your CodeGPT account. You’ll get a limited number of free interactions each day.
If you want more usage and access to advanced AI models without setting up your API keys, you can subscribe to a paid plan.
Prefer to use it for free? Simply add your own API key (such as one from OpenAI or Anthropic), and you'll be billed directly by that provider.
To learn how to do this, please refer to the following link
Maximize your productivity with CodeGPT Chat and unlock a new level of efficiency in your coding endeavors.