Comment by CharlieDigital
1 month ago
Cursor's problem isn't bigger context, it's better context.
I've been using it recently with @nanostores/react and @nanostores/router.
It constantly wants to use router methods from react-router and not nanostores so I am constantly correcting it.
This is despite using the rules for AI config (https://docs.cursor.com/context/rules-for-ai). It continually makes the same mistakes and requires the same correction likely because of the dominance of react-router in the model's training. That tells me that the prompt it's using isn't smart enough to know "use @nanostores/router because I didn't find react-router".
I think for Cursor to really nail it, the base prompt needs to have more context that it derived from the codebase. It should know that because I'm referencing @nanostores/router, to include an instruction to always use @nanostores/router.
I don't think you can fix this with a little bit of prompting with current models, since they seem clearly heavily biased towards react-router (a particular version even, iirc from a year ago).
It might help if you included API reference/docs for @nanostores/router in the context, but I'm not sure even that would fix it completely.