feat(tui): add double-click to copy word in TUI messages by kearns-cu · Pull Request #8311 · anomalyco/opencode · GitHub
Skip to content

feat(tui): add double-click to copy word in TUI messages#8311

Closed
kearns-cu wants to merge 1 commit into
anomalyco:devfrom
kearns-cu:feat/tui-word-copy
Closed

feat(tui): add double-click to copy word in TUI messages#8311
kearns-cu wants to merge 1 commit into
anomalyco:devfrom
kearns-cu:feat/tui-word-copy

Conversation

@kearns-cu

Copy link
Copy Markdown
Contributor

Summary

Changes
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

Closes: #3091


tldr: Double click to copy words, triple click to copy lines.

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
Copy Markdown
Contributor

@github-actions

Copy link
Copy Markdown
Contributor

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