Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: provider must be set #868

Merged
merged 1 commit into from
Nov 18, 2024
Merged
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
fix: provider must be set
  • Loading branch information
yetone committed Nov 18, 2024
commit 2c4d96866f6818bfe4e0ad7677d04eb9bf520cec
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