mirror of
https://github.com/openai/codex.git
synced 2026-09-13 11:47:17 +00:00
[codex] check if write cycle is active for stream on agent message
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user