Nexlyt AI Code Agent
🤖 AI-powered coding assistant for VS Code supporting local Ollama and OpenAI.
✨ Features
🗣️ Chat Interface
- Interactive AI chat panel with modern UI
- Streaming responses with typing effect
- Persistent chat history across sessions
- Quick action buttons for common tasks
- Export chat history to markdown
🚀 AI Actions
- Explain Code - Get detailed explanations of selected code
- Refactor Code - Improve code structure and readability
- Optimize Code - Enhance performance and efficiency
- Generate Tests - Create comprehensive unit tests
- Generate Documentation - Add JSDoc/docstring comments
- Find Bugs - Detect potential issues and security problems
⚙️ Dual AI Support
- Ollama (Local) - Run AI models locally for privacy
- Auto-detects available models
- Model auto-pull if missing
- Supports mistral, llama3, codellama, and more
- OpenAI (Cloud) - Use GPT models via API
- Secure API key storage
- GPT-3.5-turbo and GPT-4 support
⌨️ Quick Access
- Keyboard shortcuts for common actions:
Ctrl+Alt+C - Open AI Chat
Ctrl+Alt+E - Explain Selection
Ctrl+Alt+R - Refactor Selection
Ctrl+Alt+T - Generate Tests
- Context menu integration - Right-click selected code
- Command palette - All commands available via
Ctrl+Shift+P
🔧 Advanced Configuration
- Custom Ollama URL - Connect to remote Ollama instances
- Temperature control - Adjust AI creativity (0.0-2.0)
- Max tokens - Control response length (512-32768)
- Context lines - Set surrounding code context (10-200)
- Auto-insert - Automatically apply AI suggestions
- Streaming mode - Enable/disable typing effect
🚀 Quick Start
1. Install Extension
- Download and install the
.vsix file, or
- Install from VS Code marketplace (coming soon)
2. Setup AI Provider
Option A: Ollama (Local, Recommended)
- Install Ollama: Download from ollama.com
- Pull a model: Run
ollama pull mistral in terminal
- Verify: Extension will auto-detect running Ollama
Option B: OpenAI (Cloud)
- Get API key: Visit platform.openai.com
- Set key: Run command
Nexlyt: Set OpenAI API Key
- Switch provider: Set
nexlyt.apiProvider to "openai"
3. Start Coding with AI
- Open chat: Press
Ctrl+Alt+C or run Nexlyt: Open AI Chat
- Select code and right-click for AI actions
- Use slash commands:
/explain , /refactor , /optimize , /test
📖 Usage Examples
Chat Commands
/explain - Explain the selected code
/refactor - Refactor selected code for better structure
/optimize - Optimize code for better performance
/test - Generate unit tests for selected code
/document - Generate documentation comments
/bugs - Find potential bugs and issues
- Select code in editor
- Right-click → Choose AI action
- View results in chat panel
- Click "Insert" to apply suggestions
Keyboard Shortcuts
- Select code and press shortcuts for instant AI analysis
- Results appear in chat panel with insert button
⚙️ Configuration
Open VS Code Settings (Ctrl+, ) and search for "Nexlyt":
Basic Settings
nexlyt.apiProvider - Choose "ollama" or "openai"
nexlyt.ollamaModel - Set Ollama model (default: "mistral")
nexlyt.ollamaUrl - Ollama server URL (default: "http://localhost:11434")
Advanced Settings
nexlyt.maxTokens - Maximum response length (default: 4096)
nexlyt.temperature - Response creativity 0.0-2.0 (default: 0.7)
nexlyt.contextLines - Code context lines (default: 50)
nexlyt.autoInsert - Auto-apply suggestions (default: false)
nexlyt.streamingMode - Enable typing effect (default: true)
nexlyt.saveHistory - Persist chat history (default: true)
🛠️ Development
Build from Source
git clone <repository>
cd nexlyt-ai-code-agent
npm install
npm run compile
Debug Extension
- Open in VS Code
- Press
F5 to launch Extension Development Host
- Test in new window
Package Extension
npm install -g vsce
vsce package
🔒 Privacy & Security
Ollama (Local)
- Fully private - All processing on your machine
- No data sent to external servers
- Offline capable - Works without internet
OpenAI (Cloud)
- API key encrypted in VS Code secret storage
- Code sent to OpenAI for processing
- Standard OpenAI privacy policy applies
🤝 Contributing
- Fork repository
- Create feature branch
- Make changes and test
- Submit pull request
📄 License
MIT License - see LICENSE file for details
🆘 Support
- Issues: Report bugs on GitHub
- Discussions: Feature requests and questions
- Wiki: Detailed documentation and guides
Made with ❤️ by Nexlyt Team
| |