hide the API-key providers from the codecompanion adapter picker

The `ga` picker now lists only Claude Code and Antigravity. Every
built-in HTTP adapter is hidden after setup, so new presets in later
releases stay hidden too; hidden adapters still work by name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
jannikdonkerandClaude Opus 5.5 committed 2026-11-17 17:18:39 +01:00
1 parent 48b149f4ef
commit e4e7b6621e
1 file changed
+12 -9
+12 -9
View File
@@ -114,15 +114,9 @@ require("codecompanion").setup({
})
end,
},
http = {
-- The defaults (web search/fetch backends) plus the inline-only agent.
opts = {
hidden = {
duckduckgo = true, jina = true, markitdown = true, tavily = true,
antigravity_inline = true,
},
},
},
-- Merged into the default hidden list. All HTTP adapters get hidden
-- after setup() below; this one is an agent, so it's listed here.
http = { opts = { hidden = { antigravity_inline = true } } },
},
interactions = {
@@ -170,6 +164,15 @@ require("codecompanion").setup({
},
})
-- The `ga` picker shows only Claude Code and Antigravity: hide every
-- built-in HTTP (API-key) provider, including ones added in later releases.
-- The hidden list is read whenever the picker opens, and hidden adapters
-- still work by name (cmd/background use anthropic, web tools duckduckgo).
local http_adapters = require("codecompanion.config").adapters.http
for name in pairs(http_adapters) do
if name ~= "opts" and name ~= "extend" then http_adapters.opts.hidden[name] = true end
end
-- Progress float while an inline edit runs (see lua/ai_status.lua).
require("ai_status").setup()