Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions doc/configuration/adapters-acp.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,24 @@ require("codecompanion").setup({
})
```

## Controlling Model Choices

When switching between adapters, the plugin typically displays all available model choices for the selected adapter. If you want to simplify the interface and have the default model automatically chosen (without showing any model selection UI), you can set the `show_model_choices` option to `false`:

```lua
require("codecompanion").setup({
adapters = {
acp = {
opts = {
show_model_choices = false,
},
},
},
})
```

With `show_model_choices = false`, the default model (as reported by the ACP agent) will be automatically selected when changing adapters, and no model selection will be shown to the user.

## Setup: Auggie CLI from Augment Code

To use [Auggie CLI](https://docs.augmentcode.com/cli/overview) within CodeCompanion, you simply need to follow their [Getting Started](https://docs.augmentcode.com/cli/overview#getting-started) guide.
Expand Down
1 change: 1 addition & 0 deletions lua/codecompanion/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ local defaults = {
opencode = "opencode",
opts = {
show_presets = true,
show_model_choices = true, -- Show model choices when changing adapter
},
},
opts = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,15 @@ end
---@param connection CodeCompanion.ACP.Connection
---@return table|nil
function M.list_acp_models(connection)
local show_choices = config.adapters
and config.adapters.acp
and config.adapters.acp.opts
and config.adapters.acp.opts.show_model_choices

if not show_choices then
return nil
end

local models = connection:get_models()
if not models or vim.tbl_count(models.availableModels) < 2 then
return nil
Expand Down
Loading