Cmd+L AI Chat - Your AI Programming Partner
Master the AI Chat interface for questions, debugging, and deep code understanding
💡 What You'll Learn
- Use Cmd+L (Ctrl+L) to open the AI Chat sidebar
- Master @ symbols for providing context
- Ask effective questions for debugging and understanding
- When to use Chat vs. Cmd+K vs. Composer
💬 What is AI Chat?
AI Chat (Cmd+L) is your conversational AI assistant powered by Claude 4.5 Sonnet. Unlike Cmd+K which edits code directly, Chat is perfect for:
- 🤔 Understanding complex code
- 🐛 Debugging errors
- 💡 Getting implementation suggestions
- 📚 Learning new concepts
- 🔍 Exploring your codebase
🔑 Quick Start:
- Press
Cmd+Lto open Chat - Type your question in natural language
- Use @ symbols to add context (files, folders, docs)
- Get instant answers with code examples
⌨️ Essential Shortcuts
| Action | Mac | Windows/Linux |
|---|---|---|
| Open AI Chat | Cmd+L | Ctrl+L |
| Send message | Enter | Enter |
| New line in message | Shift+Enter | Shift+Enter |
| New chat | Cmd+Shift+L | Ctrl+Shift+L |
🎯 The Power of @ Symbols
@ symbols are the secret to getting great answers. They give the AI context about your codebase.
@Files
Reference specific files
@Folders
Reference entire directories
@Codebase
Search across your entire project
@Docs
Query official documentation
@Web
Search the internet for current info
🎯 Real-World Examples
Example 1: Debugging an Error
What's causing this error?
Example 2: Understanding Code
Example 3: Implementation Guidance
Show me how other endpoints handle rate limiting and suggest where to add it
Example 4: Learning Best Practices
✍️ Writing Effective Chat Prompts
✅ Good Prompts
- "Explain how @file.ts works"
- "Why is this error happening?"
- "What's the best way to..."
- "@Codebase where do we handle..."
- "Show me examples of..."
- "How can I optimize..."
❌ Bad Prompts
- "Fix my code" (use Cmd+K)
- "Help" (too vague)
- No @ symbols for context
- Asking for file creation (use Composer)
- Multiple unrelated questions
🔄 When to Use What?
| I want to... | Use |
|---|---|
| Understand how code works | Chat (Cmd+L) ⭐ |
| Debug an error | Chat (Cmd+L) ⭐ |
| Edit existing code | Cmd+K |
| Write new code | Tab or Composer |
| Get implementation suggestions | Chat (Cmd+L) ⭐ |
| Explore the codebase | Chat + @Codebase ⭐ |
⚡ Pro Tips
💡 Tip 1: Always use @ symbols - they 10x the quality of answers
💡 Tip 2: Chat remembers conversation history - follow up with clarifying questions
💡 Tip 3: Use "Apply" button in chat responses to insert code directly
💡 Tip 4: Start new chats (Cmd+Shift+L) for unrelated topics to keep context clean
💡 Tip 5: Reference errors directly - copy-paste error messages for faster debugging
🎓 Practice Exercise
Try These Now:
- Press Cmd+L and ask: "@Codebase what are the main features of this project?"
- Pick a complex file and ask: "Explain @path/to/file.ts in simple terms"
- Find an error in your code and ask Chat to debug it
- Use @Docs to learn about a framework feature you're unfamiliar with
- Try @Web to search for the latest best practices
📊 Chat vs. Other Tools - Quick Reference
🐛 Common Issues & Solutions
AI gives generic answers
Use @ symbols to provide file/folder context. Be specific about what you're asking.
Chat is slow
Check your internet connection. Large codebases need indexing time. Try referencing specific files instead of @Codebase.
@Codebase doesn't work
Wait for indexing to complete (check bottom status bar). Make sure your project isn't too large (>100MB).
🔗 Next Steps
Now learn how to make multi-file changes with Composer: Composer Tutorial →