fix(get_provider): fix nil access table for vendors (#1074)

If calling method without setup, we need to instantiate the vendors
table so the method can properly extend the providers table into
vendors.
This commit is contained in:
Austin Horstman 2025-01-15 04:40:35 -06:00 committed by GitHub
parent 0a837a4583
commit ea5706f52f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -263,6 +263,9 @@ M.diff = {}
---@type Provider[]
M.providers = {}
---@type AvanteProvider[]
M.vendors = {}
---@param opts? avante.Config
function M.setup(opts)
vim.validate({ opts = { opts, "table", true } })