Pre-submission checklist
Neovim version (nvim -v)
NVIM v0.13.0-dev-369+g0697c24601
Operating system/version
macOS
Adapter and model
Copilot and Haiku
Describe the bug
When I ask Copilot to grep search the CodeCompanion repo for for chat, it does so but in the process, the LLM's H2 header seems to shift
Steps to reproduce
- Open Neovim and do
:CodeCompanionChat
- Ensure the Copilot adapter is loaded
- Send a single prompt "Are you working?". Wait for the LLM to respond
- Then send "Can you use @{grep_search} to search the docs for "chat"?"
Expected behavior
The LLM header to remain in place
Screenshots or recordings (optional)
minimal.lua file
---@diagnostic disable: missing-fields
--[[
NOTE: Set the config path to enable the copilot adapter to work.
It will search the following paths for a token:
- "$CODECOMPANION_TOKEN_PATH/github-copilot/hosts.json"
- "$CODECOMPANION_TOKEN_PATH/github-copilot/apps.json"
--]]
vim.env["CODECOMPANION_TOKEN_PATH"] = vim.fn.expand("~/.config")
vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()
-- Your CodeCompanion setup
local plugins = {
{
"olimorris/codecompanion.nvim",
-- Test with local version (delete if not required)
-- dir = "~/Code/Neovim/codecompanion.nvim",
dependencies = {
{ "nvim-lua/plenary.nvim" },
{
"nvim-treesitter/nvim-treesitter",
lazy = false,
build = ":TSUpdate",
},
-- Test with blink.cmp
{
"saghen/blink.cmp",
version = "1.*",
opts = {
keymap = {
preset = "enter",
["<S-Tab>"] = { "select_prev", "fallback" },
["<Tab>"] = { "select_next", "fallback" },
},
cmdline = { sources = { "cmdline" } },
sources = {
default = { "lsp", "path", "buffer", "codecompanion" },
},
},
},
},
opts = {
--Refer to: https://github.com/olimorris/codecompanion.nvim/blob/main/lua/codecompanion/config.lua
interactions = {
chat = { adapter = "copilot" },
inline = { adapter = "copilot" },
},
opts = {
log_level = "DEBUG",
},
},
},
}
require("lazy.minit").repro({ spec = plugins })
-- CONFIGURE PLUGINS HERE -----------------------------------------------------
-- Setup Tree-sitter
-- NOTE: Please restart Neovim to ensure parsers are loaded correctly
require("nvim-treesitter")
.install({
"lua",
"markdown",
"markdown_inline",
"yaml",
}, { summary = true, max_jobs = 10 })
:wait(1800000)
Log output (optional)
No response
Minimal reproduction confirmation
Pre-submission checklist
Neovim version (nvim -v)
NVIM v0.13.0-dev-369+g0697c24601
Operating system/version
macOS
Adapter and model
Copilot and Haiku
Describe the bug
When I ask Copilot to grep search the CodeCompanion repo for for
chat, it does so but in the process, the LLM's H2 header seems to shiftSteps to reproduce
:CodeCompanionChatExpected behavior
The LLM header to remain in place
Screenshots or recordings (optional)
minimal.lua file
Log output (optional)
No response
Minimal reproduction confirmation
minimal.luafile that reproduces the issue