Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins
TypeScript ai-agentcoding-agentdesktop-appelectronglobali18nlocal-firstmcppipi-agentpi-desktoppluginsreactrusttypescript
test: 排除 native 文件路由回归中的 Host 更换干扰
geng yue16a2cd6bb633
diff --git a/apps/desktop/test/native-workspace-files.test.mjs b/apps/desktop/test/native-workspace-files.test.mjsindex b173dc779..5a4cb48cc 100644--- a/apps/desktop/test/native-workspace-files.test.mjs+++ b/apps/desktop/test/native-workspace-files.test.mjs@@ -23,9 +23,10 @@ test("unavailable native sources fail closed without Desktop workspace fallback"test("a replaced sidecar cannot publish a stale native file root", async () => {let finish;+ const host = { call: () => assert.fail("native identity reached Desktop storage") };let sidecar = { call: () => new Promise(resolve => { finish = resolve; }) };- const pending = remoteWorkspaceForFiles(() => ({ call() {} }), "native-pi:fixture", () => sidecar);+ const pending = remoteWorkspaceForFiles(() => host, "native-pi:fixture", () => sidecar);sidecar = null;finish({ session: { projectPath: "C:/fixture" } });- await assert.rejects(pending, { errorCode: "HOST_UNAVAILABLE" });+ await assert.rejects(pending, { errorCode: "HOST_UNAVAILABLE", message: "session source replaced" });});