Hi,
If making use of the multi root workspace feature in vscode, cursor uses the folder name instead of the folder path when making edits.
i.e I have a folder in my repo’s *.code-workspace
file defined as:
"folders": [
...
{
"name": "📦 organisation - service",
"path": "packages/backend/organisation/organisation-service",
},
...
]
If i make an edit to a file in that folder called ./src/domain/organisation-user.ts
it correctly finds the file and generates the edits but ends up applying them to a new file at the based of the repo that uses the folder name as the prefix, instead of applying the change to the existing file.
I.e I end up with a new file that just hads the edits in it at
<base>/organisation - service/src/domain/origanisation-user.ts
instead of the edits being applied to the existing file at:
<base>/packages/backend/organisation/organisation-service/src/domain/origanisation-user.ts
Naive required psuedo logic:
- If started from a ‘workspaces’ file
- File contexts should use folder names/aliases
- When applying edits resolve folder names/aliases to their folder paths.
This issue is indirectly referenced in this bug report, but the workarounds mentioned don’t fix the underlying issue, they just ensure that folder names always match the path which removes a lot of the benefit.
Cheers.