Commit Graph
5 Commits
Author SHA1 Message Date
Felipe Coury f5a2272c6c Copy transcript selections as literal text while preserving rich HTML (#50467)
## Why

Copying rendered transcript selections added Markdown formatting and escapes to the plain-text clipboard payload. Selecting bold text such as `hello` could paste as `**hello**`.

## What changed

Separate the literal selection text from the Markdown source used to render clipboard HTML. Plain-text copies omit inline formatting delimiters, added code fences, and Markdown escapes while retaining list and table structure. Rich-text pastes continue to preserve formatting through HTML.

## Testing

Update clipboard and transcript selection tests to verify literal text alongside rich HTML, including lists, inline code, paths with Markdown punctuation, hard breaks, streamed code blocks, and tables across layout widths.

GitOrigin-RevId: 980ee2ed0b0e201b581a3a301fa04d796c65af2e
2026-10-03 00:02:11 +00:00
Felipe Coury 0b43721d8d Copy selected file paths as plain text in the TUI (#49564)
## Why

Copying a rendered local file target such as `repo/foo_bar!` should preserve the selected path without adding Markdown escapes.

## What changed

Treat selections contained within rendered file targets as plain text, including partial selections and targets in tables. Coalesce adjacent file targets and inline code into literal ranges while preserving Markdown escaping when the selection includes surrounding content.

## Testing

Add regression coverage for partial paths, adjacent literal spans, styled links, table cells, special characters, and mixed selections at narrow and wide rendering widths.

GitOrigin-RevId: 94bcdacf14b013f9198cb84adfdb237eb644dd48
2026-09-30 10:21:00 +00:00
Felipe Coury 3074be908a Copy selections within inline code as plain text (#49041)
## Why

Copying text selected entirely within inline code added Markdown backticks that were not part of the selected content.

## What changed

Return only the selected content as plain text when the selection is contained within one inline code span, including in a single table cell. Preserve Markdown formatting for selections that also include surrounding content, and continue filtering control characters from table copies.

## Testing

Add regression coverage for full and partial inline code selections, embedded backticks, Unicode, whitespace, wrapping and resizing, and table selections with mixed content or control characters.

GitOrigin-RevId: c63e13cb781f9fca28ae53500cb4f9ae08b72c96
2026-09-28 17:51:00 +00:00
Felipe Coury 75a714843b Preserve Markdown tables and whitespace when copying TUI responses (#48549)
## Why

Copied table selections became code blocks containing the rendered grid, losing table structure. Stripping trailing whitespace from completed responses also removed Markdown hard breaks and spaces in code.

## What changed

- Reconstruct Markdown tables from selected cells across grid and record layouts, preserving alignment, inline formatting, and list or blockquote nesting.
- Copy a single selected cell as inline content and leave unselected cells empty without adding their text. Escape literal pipes in table code spans and link destinations.
- Preserve trailing whitespace on lines unchanged by assistant directive removal.
- Keep blank rows in copied text without painting newline selection highlights on empty rows.

## Testing

Add regression coverage for wrapped and rewrapped tables, partial selections, empty cells, literal pipes, and separate table and code blocks. Update snapshots for nested tables and selection highlights, and verify completed-response copying preserves hard breaks and code whitespace.

GitOrigin-RevId: 661e4c8331f2737bedff286548f9343bac44e0cb
2026-09-26 21:58:39 +00:00
Felipe Coury 16c21e3f36 Preserve table cell source metadata through TUI rendering (#48548)
## What changed

- Retain table identity, column alignments, cell coordinates, source byte ranges, and inline formatting in copy metadata.
- Carry cell fragments through grid padding, wrapping, key/value layouts, and pipe output, including escaped pipes and empty cells.
- Preserve logical source metadata when remapping wrapped lines, even without hyperlinks.

## Testing

Add coverage for cell fragments across narrow and wide layouts, blank table continuations, and Markdown selection copy structure and visible transformations.

GitOrigin-RevId: 8422f224cffe2e74813394f0623b9167bdd4ac59
2026-09-26 21:58:17 +00:00