fix: set default auto suggestions provider to nil (#1951)

This commit is contained in:
yetone
2025-05-01 02:50:01 +08:00
committed by GitHub
parent 99a2e35ff3
commit 32ca1ed38e
4 changed files with 7 additions and 6 deletions

View File

@@ -207,12 +207,14 @@ function M.setup()
---@type AvanteProviderFunctor | AvanteBedrockProviderFunctor
local provider = M[Config.provider]
local auto_suggestions_provider = M[Config.auto_suggestions_provider]
E.setup({ provider = provider })
if auto_suggestions_provider and auto_suggestions_provider ~= provider then
E.setup({ provider = auto_suggestions_provider })
if Config.auto_suggestions_provider then
local auto_suggestions_provider = M[Config.auto_suggestions_provider]
if auto_suggestions_provider and auto_suggestions_provider ~= provider then
E.setup({ provider = auto_suggestions_provider })
end
end
if Config.memory_summary_provider then