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:
Charlie Marsh
2026-09-24 16:48:22 +00:00
committed by copyberry
parent 6f51c65958
commit 90b67c96ca
4 changed files with 11 additions and 8 deletions
+1 -1
View File
@@ -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()