-
Notifications
You must be signed in to change notification settings - Fork 7.5k
unify composer #9885
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
unify composer #9885
Conversation
|
@codex review this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 868d23f878
ℹ️ 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".
| .map(|entry| entry.composer.current_text().trim().to_string()) | ||
| .unwrap_or_default() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expand pending paste placeholders before submitting notes
ChatComposer::handle_paste replaces explicit pastes larger than 1000 characters with a placeholder element and stores the real text in pending_pastes. In this overlay we now call handle_paste, but on submission we read notes via current_text(), which does not expand those placeholders. As a result, any large pasted note will be submitted as the placeholder summary string rather than the user’s actual content. Consider using current_text_with_pending() (or otherwise expanding pending pastes) when building the notes string.
Useful? React with 👍 / 👎.
| fn is_in_paste_burst(&self) -> bool { | ||
| self.current_notes_entry() | ||
| .is_some_and(|entry| entry.composer.is_in_paste_burst()) | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep paste-burst scheduling across option switches
Notes are now backed by a separate ChatComposer per option, but paste-burst scheduling only checks the current notes entry. On terminals without bracketed paste, a burst can remain buffered on option A; if the user switches to option B before the burst flushes, is_in_paste_burst() returns false and the tick scheduler stops, leaving the buffered paste stuck (and effectively lost) unless the user returns to option A and types another key. This should account for bursts in any notes composer, or flush the active composer before changing the selection.
Useful? React with 👍 / 👎.
External (non-OpenAI) Pull Request Requirements
Before opening this Pull Request, please read the dedicated "Contributing" markdown file or your PR may be closed:
https://github.com/openai/codex/blob/main/docs/contributing.md
If your PR conforms to our contribution guidelines, replace this text with a detailed and high quality description of your changes.
Include a link to a bug report or enhancement request.