fix: avoid ignorable error in ubuntu 22.04+ (#903)

This commit is contained in:
Jay Zhang 2024-11-25 04:26:23 -08:00 committed by GitHub
parent 4c9dd65600
commit 7413d5a508
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -184,6 +184,8 @@ function Selection:create_editing_input()
---@type AvanteCompleteParser
local on_complete = function(err)
if err then
-- NOTE: in Ubuntu 22.04+ you will see this ignorable error from ~/.local/share/nvim/lazy/avante.nvim/lua/avante/llm.lua `on_error = function(err)`, check to avoid showing this error.
if type(err) == "table" and err.exit == nil and err.stderr == "{}" then return end
Utils.error(
"Error occurred while processing the response: " .. vim.inspect(err),
{ once = true, title = "Avante" }