enricoros / big-AGI

Generative AI suite powered by state-of-the-art models and providing advanced AI/AGI functions. It features AI personas, AGI functions, multi-model chats, text-to-image, voice, response streaming, code highlighting and execution, PDF import, presets for developers, much more. Deploy on-prem or in the cloud.
https://big-agi.com
MIT License
4.86k stars 1.1k forks source link

[BUG] Focus lost in the prompt editing text area onblur #535

Open dandv opened 2 months ago

dandv commented 2 months ago

Description

If I edit the prompt and click on another tab, the editing mode will end and the prompt will be Markdown-rendered.

I expect to stay in edit mode, as is the case when I type/edit a prompt in the bottom chat area and click on another tab: when I return to the big-AGI tab, the textarea is still in edit mode.

Device and browser

Firefox 123 on Fedora Linux

Screenshots and more

image

Willingness to Contribute

enricoros commented 2 months ago

@dandv to fix this, we'll need to have 'save/cancel' button on the prompt editing, and don't really know where to place them on both mobile and desktop (they could be at the top, or bottom, but on mobile they'll be a wide scroll distance away, so blur was the solution.

dandv commented 1 month ago

A more serious bug here: I was in editing mode and pressed Esc to exit editing mode. There WAS a warning but my eyes anticipated it was about losing the changes to the prompt I was editing; instead, all the chats from the beam were lost! :warning: (in addition to the prompt).

Would the user actually ever want to lose the model outputs in a beam when pressing Esc? There's also no Undo.

hourianto commented 1 day ago

Also stumbled upon this issue, makes it harder to chat when I have to copy stuff from other tabs :(

enricoros commented 19 hours ago

@hourianto already fixed in the code, will be released soon.