Merge pull request #1452 from SmackleFunky/codecompanion

assistant/codecompanion-nvim: allow adapter to be specified by name and model
This commit is contained in:
Ching Pei Yang 2026-03-20 02:32:02 +01:00 committed by GitHub
commit 8aad181ec9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 36 additions and 4 deletions

View file

@ -322,6 +322,10 @@ https://github.com/gorbit99/codewindow.nvim
- Fix `vim.formatter.conform-nvim.setupOpts.formatters` type for correct merging
[SmackleFunky](https://github.com/SmackleFunky):
- Updated codecompanion-nvim adapters to allow specifying a model.
[tlvince](https://github.com/tlvince):
- Added configuration option for `foldenable`

View file

@ -1,6 +1,6 @@
{lib, ...}: let
inherit (lib.options) mkOption mkEnableOption;
inherit (lib.types) int str enum nullOr attrs;
inherit (lib.options) mkOption mkEnableOption literalExpression;
inherit (lib.types) int str enum nullOr attrs either submodule;
inherit (lib.nvim.types) mkPluginSetupOption luaInline;
in {
options.vim.assistant = {
@ -202,9 +202,23 @@ in {
strategies = {
chat = {
adapter = mkOption {
type = nullOr str;
default = null;
description = "Adapter used for the chat strategy.";
type = nullOr (either str (submodule {
options = {
name = mkOption {
type = nullOr str;
default = null;
description = "Name of the Adapter";
};
model = mkOption {
type = nullOr str;
default = null;
description = "Model used for Adapter.";
};
};
}));
};
keymaps = mkOption {
@ -253,9 +267,23 @@ in {
inline = {
adapter = mkOption {
type = nullOr str;
default = null;
description = "Adapter used for the inline strategy.";
type = nullOr (either str (submodule {
options = {
name = mkOption {
type = nullOr str;
default = null;
description = "Name of the Adapter";
};
model = mkOption {
type = nullOr str;
default = null;
description = "Model used for Adapter.";
};
};
}));
};
variables = mkOption {