Skip to content

Commit 2303e9f

Browse files
authored
Merge pull request #64 from Shakey-Bridge-Software/feature/chat-clear
feat: send chat/clear to server on EcaChatClear
2 parents 0ce6c28 + 2507c33 commit 2303e9f

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

lua/eca/sidebar.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,11 @@ end
256256
function M:clear_chat()
257257
local chat = self.containers and self.containers.chat
258258
if chat and chat.bufnr and vim.api.nvim_buf_is_valid(chat.bufnr) then
259+
local chat_id = self.mediator:id()
260+
if chat_id then
261+
self.mediator:send("chat/clear", { chatId = chat_id, messages = true }, nil)
262+
end
263+
259264
-- Reset chat content state to prevent stale line numbers / extmark IDs.
260265
self._tool_calls = {}
261266
self._reasons = {}

0 commit comments

Comments
 (0)