Skip to content

Commit eb9b738

Browse files
committed
rename _replace_message to _replace_text
1 parent 18837f2 commit eb9b738

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lua/eca/sidebar.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,7 +1248,7 @@ function M:_handle_server_content(params)
12481248

12491249
local tool_text_completed = "" .. (content.summary or content.name or "Tool call completed")
12501250

1251-
if not self:_replace_message(tool_text, tool_text_completed) then
1251+
if not self:_replace_text(tool_text, tool_text_completed) then
12521252
self:_add_message("assistant", tool_text_completed)
12531253
end
12541254

@@ -1580,7 +1580,7 @@ end
15801580
---@param target string
15811581
---@param replacement string
15821582
---@return boolean changed True if any replacement was made
1583-
function M:_replace_message(target, replacement)
1583+
function M:_replace_text(target, replacement)
15841584
local chat = self.containers.chat
15851585

15861586
if not chat or not vim.api.nvim_buf_is_valid(chat.bufnr) then
@@ -1593,7 +1593,7 @@ function M:_replace_message(target, replacement)
15931593
return false
15941594
end
15951595

1596-
if not replacement then
1596+
if not replacement or replacement == "" then
15971597
Logger.warn("Cannot replace message: empty replacement")
15981598
return false
15991599
end

0 commit comments

Comments
 (0)