Since the latest update, “Add to Chat” isn’t working half the time, whether I click the button in the code window, or use the shortcut (Ctrl + L, which i tried changing to something else and it still didn’t work).
I know this doesn’t work when editing a file in working tree or index, this is happening on files opened from the internal file browser.
Steps to Reproduce
Highlight code
Press ctrl + L add to chat shortcut, or click add to chat that appears
Code often doesn’t get added to chat, even with repeated attempts
Hey, thanks for the report. I want to pin down exactly when this triggers. Can you go through these steps and tell me what you see?
Restart Cursor and open a file from the Explorer sidebar.
Select a few lines, press Ctrl+L. Confirm the code shows up in the chat input, but don’t send it.
Click into the chat input and press Ctrl+L again. The chat panel should close.
Go back to the file, select a different block of code, and press Ctrl+L.
The chat panel opens again, but the new block doesn’t get added?
If yes, try this too. Remove the first code chip from the input, or send the message, then repeat step 4. Does the code get added this time?
Two more details that would help:
Does it ever fail when the chat panel stays open the whole time?
Do you have the file open in multiple editor groups split view?
For now as a workaround, keep the chat panel open and click into the file right before pressing Ctrl+L. That should make it add more reliably. Let me know how it goes.
It just happened again. However when I followed your steps (restarted cursor and reopened the file) it worked again. Do you have any steps I should follow without restarting Cursor? I always make sure my cursor focus is inside the chat window before I press Ctrl+Lso the workaround doesn’t work unfortunately.
Does it ever fail when the chat panel stays open the whole time?
Yes
Do you have the file open in multiple editor groups split view?
The file this last happened on was only open in 1 set of tabs in the split view. It had been opened from clicking the file under Changes