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