Conversation
There was a problem hiding this comment.
💡 Codex Review
codex/codex-rs/tui/src/chatwidget.rs
Lines 1226 to 1231 in 9531d92
on_agent_message displays completed assistant text but does not update last_copyable_output. In event flows that still emit EventMsg::AgentMessage (without item-completed capture), /copy cannot copy the latest visible reply and instead falls back to older content or reports nothing.
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
codex/codex-rs/tui/src/chatwidget.rs
Lines 4286 to 4291 in c0ea947
/copy uses self.last_copyable_output, but ThreadRolledBack only triggers transcript trimming and never updates that cache. After undo/backtrack removes the most recent assistant turn, /copy can still copy the removed reply, so it no longer reflects the latest visible Codex output.
ℹ️ 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".
|
Security review completed. No security issues were found in this pull request. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a102f22a07
ℹ️ 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".
|
Security review completed. No security issues were found in this pull request. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
codex-rs/tui/src/chatwidget.rs
Outdated
| status_line_branch_lookup_complete: bool, | ||
| external_editor_state: ExternalEditorState, | ||
| #[cfg(test)] | ||
| clipboard_text_writer_override: Option<ClipboardTextWriterOverride>, |
There was a problem hiding this comment.
let's not have a state purely for tests. we can simulate it.
codex-rs/tui/src/chatwidget.rs
Outdated
| Some(MessagePhase::FinalAnswer) | None => true, | ||
| Some(MessagePhase::Commentary) => false, | ||
| }; | ||
| if should_capture_copyable_output && !message.trim().is_empty() { |
There was a problem hiding this comment.
you don't need this change if you are doing it at task complete also.
codex-rs/tui/src/chatwidget.rs
Outdated
| /// phase for legacy models) clears the flag to preserve historical behavior. | ||
| fn on_agent_message_item_completed(&mut self, item: AgentMessageItem) { | ||
| let should_capture_copyable_output = match item.phase.as_ref() { | ||
| Some(MessagePhase::FinalAnswer) | None => true, |
There was a problem hiding this comment.
same as above. task complete is enough
codex-rs/tui/src/chatwidget.rs
Outdated
| Some(MessagePhase::FinalAnswer) | None => false, | ||
| Some(MessagePhase::Commentary) => true, | ||
| }; | ||
| if should_capture_copyable_output { |
codex-rs/tui/src/chatwidget.rs
Outdated
| }; | ||
|
|
||
| #[cfg(test)] | ||
| let copy_result = if let Some(writer) = &self.clipboard_text_writer_override { |
There was a problem hiding this comment.
let's not have test logic like that in the code
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1c6fd82111
ℹ️ 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".
/copy!
/copy allows you to copy the latest complete message from Codex on the TUI.