Skip to content

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 sst#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 sst/opentui#411 (merged)
@rekram1-node rekram1-node merged commit e8ac0b6 into sst:dev Dec 24, 2025
2 checks passed
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