mirror of
https://github.com/openai/codex.git
synced 2026-05-02 18:37:01 +00:00
fix(tui): only show 'Worked for' separator when actual work was performed (#8958)
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>
This commit is contained in:
@@ -438,6 +438,7 @@ async fn make_chatwidget_manual(
|
||||
is_review_mode: false,
|
||||
pre_review_token_info: None,
|
||||
needs_final_message_separator: false,
|
||||
had_work_activity: false,
|
||||
last_rendered_width: std::cell::Cell::new(None),
|
||||
feedback: codex_feedback::CodexFeedback::new(),
|
||||
current_rollout_path: None,
|
||||
|
||||
Reference in New Issue
Block a user