cursor icon indicating copy to clipboard operation
cursor copied to clipboard

Context for is not correct in monorepo

Open thuringia opened this issue 2 years ago • 3 comments

Hi everyone,

first of all, thank you for building Cursor. Not only does it save me a lot of time but I was also able to much better show the benefits of AI-assist to other senior engineers than with the plain Copilot extension :)

Unfortunately I work a lot with monorepos and so far I cannot find a way to provide the proper context within the monorepo to the AI. For example, given a repository like this:

├── packages
│   ├── common
│   ├── service-a
│   ├── service-b
│   ├── template
│   └── utilities

And you're in the README.md of common a prompt like "Create a readme for this package" always uses the content of the template directory. Adding something like "use the package in the directory "packages/common"" or variation on that theme do not create the correct context. I can also see that the sub-packages are not shown in the menus to select Files/Code/Docs. The "Code" menu does show the correct title, but it seems to use only the current file, i.e. the existing readme as context. This usually leads the AI to either simply repeat the file without changes, or add some unrelated text from our template file.

If you have any tips then these will be extremely appreciated. I have a feeling that Cursor can provide us huge productivity boosts :)

thuringia avatar Aug 24 '23 20:08 thuringia

Same. Seems to be related to the directory name packages. I changed the directory to something else, say apps, and Cursor picks it up when searching with codebase. With packages, it ignores it.

I tried creating a .cursorconfig file with "ignore" set to exclude packages directory but no success.

InderdeepBajwa avatar Aug 27 '23 20:08 InderdeepBajwa

@InderdeepBajwa That's an interesting finding! I will try this with some projects I have.

Still seems like there's a bug or a missing configuration in Cursor

thuringia avatar Aug 29 '23 09:08 thuringia

Having the same issue, super annoying in my Turbo/npm monorepo. About to go back to VSCode

danawoodman avatar Aug 07 '24 18:08 danawoodman

Same here, supporting turborepo/nx would be a great update

arthberman avatar Aug 29 '24 09:08 arthberman

any updates here?

yamz8 avatar Nov 19 '24 12:11 yamz8