An AI-powered coding assistant for Visual Studio Code that helps you write better code with explanations, documentation, bug detection, and refactoring suggestions.
Features
🤖 AI-Powered Code Analysis
- Explain Code: Select code and get an instant explanation of what it does
- Generate Documentation: Auto-generate JSDoc comments and documentation
- Find Bugs: Analyze code for potential issues and bugs
- Refactor Code: Get suggestions to improve code quality and readability
💬 Interactive Chat Interface
- AI Chat Panel: Dedicated sidebar for conversational AI assistance
- Ask Questions: Send messages directly to Atlas AI from the command palette
- Chat History: View all previous questions and responses
- Clear Chat: Reset conversation history with one command
⚡ Quick Access
- Right-click context menu for all commands
- Keyboard shortcut:
Ctrl+Alt+Eto explain selected code - Chat keyboard shortcut:
Ctrl+Alt+Cto open chat input - Command palette access to all features
- Dedicated AI Assistant panel with chat interface
Usage
Code Analysis Methods
Method 1: Context Menu
- Select code in your editor
- Right-click to open the context menu
- Choose from:
- "Atlas AI: Explain Selected Code"
- "Atlas AI: Generate Documentation"
- "Atlas AI: Find Bugs in Selected Code"
- "Atlas AI: Refactor Selected Code"
Method 2: Keyboard Shortcut
- Select code in your editor
- Press
Ctrl+Alt+E(orCmd+Alt+Eon Mac) to explain the code
Method 3: Command Palette
- Press
Ctrl+Shift+P(orCmd+Shift+Pon Mac) - Type "Atlas AI:" to see all available commands
- Select a command to execute
Chat Interface
Method 1: Chat Panel in Sidebar
- Click the Atlas AI icon in the Activity Bar (left sidebar)
- The AI Assistant panel opens showing chat history
- Click "Send Chat Message" to open the input dialog
Method 2: Keyboard Shortcut
- Press
Ctrl+Alt+C(orCmd+Alt+Con Mac) - Type your question in the input box
- Press Enter to send
Method 3: Command Palette
- Press
Ctrl+Shift+P(orCmd+Shift+Pon Mac) - Type "Atlas AI: Send Chat Message"
- Type your question and press Enter
Clear Chat History
- Use Command Palette:
Ctrl+Shift+P→ "Atlas AI: Clear Chat History" - Or click the clear button in the Chat panel title bar
Commands
| Command | Shortcut | Description |
|---|---|---|
atlasAI.explainCode |
Ctrl+Alt+E | Explain what the selected code does |
atlasAI.generateDocumentation |
N/A | Generate documentation for selected code |
atlasAI.findBug |
N/A | Analyze code for potential bugs |
atlasAI.refactorCode |
N/A | Get refactoring suggestions |
atlasAI.sendChat |
Ctrl+Alt+C | Send a message to Atlas AI Chat |
atlasAI.clearChat |
N/A | Clear chat history |
atlasAI.showPanel |
N/A | Open the AI Assistant panel |
Configuration
API Key Setup (For Real AI Features)
To enable full AI capabilities with real API responses:
- Open VS Code Settings (Ctrl+,)
- Search for "Atlas AI"
- Configure:
- API Provider: Choose OpenAI, Anthropic, or other supported services
- API Key: Enter your API key
- Model: Select preferred AI model
Supported Providers
- OpenAI (GPT-4, GPT-3.5)
- Anthropic Claude
- Local LLM models
Example Workflows
Documenting Legacy Code
- Select the function or class
- Run "Atlas AI: Generate Documentation"
- Review the generated JSDoc comments
- Copy and integrate into your code
Code Review and Optimization
- Select a code block
- Run "Atlas AI: Find Bugs in Selected Code"
- Review suggestions
- Run "Atlas AI: Refactor Selected Code" for improvements
Learning and Understanding
- Select unfamiliar code
- Run "Atlas AI: Explain Selected Code"
- Read the explanation in the output panel
Development
Prerequisites
- Node.js 14+
- npm 6+
- VS Code 1.120.0+
Setup
npm install
Run Extension in Development Mode
- Press
F5in VS Code to launch the extension host - A new VS Code window opens with the extension loaded
- Test the commands in the new window
Build
npm run compile
Watch Mode (Development)
npm run watch
Project Structure
atlas-ai/
├── src/
│ └── extension.js # Main extension file
├── .vscode/
│ ├── launch.json # Debug configuration
│ └── tasks.json # Build tasks
├── package.json # Extension manifest
├── README.md # This file
└── .vscodeignore # Files to ignore when packaging
Extension Capabilities
Current Features
- ✅ Code explanation (simulated)
- ✅ Documentation generation (simulated)
- ✅ Bug detection suggestions (simulated)
- ✅ Refactoring recommendations (simulated)
- ✅ Context menu integration
- ✅ Keyboard shortcuts
- ✅ Output panel for results
- ✅ Chat interface with message history
- ✅ Tree view for chat display
- ✅ Clear chat history functionality
Planned Features
- 🔄 Real-time code suggestions
- 🔄 AI-powered code completion
- 🔄 Integration with OpenAI API
- 🔄 Custom model support
- 🔄 Batch code analysis
- 🔄 Code quality metrics
- 🔄 Performance optimization suggestions
- 🔄 Multi-language support for chat
- 🔄 Code snippet sharing from chat
Troubleshooting
Commands not appearing
- Make sure code is selected before right-clicking
- Try accessing commands through the Command Palette (Ctrl+Shift+P)
Extension not loading
- Check the Output panel for error messages
- Ensure Node.js is installed:
node --version - Reinstall dependencies:
npm install
API features not working
- Verify API key is configured in settings
- Check internet connection
- Confirm API service is available
License
MIT License - See LICENSE file for details
Support
For issues, suggestions, or contributions:
- Report bugs on GitHub Issues
- Submit feature requests
- Contribute code via pull requests
Acknowledgments
Built with ❤️ using the VS Code Extension API
Enjoy coding with Atlas AI! 🚀