Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect Path Resolution for _components Folders in VS Code Extension #6344

Open
tiger-githubb opened this issue Dec 13, 2024 · 2 comments
Open
Assignees
Labels
bug Something isn't working repo/cody

Comments

@tiger-githubb
Copy link

Version

1.96.0

Describe the bug

image

Cody incorrectly resolves paths when generating or modifying code for components located in a folder named _components. Instead of using the correct path, Cody generates an invalid one, making the "Apply in Editor" feature unusable.

Steps to Reproduce

  1. Use a Next.js project with the App Router setup.
  2. Place components in a folder named _components alongside a page.tsx file, like this:
    src/app/(board)/tableau-de-bord/organisations/ajouter/_components/organization-form.tsx
    
  3. Ask Cody to modify the component or generate code.
  4. Observe the incorrect path Cody produces, such as:
    src/app(board)/tableau-de-bord/organisations/ajouter_components/organization-form.tsx
    

Expected behavior

Cody should generate the correct path:

src/app/(board)/tableau-de-bord/organisations/ajouter_components/organization-form.tsx

Additional context

The issue prevents applying changes directly via the “Apply in Editor” feature.

This behavior has been observed consistently with _components folders in App Router projects.

@tiger-githubb tiger-githubb added bug Something isn't working repo/cody labels Dec 13, 2024
Copy link

linear bot commented Dec 13, 2024

@PriNova PriNova self-assigned this Dec 13, 2024
@PriNova
Copy link
Collaborator

PriNova commented Dec 13, 2024

Hey @tiger-githubb

Thank you for providing the detailed bug report.
The team will have a look at it.
One missing information is, what version of Cody you are using and on what OS.

Sorry for the inconvenience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working repo/cody
Projects
None yet
Development

No branches or pull requests

2 participants