From 15fa18411a03ecc38a83fdea588a4ad10e461f0e Mon Sep 17 00:00:00 2001 From: Carlos Escalante Date: Sat, 4 Jul 2026 19:53:15 -0600 Subject: [PATCH] =?UTF-8?q?Assistant:=20block=20"Nueva=20conversaci=C3=B3n?= =?UTF-8?q?"=20while=20a=20run=20is=20streaming?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MAF persists the thread at run END, so clearing mid-stream deleted the row only for the finishing run to write the conversation right back — the thread reappeared after the reload ("chunks" needing a second clear). The button is now disabled while agent.isRunning. (The chunked-clear reports on the prior build had a second cause fixed in 0f34a64: clearing left the client's message copy alive and the next question re-persisted it.) Co-Authored-By: Claude Fable 5 --- frontend/src/pages/Asistente.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/pages/Asistente.tsx b/frontend/src/pages/Asistente.tsx index 9bb503a..38a476c 100644 --- a/frontend/src/pages/Asistente.tsx +++ b/frontend/src/pages/Asistente.tsx @@ -144,7 +144,10 @@ export default function Asistente() { variant="outline" size="sm" onClick={() => setConfirmClear(true)} - disabled={!agent || agent.messages.length === 0} + // Also disabled mid-run: MAF saves the thread at run END, so + // clearing while an answer streams would delete the row only + // to have the finishing run write it right back. + disabled={!agent || agent.messages.length === 0 || agent.isRunning} > Nueva conversación