mirror of
https://github.com/openai/codex.git
synced 2026-04-28 10:21:06 +03:00
Fixes #7919. This PR addresses a TUI display bug where the "Worked for" separator would appear prematurely during the planning stage. **Changes:** - Added `had_work_activity` flag to `ChatWidget` to track if actual work (exec commands, MCP tool calls, patches) was performed in the current turn. - Updated `handle_streaming_delta` to only display the `FinalMessageSeparator` if both `needs_final_message_separator` AND `had_work_activity` are true. - Updated `handle_exec_end_now`, `handle_patch_apply_end_now`, and `handle_mcp_end_now` to set `had_work_activity = true`. **Verification:** - Ran `cargo test -p codex-tui` to ensure no regressions. - Manual verification confirms the separator now only appears after actual work is completed. --------- Co-authored-by: Josh McKinney <joshka@openai.com>