Skip to content
| Marketplace
Sign in
Visual Studio Code>Debuggers>Ollama AI AssistantNew to Visual Studio Code? Get it now.
Ollama AI Assistant

Ollama AI Assistant

codeboss

|
6 installs
| (0) | Free
AI-powered coding assistant with Ollama integration for code generation, debugging, and project analysis
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Ollama AI Assistant - VS Code Extension

A powerful VS Code extension that integrates with Ollama to provide AI-powered coding assistance, including code generation, debugging, project analysis, and code execution.

Features

🤖 AI-Powered Code Assistance

  • Code Generation: Generate code from natural language prompts
  • Code Explanation: Get detailed explanations of complex code
  • Code Debugging: Identify and fix bugs with AI assistance
  • Code Refactoring: Improve code quality and maintainability

🔍 Project Analysis

  • Automatic Project Scanning: Analyze your entire project structure
  • Technology Stack Detection: Identify frameworks, languages, and tools
  • AI-Powered Insights: Get recommendations and best practices
  • Code Quality Assessment: Analyze code patterns and suggest improvements

⚡ Code Execution

  • Multi-Language Support: Execute code in various programming languages
  • Real-time Results: See execution output and errors immediately
  • Debug Information: Get detailed debugging information
  • Performance Metrics: Track execution time and performance

🎯 Smart Integration

  • Ollama Connection: Automatic detection and connection to Ollama
  • Context-Aware: Understands your project structure and code context
  • VS Code Native: Seamlessly integrated with VS Code's interface
  • Status Bar Integration: Real-time connection status

Prerequisites

  1. Ollama: Install and run Ollama on your system

    • Download from ollama.ai
    • Install a code-capable model like codellama or deepseek-coder
  2. VS Code: Version 1.74.0 or higher

Installation

  1. Clone or download this extension
  2. Open VS Code
  3. Press Ctrl+Shift+P (or Cmd+Shift+P on Mac)
  4. Type "Extensions: Install from VSIX"
  5. Select the extension file

Configuration

The extension can be configured through VS Code settings:

{
  "ollama-ai-assistant.ollamaUrl": "http://localhost:11434",
  "ollama-ai-assistant.model": "codellama",
  "ollama-ai-assistant.autoAnalyze": true,
  "ollama-ai-assistant.maxTokens": 2048
}

Configuration Options

  • ollamaUrl: URL of your Ollama server (default: http://localhost:11434)
  • model: Default model to use for AI operations (default: codellama)
  • autoAnalyze: Automatically analyze project when extension activates (default: true)
  • maxTokens: Maximum tokens for AI responses (default: 2048)

Usage

1. Activate the Extension

  • Click the "Ollama AI" status bar item, or
  • Use the command palette: Ctrl+Shift+P → "Activate Ollama AI Assistant"

2. Project Analysis

  • Right-click in the Explorer panel → "Analyze Project"
  • Or use the command palette: "Ollama AI: Analyze Project"

3. Code Generation

  • Select code in the editor
  • Right-click → "Generate Code" or use the command palette
  • Enter your prompt and let AI generate the code

4. Code Explanation

  • Select code you want to understand
  • Right-click → "Explain Code"
  • Get detailed explanations of how the code works

5. Code Debugging

  • Select problematic code
  • Right-click → "Debug Code"
  • Get AI-powered debugging assistance

6. Code Refactoring

  • Select code to improve
  • Right-click → "Refactor Code"
  • Get suggestions for better code structure

7. Code Execution

  • Open the AI Assistant panel
  • Go to the "Code Execution" tab
  • Enter code and select the language
  • Click "Execute Code" to run it

Supported Languages

  • JavaScript/TypeScript
  • Python
  • Java
  • C/C++
  • C#
  • PHP
  • Ruby
  • Go
  • Rust
  • Shell/Bash
  • PowerShell

Commands

Command Description
ollama-ai-assistant.activate Activate the extension and check Ollama connection
ollama-ai-assistant.analyzeProject Analyze the current project
ollama-ai-assistant.generateCode Generate code from selected text
ollama-ai-assistant.debugCode Debug selected code
ollama-ai-assistant.explainCode Explain selected code
ollama-ai-assistant.refactorCode Refactor selected code
ollama-ai-assistant.openPanel Open the AI Assistant panel

Troubleshooting

Ollama Connection Issues

  1. Check Ollama Status: Ensure Ollama is running

    ollama list
    
  2. Verify Model Installation: Install a code-capable model

    ollama pull codellama
    
  3. Check URL: Verify the Ollama URL in settings

    • Default: http://localhost:11434
    • Custom: Update ollama-ai-assistant.ollamaUrl

Performance Issues

  1. Model Size: Use smaller models for faster responses
  2. Token Limit: Reduce maxTokens in settings
  3. Project Size: Large projects may take longer to analyze

Code Execution Issues

  1. Language Support: Ensure the language runtime is installed
  2. Permissions: Check file permissions for code execution
  3. Dependencies: Install required packages for the language

Development

Building the Extension

npm install
npm run compile

Testing

npm run test

Packaging

vsce package

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

License

MIT License - see LICENSE file for details

Support

  • Issues: Report bugs and request features on GitHub
  • Documentation: Check the README and code comments
  • Community: Join discussions in the GitHub repository

Changelog

Version 1.0.0

  • Initial release
  • Ollama integration
  • Code generation, debugging, and explanation
  • Project analysis
  • Code execution
  • VS Code UI integration
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft