Files
GenericAgent/frontends
yanghang a74b270a94 fix(tui): clean copy without wrap newlines for assistant messages
_render_md now produces two renders: the existing narrow ANSI roundtrip
for display (mouse selection still anchors via segment.style.meta) and a
wide render at width=10000 that contains only structural \n. An alignment
walk maps each visual line back to a position in the wide source, so
SelectableStatic.get_selection extracts source text without wrap-induced
newlines.

The aligner handles three layouts:
- 1:1 (no wrap): narrow line maps directly to wide line
- N:1 wrap: hanging indent on continuation lines is stripped, and the
  whitespace eaten at wrap points (e.g. spaces between English words) is
  recovered from the wide line
- centered single-line (Markdown headers): wide and narrow have different
  leading-pad widths; source uses the lstripped content, and narrow's pad
  becomes per-line indent that selection clamps over
2026-05-16 23:29:39 +08:00
..
2026-05-14 22:46:06 +08:00
…