跳到主要内容

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

提交记录
修改desktop/linux/cage-desktop.c+1 −0看文件
@@ -1,4 +1,5 @@
11/* Native Linux host for the shared Cage workbench. */
2新增:#define _POSIX_C_SOURCE 200809L
23#include <gtk/gtk.h>
34#include <webkit2/webkit2.h>
45#include <json-glib/json-glib.h>
修改ui/scripts/workbench-fixture.mjs+7 −0看文件
@@ -206,6 +206,13 @@ export async function createWorkbench({
206206 result = state.settings;
207207 else if (path === "/status")
208208 result = { ...state.status, workspace: state.settings.workspace };
209新增: else if (path === "/projects/open") {
210新增: if (state.failJob) return route.fulfill({ status: 400, body: "项目文件夹连接失败,原项目保持不变" });
211新增: if (!body.add && !state.status.projects.includes(body.workspace)) return route.fulfill({ status: 400, body: "请选择已授权的项目" });
212新增: if (body.add && !state.status.projects.includes(body.workspace)) state.status.projects.push(body.workspace);
213新增: if (body.activate) state.settings.workspace = body.workspace;
214新增: result = { workspace: body.workspace };
215新增: }
209216 else if (path === "/settings") {
210217 state.saves.push(body);
211218 if (state.failSave)
修改ui/scripts/workbench-smoke.mjs+5 −4看文件
@@ -28,13 +28,13 @@ try {
2828 .getByRole("navigation", { name: "主导航" })
2929 .getByRole("button", { name: /^打开项目/ })
3030 .click();
31删除: await page.getByRole("button", { name: "选择文件夹…", exact: true }).click();
31新增: await page.getByRole("button", { name: "添加本机项目…", exact: true }).click();
3232 await page.waitForFunction(
3333 (path) => document.getElementById("project-path")?.value === path,
3434 state.chosenFolder,
3535 );
3636 assert.equal(
37删除: await page.getByLabel("项目文件夹", { exact: true }).inputValue(),
37新增: await page.getByLabel("新项目文件夹", { exact: true }).inputValue(),
3838 state.chosenFolder,
3939 );
4040 state.failJob = true;
@@ -49,7 +49,7 @@ try {
4949 .filter({ hasText: "项目文件夹连接失败" })
5050 .waitFor();
5151 assert.equal(
52删除: await page.getByLabel("项目文件夹", { exact: true }).inputValue(),
52新增: await page.getByLabel("新项目文件夹", { exact: true }).inputValue(),
5353 state.chosenFolder,
5454 );
5555 assert.ok(state.settings.workspace.endsWith(".claude-cage-workspace"));
@@ -255,8 +255,9 @@ try {
255255 .getByRole("navigation", { name: "主导航" })
256256 .getByRole("button", { name: /^打开项目/ })
257257 .click();
258新增: await page.getByRole("button", { name: "添加本机项目…", exact: true }).click();
258259 await page
259删除: .getByLabel("项目文件夹", { exact: true })
260新增: .getByLabel("新项目文件夹", { exact: true })
260261 .fill("/Users/shihao/Projects/another-project");
261262 await page
262263 .getByRole("dialog")