mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-19 14:01:15 +00:00
feat(coding-agent): add Android/Termux support
- Make @mariozechner/clipboard an optional dependency - Lazy-load clipboard module with graceful fallback - Add Termux clipboard support via termux-clipboard-set - Skip image clipboard on Termux (not supported) fixes #1164
This commit is contained in:
parent
bc3fda518d
commit
cb850676e7
3 changed files with 33 additions and 4 deletions
|
|
@ -17,7 +17,16 @@ export function copyToClipboard(text: string): void {
|
|||
} else if (p === "win32") {
|
||||
execSync("clip", options);
|
||||
} else {
|
||||
// Linux - try wl-copy for Wayland, fall back to xclip/xsel for X11
|
||||
// Linux. Try Termux, Wayland, or X11 clipboard tools.
|
||||
if (process.env.TERMUX_VERSION) {
|
||||
try {
|
||||
execSync("termux-clipboard-set", options);
|
||||
return;
|
||||
} catch {
|
||||
// Fall back to Wayland or X11 tools.
|
||||
}
|
||||
}
|
||||
|
||||
const isWayland = isWaylandSession();
|
||||
if (isWayland) {
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue