Skip to content

feat(terminal): selection-aware copy, image paste, and Thai input fix#776

Open
Piya-Boy wants to merge 3 commits into
crynta:mainfrom
Piya-Boy:piya-dev
Open

feat(terminal): selection-aware copy, image paste, and Thai input fix#776
Piya-Boy wants to merge 3 commits into
crynta:mainfrom
Piya-Boy:piya-dev

Conversation

@Piya-Boy

Copy link
Copy Markdown

Summary

  • Add selection-aware Ctrl+C copy in terminal (copies selection if present, otherwise passes through)
  • Add Ctrl+V / Cmd+V image paste via temp file in terminal
  • Fix Thai character input in terminal and AI composer

Test plan

  • Select text in terminal → Ctrl+C copies selection
  • No selection → Ctrl+C passes through to process
  • Ctrl+V with image in clipboard → pastes image via temp file
  • Thai characters input correctly in terminal and AI composer

Piya-Boy added 3 commits June 10, 2026 17:20
When clipboard contains only an image, write it to a temp PNG file via
a Rust command and paste the file path into the terminal. Supports AI
CLI tools (e.g. Claude Code) that accept image paths. Temp file is
deleted automatically after 5 minutes.

- Add write_temp_image Tauri command (Rust, base64 decode → temp dir)
- Add base64 crate dependency
- Refactor pasteClipboard helper: image path on image-only clipboard,
  plain text otherwise
- Add isMacPaste (Cmd+V) for macOS cross-platform support
In terminal: replace keyCode === 229 check with event.key === 'Process'
so Thai tone marks (which Chromium also reports with keyCode 229) are
forwarded to xterm's textarea-diff path instead of being silently dropped.

In AI composer: skip setValue during IME composition so React does not
overwrite the textarea mid-composition, which caused Thai characters to
disappear on compositionend.
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.

1 participant