How-To Guide

How to Use Cursor's Chat Panel

Master Cursor's AI chat panel. Ask questions, debug code, and get context-aware answers about your entire codebase.

How to Use Cursor's Chat Panel

1

Open the chat panel

Press Cmd+L (Mac) or Ctrl+L (Windows/Linux) to open the chat panel on the right side. This is your main interface for asking AI questions about your code.

2

Ask questions about your code

Type natural language questions like 'how does the auth middleware work?' or 'what does this function do?'. Cursor reads your codebase to provide accurate, contextual answers.

3

Reference specific files with @

Use @filename to add specific files to the conversation context. For example: '@auth.ts explain the JWT validation logic'. You can also use @folder to include entire directories.

4

Apply suggested code changes

When the chat suggests code changes, click the 'Apply' button to insert them directly into your editor with a visual diff. Review the diff before accepting.

Pro tips

  • *

    Use @codebase to search your entire project for relevant context

  • *

    Start a new chat (Cmd+Shift+L) to reset context when switching topics

  • *

    You can select code in the editor before opening chat — it's automatically included as context

More Cursor guides

Explore more