In AI input boxes such as in Chat and Cmd K, you can reference entire files by using @Files. Also, if you continue to type after @, you will see your file search results after the @Code strategy.

In order to make sure the file you’re referencing is the correct file, Cursor will show a preview of the file’s path. This is especially useful when you have multiple files with the same name in different folders.

Chat Long File References

In Cursor’s Chat, if the contents of a file is too long, Cursor will chunk the file into smaller chunks and rerank them based on relevance to the query.

Drag and Drop

You can drag and drop files from the primary sidebar into Composer, Chat or Cmd K to add them as context.

Was this page helpful?