From 2d8f25efadd673671d2d6a62347db6eaf90c6fa1 Mon Sep 17 00:00:00 2001 From: yetone Date: Fri, 21 Feb 2025 00:53:10 +0800 Subject: [PATCH] fix separator (#1329) --- lua/avante/sidebar.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/avante/sidebar.lua b/lua/avante/sidebar.lua index dee9141..154a23c 100644 --- a/lua/avante/sidebar.lua +++ b/lua/avante/sidebar.lua @@ -1788,7 +1788,7 @@ function Sidebar:update_content(content, opts) opts = vim.tbl_deep_extend("force", { focus = false, scroll = true, stream = false, callback = nil }, opts or {}) if not opts.ignore_history then local chat_history = Path.history.load(self.code.bufnr) - content = self:render_history_content(chat_history) .. "---\n\n" .. content + content = self:render_history_content(chat_history) .. "-------\n\n" .. content end if opts.stream then local scroll_to_bottom = function() @@ -1915,7 +1915,7 @@ function Sidebar:render_history_content(history) for idx, entry in ipairs(history) do if entry.reset_memory then content = content .. "***MEMORY RESET***\n\n" - if idx < #history then content = content .. "------\n\n" end + if idx < #history then content = content .. "-------\n\n" end goto continue end local selected_filepaths = entry.selected_filepaths @@ -1932,7 +1932,7 @@ function Sidebar:render_history_content(history) ) content = content .. prefix content = content .. entry.response .. "\n\n" - if idx < #history then content = content .. "------\n\n" end + if idx < #history then content = content .. "-------\n\n" end ::continue:: end return content @@ -1945,7 +1945,7 @@ end ---@return string, integer function Sidebar:get_content_between_separators() - local separator = "------" + local separator = "-------" local cursor_line, _ = Utils.get_cursor_pos() local lines = Utils.get_buf_lines(0, -1, self.result_container.bufnr) local start_line, end_line