How to force cursor to recognize file mentiones when copy-pasting prompts

Hi all

In our team, we have pre-written prompts that are actually a part of the source control that can enable engineers to execute common AI tasks very quickly.

Those prompts contain a lot of file mentions. here’s a sample portion of such a prompt

Having this information I need to implement a walking skeleton for a new feature for searching audit for @AuditEntity
We are going to return all properties inside the entity plus ShopName, ShopCode, StaffName, SalesAgentName, SalesAgentPrimaryPhoneNumber. The search should allow sorting by occurred at, it should have filters of type string for sales agent, staff, shop, action and actioned by. Take a look at the similar feature for searching clusters for reference that include the following files
- @SearchClustersEndpoint
- @SearchClustersQuery
- @SearchClustersQueryHandler
- @SearchClustersQueryValidator
- @SearchClustersQueryResult
 Take a look at @SalesAgentEntity.cs, @ShopEntity.cs and @StaffEntity.cs for additional context

 Ensure to output all layers of the walking skeleton as mentioned above

When I open cursor for the first time for a given project, then I paste this prompt into the composer, the file mentions are not detected as mentions. To make cursor detect them as file mentions, I will have to manually re-type those mentions inside the composer. After I do that once, any follow-up copy-pasted prompts that invole file mentions that I previously typed in will be automatically recognized.

So, after the first manual typing of the files, it seems the mentions will be cached and any follow-up prompts with those same file mentions will be automatically parsed even when pasted as text.

Question, what can I do so the composer automatically recognizes @SOMETHING as a mention and links the corresponding file to the chat context. This will dramatically reduce the friction of using pre-engineered prompts.

2 Likes

heavy +1, thought this would be fixed by now D: