Skip to content

Bug: Crash in CopilotChatPrompts (attempt to index a nil value) #1554

@r4ppz

Description

@r4ppz

When trying to select a prompt action
(something like this)

{
  "<leader>cp",
  function()
    local chat = require("CopilotChat")
    chat.open()
    chat.select_prompt()
  end,
  mode = { "n", "v" },
  desc = "View/select prompt templates",
},

I get this:

vim.schedule callback: ...hare/nvim/lazy/CopilotChat.nvim/lua/CopilotChat/init.lua:381: attempt to index a nil value
stack traceback:
        ...hare/nvim/lazy/CopilotChat.nvim/lua/CopilotChat/init.lua:381: in function 'on_choice'
        ...share/nvim/lazy/snacks.nvim/lua/snacks/picker/select.lua:59: in function <...share/nvim/lazy/snacks.nvim/lua/snacks/picker/select.lua:58>

I am using the latest version btw.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions