mirror of
https://github.com/openai/codex.git
synced 2026-11-28 07:32:19 +00:00
Harden embedded composer input handling (#42408)
## What changed - Keep `!`, `/`, and `?` prefixes literal in plain-text composers instead of activating command modes or shortcuts. - Preserve buffered characters when changing Vim mode, cancelling a draft, or pressing Enter during a paste burst. - Show over-limit errors in embedded composer footers, retain the rejected draft, and schedule redraws when the message expires. - Clear stale validation errors when replacing a draft or switching form fields. ## Testing - Add coverage for literal prefixes, buffered typing, single-character paste lines, retained over-limit drafts, and clearing validation errors between fields. GitOrigin-RevId: ed9d5b2c087abdfefd92d93033ea1c20211d56d7
This commit is contained in:
1 parent
460b63e5f4
commit
93053c7f5d
9 files changed
+205
-22
No files matched your search
@@ -118,6 +118,11 @@ impl ComposerInput {
|
||||
self.inner.is_in_paste_burst()
|
||||
}
|
||||
|
||||
/// Delay until validation feedback expires and needs a redraw.
|
||||
pub fn footer_flash_delay(&self) -> Option<Duration> {
|
||||
self.inner.footer_flash_delay()
|
||||
}
|
||||
|
||||
/// Flush a pending paste-burst if the inter-key timeout has elapsed.
|
||||
/// Returns true if text changed and a redraw is warranted.
|
||||
pub fn flush_paste_burst_if_due(&mut self) -> bool {
|
||||
|
||||
Reference in new issue
Block a user