Personal Copilot
This tool is an experimental extension for the Visual Studio Code IDE. It is designed for developers and operations professionals. The extension helps with generating code, finding issues and vulnerabilities, summarizing code, creating documentation, and doing git code reviews before committing changes.
The extension uses different APIs for large language models (LLMs). Currently, it only works with locally hosted open-source APIs like Llama2 and Mistral. This gives the extension a wide range of features and functions. Since the LLMs are hosted locally, it works even when you are not connected to the internet.
Please note that this is an experimental version resulting from my learning and experimentation with Local LLMs. Therefore, you should use it at your discretion and at your own risk.
Features
- Code Generation
- Code Documentation
- Code Summary
- Find Code Problems and Vulnerabilities
Prerequisites
Install Ollama CLI:
Follow instructions specific to your OS as given here: https://ollama.com/download
Download Codellama Model:
Post successful installation of Ollama, Run following in your terminal (for Mac/Linux) or in Command Prompt on windows.
ollama pull deepseek-coder-v2:latest
Configuring the Extension
Open VS Code settings, and search for "Personal-Copilot", to find the settings required for this extension. Key settings are:
- Provider (default Local)
- LLM Enpoint; Default configured with Ollama Endpoint (http://localhost:11434/v1)
- Default Promopts for each tasks and can be updated if required
How to use the Personal Copilot?
- After done with Prerequisites and Configurations as given above, open your code project/workspace.
- Open the code file, where you want help from your Personal Copilot
- Select the code snippet in the file in VS Code, right click then you will be seeing the options starting with Personal-CoPilot
- Select the operation you want help with e.g. "Personal-CoPilot: Refactor the code"
- It will open the CoPilot window on left side in VS Code, with the suggested code
- Click on the code block appearing on the Personal CoPilot window, it will replace the code in code file.
- Similarly you can try with other options
Known Issues/Limitations
Developed this project while experimenting with Local LLM, still work for feedback, Azure Repo review is having some trouble. With keeping these context, use it with at your risk :) .
- Only Eabled with Local LLMs, new verisons will be coming with ChatGPT/Azure etc.
- Required intallation and configuration for Local LLMs
- Currently Code is not getting highlighted but appearing in Red color, WIP around this.
Release Notes
1.0.0
1.1.0
Included full support for latest local LLMs and fine tuned the prompts accordingly
Hope you will like it!