Skip to content

Commit 2507c33

Browse files
ssjolearyclaude
andcommitted
feat: send chat/clear to server on EcaChatClear
Previously :EcaChatClear only wiped the local buffer without notifying the server. Server retained full chat history. Now sends chat/clear request before local cleanup, matching eca-emacs behavior. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 5ac15c9 commit 2507c33

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)