### Install CodeGPT Plugin for JetBrains IDEs Source: https://help.codegpt.co/1quick-access-guide Steps to install the CodeGPT plugin for JetBrains IDEs. This involves downloading from the JetBrains Marketplace or installing from a file, verifying Node.js version, and signing in. ```plaintext To connect "JetBrains," first install the plugin. You can download the current version of the plugin from the JetBrains Marketplace, choose your preferred IDE, and click download. Then, to install it from a file, in the "Settings" menu, look for the gear icon at the top and choose the option "Choose from file." Once installed, you must verify that the appropriate version of "Node" 20 or higher is active, the plugin configuration is accepted, and the Next connection is active. Sign in with Google or GitHub, and you will have your "CodeGPT Studio" account connected.That's it! Thank you for joining us, and enjoy using CodeGPT. See you next time! ``` -------------------------------- ### Install CodeGPT Extension for VSCode Source: https://help.codegpt.co/1quick-access-guide Instructions for installing the CodeGPT extension within Visual Studio Code. This includes searching the Marketplace, installing, and enabling automatic updates. ```plaintext Welcome to CodeGPT. On this website, you will find information about CodeGPT products and the corresponding documentation. To log in, click on the "Sign Up" button and continue with your corporate account, Gmail, or GitHub. Once you're inside CodeGPT Studio, you can access the tool panel. From here, you can install the "Visual Studio Code" extension. Just open the Marketplace, click on "Install", search for the tool, select "Install" again, and wait for the changes to be saved. Don't forget to enable automatic updates. Then, synchronize your account by clicking on "Sign in," which will open your browser. Once you receive the connection confirmation message, you can go back to Visual Studio and accept the necessary permissions. To index the knowledge base and code, follow the indicated steps. You will be ready to start a conversation with any AI model available on the CodeGPT providers. ``` -------------------------------- ### Example of Small, Sequential Prompts Source: https://help.codegpt.co/best-practices-for-using-codegpt-in-your-workflow Avoid making multiple small requests for related tasks. This example shows an inefficient way to add features. ```natural_language Add logging. Now add validation. Now add error handling. ``` -------------------------------- ### Initial Prompt for JWT Authentication Source: https://help.codegpt.co/best-practices-for-using-codegpt-in-your-workflow Start with a clear objective and ask for a plan before requesting implementation. This prompt seeks guidance on files and middleware for JWT authentication. ```natural_language I want to protect the /admin routes using JWT, just like we do for /users. Can you walk me through what files and middleware should be updated? ``` -------------------------------- ### Combined Prompt for Multiple Tasks Source: https://help.codegpt.co/best-practices-for-using-codegpt-in-your-workflow Combine related tasks into a single, comprehensive prompt for cleaner and more cohesive code. This example requests input validation, error handling, and logging. ```natural_language Update this function to include: - Input validation - Error handling - LoggingFollow the same style as logRequest() and validateUser(). ``` -------------------------------- ### JavaScript Promise Example for Asynchronous Operations Source: https://help.codegpt.co/prompt-example This snippet demonstrates how to use JavaScript Promises to handle asynchronous operations like fetching data from an API. It includes error handling for network issues and data processing. ```javascript function fetchData(url) { return new Promise((resolve, reject) => { fetch(url) .then(response => { if (!response.ok) { throw new Error('Network response was not ok'); } return response.json(); }) .then(data => resolve(data)) .catch(error => reject(error)); }); } // Using the promise fetchData('https://api.example.com/data') .then(data => { console.log('Data received:', data); }) .catch(error => { console.error('Error fetching data:', error); }); ``` -------------------------------- ### Follow-up Prompt for JWT Implementation Source: https://help.codegpt.co/best-practices-for-using-codegpt-in-your-workflow After understanding the plan, use this prompt to instruct CodeGPT to implement the changes based on the provided guidance. ```natural_language Now go ahead and implement it using the same patterns. ``` -------------------------------- ### Prompt to Summarize Changes Source: https://help.codegpt.co/best-practices-for-using-codegpt-in-your-workflow After implementation, ask CodeGPT to summarize the modifications made to a file. This is useful for documentation or review. ```natural_language Summarize what you changed in this file. ``` -------------------------------- ### Prompt Template for Summarizing Changes Across Files Source: https://help.codegpt.co/best-practices-for-using-codegpt-in-your-workflow Use this template to request a summary of changes made across multiple specified files. ```natural_language Summarize the changes across these three files. ``` -------------------------------- ### Verify GitLab API Token Permissions Source: https://help.codegpt.co/documentation-on-connecting-gitlab-on-premise-and-its-use-in-graphs Use this command to verify if your access token has basic permissions to list projects on your GitLab instance. Ensure you replace 'your_token' and 'https://your-gitlab.com' with your actual token and GitLab instance URL. ```bash curl -H "PRIVATE-TOKEN: your_token" https://your-gitlab.com/api/v4/projects ``` -------------------------------- ### Prompt Specifying Implementation Patterns Source: https://help.codegpt.co/best-practices-for-using-codegpt-in-your-workflow Be explicit about desired implementation styles, such as error handling and input validation, by referencing specific functions. ```natural_language Add input validation and error handling. Use validatePayload() and handleApiError() as references. ``` -------------------------------- ### Verify Repository Download Capability with GitLab API Token Source: https://help.codegpt.co/documentation-on-connecting-gitlab-on-premise-and-its-use-in-graphs This command verifies if your access token has the necessary permissions to download a complete repository archive. Replace 'your_token' and 'https://your-gitlab.com' with your specific details and 'PROJECT_ID' with the target project's ID. ```bash curl -H "PRIVATE-TOKEN: your_token" https://your-gitlab.com/api/v4/projects/PROJECT_ID/repository/archive.zip -o repo_test.zip ``` -------------------------------- ### Create a CodeGPT Account Source: https://help.codegpt.co/1quick-access-guide Follow these steps to create a new CodeGPT account on their official website. This involves signing up, accepting terms, and choosing an email provider. ```plaintext Hello and welcome to CodeGPT! If you're new here and don't have an account yet, don't worry; we'll show you how to create one quickly. First, visit our official website: codegpt.co. Click on "Sign Up", accept the terms and conditions, and select your preferred email provider. After clicking "Continue", you'll have several options: create your own agent, explore our collection of expert agents in the Marketplace, or connect your repository. For the latter option, make sure you have an account on GitHub, GitLab, Bitbucket, Amazon, or a similar service. You can also install plugins for extensions like VSCode, JetBrains, and Cursor to enhance your experience. Once everything is set up, you'll be able to interact directly with the CodeGPT models. Don't forget to set up your name and organization in the profile options. If you started with a free account, you can change your organization if your account originates from a seat in a main Teams or Professional account. If you wish to acquire a Professional or Teams account, you can easily do so from the "Subscribe" button in the subscription options. And if you want to share CodeGPT with your friends, go to the "Referrals" tab and copy your referral code. ``` -------------------------------- ### Prompt Template for Multiple Tasks with Pattern References Source: https://help.codegpt.co/best-practices-for-using-codegpt-in-your-workflow This template allows for requesting multiple tasks (e.g., email verification, logging, error handling) and specifies patterns to follow from other files. ```natural_language Add email verification, logging, and error handling to the registration flow. Follow patterns in auth.ts and emailService.ts. ``` -------------------------------- ### Prompt Template for Investigating and Adding Features Source: https://help.codegpt.co/best-practices-for-using-codegpt-in-your-workflow Use this template to first investigate which functions are involved in a process and then request the addition of features like error handling. ```natural_language What functions are involved in sending payments? I want to add error handling. ``` -------------------------------- ### Prompt Referencing Codebase for Caching Strategy Source: https://help.codegpt.co/best-practices-for-using-codegpt-in-your-workflow Provide context by referencing specific code patterns or files within your codebase. This prompt asks to use the same caching strategy as a specified file. ```natural_language Use the same caching strategy as cacheUserData.ts. ``` -------------------------------- ### First Prompt for Breaking Down a Complex Task Source: https://help.codegpt.co/best-practices-for-using-codegpt-in-your-workflow When a complex change is not working, break it down into smaller, manageable steps. This is the first prompt to add logging. ```natural_language Add logging to this function using logRequest(). ``` -------------------------------- ### Prompt Referencing Codebase for Validation Logic Source: https://help.codegpt.co/best-practices-for-using-codegpt-in-your-workflow Instruct CodeGPT to locate and use existing patterns from your codebase. This prompt directs it to look for validation logic in a specific folder. ```natural_language Before implementing, look for validation logic in the middleware/ folder. ``` -------------------------------- ### Second Prompt for Breaking Down a Complex Task Source: https://help.codegpt.co/best-practices-for-using-codegpt-in-your-workflow This is the subsequent prompt to add validation after logging has been implemented, continuing the breakdown of a complex task. ```natural_language Now add validation like in validateUser(). ``` -------------------------------- ### Identify Process Using Port (macOS) Source: https://help.codegpt.co/codegpt-jetbrains Use this command to find which process is using a specific port on macOS. Replace `$PORT` with the actual port number. ```bash sudo lsof -i -P | grep LISTEN | grep :$PORT ``` -------------------------------- ### HTML Placeholder for Chat Widget Source: https://help.codegpt.co/connect-codegpt-to-your-own-website Include this HTML snippet in your webpage to create a placeholder for the chat widget. ```html
```