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
+3 -2
View File
@@ -6,7 +6,7 @@
* - ENABLE_BACKEND:设为 "1" or "true" 时启用默认 FastAPI 后端
* - BACKEND_CMD:覆盖 FastAPI 启动命令;设置后即视为显式启用后端
* - SKIP_BACKEND:设为 "1" or "true" 可强制跳过 FastAPI 后端
* - ENABLE_OPENCODE:设为 "1" or "true" 时启用 opencode serve
* - ENABLE_OPENCODE:设为 "1" or "true" 时启用 opencode serve;默认不启动
* - OPENCODE_CMD:覆盖 opencode 启动命令;设置后即视为显式启用 opencode
* - SKIP_OPENCODE:设为 "1" or "true" 可强制跳过 opencode
* - MNOTE_OPENCODE_XDG_ROOT / MNOTE_OPENCODE_HOMEopencode 专用运行目录
@@ -128,7 +128,7 @@ function shouldStartBackend(env = process.env) {
function shouldStartOpencode(env = process.env) {
if (isEnabledEnv(env.SKIP_OPENCODE)) return false;
if (String(env.OPENCODE_CMD || "").trim()) return true;
return true;
return isEnabledEnv(env.ENABLE_OPENCODE);
}
function resolveRuntimePlan(env = process.env) {
@@ -757,6 +757,7 @@ module.exports = {
resolveBackendExecutable,
schedulePiLabWarmup,
shouldStartBackend,
shouldStartOpencode,
stopStaleMnoteWebCargoProcesses,
terminatePid,
};