mirror of
https://github.com/openai/codex.git
synced 2026-11-19 23:05:23 +00:00
Preserve Markdown formatting when copying TUI responses (#42847)
## What changed - Add rendered HTML alongside the original Markdown when copying a whole response through the native clipboard, so rich-text destinations preserve headings, lists, tables, code, and other formatting. - Keep code-block, blockquote, transcript, terminal, and WSL clipboard copies as plain text. - Escape raw HTML, omit remote image sources, and render unsupported link destinations as visible text when producing clipboard HTML. ## Testing - Add coverage for rich formatting, local and unsafe links, inert images, fenced tables, copy selection formats, and clipboard fallbacks. GitOrigin-RevId: c6f5edd88b65f9e9b1ddc5618442868cf47ee560
This commit is contained in:
1 parent
9c4253ffc1
commit
7a8092a447
17 files changed
+329
-57
No files matched your search
@@ -205,8 +205,8 @@ impl App {
|
||||
self.chat_widget.maybe_send_next_queued_input();
|
||||
}
|
||||
}
|
||||
AppEvent::CopySelection { text, label } => {
|
||||
self.chat_widget.copy_selection(text, label);
|
||||
AppEvent::CopySelection { text, label, format } => {
|
||||
self.chat_widget.copy_selection(text, label, format);
|
||||
}
|
||||
AppEvent::ClearUi { name } => {
|
||||
self.clear_terminal_ui(tui, /*redraw_header*/ false)?;
|
||||
|
||||
Reference in new issue
Block a user