This VS Code extension provides AI-powered features including chat and inline code completions using the Ollama API.
Access a powerful AI chat interface directly in VS Code for code-related questions, explanations, and assistance.
Get real-time code suggestions as you type with AI-powered inline completions.
- VS Code 1.96.0 or newer
- Access to an Ollama server (local or remote)
- A compatible model installed on the Ollama server (e.g., gemma2:2b-instruct-q4_K_M, codellama, etc.)
This extension contributes the following settings:
ollama.endpoint
: Ollama API endpoint URL (default: "http://74.225.223.193:11435")ollama.model
: Model to use for completions (default: "gemma2:2b-instruct-q4_K_M")ollama.maxTokens
: Maximum number of tokens to generate (default: 50)ollama.pauseCompletion
: Pause automatic completions (default: false)ollama.temperature
: Temperature for completions, 0 = deterministic, higher = more random (default: 0.2)ollama.trackTelemetry
: Track telemetry for accepted completions - local only (default: false)
The extension provides AI-powered code completions as you type:
- Automatic Completions: As you code, the extension will automatically suggest completions based on the context.
- Manual Trigger: Press
Alt+\
to manually trigger a completion suggestion. - Toggle Completions: Use the command "Toggle AI Code Completions" to turn the feature on or off.
Alt+\
: Manually trigger an AI code completionTab
: Accept the current suggestion (VS Code default)- Arrow keys: Navigate through multiple suggestions (VS Code default)
If inline completions aren't working:
- Check Connection: Ensure you have access to the Ollama API endpoint specified in settings.
- Check Model: Verify that the model specified in settings is available on your Ollama server.
- Manual Trigger: Try manually triggering completions with
Alt+\
. - View Logs: Check the "DevAI" output channel for error messages.
- Toggle Feature: Try turning the feature off and back on with the "Toggle AI Code Completions" command.
- The Ollama API endpoint must be accessible from your VS Code environment.
- Large files (>180KB) may not receive completions to avoid performance issues.
- Initial release with AI chat and code completion features
Enjoy coding with DevAI!