s-kostyaev / ellama

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

Update selected region is not working. #6

Closed hwiorn closed 11 months ago

hwiorn commented 11 months ago

Ellama's update often causes issues when using the "selected-region" feature as it may remove the selected region and insert new content at the end of a line, leading to unexpected results.

Reproduce

  1. Make a new buffer
  2. M-x markdown-mode
  3. Paste text: "Ellama lets you access LLMs locally using ollama's API from Emacs. It offers a set of commands that allow you to inquire, define words, translate text and more through the Emacs interface. Ellama natively supports streaming output, making it effortless to use with your preferred text editor."
  4. Select region: "[Ellama lets you access LLMs locally using ollama's API from Emacs.] It offers a set of commands that allow you to inquire, define words, translate text and more through the Emacs interface. Ellama natively supports streaming output, making it effortless to use with your preferred text editor."
  5. Do M-x ellama-enhance-wording " It offers a set of commands that allow you to inquire, define words, translate text and more through the Emacs interface. Ellama natively supports streaming output, making it effortless to use with your preferred text editor. Ellama enables you to connect with local LLMs through its API, making use of Ollama within Emacs for seamless integration."
s-kostyaev commented 11 months ago

Thank you for reporting this @hwiorn