From 3820db92ee6569ea941d28d321e012ead76f1c24 Mon Sep 17 00:00:00 2001 From: Bryce Thorpe Date: Sun, 5 Apr 2026 09:54:38 -0500 Subject: [PATCH] assistant/codecompanion: rename strategies -> interactions codecompanion.nvim v19 renamed `strategies` to `interactions` (olimorris/codecompanion.nvim#2485). The nvf module still generated the deprecated `strategies` key, which triggers codecompanion's backwards-compat migration shim. That shim replaces any user-provided `interactions` table with `defaults + strategies`, silently discarding user overrides like `interactions.chat.adapter`. Rename the option tree so the generated Lua uses the current `interactions` key and the migration shim is never triggered. --- docs/manual/release-notes/rl-0.9.md | 13 +++++++++++++ .../assistant/codecompanion/codecompanion-nvim.nix | 6 +++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/docs/manual/release-notes/rl-0.9.md b/docs/manual/release-notes/rl-0.9.md index 4dd694f1..74e77571 100644 --- a/docs/manual/release-notes/rl-0.9.md +++ b/docs/manual/release-notes/rl-0.9.md @@ -33,6 +33,12 @@ controlled via `vim.options.foldenable` directly instead. RIP `vim.treesitter.foldByDefault` 2026-03-19 - 2026-03-19. +- `vim.assistant.codecompanion-nvim.setupOpts.strategies` has been renamed to + `vim.assistant.codecompanion-nvim.setupOpts.interactions` to match the + upstream codecompanion.nvim v19 rename. If you set options like + `setupOpts.strategies.chat.adapter`, rename them to + `setupOpts.interactions.chat.adapter`. + [Snoweuph](https://github.com/snoweuph) - "Correct `languages.go.treesitter` to contain all Go file types. @@ -59,6 +65,13 @@ ## Changelog {#sec-release-0-9-changelog} +[SecBear](https://github.com/SecBear): + +- Renamed `setupOpts.strategies` to `setupOpts.interactions` in the + codecompanion-nvim module to match the upstream v19 rename. The old key + triggered a migration shim that silently discarded user `interactions` + overrides. + [midischwarz12](https://github.com/midischwarz12): - Changed the prettier-plugin-astro build to use `writableTmpDirAsHomeHook` to diff --git a/modules/plugins/assistant/codecompanion/codecompanion-nvim.nix b/modules/plugins/assistant/codecompanion/codecompanion-nvim.nix index 98916d4b..119a3b6f 100644 --- a/modules/plugins/assistant/codecompanion/codecompanion-nvim.nix +++ b/modules/plugins/assistant/codecompanion/codecompanion-nvim.nix @@ -199,11 +199,11 @@ in { description = "An adapter is what connects Neovim to an LLM."; }; - strategies = { + interactions = { chat = { adapter = mkOption { default = null; - description = "Adapter used for the chat strategy."; + description = "Adapter used for the chat interaction."; type = nullOr (either str (submodule { options = { name = mkOption { @@ -268,7 +268,7 @@ in { inline = { adapter = mkOption { default = null; - description = "Adapter used for the inline strategy."; + description = "Adapter used for the inline interaction."; type = nullOr (either str (submodule { options = { name = mkOption {