Commit Graph

2 Commits

  • feat(tui2): add multi-click transcript selection (#8471)
    Support multi-click transcript selection using transcript/viewport
    coordinates
    (wrapped visual line index + content column), not terminal buffer
    positions.
    
    Gestures:
    - double click: select word-ish token under cursor
    - triple click: select entire wrapped line
    - quad click: select paragraph (contiguous non-empty wrapped lines)
    - quint+ click: select the entire history cell (all wrapped lines
    belonging to a
      single `HistoryCell`, including blank lines inside the cell)
    
    Selection expansion rebuilds the wrapped transcript view from
    `HistoryCell::display_lines(width)` so boundaries match on-screen
    wrapping during
    scroll/resize/streaming reflow. Click grouping is resilient to minor
    drag jitter
    (some terminals emit tiny Drag events during clicks) and becomes more
    tolerant as
    the sequence progresses so quad/quint clicks are practical.
    
    Tests cover expansion (word/line/paragraph/cell), sequence resets
    (timing, motion,
    line changes, real drags), drag jitter, and behavior on spacer lines
    between
    history cells (paragraph/cell selection prefers the cell above).
  • feat(tui2): add copy selection shortcut + UI affordance (#8462)
    - Detect Ctrl+Shift+C vs VS Code Ctrl+Y and surface in footer hints
    - Render clickable “⧉ copy” pill near transcript selection (hidden while
    dragging)
    - Handle copy hotkey + click to copy selection
    - Document updated copy UX
    
    VSCode:
    <img width="1095" height="413" alt="image"
    src="https://github.com/user-attachments/assets/84be0c82-4762-4c3e-80a4-c751c078bdaa"
    />
    
    Ghosty:
    <img width="505" height="68" alt="image"
    src="https://github.com/user-attachments/assets/109cc1a1-f029-4f7e-a141-4c6ed2da7338"
    />