Access ChatGPT in VS Code without Leaving The Editor with this Plugin

0 Comments
Editor Ratings:
User Ratings:
[Total: 0 Average: 0]




Continue is a free, open-source VS Code extension that allows you to harness the power of ChatGPT to your IDE and acts like an autopilot for software development.

Many developers nowadays have started taking assistance from ChatGPT while coding. But the experience is not very satisfactory due to the amount of copying, pasting and editing that is required to absorb and include the results into your codebase. This is precisely where Continue steps in and enables the LLMs to help you directly in your IDE without leaving the editor as you complete your software development tasks.

For example, you can highlight a section of the code that you do not understand and then use natural language prompts like “tell me how this code works” to get the explanation. Here are a few tasks where Continue can prove to be very helpful for you:

  1. Ask single open-ended questions: You can go ahead and ask open-ended questions without leaving your IDE such as “what is the difference between dense and sparse embeddings?”. Continue will provide single answers to your queries without turning them into conversations.
  2. Get possible explanations: You can inquire about a part of the code that you have highlighted to get another option such as “where in the page should I make this request to the backend?”
  3. Edit in Natural Language: You can highlight a portion of the code and ask Continue to fix or restructure it to improve its operation without affecting the functionality using the ‘/edit’ slash command. For example, “/edit rewrite this function to be async”.
  4. Generate files from scratch: This allows you to create a new file and start new Python scripts, React components and more. “/edit add a React component for syntax highlighted code”.
  5. Ask about errors: Continue can also assist you in explaining errors and offering possible solutions. For this, you must copy and paste the error message into the text input box of Continue and use natural language prompts such as “Explain this error to me in a simple way” or “Give me some ideas to solve this problem?”
  6. Edit small existing files: You can highlight an entire file and ask Continue to refactor and improve it provided the file is not too large. For example, “/edit Rewrite this API call to grab all pages”.

There are several other tasks that Continue can help you to complete easily and quickly. Click here to learn more about them. You must also remember that there are tasks that Continue may not be helpful with such as deep debugging, editing large files, highlighting very long lines, tasks with many steps, multi-file edits in concurrence and more.

Working:

1. Ensure that you have Python 3.8 and above for Continue to function. If you have not installed it, click on this link for installation.

2. Click on this link to navigate to the Visual Studio Marketplace and click on ‘Install’.

Install continue

3. This will take you to the Continue extension page in VS Code where you must click on ‘Install’ once again. You will now see a message in the bottom right of the window that says ‘Setting up Continue extension. This process may take 60 to 90 seconds after which the Continue extension will pop up as a sidebar.

Install Continue in VS Code

Continue Sidebar

4. As explained earlier, you can now use Continue for a variety of tasks. To ask single non-conversational questions, just input the question in the text box and click on ‘Continue’. Wait for some time while the extension processes the input and generates the results in the sidebar.

Single open-ended query

5. To ask Continue about a section of the code that you do not understand, simply highlight code, type the corresponding prompt such as ‘tell me how this code works’ and click on ‘Continue’.

Explain code

6. You can use Continue to build Python scripts, React components and more from scratch. To add a React component, just highlight the code in the file and input “/edit add a React component for syntax highlighted code”. Wait for a couple of seconds while Continue processes and develops the code. Likewise, you can type “/edit write a python script to get Posthog events” to get the corresponding script for it.

Add react component

Python script

7. For more examples and information and examples on how to use Continue for a variety of tasks, click here.

Closing Comments:

Overall, Continue is a great VS Code extension that enables you to use ChatGPT directly within your IDE and provides an autopilot for your software development. It can assist you in a variety of tasks that we have explained above in the article.

Let me add here that LLMs do hallucinate at times and may make up a library or create some syntax that does not exist. Hence if the suggestions from Continue seem weird or do not seem to work, you must search in Google or other search engines to prevent from ending up somewhere strange.

Click here to navigate to the Visual Studio Marketplace to install the Continue extension. To access the source code of Continue, click here.

Editor Ratings:
User Ratings:
[Total: 0 Average: 0]
Free/Paid: Free

Leave A Reply

 

Get 100 GB FREE

Provide details to get this offer