[Bug]: Missing prompt chats from config in Chat buffer
Your minimal.lua config
local root = vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"--single-branch",
"https://github.com/folke/lazy.nvim.git",
lazypath,
})
end
vim.opt.runtimepath:prepend(lazypath)
-- Your CodeCompanion setup
local plugins = {
{
"olimorris/codecompanion.nvim",
dependencies = {
{ "nvim-treesitter/nvim-treesitter", build = ":TSUpdate" },
"nvim-lua/plenary.nvim",
"nvim-telescope/telescope.nvim",
{
"stevearc/dressing.nvim",
opts = {},
},
},
config = function()
require("codecompanion").setup({
adapters = {
ollama = require("codecompanion.adapters").use("ollama", {
schema = {
model = {
default = "llama3",
},
num_predict = {
default = 500
}
},
}),
},
strategies = {
chat = {
adapter = "ollama",
},
inline = {
adapter = "ollama",
},
agent = {
adapter = "anthropic",
},
},
})
end,
}
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
-- setup treesitter
local ok, treesitter = pcall(require, "nvim-treesitter.configs")
if ok then
treesitter.setup({
ensure_installed = "all",
ignore_install = { "phpdoc" }, -- list of parser which cause issues or crashes
highlight = { enable = true },
})
end
Error messages
There are no error messages
Health check output
codecompanion: require("codecompanion.health").check()
codecompanion.nvim report
- Log file: /Users/
/projects/private/ /.repro/state/nvim/codecompanion.log - OK plenary.nvim installed
- OK nvim-treesitter installed
- OK telescope.nvim installed
- OK dressing.nvim installed
- OK curl installed
Log output
It is Empty
Describe the bug
I expect Chat buffer to open and contain:
- Welcome message (intro_message)
- Custom prompts from the configuration (default_prompts)
What happens:
- Empty chat (seem to work correctly)
Thanks for a great plugin!. I am a bit unexperienced on the codebase (I am not used to the style of writing and lua debug methods) to submit a pull request yet
Reproduce the bug
Steps
- Run with minimal configuration (Plugin version 36bac7)
- Run :CodeCompanionActions
- Prompts -> Senior (XYZ) Developer
- Empty Chat opens
Final checks
- [X] I have made sure this issue exists in the latest version of the plugin
- [X] I have tested with the
minimal.luaconfig file above and still get the issue - [X] I have shared the contents of the log file
Thanks.
Are none of them working? Or do you need to make a visual selection for them to appear?
Do you mean if I open a chat using visual inspection?
if I do visual inspection and: :'<,'>CodeCompanionActions
Selecting Senior (XYZ) Developer I have the following code:
<visual selection here>
- The selected visual is present in the chat with an added header, however I can not see any messages from "system".
- No intro_message
I've just pushed a change (d8c88f9dc54a0d43c8e6cde71d66996e47b466fd) which affects the palette. Could you let me know if you're still facing this issue?
It may have fixed it. #buffer was helpful. Managed to solve the issue with a proper cold restart of everything