Merge pull request #1452 from SmackleFunky/codecompanion
Some checks are pending
Set up binary cache / cachix (default) (push) Waiting to run
Set up binary cache / cachix (maximal) (push) Waiting to run
Set up binary cache / cachix (nix) (push) Waiting to run
Treewide Checks / Validate flake (push) Waiting to run
Treewide Checks / Check formatting (push) Waiting to run
Treewide Checks / Check source tree for typos (push) Waiting to run
Treewide Checks / Validate documentation builds (push) Waiting to run
Treewide Checks / Validate documentation builds-1 (push) Waiting to run
Treewide Checks / Validate documentation builds-2 (push) Waiting to run
Treewide Checks / Validate documentation builds-3 (push) Waiting to run
Treewide Checks / Validate hyperlinks in documentation sources (push) Waiting to run
Treewide Checks / Validate Editorconfig conformance (push) Waiting to run
Build and deploy documentation / Check latest commit (push) Waiting to run
Build and deploy documentation / publish (push) Blocked by required conditions

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 {