Implemented chat and inline functionality with codecompanion!!
This commit is contained in:
@@ -5,20 +5,69 @@ return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
},
|
||||
opts = {
|
||||
interactions = {
|
||||
display = {
|
||||
chat = {
|
||||
adapter = {
|
||||
name = "gemini",
|
||||
model = "gemini-3.5-flash",
|
||||
window = {
|
||||
layout = "vertical",
|
||||
width = 0.35,
|
||||
height = 0.35,
|
||||
},
|
||||
keymaps = {
|
||||
close = {
|
||||
modes = {
|
||||
n = "q", -- Bind "q" in normal mode to close the chat
|
||||
},
|
||||
index = 1,
|
||||
callback = "keymaps.close",
|
||||
description = "Close Chat",
|
||||
},
|
||||
}
|
||||
},
|
||||
-- inline = { adapter = "gemini" },
|
||||
-- cmd = { adapter = "gemini" },
|
||||
},
|
||||
interactions = {
|
||||
chat = {
|
||||
adapter = "gemini_pro", -- Removed the curly braces
|
||||
},
|
||||
inline = {
|
||||
adapter = "gemini_flash", -- Removed the curly braces
|
||||
},
|
||||
},
|
||||
background = {
|
||||
adapter = {
|
||||
name = "ollama",
|
||||
model = "qwen-7b-instruct"
|
||||
adapter = "ollama_bg", -- Pointed this to the new extended adapter string
|
||||
},
|
||||
adapters = {
|
||||
http = {
|
||||
gemini_pro = function()
|
||||
return require("codecompanion.adapters").extend("gemini", {
|
||||
name = "gemini_pro",
|
||||
schema = {
|
||||
model = {
|
||||
default = "gemini-3.5-flash",
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
gemini_flash = function()
|
||||
return require("codecompanion.adapters").extend("gemini", {
|
||||
name = "gemini_flash",
|
||||
schema = {
|
||||
model = {
|
||||
default = "gemini-2.0-flash",
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
-- Added an extended Ollama adapter to fix your background task
|
||||
ollama_bg = function()
|
||||
return require("codecompanion.adapters").extend("ollama", {
|
||||
name = "ollama_bg",
|
||||
schema = {
|
||||
model = {
|
||||
default = "qwen-7b-instruct",
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user