CopilotC-Nvim / CopilotChat.nvim

Chat with GitHub Copilot in Neovim
https://copilotc-nvim.github.io/CopilotChat.nvim/
GNU General Public License v3.0
1.44k stars 67 forks source link

Unable to Preserve Chat Session, when Closing from Full Screen #359

Closed haapjari closed 1 month ago

haapjari commented 2 months ago

Hello, we briefly chatted on Discord. I have following config:

return {
    {
        "CopilotC-Nvim/CopilotChat.nvim",
        branch = "canary",
        dependencies = {
            { "github/copilot.vim" },
            { "nvim-lua/plenary.nvim" },
        },
        opts = {
            debug = true,
            context = 'buffers',
            model = 'gpt-4',
            window = {
                layout = 'replace',
                title = 'Chat',
            }
        },
    },
}

With this when I :CopilotChat I'll get the chat open in full-screen - as expected. Then if I call :CopilotChatClose I'll experience Lua Error, with following stacktrace:

image

Ultimately I would like to be able to open the chat and toggle it off, while preserving session. If I close it with :q or :bdel I am losing the session - however a workaround is to hop to next buffer with :bnext (however :bprev doesn't hop back to the chat, nor chat is not visible in :buffers) and then I can again :CopilotChat to open the existing session.

Thank you for your time and consideration in advance!

BR, Haspe

haapjari commented 2 months ago

I'll expand on the text, Ideally I would like to toggle the chat in fullscreen and off the fullscreen with :CopilotChatToggle.

However, I can work with :bnext workaround.