Skip to content

Commit

Permalink
fix: provider must be set (yetone#868)
Browse files Browse the repository at this point in the history
  • Loading branch information
yetone authored Nov 18, 2024
1 parent 3b39004 commit cf2312a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/avante/providers/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -161,15 +161,15 @@ end
---@param opts {refresh: boolean, provider: AvanteProviderFunctor}
---@private
E.setup = function(opts)
opts.provider.setup()

local var = opts.provider.api_key_name

if var == nil or var == "" then
vim.g.avante_login = true
return
end

opts.provider.setup()

-- check if var is a all caps string
if type(var) == "table" or var:match("^cmd:(.*)") then return end

Expand Down

0 comments on commit cf2312a

Please sign in to comment.