feat(response-viewer): add a Copy Markdown button

The viewer renders the agent's answer, so selecting it loses the source:
headings, list markers and code fences do not survive. The only source copy
was the per-code-block button.

Copy Markdown copies the raw source of the newest answer the viewer holds:
every row of its turn, or the last response block when the reader emits no
turns. Tool and status blocks share the assistant role and are left out. The
copied text is recorded where the views render, so a reopened viewer never
copies an earlier answer, and an empty viewer warns instead of copying.

The feedback helper replaces the inline copy of the same logic in the
code-block button. On phones the header title now truncates so the longer
action row stays on screen.
This commit is contained in:
Aamer Akhter committed 2026-11-11 18:21:19 -05:00
1 parent 8bedbbe793
commit 992e43bc5c
9 files changed
+405 -11

No files matched your search

+3 -2
View File
@@ -187,8 +187,9 @@ Setup in [Notifications And Approvals](Notifications-And-Approvals).
## Reading long answers
The terminal viewport is small. **Last Response** (opt-in header button) renders the agent's
last answer as scrollable text instead, with a **More** button for additional context.
Persian, Arabic and Hebrew answers read right to left there.
last answer as scrollable text instead, with a **More** button for additional context and a
**Copy Markdown** button for its raw source. Persian, Arabic and Hebrew answers read right to
left there.
The [File Viewer](Working-With-Files) works on phones too, including edit mode, which is
enough to fix a typo an agent introduced while you are away from your desk.
+5 -3
View File
@@ -77,9 +77,11 @@ Turning on either starts the watcher.
**Last Response** (header button, opt-in) renders the agent's last answer as scrollable text
rather than terminal output. It exists mostly for phones, where reading a long answer in a
terminal viewport is painful. **More** loads additional context. Persian, Arabic and Hebrew
answers read right to left here, which the terminal cannot do, while code and the file paths
it links stay left to right.
terminal viewport is painful. **More** loads additional context. **Copy Markdown** copies the
newest answer's raw Markdown, every part of its turn, so headings, lists and code fences paste
intact (the same answer in both views; tool and status blocks are left out). Persian, Arabic
and Hebrew answers read right to left here, which the terminal cannot do, while code and the
file paths it links stay left to right.
## After the fact