fix: make qmd memory search opt-in (#6)

Co-authored-by: luckyyzh <luckyyzh@users.noreply.github.com>
This commit is contained in:
Zihao Yang
2026-07-31 23:37:06 +08:00
committed by GitHub
co-authored by luckyyzh
parent 3b48681852
commit 551c59413e
9 changed files with 289 additions and 3 deletions
+5
View File
@@ -1,5 +1,6 @@
import { spawn } from "node:child_process";
import { join } from "node:path";
import { configurePiMemory } from "./configure-pi-memory.mjs";
import { managedEnvironment, rootDir } from "./profile.mjs";
import {
isLocalPortListening,
@@ -21,6 +22,10 @@ if (!npmCliPath) {
}
const childEnvironment = managedEnvironment();
const memoryConfiguration = configurePiMemory({ quiet: true });
if (memoryConfiguration.status === "missing") {
console.warn("[memory] pi-memory is not installed; run npm run setup to enable managed memory");
}
if (await isLocalPortListening(30141)) {
console.log("[storage] skipped automatic maintenance because Pi Web is already running");
} else {