fix: move page ai launcher to pi lab

This commit is contained in:
Agent Board
2026-07-13 09:00:19 +08:00
parent 2f5902e3e7
commit d6a25afa0a
11 changed files with 80 additions and 73 deletions
+9
View File
@@ -11,6 +11,7 @@ const {
isPortFree,
resolveRuntimePlan,
shouldStartBackend,
shouldStartOpencode,
stopStaleMnoteWebCargoProcesses,
} = require("./desktop-hot.js");
@@ -188,6 +189,14 @@ test("默认跳过 FastAPI 后端,只有显式开启时才启动", () => {
assert.equal(shouldStartBackend({ ENABLE_BACKEND: "1", SKIP_BACKEND: "1" }), false);
});
test("默认跳过 opencode,只有显式开启时才启动", () => {
assert.equal(shouldStartOpencode({}), false);
assert.equal(shouldStartOpencode({ ENABLE_OPENCODE: "1" }), true);
assert.equal(shouldStartOpencode({ ENABLE_OPENCODE: "true" }), true);
assert.equal(shouldStartOpencode({ OPENCODE_CMD: "custom-opencode" }), true);
assert.equal(shouldStartOpencode({ ENABLE_OPENCODE: "1", SKIP_OPENCODE: "1" }), false);
});
test("opencode 默认命令使用 MNote 专用运行目录", () => {
const command = buildDefaultOpencodeCommand(18085);
assert.match(command, /\/mnt\/Data1T\/Mnote_data\/opencode\/runtime/);