From 12d69945c562b87f4086d60893c334849f1ace54 Mon Sep 17 00:00:00 2001 From: yetone Date: Tue, 3 Jun 2025 11:27:01 +0800 Subject: [PATCH] fix: legacy warning (#2120) --- lua/avante/llm.lua | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/lua/avante/llm.lua b/lua/avante/llm.lua index 8f11a2c..28e867e 100644 --- a/lua/avante/llm.lua +++ b/lua/avante/llm.lua @@ -596,20 +596,10 @@ function M.curl(opts) end end vim.schedule(function() - if Config[Config.provider] == nil and provider.parse_stream_data ~= nil then - if provider.parse_response ~= nil then - Utils.warn( - "parse_stream_data and parse_response are mutually exclusive, and thus parse_response will be ignored. Make sure that you handle the incoming data correctly.", - { once = true } - ) - end + if provider.parse_stream_data ~= nil then provider:parse_stream_data(resp_ctx, data, handler_opts) else - if provider.parse_stream_data ~= nil then - provider:parse_stream_data(resp_ctx, data, handler_opts) - else - parse_stream_data(data) - end + parse_stream_data(data) end end) end,