Core Features

Chat Mode: Codebase-Aware Conversations

Cursor's Chat panel connects AI conversation directly to your codebase through @-symbols. Learn how to reference files, symbols, docs, and web content to get precise, context-rich answers.

Opening Chat

Press Cmd+L (Mac) or Ctrl+L (Windows/Linux) to open the Chat panel. Unlike a standalone chat interface, Cursor Chat has native access to your indexed codebase.

By default, Chat can see the currently active file and any context you explicitly reference using @-symbols.

The @-Symbol Context System

The @-symbol is how you inject context into a chat message. Cursor supports many context types:

SymbolWhat it injects
@FilesThe full contents of a specific file
@FoldersThe structure and contents of a folder
@CodeA specific function, class, or symbol by name
@DocsDocumentation from a linked external source
@WebLive web search results
@CodebaseSemantic search across your entire indexed codebase
@GitRecent git history and diffs
@LintCurrent lint errors

Example: Debugging Across Files

text
@Files src/lib/supabase.ts @Files src/hooks/useAuth.ts

When I call signIn(), the session is null immediately after. Walk me through what happens from signIn() to session state and tell me where it's breaking.

This query gives the AI both relevant files as full context, enabling it to trace the exact data flow and identify where the session state is being lost.

Using @Codebase for Discovery

@Codebase triggers a semantic search across your indexed project. Use it when you're not sure which file contains what you're looking for:

text
@Codebase Where are API errors currently being handled? I want to add a new error type.

Cursor will search the codebase, surface the relevant files and functions, and then give you a precise, codebase-specific answer.

Linking External Documentation

You can add external documentation sources in Settings > Docs. Once added, @Docs[DocName] retrieves the relevant section of that documentation and includes it as context.

This is especially useful for:

  • Framework docs (Next.js App Router, Supabase, Stripe)
  • Internal wikis or API specs
  • Libraries with complex APIs that the model's training data might not cover accurately

Chat vs. Composer

FeatureChat (Cmd+L)Composer (Cmd+I)
Primary useQuestions and explorationMulti-file editing
Applies editsOptionally (click Apply)Yes, directly
ScopeSingle file defaultMultiple files
Best forUnderstanding code, asking questionsMaking changes

Use Chat when you want to understand, explore, or get advice. Use Composer when you want to make changes.

Key Takeaways

  • Press Cmd+L to open Chat with codebase context
  • Use @-symbols to inject specific files, folders, symbols, docs, or web content as context
  • @Codebase performs semantic search across your entire indexed project
  • Link external documentation in Settings > Docs to give Chat accurate, up-to-date reference material