fix: get_history_messages is nil (#2368)

This commit is contained in:
Peter Cardenas
2025-06-29 19:25:49 -07:00
committed by GitHub
parent 2d9247e536
commit 508cc4c22c

View File

@@ -732,7 +732,7 @@ function M._stream(opts)
return
end
local new_opts = vim.tbl_deep_extend("force", opts, {
history_messages = opts.get_history_messages(),
history_messages = opts.get_history_messages and opts.get_history_messages() or {},
})
if provider.get_rate_limit_sleep_time then
local sleep_time = provider:get_rate_limit_sleep_time(resp_headers)