Ctrl-Shift-Enter (codebase search) is no longer working in Composer, v.0.41.3
OS: host Win11, code in remote workspace in WSL2 (Ubuntu 22.04.02 LTS) Cursor: 0.41.1, 0.41.2, 0.41.3
Steps to reproduce:
- Open a new Composer
- Remove all the auto-included files from the context
- Write a prompt "what are the tables in my prisma schema?"
- Press Ctrl-Shift-Enter
Expected result: 12 tables are listed (my project-specific info) Actual result: the prompt is not even submitted. Pressing just Enter does not yield any meaningful context: "...since I don't have direct access to your project files, I can provide you with a general approach to find this information..."
Entire codebase knowledge (not having to add 15 files manually for my prompt) plus applying changes directly to files (diff mode) was the killer feature and reason I switched to Cursor from other products like TabNine, GitHub CoPilot, etc. and advertised Cursor to all of my friends.
Now there are half-baked options for me:
- either I put all the needed files myself in each prompt iteration in Composer
- or I apply changes manually from the Chat window (which still has full codebase search)
- actually the third option is try to downgrade Cursor to previous version, but I have to find out how to do that exactly.
I think codebase search in Composer was some kind of a "hidden" feature" becase there were no button for it, but pressing Ctrl-Shift-Enter worked the same way like in Chat.
Some more info.
I found how to install previous versions with a great help from #1143
So, installed and tried:
- 0.41.2 - reproduced (https://dl.todesktop.com/230313mzl4w4u92/versions/0.41.2/windows). btw this version is downloaded (not 0.41.3 which I got autoupdated to) when clicking on the "Download" top right button on the main site when logged in.
- 0.41.1 - reproduced (https://dl.todesktop.com/230313mzl4w4u92/versions/0.41.1/windows)
- 0.40.4 - works great again (https://dl.todesktop.com/230313mzl4w4u92/versions/0.40.4/windows), this was the initial version I had installed
Additionally, I don't really understand now how I found Ctrl-Shift-Enter key combination, because Chat button shows as "ctrl-enter codebase", and Composer does not have that button at all. Don't ask me, I can't say. I changed the issue description and repro steps to mention Ctrl-Shift-Enter as simple Ctrl-Enter does not work in Composer even in 0.40.4. So this is really a "hidden" feature.
However, this feature is a greatest achievement among all of the other things. Remove Cursor Tab, Chat, all other features and I will still buy Cursor. I had made entire functional pages of my Next.js monorepo app with this, changing db schema, DAL, API route, UI components in library, app UI page in one composer. I don't basically even need in-line autocompletion anymore, this thing works on a higher level suggestiong functional changes including all the small changes needed that previously were made manually with inline autocompletion help.
Things switched in my head when Composer was able to find and fix pagination bug in one go from the prompt "I have a pagination bug when second and pre-last page buttons are not displayed". I did not put anything into context, and it found where that UI component was in the project tree, what was wrong there, and how to fix it. Just astonishing.
v0.40.4 does not have ability to dock Composer in right pane - I like that new thing but can live without it until the codebase search is again available.
@danperks could you please check this out and tell me if my concern is valid or not
Hey, sorry for not picking this up.
The main reason for this is about limiting Composer's access to avoid any hallucination or bad edits.
When using Composer, at least in its current form, it only has the ability to edit files explicitly provided to it as context (or new files if it decides to make some). This is to avoid it editing irrelevant files, or hallucinating changes that shouldn't be done. By providing a specific set of files, it helps to keep the AI on task.
However, this does mean having a "codebase wide edit" feature isn't an immediate choice like it used to be, as it could cause the AI to write into irrelevant files and break your codebase.
As you know, you could manually add each file to its context but for large codebase, I know that can be a time consuming task.
I hope this helps you understand why it was removed. Composer is the most advanced feature in Cursor so far, and a better solution to accomplish this would be ideal, without the risk of breaking your code (or doing 100s of LLM requests for every file in your codebase).
I can't guarantee the feature's return or give any timescales, as I'm not a developer for Cursor, but I can assure you your concerns have been heard and to "watch this space". My guess is there will be some changes in the coming weeks and months that make your experience with Composer better!
If you have any suggestions or comments, do drop them in, as I can pass good ideas back up to the team.
@danperks, thank you for detailed answer!
I accept the way and appreciate all the work done here.
I have an idea/suggestion to add "Composer Codebase Search" as a Beta feature (default: disabled) for those adventurers who have no fear to move fast and break things 🚀
I t works back again in 0.42.3!!! (well, maybe in some earlier version)
Thanks to the Cursor auto-update feature I didn't notice immediately it's a new Cursor version after IDE restart. Tried my original flow and it worked, then only I noticed UI changes from the new version.
Back to the latest updates channel.
In the latest version, this fail to work again
Version: 0.42.5
VSCode Version: 1.93.1
Commit: 001668006cc714afd397f4ef0d52862f5a095530
Date: 2024-11-14T00:33:36.512Z
Electron: 30.4.0
Chromium: 124.0.6367.243
Node.js: 20.15.1
V8: 12.4.254.20-electron.0
OS: Darwin arm64 24.1.0
If you have any suggestions or comments, do drop them in, as I can pass good ideas back up to the team.
Hey Dan, there's a workaround that u/Miltoni on reddit shared. It wasn't for this specific issue, but it resolves it nevertheless. It works as follows (I'm cribbing from u/Miltoni's post heavily here, kudos to them!) https://www.reddit.com/r/ChatGPTCoding/comments/1h7jx5k/comment/m0oszsu/
Imagine you have a function in module 1 that is imported in modules 2, 3 and 4. You ask Cursor to fix an issue in module 2.
It will use its RAG approach to contextualise what it thinks it needs as a way to optimise efficiency, rather than considering the whole codebase as context. So it will recognise that module 2 uses the function from module 1, and will go ahead and make changes to both to fix the particular issue.
However, it will often not recognise that the changes it's making to module 1 will have a downstream impact on modules 3 and 4, which then breaks those. So you then prompt it to fix those, but it won't consider module 2, so it then breaks this functionality again. And so on [Note to Github: similar to the issue described w/hallucinations that has caused Cursor devs to limit the access of Composer to the codebase].
Here's the workaround:
-Repopack (aka Repomix) the codebase (python tool that converts your codebase to an AI-friendly txt) -Ask your LLM of choice via the web interface to make a schema/map in XML that specifies all your classes/functions and their connections with one another, with some minimal explanations on their functionality using the Repopack file. -Save this XML file in your codebase. -Create a .cursorrules file (this gives instructions to Cursor for each prompt) that is must always use the XML file to consider changes, and to always update this. Whenever a complex issue is fixed add a helpful explanation of how it came to that conclusion for the benefit of another LLM, and to add these notes to the XML file (worth manually mentioning this sometimes as well, just to be safe).
So a bit of a manual workaround for now, but certainly this is something you could build into Cursor more cleanly. I'm not sure of the degree to which it mitgates the issue (like numbers/percentage-wise) but in my personal use it makes a tremendous difference.