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

Prompt submit broken #179

Closed
scottarthur opened this issue May 3, 2023 · 4 comments
Closed

Prompt submit broken #179

scottarthur opened this issue May 3, 2023 · 4 comments

Comments

@scottarthur
Copy link

Here's my nvim version:

> nvim --version
NVIM v0.9.0
Build type: Release
LuaJIT 2.1.0-beta3

I've got a stripped down init.lua:

require('packer').startup(function(use)
  -- Packer can manage itself
  use 'wbthomason/packer.nvim'

  use({"jackMort/ChatGPT.nvim",
    config = function()
      require("chatgpt").setup()
    end,
    requires = {
      "MunifTanjim/nui.nvim",
      "nvim-lua/plenary.nvim",
      "nvim-telescope/telescope.nvim"
    }
  })

end)

Problem is this: Whenever I open any :ChatGPT* command, the default keybinding of <C-Enter> does not submit the prompt, it instead creates a newline in the prompt field. When this happens, previous output is repeated in the response window. This happens both in INSERT or NORMAL mode. I've tried specifying other values for the submit keybinding in setup() but nothing seems to work. All other command keybindings (new session, select session, delete session) work as intended. I've ruled out problems with my token/ChatGPT connection because opening up a :ChatGPTActAs successfully queries the API and prints the response from the initial prompt.

Thanks!

@jackMort
Copy link
Owner

jackMort commented May 4, 2023

I added option to submit by enter in normal mode, please try if it solves this issue for you

@scottarthur
Copy link
Author

That worked! Submit with <Enter> in NORMAL mode successfully submits the prompt and gets me output. <C-Enter> in INSERT mode still exhibits the behavior I described above, though. Do you want me to close this issue or leave it open for the INSERT mode bug?

@ljseng
Copy link

ljseng commented May 4, 2023

hi @scottarthur see #170

@scottarthur
Copy link
Author

Ah yeah, this is a dup of #170, closing. Thanks!

@scottarthur scottarthur closed this as not planned Won't fix, can't repro, duplicate, stale May 5, 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

3 participants