mirror of
https://github.com/openai/codex.git
synced 2026-11-15 21:50:46 +00:00
Use Tokio's clock for TUI paste timing (#47881)
## Why Paste input classification and asynchronous flush deadlines need to share a clock, including when Tokio time is paused in tests. ## What changed Use Tokio's clock for chat composer paste timing and startup draft newline tracking, converting to `std::time::Instant` where existing composer helpers require it. ## Testing Run the existing startup draft multiline paste test with `start_paused = true`. It checks that non-bracketed pastes preserve newlines without submitting the draft. GitOrigin-RevId: 73bac963204473d85e7395781e0df966ecc92801
This commit is contained in:
@@ -414,7 +414,7 @@ fn startup_draft_preserves_multiline_editing_without_submitting() {
|
||||
assert!(pump.app_event_rx.try_recv().is_err());
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[tokio::test(start_paused = true)]
|
||||
async fn startup_draft_preserves_non_bracketed_multiline_pastes_without_submitting() {
|
||||
let events = "first line\n\nsecond line\nthird line"
|
||||
.chars()
|
||||
|
||||
Reference in New Issue
Block a user