fix(tui/status): clear spinner after final answer

Remove the active task marker as soon as the core delivers a final answer so the Responding… status drops even when TaskComplete is delayed.

Fixes #204.
This commit is contained in:
James Peter
2025-09-22 13:17:33 +10:00
parent 5982e160a3
commit d95c24b1a7
+4
View File
@@ -3832,6 +3832,10 @@ impl ChatWidget<'_> {
self.stream_state
.closed_answer_ids
.insert(StreamId(id.clone()));
// Receiving a final answer means this task has finished even if we have not yet
// observed the corresponding TaskComplete event. Clear the active marker now so
// the status spinner can hide promptly when nothing else is running.
self.active_task_ids.remove(&id);
self.maybe_hide_spinner();
}
EventMsg::ReplayHistory(ev) => {