https://github.com/nishant9083/ai-assistant
A vs-code extension for assisting you in coding using ollama which run locally on your pc
https://github.com/nishant9083/ai-assistant
ai ai-assistant ollama ollama-api vs-code vs-code-extenstion
Last synced: about 2 months ago
JSON representation
A vs-code extension for assisting you in coding using ollama which run locally on your pc
- Host: GitHub
- URL: https://github.com/nishant9083/ai-assistant
- Owner: nishant9083
- License: mit
- Created: 2025-03-22T05:46:50.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2025-03-29T19:04:32.000Z (about 2 months ago)
- Last Synced: 2025-03-29T20:19:40.079Z (about 2 months ago)
- Topics: ai, ai-assistant, ollama, ollama-api, vs-code, vs-code-extenstion
- Language: TypeScript
- Homepage: https://marketplace.visualstudio.com/items?itemName=nishant-vscode-ext.code-pilot
- Size: 380 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://ollama.com/) installed and running on your machine
- At least one model pulled in Ollama (recommended: codellama:7b-instruct)## Installation
1. Install the extension from the VS Code Marketplace
2. Install [Ollama](https://ollama.com/) if you haven't already
3. Pull a model using Ollama (e.g., `ollama pull codellama:7b-instruct`)
4. Start Ollama on your machine
5. 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
1. Press `Ctrl+Shift+P` (or `Cmd+Shift+P` on Mac) to open the command palette
2. Type "CodePilot: Chat" and press Enter
3. Type your question in the chat panel and press Enter### Using Code Actions
1. Select some code in your editor
2. Right-click to open the context menu
3. Choose "Explain Code", "Refactor Code", or "Document Code"### Using Templates
1. In the chat panel, type `/` to see available templates
2. Select a template to use for your next question
3. Type your specific question and press Enter### Including File Context
1. Click the "No files selected" button in the chat panel
2. Select files to include as context for your queries
3. 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](CHANGELOG.md) 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.