VS Code Local Assistant is a powerful extension designed to assist developers with code generation, explanation, and chat-based interactions. It integrates with a locally hosted AI model, allowing users to generate and understand code directly within Visual Studio Code.
- Code Generation: Generate code snippets based on user prompts.
- Code Explanation: Select code in the editor to get detailed explanations.
- Interactive Chat Panel: Open a side panel to interact with the assistant.
- Supports Multiple Languages: Detects file type and generates explanations accordingly.
- Download the extension by clonning this repository.
- Open VS Code and navigate to
Extensions(Ctrl+Shift+X). - After clonning the repo Install the requirements, You will need to download DeepSeek model using LLama you download any level of model ranging from 1.5 Billion paramaters to highest qulaity depending on your system I have trained it on 7Billion and 1.5 Billion Parameters model.
- Click
Installon the VS Code Local Assistant. - Reload or restart VS Code to activate the extension.
- Use the command palette (
Ctrl+Shift+P) and search forLocal Assistant: Open Panel. - The chat window will open in a new side panel.
- Open the command palette (
Ctrl+Shift+P). - Select
Local Assistant: Generate Code. - Enter a prompt (e.g., "Create a function to sort an array of objects by a property").
- The generated code will be inserted into the editor at the cursor position.
- Select a block of code in the editor.
- Open the command palette (
Ctrl+Shift+P). - Choose
Local Assistant: Explain Code. - The explanation will appear in the chat panel.
- JavaScript
- TypeScript
- Python
- Java
- C / C++
- C#
- Go
- Ruby
- PHP
- HTML / CSS
- JSON / Markdown
- Shell (Bash, PowerShell)
- Rust
- Swift
- Kotlin
- Dart
- Node.js and npm installed
- VS Code installed
- LLama
- Clone the repository:
git clone https://github.com/your-repo/vscode-local-assistant.git cd vscode-local-assistant - Install dependencies:
npm install
- Run the extension in VS Code:
npm run compile code . - Press
F5to launch a new VS Code window with the extension loaded.
- I am trying it to be more flexible and researching ways how can we use it Without even downloading the Deepseek model which Offcourse required Internet to connect to some Cloud platorm which will destroy the Original Problem Statement of Offline Assistant, Any suggestion Are highly welcome!
Contributions are welcome! Please open an issue or submit a pull request if you'd like to improve the extension.
For any questions or issues, feel free to reach out via GitHub Issues or email at [email protected]