Chat

Ask questions, debug errors, and explore your codebase in a conversational AI panel.

What's possible

  • Ask questions about how code works and get explanations
  • Debug errors by pasting stack traces or error messages
  • Search your codebase with @codebase for relevant context
  • Reference specific files, folders, or docs with @-mentions
  • Get code suggestions you can apply directly to files
  • Use @web to search the internet for documentation or solutions

Getting started

  1. 1

    Open Chat

    Press Cmd+L to open the Chat panel. It appears as a sidebar on the right.

  2. 2

    Ask a question

    Type your question in plain English. Chat has access to your current file and can search your codebase for relevant context.

  3. 3

    Reference specific files

    Use @filename to attach specific files to the conversation. You can also reference @folder, @codebase, or @web.

  4. 4

    Apply suggested code

    If Chat suggests a code change, click "Apply" to insert it into the relevant file. Review the diff before accepting.

Example prompts

Understanding code

How does the authentication middleware work in @middleware/auth.ts?

Debugging

I'm getting 'Cannot read property of undefined' on line 42. Here's the stack trace: [paste]. What's wrong?

Codebase search

@codebase Where is the user session timeout configured?

Documentation lookup

@web What's the correct way to set up middleware in Next.js 15?

Tips

  • Select code before opening Chat (Cmd+L) to automatically include it as context.
  • Use @codebase for broad questions (“where is X defined?”) and @file for specific questions about one file.
  • Chat maintains conversation history within a session. Follow up on previous answers without repeating context.
  • For multi-file code changes, switch to Composer instead of applying Chat suggestions one at a time.