s-kostyaev / ellama

Ellama is a tool for interacting with large language models from Emacs.
GNU General Public License v3.0
378 stars 27 forks source link

Completion at point #23

Closed carl-reverb closed 7 months ago

carl-reverb commented 7 months ago

When coding I often am working in the middle of a file, not at the end. But ellama-code-complete and ellama-code-add append the buffer. Sometimes I can use ellama-code-add and it will replicate everything at the bottom of the buffer, then I can chop the original head of the buffer and use the regenerated code, but it makes me look harder at the git diff to ensure nothing unusual was changed in the regeneration.

Is it possible to ellama-complete-code-at-point or ellama-code-in-selection or something, which would take the buffer as context but then insert its output inline?

carl-reverb commented 7 months ago

I've found sometimes I can use ellama-change-code to make an inline change, so maybe that's a sufficient workaround. Thank you for this really excellent package.

s-kostyaev commented 7 months ago

Definitely a bug. Thank you for reporting.

s-kostyaev commented 7 months ago

@carl-reverb is it works for you now?

carl-reverb commented 7 months ago

I think it does, though zephyr got carried away and wrote too much! Thank you very much!

https://github.com/s-kostyaev/ellama/assets/87382792/ba59ac23-da05-4085-9e7c-a2d69d3e114e