From ed438e9934c2b2cbcb10e3330d7bb7dfb15e3db3 Mon Sep 17 00:00:00 2001 From: yetone Date: Thu, 16 Jan 2025 21:27:32 +0800 Subject: [PATCH] feat: include diagnostics in suggestion --- lua/avante/suggestion.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/avante/suggestion.lua b/lua/avante/suggestion.lua index 8552653d..fc68a5b4 100644 --- a/lua/avante/suggestion.lua +++ b/lua/avante/suggestion.lua @@ -130,9 +130,12 @@ L5: pass }, } + local diagnostics = Utils.get_diagnostics(bufnr) + Llm.stream({ provider = provider, ask = true, + diagnostics = vim.json.encode(diagnostics), selected_files = { { content = code_content, file_type = filetype, path = "" } }, code_lang = filetype, history_messages = history_messages,