Skip to content

feat(tui): console copy-to-clipboard via opentui#5658

Merged
rekram1-node merged 5 commits intoanomalyco:devfrom
edlsh:feat/console-click-to-copy
Dec 24, 2025
Merged

feat(tui): console copy-to-clipboard via opentui#5658
rekram1-node merged 5 commits intoanomalyco:devfrom
edlsh:feat/console-click-to-copy

Conversation

@edlsh
Copy link
Contributor

@edlsh edlsh commented Dec 17, 2025

Closes #4885

Supersedes #5239 — uses opentui's new onCopySelection callback from sst/opentui#411.

Changes

  • Updated @opentui/core and @opentui/solid to 0.1.61
  • Wired renderer.console.onCopySelection callback for clipboard integration
  • Removed manual MouseParser implementation (now handled by opentui)

Features (from opentui)

  • Mouse selection: Click and drag to select text in console
  • [Copy] button: Clickable button in console title bar
  • Keyboard shortcut: Ctrl+Shift+C to copy selection
  • OSC52 support: Works in tmux and terminals supporting OSC52

Context: #4885 (comment)

edlsh and others added 4 commits December 16, 2025 20:13
The click-to-copy feature would fail when console was visible but
unfocused because the state tracker assumed toggle() was a simple
on/off, but opentui's toggle() has 3 states:

- hidden → show+focus
- visible+focused → hide
- visible+unfocused → focus (stays visible!)

When user toggled an unfocused console, the old code would flip
consoleOpen to false even though the console remained visible,
breaking the click detection.

Now tracks both visible AND focused state to match opentui's
actual behavior, ensuring click-to-copy works reliably.

Closes anomalyco#4885
- Update @opentui/core and @opentui/solid to 0.1.61
- Replace manual click-to-copy with opentui's onCopySelection callback
- Remove MouseParser and console state tracking (now handled by opentui)
- Simplify toggle console command

Depends on anomalyco/opentui#411 (merged)
@rekram1-node rekram1-node merged commit e8ac0b6 into anomalyco:dev Dec 24, 2025
2 checks passed
rekram1-node added a commit that referenced this pull request Dec 27, 2025
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
anntnzrb pushed a commit to anntnzrb/opencode-1 that referenced this pull request Dec 29, 2025
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Copy console text on click

2 participants