From 9bad591e8a63f53058471f691497b04eea5dddbf Mon Sep 17 00:00:00 2001 From: yetone Date: Wed, 12 Feb 2025 22:59:15 +0800 Subject: [PATCH] fix: lowercase filepath bad case (#1259) --- lua/avante/sidebar.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lua/avante/sidebar.lua b/lua/avante/sidebar.lua index 6c63040..36194ea 100644 --- a/lua/avante/sidebar.lua +++ b/lua/avante/sidebar.lua @@ -227,6 +227,14 @@ local function transform_result_content(selected_files, result_content, prev_fil goto continue end end + if line_content:match(".+") then + local filepath = line_content:match("(.+)") + if filepath then + current_filepath = filepath + table.insert(transformed_lines, string.format("Filepath: %s", filepath)) + goto continue + end + end if line_content:match("^%s*") then is_searching = true @@ -243,6 +251,7 @@ local function transform_result_content(selected_files, result_content, prev_fil and prev_filepath and not prev_line:match("Filepath:.+") and not prev_line:match(".+") + and not prev_line:match(".+") then table.insert(transformed_lines, string.format("Filepath: %s", prev_filepath)) end