fix(tui): only show 'Worked for' separator when actual work was performed#8958
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 93baa9bf16
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Thanks for the review feedback! Here's my analysis: Regarding view-image tool callsThe
The current behavior is correct: separator only shows when |
|
Thanks for the review! Regarding the view-image concern: I intentionally didn't count
However, I'm happy to add it if you prefer consistency (any tool call = work). Also, I'll rename Please let me know which direction you'd prefer! |
- Add per-turn work tracking (exec/patch/MCP) in tui2 so 'Worked for …' only appears when work happened. - Mirror the separator reset behavior for no-work turns. - Add/align rustdoc/field comments explaining the separator and gating flags in both tui and tui2.
joshka-oai
left a comment
There was a problem hiding this comment.
I added docs and updated this to also contain logic for tui2
Fixes #7919.
This PR addresses a TUI display bug where the "Worked for" separator would appear prematurely during the planning stage.
Changes:
had_work_activityflag toChatWidgetto track if actual work (exec commands, MCP tool calls, patches) was performed in the current turn.handle_streaming_deltato only display theFinalMessageSeparatorif bothneeds_final_message_separatorANDhad_work_activityare true.handle_exec_end_now,handle_patch_apply_end_now, andhandle_mcp_end_nowto sethad_work_activity = true.Verification:
cargo test -p codex-tuito ensure no regressions.