mirror of
https://github.com/escalante29/WealthySmart.git
synced 2026-07-17 10:28:47 +02:00
Assistant: block "Nueva conversación" while a run is streaming
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 <noreply@anthropic.com>
This commit is contained in:
@@ -144,7 +144,10 @@ export default function Asistente() {
|
|||||||
variant="outline"
|
variant="outline"
|
||||||
size="sm"
|
size="sm"
|
||||||
onClick={() => setConfirmClear(true)}
|
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}
|
||||||
>
|
>
|
||||||
<MessageSquarePlus />
|
<MessageSquarePlus />
|
||||||
Nueva conversación
|
Nueva conversación
|
||||||
|
|||||||
Reference in New Issue
Block a user