Skip to content

Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins

test(file-manager): stage the plugin's remote helper beside main.js

SeanLiu326f196b7ca104e
diff --git a/apps/desktop/test/file-manager-directory-location-user-path.e2e.mjs b/apps/desktop/test/file-manager-directory-location-user-path.e2e.mjs
index 53e8018ca..c2995a70c 100644
--- a/apps/desktop/test/file-manager-directory-location-user-path.e2e.mjs
+++ b/apps/desktop/test/file-manager-directory-location-user-path.e2e.mjs
@@ -231,15 +231,17 @@ test(
await writeFile(join(scratch, "run", "artifact.txt"), "artifact\n");
// The preload requires the vendored plugin from the app resources; stage
- // a copy next to the workspace the fixture constructs (main.js only
- // requires node builtins, so a copy is self-contained and needs no
- // symlink privilege).
+ // its runtime files next to the workspace the fixture constructs. main.js
+ // requires its sibling remote-workspace.js, so both travel together; a
+ // copy needs no symlink privilege.
const pluginStage = join(temp, "staged");
await mkdir(join(pluginStage, "pi.file-manager"), { recursive: true });
- await copyFile(
- join(root, "apps/desktop/resources/plugins/pi.file-manager/main.js"),
- join(pluginStage, "pi.file-manager", "main.js"),
- );
+ for (const runtimeFile of ["main.js", "remote-workspace.js"]) {
+ await copyFile(
+ join(root, "apps/desktop/resources/plugins/pi.file-manager", runtimeFile),
+ join(pluginStage, "pi.file-manager", runtimeFile),
+ );
+ }
const preload = String.raw`
const { contextBridge } = require("electron");