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

Changes applied from AI panel are prepended to code rather than replacing existing code #21002

Open
1 task done
fonnesbeck opened this issue Nov 21, 2024 · 1 comment
Open
1 task done
Labels
admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue

Comments

@fonnesbeck
Copy link

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

I'm having ongoing issues with making changes using suggestions from the AI panel. These were supposedly addressed by #19195 but I have seen no improvement, and the inline assist function is still generally unusable as the result. As an example, trying to apply a very clear, discrete change suggested for a single function:

image

You can see from the colors in the code status in the margin that things did not go well. Sure enough, if you scroll down to the bottom of the inserted text, it did not replace the code that it was meant to be refactoring, it just sort of pasted it in arbitrarily where the inline assist box was created.

image

The old code is just sitting there, and accepting the changes just creates a mess, with two versions of the same function, not even in a runnable state.

Environment

Zed: v0.162.3 (Zed)
OS: Linux Wayland bluefin 41
Memory: 60.6 GiB
Architecture: x86_64
GPU: AMD Radeon 780M (RADV GFX1103_R1) || radv || Mesa 24.2.4

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your Zed.log file to this issue.

No response

@fonnesbeck fonnesbeck added admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue labels Nov 21, 2024
@fonnesbeck
Copy link
Author

fonnesbeck commented Nov 21, 2024

Another example on an entirely different code base. The suggested changes consist of a series of functions. In the hope of getting a better result, I said "Apply changes in the appropriate place in the code (not here)" to the instructions:

image

Bizarrely, all it did was append import jax to one of the other imports, which not only obviously breaks things, but has nothing to do with the suggested changes from the AI panel. This seems very broken at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue
Projects
None yet
Development

No branches or pull requests

1 participant