[codex] check if write cycle is active for stream on agent message

This commit is contained in:
Anton Panasenko
2025-09-09 12:18:34 -07:00
parent d5d5eab64c
commit 8a7ec74019

View File

@@ -184,6 +184,9 @@ impl ChatWidget {
}
fn on_agent_message(&mut self, message: String) {
if !self.stream.is_write_cycle_active() {
return;
}
let sink = AppEventHistorySink(self.app_event_tx.clone());
let finished = self.stream.apply_final_answer(&message, &sink);
self.handle_if_stream_finished(finished);