mirror of
https://github.com/Youzini-afk/ST-Bionic-Memory-Ecology.git
synced 2026-06-13 18:31:16 +08:00
chore: 移除 Recall Card 排查用的 ST-BME:DIAG 临时日志
Made-with: Cursor
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
// ST-BME: 召回输入解析与注入控制器(纯函数)
|
||||
|
||||
import { debugLog, debugWarn } from "./debug-logging.js";
|
||||
import { debugLog } from "./debug-logging.js";
|
||||
|
||||
export function buildRecallRecentMessagesController(
|
||||
chat,
|
||||
@@ -289,12 +289,10 @@ export function applyRecallInjectionController(
|
||||
}
|
||||
|
||||
export async function runRecallController(runtime, options = {}) {
|
||||
debugWarn("[ST-BME:DIAG:RECALL] runRecallController entered");
|
||||
if (runtime.getIsRecalling()) {
|
||||
runtime.abortRecallStageWithReason("旧召回已取消,正在启动新的召回");
|
||||
const settle = await runtime.waitForActiveRecallToSettle();
|
||||
if (!settle.settled && runtime.getIsRecalling()) {
|
||||
debugWarn("[ST-BME:DIAG:RECALL] EXIT: 上一轮召回仍在清理");
|
||||
runtime.setLastRecallStatus(
|
||||
"召回忙",
|
||||
"上一轮召回仍在清理,请稍后重试",
|
||||
@@ -310,18 +308,14 @@ export async function runRecallController(runtime, options = {}) {
|
||||
}
|
||||
|
||||
const hasGraph = !!runtime.getCurrentGraph();
|
||||
debugWarn("[ST-BME:DIAG:RECALL] hasGraph:", hasGraph);
|
||||
if (!hasGraph) {
|
||||
debugWarn("[ST-BME:DIAG:RECALL] EXIT: 当前无图谱");
|
||||
return runtime.createRecallRunResult("skipped", {
|
||||
reason: "当前无图谱",
|
||||
});
|
||||
}
|
||||
|
||||
const settings = runtime.getSettings();
|
||||
debugWarn("[ST-BME:DIAG:RECALL] settings.enabled:", settings.enabled, "recallEnabled:", settings.recallEnabled);
|
||||
if (!settings.enabled || !settings.recallEnabled) {
|
||||
debugWarn("[ST-BME:DIAG:RECALL] EXIT: 召回功能未启用");
|
||||
return runtime.createRecallRunResult("skipped", {
|
||||
reason: "召回功能未启用",
|
||||
});
|
||||
@@ -330,12 +324,8 @@ export async function runRecallController(runtime, options = {}) {
|
||||
typeof runtime.isGraphReadableForRecall === "function"
|
||||
? runtime.isGraphReadableForRecall()
|
||||
: runtime.isGraphReadable();
|
||||
const chatId = typeof runtime.getCurrentChatId === "function" ? runtime.getCurrentChatId() : "(no fn)";
|
||||
const loadState = runtime.getGraphPersistenceLoadState?.() || "(no fn)";
|
||||
debugWarn("[ST-BME:DIAG:RECALL] isReadableForRecall:", isReadableForRecall, "chatId:", chatId, "loadState:", loadState);
|
||||
if (!isReadableForRecall) {
|
||||
const reason = runtime.getGraphMutationBlockReason("召回");
|
||||
debugWarn("[ST-BME:DIAG:RECALL] EXIT: 图谱不可读 -", reason);
|
||||
runtime.setLastRecallStatus("等待图谱加载", reason, "warning", {
|
||||
syncRuntime: true,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user