AI Chat in Cursor
Use natural-language discussion to explain code, draft snippets and diagnose a specific problem using relevant repository context.
#Open the conversation
The source uses Cmd/Ctrl + L for chat and Cmd/Ctrl + Shift + L for a new conversation. Cursor's commands and bindings have changed between versions; check Keyboard Shortcuts↗ in your installation.
#Ask concrete questions
textWhat does this function do? How would infinite scrolling fit this React component? Explain this error using the attached code.
Select code before opening the conversation, attach a file, or use supported @ references. Prefer the actual file/function picker over assuming historical textual forms such as @function: work in every version.
#Useful request patterns
textExplain the responsibility and control flow of this code. Review this diff for logic errors and compatibility risks. Generate meaningful unit tests for this function. Improve this component's rendering performance without changing its behavior.
For example, attach src/hooks/useCreateUser.ts and the exact error Type 'undefined' is not assignable to type 'string', rather than saying only “it fails.”
#Work through a conversation
You might first draft a form-state hook, then add validation, then submission state. Keep the scope visible and inspect each change. Clear stale context or start a new conversation when the task changes; inspect the attached files instead of assuming every mention remains permanently active.
#Break complex work into steps
For an authentication task, define the data structures, implement the existing API contract, add token validation and test the intended behavior. Do not delegate undefined security policy to a generated snippet.
#Choose the right interaction size
Discussion and local snippets suit chat. A coordinated feature spanning multiple files suits the supported agent/multi-file workflow. These are workflow distinctions, not permanent claims that a current chat interface cannot edit more than one file.
#Review reply actions
Apply changes only after checking the diff. Copy and Insert place code into the editor; neither verifies correctness. If an edit targets the wrong location, save/check the file, inspect the intended target and apply a bounded correction.
For slow responses, check connectivity, available model options and excessive context rather than relying on the source's historical model recommendation.