mirror of
https://github.com/macocianradu/setup.git
synced 2026-03-18 21:00:04 +00:00
38 lines
1.1 KiB
Lua
38 lines
1.1 KiB
Lua
require('codecompanion').setup({
|
|
extensions = {
|
|
history = {
|
|
enabled= true,
|
|
},
|
|
},
|
|
adapters = {
|
|
http = {
|
|
webui = function()
|
|
return require("codecompanion.adapters").extend("openai_compatible", {
|
|
env = {
|
|
url = "https://openwebui.estatecloud.org",
|
|
api_key = os.getenv("OPENWEBUI_API_KEY"),
|
|
chat_url = "/api/chat/completions",
|
|
},
|
|
schema = {
|
|
model = {
|
|
default = "qwen3.5:9b", -- Use the exact model name from your PC
|
|
}
|
|
}
|
|
})
|
|
end,
|
|
},
|
|
acp = {
|
|
claude_code = function()
|
|
return require("codecompanion.adapters").extend("claude_code", { })
|
|
end
|
|
}
|
|
},
|
|
interactions = {
|
|
chat = {
|
|
adapter = "claude_code",
|
|
}
|
|
}
|
|
})
|
|
|
|
vim.keymap.set('n', '<leader>gpt', function() require("codecompanion").chat({strategy = "agent" }) end);
|