mirror of
https://github.com/openai/codex.git
synced 2026-10-20 17:38:45 +00:00
## What changed - Make `/copy` select the latest completed response directly in the owned transcript. Navigate user messages, code blocks, and blockquotes with arrow keys or `j`/`k`, use `g`/`G` to jump to the ends, and press Enter to copy or Escape to close. - Highlight selected blocks and keep surrounding context visible during navigation and resizing. Preserve source payloads for code and quotes, including rendered Mermaid diagrams and fenced Markdown tables. - Pause queued submissions until copy mode closes, and report clipboard results in the transcript footer. ## Testing Add tests for copy routing, keyboard navigation, highlighting and resize behavior, source whitespace and line endings, clipboard completion, and queued-input resumption. GitOrigin-RevId: bd4f58ec17568f95d0e91014e5ddba33ca8bd57c
14 lines
360 B
Rust
14 lines
360 B
Rust
//! Keep queued submissions paused until the transcript selector releases its owner.
|
|
|
|
use crate::app_event::AppEvent;
|
|
use crate::app_event_sender::AppEventSender;
|
|
|
|
#[derive(Debug)]
|
|
pub(crate) struct CopyInputGuard(pub(crate) AppEventSender);
|
|
|
|
impl Drop for CopyInputGuard {
|
|
fn drop(&mut self) {
|
|
self.0.send(AppEvent::TranscriptCopyClosed);
|
|
}
|
|
}
|