Cursor is not able to read the content of my JS file that I am copy pasting in the chat

Hi,
I am stuck in a loop here and probably wasted a couple of requests trying to make Cursor understand the error.

Cursor asks me to copy paste the code of my JS file.
Then when I copy paste the code, it says:

I still don't see the code you're trying to share. Let me try a different approach:

* Could you copy the entire contents of src/components/navigation/LeftNavigation.js

* Paste it in your next message

* Then I can help fix the onSave is not a function error and properly implement the team member editing functionality

Without seeing the actual code, I can't provide specific fixes. Please share the code in your next message.

I kept copy pasting and also added the file in the context. Still it does not seem to understand.

Is there something I am doing wrong here?

1 Like

Hey, what happens if you start a new session and try the same steps? Does it solve the problem?

I tried that too and it kept giving the same error. So I gave up on that.

I have the exact same issue. It’s very annoying that Cursor so aggressively puts my code into that file reference but then fails to add that to the chat context with the LLM!

You can hack it by copying the code from the Cursor/VS Code, then paste it in Textedit or whatever and then paste it back into the chat. This will trick the Cursor chat to not recognise it as one of the files.

Hey, we are aware of an issue that causes the AI to not be able to see the context you have added, but the best solution right now is to simply start a new Composer session, as that should get things working again.

If you continuly have this issue, it’d be super helpful if you could provide us with a request ID for us to look into. You can find the steps to get a request ID using the guide below, but the key point is you would need to have privacy mode disabled for us to be able to investigate property. With the request ID, we can hopefully figure out the cause of the bug, and fix it in a future update.

Request ID guide: