File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments