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
@@ -4,7 +4,7 @@
//! preserved, protected screens do not consume draft input, and confirmation never removes text.
use std::io;
use std::time::Instant;
use tokio::time::Instant;
use crossterm::event::KeyCode;
use crossterm::event::KeyEvent;