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
+6
View File
@@ -49,6 +49,12 @@ const missing = [
...requiredTools.filter((name) => !tools.has(name)).map((name) => `tool:${name}`),
...requiredCommands.filter((name) => !commands.has(name)).map((name) => `command:/${name}`),
];
if (process.env.PI_MEMORY_NO_SEARCH === "1" && tools.has("memory_search")) {
missing.push("unexpected tool:memory_search in lightweight memory mode");
}
if (process.env.PI_MEMORY_NO_SEARCH !== "1" && !tools.has("memory_search")) {
missing.push("tool:memory_search");
}
if (missing.length > 0) {
console.error(`Managed Pi profile is incomplete: ${missing.join(", ")}`);