CodePilot AI Assistant

CodePilot is a powerful AI coding assistant for VS Code that connects to Ollama models to provide intelligent code assistance directly in your editor.
Features
- AI Chat Interface: Interact with AI models through a dedicated chat panel
- Template System: Choose from various specialized prompt templates for different coding tasks
- Context-Aware: Uses your current file or workspace as context for more relevant responses
- Code Actions: Right-click on code to explain, refactor, or document it with AI
- Chat History: Keep track of all your conversations with the AI
- File Context: Select specific files to include as context for your queries
- Themes: Automatically adapts to your VS Code theme

Requirements
- VS Code 1.98.0 or higher
- Ollama installed and running on your machine
- At least one model pulled in Ollama (recommended: codellama:7b-instruct)
Installation
- Install the extension from the VS Code Marketplace
- Install Ollama if you haven't already
- Pull a model using Ollama (e.g.,
ollama pull codellama:7b-instruct )
- Start Ollama on your machine
- Configure the extension in VS Code settings
Extension Settings
CodePilot contributes the following settings:
ai-assistant.ollamaEndpoint : URL for your Ollama instance (default: "http://localhost:11434")
ai-assistant.model : Default Ollama model to use (default: "codellama:7b-instruct")
ai-assistant.maxContextFiles : Maximum number of files to include in context (default: 10)
ai-assistant.maxHistoryEntries : Maximum number of chat histories to keep (default: 30)
ai-assistant.autoAssociateWorkspaces : Automatically associate chats with the current workspace (default: true)
Usage
Starting a Chat
- Press
Ctrl+Shift+P (or Cmd+Shift+P on Mac) to open the command palette
- Type "CodePilot: Chat" and press Enter
- Type your question in the chat panel and press Enter
Using Code Actions
- Select some code in your editor
- Right-click to open the context menu
- Choose "Explain Code", "Refactor Code", or "Document Code"
Using Templates
- In the chat panel, type
/ to see available templates
- Select a template to use for your next question
- Type your specific question and press Enter
Including File Context
- Click the "No files selected" button in the chat panel
- Select files to include as context for your queries
- Ask your question with the selected files as context
Tips
- Use the
/ command to access specialized templates for different tasks
- Include specific files as context when asking about larger projects
- Try different models for different types of tasks
Release Notes
See the CHANGELOG for details about each release.
Privacy & Data
CodePilot runs entirely locally and doesn't send your code to any external servers beyond your local Ollama instance.
License
This extension is licensed under the MIT License.
| |