Hidden Tips for VSCode GitHub Copilot Chat! 🚀
【Unlock the Full Power of VSCode GitHub Copilot Chat! 🚀】
1️⃣ Chat Participants (Use @ to find the expert) Stop giving generic prompts. Direct your questions to the right “agent”:
@workspace: Scans your entire project structure to answer complex, cross-file logic questions.
@github: No need to switch to your browser! Ask about PRs, Issues, and repository-specific knowledge directly.
@terminal: Get help with terminal commands and shell-specific errors instantly.
2️⃣ Slash Commands (Use / for shortcuts) Execute complex tasks with just one word:
/clear: [Must-Know!] When a conversation gets too long and Copilot starts losing track, use this to reset the context and start fresh.
/explain: Breaks down complex code blocks into plain English.
/fix: Automatically proposes a solution for bugs in your selected code.
3️⃣ Chat Variables (Use # for Context) Give Copilot the exact data it needs to see:
#file: Reference a specific file in your workspace.
#selection: Focus Copilot’s attention strictly on the code you’ve highlighted.
Example: “Where is #getUser used? #usages”
💡 Pro Tip: If Copilot’s answers feel “off,” hit /clear to wipe the memory, then use @workspace #file to provide a sharp, specific target. It makes a world of difference!
【Reference Guide】 🔗 https://lnkd.in/g8rjHYaD 🔗 https://lnkd.in/gSW-qFEn