Clarify <old_text>
requirement and difference between create/update in suggest_edits prompt.
#22340
Open
1 task done
Labels
admin read
Pending admin review
enhancement
[core label]
triage
Maintainer needs to classify the issue
Check for existing issues
Describe the feature
<old_text>
is marked optional in suggest edits prompt:zed/assets/prompts/suggest_edits.hbs
Line 16 in 6b92e0b
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 thatcreate
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 culpritZed Version and System Specs
mac / unrelated
If applicable, add mockups / screenshots to help present your vision of the feature
No response
The text was updated successfully, but these errors were encountered: