Robitx / gp.nvim

Gp.nvim (GPT prompt) Neovim AI plugin: ChatGPT sessions & Instructable text/code operations & Speech to text [OpenAI]
MIT License
537 stars 50 forks source link

Autoscrolling response #82

Closed TrMen closed 6 months ago

TrMen commented 6 months ago

When opening a chat in a popup with :GpChatNew popup or GpChatToggle popup and the response text exceeds the popup height, the text just silently gets inserted outside of the visible window and the cursor pops to the end when the full response is rendered. That's especially confusing when the cursor is already at the bottom of the window at the start, since then it just looks like the response generation didn't work since nothing visibly changes.

It seems like the behavior is the same for other targets as well (split, vsplit, tabnew). It's just more obvious to me in popups since the window is smaller.

It would be awesome if the cursor or the visible portion of the buffer could move with the response so that the newest line of the output is visible while it's being rendered. Or if at least the beginning of the message is always visible while the rest is still generating. I know chatGPT.nvim does this scrolling, but sadly I don't know how it's implemented there.

Robitx commented 6 months ago

@TrMen hey, thanks for the report auto scroll should be fixed in the latest version.