mirror of
https://github.com/openai/codex.git
synced 2026-12-06 01:10:58 +00:00
## Why When a command starts before an assistant message completes, the TUI can flush the streamed text and then render it again when the completion arrives. This duplicates the preamble in both live output and replay. ## What changed Track the turn ID, item ID, and source text of the flushed message. Skip rendering its completion again when the identity and text match, allowing for the trailing newline added during stream finalization. Continue rendering completions whose identity or text differs. ## Testing Add an end-to-end test that delays message completion until a command starts and checks that live and replayed transcripts contain the preamble once. Add regression coverage for completions with different text or item IDs. GitOrigin-RevId: 59af0198a99f26ba8ba2a47644ba662301c30011