跳到主要内容

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

浏览文件

desktop-entry.jsx

35 行 · 1.0 KB历史下载
1import React, { lazy, Suspense } from "react";
2import { createRoot } from "react-dom/client";
3import { installDiagnostics } from "./diagnostics.mjs";
4import { DiagnosticBoundary } from "./diagnostics.jsx";
5import { ClientRoot } from "./remote-hosts";
6import { native } from "./api";
7import "./style.css";
8
9const Workbench = lazy(() => import("./main.jsx"));
10
11installDiagnostics();
12// Keep the native menu usable while the workbench is loading or disconnected.
13window.cageNativeAction = (command) => {
14 if (window.cageWorkbenchAction) return window.cageWorkbenchAction(command);
15 if (command === "quit") return native("quitNow");
16};
17createRoot(document.getElementById("root")).render(
18 <DiagnosticBoundary>
19 <ClientRoot>
20 <Suspense
21 fallback={
22 <div className="client-loading" role="status">
23 正在打开工作台…
24 </div>
25 }
26 >
27 <Workbench />
28 </Suspense>
29 </ClientRoot>
30 </DiagnosticBoundary>,
31);
32
33window.addEventListener("hashchange", () => {
34 if (location.hash) location.reload();
35});