mirror of
https://github.com/openai/codex.git
synced 2026-11-16 22:00:36 +00:00
## Why Single-line ASCII copies can use the lightweight Windows clipboard writer without starting PowerShell. ## What changed - Try `clip.exe` for printable ASCII text and tabs, falling back to PowerShell if it is unavailable or fails. Bound discovery and execution by short deadlines. - Keep PowerShell for Unicode, multiline text, and other control characters. Pad even-length ASCII input with a trailing NUL to prevent `clip.exe` from interpreting it as UTF-16. - Preserve precedence and command compatibility for installed Linux `powershell.exe` adapters, and defer Windows PowerShell discovery until needed. ## Testing Extend WSL clipboard tests to cover input eligibility and padding, adapter precedence, and expired deadlines. GitOrigin-RevId: 69b66ec1243452d0a4df119563321f38d177bea9