QCodeX is a powerful AI coding assistant extension for Visual Studio Code that supports multiple AI models including OpenAI GPT, Anthropic Claude, Ollama, and custom API endpoints.
Features
Multi-Model Support: Use GPT-4, Claude 3, or any OpenAI-compatible API
Chat Interface: Interactive chat panel in the sidebar
Code Actions: Right-click context menu for quick AI actions
Explain Code
Refactor Code
Generate Tests
Fix Bugs
Add Comments
Custom Models: Add your own AI models with custom API endpoints
Streaming Responses: Real-time streaming for faster feedback
Installation
Open VS Code
Go to Extensions (Ctrl+Shift+X)
Search for "QCodeX"
Click Install
Configuration
Adding API Keys
Click the QCodeX icon in the activity bar
Click "Settings" in the header
Find your preferred model and click "Add Key"
Enter your API key and save
Adding Custom Models
Open Settings
Go to "Add Custom" tab
Fill in the model details:
Model Name
Model ID
Base URL
API Key
Click "Add Model"
Usage
Chat
Click the QCodeX icon in the activity bar
Select a model from the dropdown
Type your question and press Enter or click Send
Code Actions
Select code in the editor
Right-click to open context menu
Choose from QCodeX submenu:
Explain Code
Refactor Code
Generate Tests
Fix Bugs
Add Comments
Keyboard Shortcuts
Ctrl+Shift+Q / Cmd+Shift+Q: Open QCodeX Chat
Supported Models
OpenAI
GPT-4
GPT-4 Turbo
GPT-3.5 Turbo
Anthropic
Claude 3 Opus
Claude 3 Sonnet
Claude 3 Haiku
Local Models
Ollama (any model)
Custom
Any OpenAI-compatible API
Extension Settings
This extension contributes the following settings:
qcodex.defaultModel: Default AI model to use
qcodex.models: Configured AI models with API keys
qcodex.serverUrl: Custom backend server URL (optional)
Development
Building from Source
# Install dependencies
npm install
# Compile
npm run compile
# Watch mode
npm run watch
# Package
npm run package