Perplexity Bot - AI Chat Assistant for VS Code

🚀 Chat with Perplexity AI directly in VS Code! Get instant coding help, explanations, and answers without leaving your editor. Boost your productivity with AI-powered assistance.
✨ Features
🤖 AI-Powered Chat
- Direct Perplexity AI Integration - Chat with one of the most advanced AI models
- Context-Aware Conversations - AI remembers your entire conversation history
- Smart Code Assistance - Get help with debugging, code reviews, and explanations
💾 Chat Management
- New Chat Creation - Start a new chat session with one click
- Chat History Browser - Browse and switch between previous conversations
- Delete Individual Chats - Remove specific chat sessions you no longer need
- Persistent Chat History - Chat history is automatically saved and restored
- Cross-Session Persistence - Your conversations survive VS Code restarts
- Smart Storage Management - Automatically manages storage to prevent bloat
🎨 Modern UI/UX
- Copilot/Gemini-Style Interface - Modern chat design similar to popular AI assistants
- Multiline Chat Input - Auto-resizing textarea for better message composition
- Model Selection - Choose between different Perplexity AI models
- File Context Integration - Include current file content in conversations
- Theme-Aware Interface - Matches your VS Code theme perfectly
- Markdown Support - Rich formatting for code blocks, lists, and text
- Code Highlighting - Syntax-highlighted code in responses
- Timestamps - See when each message was sent
🔒 Security & Privacy
- Secure API Key Storage - Keys stored in VS Code's secure configuration
- No Data Leakage - API keys never leave your system
- Local Processing - All chat processing happens locally
⚡ Developer Productivity
- No Context Switching - Stay in your editor while getting AI help
- Quick Access - One-click access from the Activity Bar
- Command Palette Integration - Access features via keyboard shortcuts
🚀 Quick Start
1. Installation
# Install from VS Code Marketplace
code --install-extension ankitmalik.perplexity-bot
Or search for "Perplexity Bot" in the VS Code Extensions marketplace.
2. Get Your API Key
- Visit Perplexity AI
- Sign up for an account
- Navigate to API settings
- Copy your API key (starts with
pplx-
)
- Open VS Code Settings (
Cmd+,
on macOS or Ctrl+,
on Windows/Linux)
- Search for "Perplexity Bot"
- Add your API key to the
perplexityBot.apiKey
setting
Or add to your settings.json
:
{
"perplexityBot.apiKey": "pplx-your-api-key-here"
}
4. Start Chatting!
- Click the "Chat Assistant" icon in the Activity Bar
- Choose your preferred AI model from the dropdown
- Optionally enable "File Context" to include current file content
- Type your question in the multiline input and press Send
- Get instant AI-powered responses with context awareness!
5. Managing Your Chats
- Click the "➕" button to create a new chat session
- Click the "🕒" button to browse and select from previous chat sessions
- Hover over chat history items to reveal the delete option (✖️)
- Click on any chat history item to restore that conversation
📖 Usage Examples
💻 Coding Help
User: "How do I create a React component with TypeScript?"
AI: [Provides detailed explanation with code examples]
🐛 Debugging Assistance
User: "My JavaScript function is returning undefined, can you help?"
AI: [Analyzes the issue and provides debugging steps]
📚 Learning & Explanation
User: "Explain the difference between async/await and Promises"
AI: [Provides comprehensive explanation with examples]
📁 File Context Analysis
User: "Can you review this code for best practices?" (with File Context enabled)
AI: [Analyzes current file and provides specific recommendations]
🔍 Code Review
User: "Can you review this code for best practices?"
AI: [Reviews code and suggests improvements]
⚙️ Configuration
Extension Settings
Setting |
Description |
Default |
perplexityBot.apiKey |
Your Perplexity API Key (required) |
"" |
🎯 Use Cases
🧑💻 For Developers
- Code Reviews - Get instant feedback on your code
- Debugging Help - Troubleshoot issues with AI assistance
- Learning New Technologies - Understand concepts and best practices
- Code Generation - Get help with boilerplate and examples
👨🎓 For Students
- Homework Help - Get explanations for programming concepts
- Project Guidance - Receive guidance on coding projects
- Learning Path - Understand complex topics step by step
🏢 For Teams
- Code Documentation - Generate documentation for your code
- Best Practices - Ensure code follows industry standards
- Knowledge Sharing - Get explanations for team codebases
🔧 Troubleshooting
Common Issues
❌ "API key is not set"
- Solution: Add your Perplexity API key to VS Code settings
❌ "API Error: 401"
- Solution: Check if your API key is valid and has sufficient credits
❌ "Request failed"
- Solution: Check your internet connection and try again
❌ Chat history not persisting
- Solution: Ensure you're using the latest version of the extension
Getting Help
- Check the Issues page
- Create a new issue if your problem isn't listed
- Include details about your VS Code version and error messages
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- Perplexity AI for providing the powerful AI API
- VS Code Team for the excellent extension API
- Community Contributors for feedback and suggestions
📊 Statistics
- Version: 1.0.3
- VS Code Compatibility: 1.102.0+
- Last Updated: August 2025
- License: MIT