Copilot Chat
Copilot Chat is useful when discussion stays close to the current file, repository and GitHub workflow, rather than answering general knowledge questions.
#Suitable tasks
Explain existing code, propose a change, add tests/comments/error handling, or discuss the next step using project context. A general chatbot can answer broad questions; repository context is the distinction here.
#Choose the interaction surface
Use sidebar chat for a longer discussion of implementation, file structure, tests and edge cases. Use inline interaction for explanations or edits to a specific code block with clear context.
#State the goal, constraints and output
textGoal: add pagination and search to the user list page. Constraint: keep the existing API and Redux slice, no new dependency. Output: list the change plan first, then show the key code patches.
#A bounded workflow
First ask it to explain the current code, then compare possible changes, then generate only the section you have agreed to modify. This is easier to review than a request to refactor everything.
For permissions, security, complex cross-file refactoring or unclear requirements, review a plan before accepting implementation. Treat the response as reasoning and a draft, not an automatically correct result.