You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using headless mode I've noticed you must first open the buffer window for CopilotChat first otherwise any prompts that use state.source.bufnr/winnr will throw an error.
For example, if try to run the following immediately after opening nvim
Error executing vim.schedule lua callback: ...share/nvim/lazy/plenary.nvim/lua/plenary/async/async.lua:18: The coroutine failed with this message: ...re/nvim/lazy/CopilotChat.nvim/lua/CopilotChat/config.lua:330: attempt to index local 'source' (a nil value)
stack traceback:
[C]: in function 'error'
...share/nvim/lazy/plenary.nvim/lua/plenary/async/async.lua:18: in function 'callback_or_next'
...share/nvim/lazy/plenary.nvim/lua/plenary/async/async.lua:45: in function <...share/nvim/lazy/plenary.nvim/lua/plenary/async/async.lua:44>
From what I can tell, state.source.bufnr/winnr is set at init:update_selection, which gets called on BufEnter for the Chat window. But since we don't ever open the Chat window in headless mode we don't update state.source.
The text was updated successfully, but these errors were encountered:
When using headless mode I've noticed you must first open the buffer window for CopilotChat first otherwise any prompts that use
state.source.bufnr/winnr
will throw an error.For example, if try to run the following immediately after opening nvim
I would get the following error
From what I can tell,
state.source.bufnr/winnr
is set at init:update_selection, which gets called on BufEnter for the Chat window. But since we don't ever open the Chat window in headless mode we don't updatestate.source
.The text was updated successfully, but these errors were encountered: