Skip to content

Conversation

@kearns-cu
Copy link

Add multi-click text copy functionality for messages in the TUI:

  • Double-click copies the word at cursor position
  • Triple-click copies the entire line
  • Works on both user and assistant messages

Files:

  • multi-click.ts: Multi-click detector with timeout handling
  • text-boundaries.ts: Position-to-text mapping for word extraction
  • use-multi-click-text-copy.ts: Hook integrating detection and clipboard
  • session/index.tsx: Integration into TextPart, ReasoningPart, UserMessage

What does this PR do?

How did you verify your code works?

Add multi-click text copy functionality for messages in the TUI:
- Double-click copies the word at cursor position
- Triple-click copies the entire line
- Works on both user and assistant messages

Files:
- multi-click.ts: Multi-click detector with timeout handling
- text-boundaries.ts: Position-to-text mapping for word extraction
- use-multi-click-text-copy.ts: Hook integrating detection and clipboard
- session/index.tsx: Integration into TextPart, ReasoningPart, UserMessage
@github-actions
Copy link
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

Potential Duplicate Found

PR #6285: feat(tui): add double-click to copy word

Related PRs (may be relevant context)

PR #6444: feat: Copy Assistant Response Chain

PR #7520: feat: add input_copy and input_cut keybindings for keyboard-based text selection

@kearns-cu kearns-cu closed this Jan 14, 2026
@kearns-cu kearns-cu deleted the feat/tui-word-copy branch January 14, 2026 00:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant