跳到主要内容

Claude Cage · 面向 Claude 的隔离开发环境,支持桌面工作台、多账号、远程部署与移动端连接。上游 Lee-xeo/Claude-Cage 完整源码镜像,非灵栈原创;主许可 MIT,第三方组件遵循各自许可。来源:https://github.com/Lee-xeo/Claude-Cage 。手动同步,不附带 Release 安装包。

浏览文件

remote-cursor.mjs

23 行 · 663 B历史下载
1// noVNC hides the local cursor until the server supplies a visible shape.
2// Headless macOS guests may never do so, so keep a native arrow as a fallback.
3export function installLocalCursorFallback(cursor, enabled) {
4 if (!enabled) return;
5
6 const change = cursor.change.bind(cursor);
7 const clear = cursor.clear.bind(cursor);
8 const fallback = () => {
9 clear();
10 cursor._target.style.cursor = "default";
11 };
12
13 cursor.clear = fallback;
14 cursor.change = (rgba, hotx, hoty, w, h) => {
15 for (let i = 3; i < rgba.length; i += 4) {
16 if (rgba[i] !== 0) {
17 change(rgba, hotx, hoty, w, h);
18 return;
19 }
20 }
21 fallback();
22 };
23}