feat(terminal): right-click send for selected text#85
Merged
Conversation
Adds a one-click way to push the current terminal selection back into the same pane's PTY and execute it, without going through copy/paste.
Five tasks across two pure helpers (canSendSelection, prepareSendPayload), a pair of i18n labels, and a wiring change in TerminalView.vue.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a
发送 / Senditem to the desktop terminal's right-click menu. Sends the current xterm selection back to the same pane's PTY with a trailing\r, executing immediately. Bypassesterm.paste()deliberately so bracketed-paste mode doesn't swallow the Enter in zsh / bash / TUIs that have bracketed paste on.\n,\r\n,\r) normalized to a single\rper line, with one final\rappended.remote_permission != viewAND this client is the current driver. Greyed otherwise.canSendSelection,prepareSendPayload) live indesktop/frontend/src/lib/terminalContextMenu.tsso the SFC stays a thin wrapper.Spec:
docs/superpowers/specs/2026-05-30-terminal-right-click-send-design.mdPlan:
docs/superpowers/plans/2026-05-30-terminal-right-click-send.mdTest Plan
cd desktop/frontend && npx vitest run— 71 files / 607 tests passcd desktop/frontend && npm run build— vue-tsc + vite cleanwails dev: select an old command from scrollback → right-click → 发送 → command re-runsremote_permission = view→ 发送 is greyed