continuedev / contribution-ideas

A Repo to which to Attach Contribution Ideas
2 stars 0 forks source link

Reliably edit file without repeating the entire contents #18

Open sestinj opened 1 year ago

sestinj commented 1 year ago

The current prompt for editing files requires the LLM to rewrite the entire range that it wants to edit. Ideally, it could specify only the diff, or at most a few lines surrounding the areas that it wants to edit.

To see the start of one attempt at this, look here. One idea on how to do this is by getting the LLM to output git merge conflict notation, like this:

<<<<<<< HEAD
<OLD_CODE>
=======
<NEW_CODE>
>>>>>>> updated

Other ideas: