s-kostyaev / ellama

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

Don't insert initial blank line when improving code #87

Closed r0man closed 3 months ago

r0man commented 4 months ago

Hi Sergey,

first, thanks for Ellama. It's a nice package I'm starting to use as my daily driver.

I think I found an issue:

Ellama inserts blank lines when improving code. Steps to reproduce are:

  ;;; HERE IS A BLANK LINE
  (defun hello-world ()
    (interactive)
    (message "Hello, world!"))

This is due to the ellama--code-prefix matching against the end of line. When using this function to strip off the prefix, an extra blank line remains at the beginning.

I included 2 tests to prevent a regression.

Would you like to merge this PR?

My FSF assignment is in process. I hope to have it done very soon.

Thanks, Roman.

s-kostyaev commented 4 months ago

Hi @r0man

Thank you for kind words and for contribution

I hope to have it done very soon.

Ulikely. For me it was about a month.

r0man commented 3 months ago

Hi @s-kostyaev, my FSF paperwork is done. Let's merge this?

s-kostyaev commented 3 months ago

@r0man thank you for contribution!

r0man commented 3 months ago

Thanks for merging!