mirror of
https://github.com/openai/codex.git
synced 2026-04-24 22:54:54 +00:00
Fixes a TUI freeze caused by awaiting `mpsc::Sender::send()` that blocks the tokio thread, stopping the consumption runtime and creating a deadlock. This could happen if the server was producing enough chunks to fill the `mpsc` fast enough. To solve this we try on insert using a `try_send()` (not requiring an `await`) and delegate to a tokio task if this does not work This is a temporary solution as it can contain races for delta elements and a stronger design should come here