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

Clarify <old_text> requirement and difference between create/update in suggest_edits prompt. #22340

Open
1 task done
mattprodani opened this issue Dec 21, 2024 · 0 comments · May be fixed by #22341
Open
1 task done
Labels
admin read Pending admin review enhancement [core label] triage Maintainer needs to classify the issue

Comments

@mattprodani
Copy link

mattprodani commented Dec 21, 2024

Check for existing issues

  • Completed

Describe the feature

<old_text> is marked optional in suggest edits prompt:

identifies a range within the file where the edit should occur. If this tag is not
.
This leads to the LLM occasionally attempting to suggest edits using the update operation, without providing <old_text>, when attempting to override the entire file. (From my experience with Claude 3, this happens very often). Opening this as a request to clarify that create can be used when replacing an entire file. Models often prefer to fully rewrite a file, rather than patch, possibly even more so with rewrite models in the future.

I feel this would be nice, as it is confusing for users new to zed to realize why their LLM edit suggestions are failing to process. There's no indication of the prompt used, syntax expected, or reasoning for the suggestion not appearing correctly to the user.

note: I realized after looking at the code, this isn't used for delete either, which I assumed was true due to If this tag is not specified, then the entire file will be used as the range. I guess that's likely the culprit

Zed Version and System Specs

mac / unrelated

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

No response

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