Spaces:
Running
Running
sync: upstream 9194f15 + custom addons (KeyRotator, RotatingChatTransport, sol/terra/luna, ScannerTrap, health, Py3.12 compat)
e99df76 Download src/free_claude_code/cli/clipboard.py from dherain24/claude-proxy: direct link, hf CLI and curl.
- Browser
- Download file 391 Bytes
-
https://huggingface.co/spaces/dherain24/claude-proxy/resolve/main/src/free_claude_code/cli/clipboard.py
- Command line
-
hf download hf://spaces/dherain24/claude-proxy/src/free_claude_code/cli/clipboard.py
-
curl -L -o clipboard.py https://huggingface.co/spaces/dherain24/claude-proxy/resolve/main/src/free_claude_code/cli/clipboard.py
391 Bytes
| from __future__ import annotations | |
| """Best-effort text copy for the diagnostic command.""" | |
| import pyperclip | |
| class ClipboardUnavailable(Exception): | |
| """The current desktop cannot accept clipboard text.""" | |
| def copy_text(text: str) -> None: | |
| try: | |
| pyperclip.copy(text) | |
| except (pyperclip.PyperclipException, OSError) as error: | |
| raise ClipboardUnavailable from error | |