Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buffer is not 'modifiable' error when submitting a new query while one is still executing. #340

Closed
joeldrotleff opened this issue Dec 11, 2023 · 1 comment

Comments

@joeldrotleff
Copy link

With the main ChatGPT window open, while a query is being executed, submitting a new query leads to an error being printed over and over:

Error executing vim.schedule lua callback: ...e/nvim/lazy/ChatGPT.nvim/lua/chatgpt/flows/chat/base.lua:263: Buffer is not 'modifiable'
stack traceback:
[C]: in function 'nvim_buf_set_lines'
...e/nvim/lazy/ChatGPT.nvim/lua/chatgpt/flows/chat/base.lua:263: in function 'addAnswerPartial'
...e/nvim/lazy/ChatGPT.nvim/lua/chatgpt/flows/chat/base.lua:723: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>

With (apparently) no good way to quit - :q, , C-c, C-d...nothing seems to work.

Steps to reproduce:

  1. Open ChatGPT plugin :ChatGPT
  2. Request something that takes a while to complete, i.e. "Tell me a story." Wait for response to begin streaming in.
  3. Type a new query, i.e. "Test" and hit Enter.
    Notice: Error is shown at bottom of screen, and can't be dismissed
    Expected: No error. I think a warning that says something like "You have a query running already. To cancel it, use C-x (the default cancel key command).
@joeldrotleff
Copy link
Author

Here's a fix for it: #341

aaronik pushed a commit to aaronik/ChatGPT.nvim that referenced this issue Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant