Download and install Ollama from https://ollama.ai
Then install the models:
ollama pull gemma3:4b
ollama pull gemma3:8b
ollama pull deepseek-r1:8bVerify installation:
ollama listOpen a terminal in the project folder:
cd server
pip install -r requirements.txt
python server.pyYou should see:
Starting Local AI Copilot Server...
Available models: ['gemma3-4b', 'gemma3-8b', 'deepseek-r1-8b']
Server running on http://127.0.0.1:5000
Keep this terminal running!
Open another terminal:
cd vscode-extension
npm install
npm run compileIn VS Code:
- Press
F5(or Run → Start Debugging) - A new VS Code window will open with the extension loaded
- Press
Ctrl+Shift+Pand type "Local AI Copilot: Chat" - Start chatting!
Open browser to: http://127.0.0.1:5000/health
Should show:
{"status":"healthy","ollama":"running"}ollama run gemma3:4b "Write a hello world in Python"$body = @{
prompt = "Write hello world in Python"
model = "gemma3-4b"
task_type = "code"
} | ConvertTo-Json
Invoke-RestMethod -Uri "http://127.0.0.1:5000/completion" -Method POST -Body $body -ContentType "application/json"Solution: Make sure the Python server is running
cd server
python server.pySolution: Make sure Ollama is running
ollama listIf Ollama isn't running, start it:
- Windows: Ollama should auto-start. Check system tray.
- Mac:
ollama serve - Linux:
ollama serve
Solution: Pull the model
ollama pull gemma3:4bSolution:
- Close the debug VS Code window
- In your main VS Code window, run:
cd vscode-extension npm run compile - Press
F5again
Ctrl+Shift+P→ "Local AI Copilot: Chat"- Select model from dropdown
- Type your question and press Enter
- Select some code
- Right-click → "AI: Edit Code"
- Describe what you want to change
- Review the diff and apply
- Place cursor where you want code
- Right-click → "AI: Generate Code"
- Describe what you want to create
- Code will be inserted
- Select code you want explained
- Right-click → "AI: Explain Code"
- Read explanation in chat panel
- 💡 Use
gemma3-4bfor quick responses - 💡 Use
deepseek-r1-8bfor complex reasoning tasks - 💡 Select code before asking questions for better context
- 💡 The chat panel remembers your conversation
- 💡 Code suggestions show "Before/After" diffs
Once everything works:
- Package the extension:
vsce package - Install it:
code --install-extension *.vsix - Stop using
F5and use it like a real extension!
Check the full README.md for detailed documentation.