An intelligent AI-powered coding assistant for VS Code that uses Mistral AI via LangChain to boost developer productivity with a split-view interface.
- ๐ค Intelligent AI Chat: Built-in chat interface with Mistral AI in a split-view layout
- ๐ Code Explanation: Get detailed explanations for selected code
- ๐งช Test Generation: Auto-generate comprehensive unit tests
- ๐ง Code Refactoring: Smart refactoring suggestions and improvements
- ๐ก Comment to Code: Convert natural language comments to working code
- ๐ Quick Fix: Detect and fix errors with AI assistance
- โก Smart Completion: AI-powered code completion for comments and TODOs
- ๐ฑ Split View: AI assistant positioned on the right side of your editor
- ๐ฏ Context Awareness: Understands your current file, language, and selected code
- Install from VS Code Marketplace
- Get your Mistral AI API key
- Configure the extension:
Ctrl+Shift+Pโ "Preferences: Open Settings" โ Search "Codx" - Enter your Mistral AI API key
// Select this comment and press Ctrl+Alt+G to convert to code
// Function that calculates the factorial of a number recursively
// The AI will generate:
function factorial(n: number): number {
if (n <= 1) return 1;
return n * factorial(n - 1);
}| Command | Shortcut | Description |
|---|---|---|
| AI: Open Chat | Ctrl+Alt+C |
Open AI chat in split view |
| AI: Explain Code | Ctrl+Alt+E |
Explain selected code |
| AI: Generate Tests | Ctrl+Alt+T |
Generate unit tests for current file |
| AI: Refactor Code | Ctrl+Alt+R |
Get refactoring suggestions |
| AI: Convert to Code | Ctrl+Alt+G |
Convert comments to working code |
| AI: Quick Fix | Ctrl+Alt+F |
Detect and fix code issues |
| AI: Toggle Split View | Ctrl+Alt+S |
Toggle AI assistant split view |
Right-click on selected code to access:
- Explain Code
- Refactor Code
- Generate Documentation
- Generate Tests
{
"aiCodingAssistant.mistralApiKey": "your-mistral-api-key",
"aiCodingAssistant.modelName": "mistral-medium",
"aiCodingAssistant.splitViewEnabled": true,
"aiCodingAssistant.enableAutocompletion": true,
"aiCodingAssistant.completionDelay": 500,
"aiCodingAssistant.maxTokens": 1000,
"aiCodingAssistant.temperature": 0.7,
"aiCodingAssistant.enableTelemetry": true
}| Setting | Default | Description |
|---|---|---|
mistralApiKey |
"" |
Your Mistral AI API key |
modelName |
"mistral-medium" |
AI model to use (tiny/small/medium/large) |
splitViewEnabled |
true |
Enable split view with AI on the right |
enableAutocompletion |
true |
Enable AI-powered code completion |
completionDelay |
500 |
Delay before triggering completion (ms) |
maxTokens |
1000 |
Maximum tokens for AI responses |
temperature |
0.7 |
AI creativity level (0.0-1.0) |
enableTelemetry |
true |
Help improve the extension |
- TypeScript/JavaScript
- Python
- Java
- C#
- C/C++
- Go
- Rust
- PHP
- And more...
- Node.js 18+
- VS Code 1.85.0+
- TypeScript
# Clone the repository
git clone https://github.com/PetrJoe/codx-v2.git
cd codx
# Install dependencies
npm install
# Compile TypeScript
npm run compile
# Watch for changes
npm run watch- Open the project in VS Code
- Press
F5to launch Extension Development Host - Test the extension in the new VS Code window
# Build for production
npm run build
# Package the extension
npm run package
# Publish to marketplace
npm run publishAI: Open Chat- Launch AI assistant in split viewAI: Explain Code- Explain selected code blockAI: Generate Tests- Create unit tests for current fileAI: Refactor Code- Get refactoring suggestionsAI: Convert to Code- Transform comments into codeAI: Quick Fix- Analyze and fix code issuesAI: Toggle Split View- Show/hide AI assistant panel
| Windows/Linux | macOS | Command |
|---|---|---|
Ctrl+Alt+C |
Cmd+Alt+C |
Open AI Chat |
Ctrl+Alt+E |
Cmd+Alt+E |
Explain Code |
Ctrl+Alt+T |
Cmd+Alt+T |
Generate Tests |
Ctrl+Alt+R |
Cmd+Alt+R |
Refactor Code |
Ctrl+Alt+G |
Cmd+Alt+G |
Convert to Code |
Ctrl+Alt+F |
Cmd+Alt+F |
Quick Fix |
Ctrl+Alt+S |
Cmd+Alt+S |
Toggle Split View |
The extension provides a clean, intuitive interface with:
- Split View Layout: AI assistant on the right, code editor on the left
- Chat Interface: Interactive chat with syntax highlighting
- Code Insertion: One-click code insertion from AI responses
- Progress Indicators: Visual feedback for AI operations
- Context Awareness: Automatic detection of file type and selected code
- Your code is sent to Mistral AI for processing
- API key is stored securely in VS Code settings
- No code is stored permanently by the extension
- Telemetry can be disabled in settings
AI not responding?
- Check your Mistral AI API key in settings
- Verify internet connection
- Check VS Code Developer Console for errors
Split view not working?
- Enable split view in settings:
aiCodingAssistant.splitViewEnabled - Try toggling split view:
Ctrl+Alt+S
Code completion not working?
- Enable autocompletion:
aiCodingAssistant.enableAutocompletion - Try typing comments with
//orTODO:
- โจ Initial release with split-view AI assistant
- ๐ค Mistral AI integration via LangChain
- ๐ Code explanation and documentation
- ๐งช Automated test generation
- ๐ง Smart refactoring suggestions
- ๐ก Comment-to-code conversion
- โก AI-powered code completion
- ๐ฏ Context-aware assistance
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Mistral AI for the powerful language model
- LangChain for the AI framework
- VS Code team for the excellent extension API
- ๐ Report Issues
- ๐ฌ Discussions
- ๐ง Contact
Made with โค๏ธ by PetrJoe
Boost your coding productivity with AI assistance!