Attach file / Mention usage

Does the mention or attaching of a file use the same approach for @Codebase, or it just copy pastes the file code into the prompt?

Copy pastes the file into the prompt, if it’s small enough.

If it’s a big file, you’ll see this option on the newest versions of Cursor.

Screenshot 2023-08-24 at 5.18.13 PM

1 Like

I don’t have that version, is it just updated?

What does each option do basically?

Fast scan uses embeddings to pick the most relevant chunks. Exhaustive scan chunks the file and runs the llm over everything. Then uses another llm to summarize the output.


0.8.0 and up. Needs to be a big enough file to not fit in the token window.

1 Like

Can we add an option to get the mentioned file embedded like in the @Codebase, so that it doesn’t consume much of the prompt tokens? whether it’s a big file or not?
as I may attach multiple small files (and not the whole Codebase) that may add to large number of tokens.

What’s an example chat message where you’d want this? Fast scan works like that on one file, but we could include an option to do that over all your @'ed files.

1 Like

I would appreciate that, as I usually use Cursor with my API, so aiming at minimum cost :slight_smile:

So, it’s better to use @Codebase instead of mentioning specific files?
will it consume less tokens (or cost)? that what I concluded.