pi-mono/packages/tui/native/win32/README.md
Armin Ronacher caf6dfe731
feat(tui): Simplify clipboard handling (#9163)
Replace the external clipboard dependency with small macOS, Windows,
and X11 helpers and integrate them into coding-agent.

Run native clipboard operations on worker threads and make command
fallbacks asynchronous. Preserve incremental X11 transfers, legacy text
encodings, native image formats, and existing Wayland and platform tools.

Include native prebuilds with ARM64 page alignment, packaging updates,
and regression coverage.
2026-09-05 23:52:32 +02:00

943 B

Windows native prebuilds

Provides console input setup, modifier-key state, and asynchronous text/image clipboard access. Links to kernel32 and user32; no Node headers are required.

Building

On Windows, install Visual Studio's "Desktop development with C++" workload, then run from the repository root to build x64 and arm64:

npm --prefix packages/tui run build:native:win32

For cross-builds or custom toolchains, provide MinGW-compatible compilers:

PI_TUI_WIN32_TOOLCHAIN=mingw \
CC_X64=/path/to/x86_64-w64-mingw32-gcc \
CC_ARM64=/path/to/aarch64-w64-mingw32-gcc \
npm --prefix packages/tui run build:native:win32

Testing clipboard writes

On a Windows test desktop, run from packages/tui in PowerShell:

$env:PI_TEST_NATIVE_CLIPBOARD = "1"
node --test test/native-platform.test.ts

This opt-in test checks native text writes and reads. It replaces the system clipboard contents.