fix: must not be called in a lua loop (#876)
This commit is contained in:
parent
5dd42548d4
commit
56ebcad7a8
@ -347,6 +347,8 @@ end
|
|||||||
|
|
||||||
---@param opts StreamOptions
|
---@param opts StreamOptions
|
||||||
M.stream = function(opts)
|
M.stream = function(opts)
|
||||||
|
if opts.on_chunk ~= nil then opts.on_chunk = vim.schedule_wrap(opts.on_chunk) end
|
||||||
|
if opts.on_complete ~= nil then opts.on_complete = vim.schedule_wrap(opts.on_complete) end
|
||||||
local Provider = opts.provider or P[Config.provider]
|
local Provider = opts.provider or P[Config.provider]
|
||||||
if Config.dual_boost.enabled then
|
if Config.dual_boost.enabled then
|
||||||
M._dual_boost_stream(opts, Provider, P[Config.dual_boost.first_provider], P[Config.dual_boost.second_provider])
|
M._dual_boost_stream(opts, Provider, P[Config.dual_boost.first_provider], P[Config.dual_boost.second_provider])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user