fix: move page ai launcher to pi lab
This commit is contained in:
@@ -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/);
|
||||
|
||||
Reference in New Issue
Block a user