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,Claude-3.5-Sonnet
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. - 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
buttonDeep insights
: 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:
/Fix
: Fix the code selected/Explain
: Explain the code selected/Refactor
: Refactor the code selected/Document
: Generate documentation for the code selected/Inline code
: edit specific words inside the selected code./Unit Test
: Test the code selected/Comment
: Comment the code selected/StackOverflow
: Search for the code selected on StackOverflow/Code Builder
: Generate a code builder for the code selected/Code Interpreter
: Interpret the code selected without executing it/Planning
: allow expert agents from our Marketplace to help you plan the code.
Make the most of CodeGPT Chat and experience a new level of productivity in your coding endeavors.