mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-13 02:01:16 +00:00
test(doctor): mock memory-core runtime seam
This commit is contained in:
5
src/gateway/server-methods/doctor.memory-core-runtime.ts
Normal file
5
src/gateway/server-methods/doctor.memory-core-runtime.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export {
|
||||
removeBackfillDiaryEntries,
|
||||
previewGroundedRemMarkdown,
|
||||
writeBackfillDiaryEntries,
|
||||
} from "../../../extensions/memory-core/api.js";
|
||||
@@ -36,11 +36,8 @@ vi.mock("../../plugins/memory-runtime.js", () => ({
|
||||
getActiveMemorySearchManager: getMemorySearchManager,
|
||||
}));
|
||||
|
||||
vi.mock("../../../extensions/memory-core/src/rem-evidence.js", () => ({
|
||||
vi.mock("./doctor.memory-core-runtime.js", () => ({
|
||||
previewGroundedRemMarkdown,
|
||||
}));
|
||||
|
||||
vi.mock("../../../extensions/memory-core/src/dreaming-narrative.js", () => ({
|
||||
writeBackfillDiaryEntries,
|
||||
removeBackfillDiaryEntries,
|
||||
}));
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
import fs from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
import {
|
||||
removeBackfillDiaryEntries,
|
||||
previewGroundedRemMarkdown,
|
||||
writeBackfillDiaryEntries,
|
||||
} from "../../../extensions/memory-core/api.js";
|
||||
import { resolveAgentWorkspaceDir, resolveDefaultAgentId } from "../../agents/agent-scope.js";
|
||||
import { loadConfig } from "../../config/config.js";
|
||||
import type { OpenClawConfig } from "../../config/config.js";
|
||||
@@ -19,6 +14,11 @@ import {
|
||||
} from "../../memory-host-sdk/dreaming.js";
|
||||
import { getActiveMemorySearchManager } from "../../plugins/memory-runtime.js";
|
||||
import { formatError } from "../server-utils.js";
|
||||
import {
|
||||
removeBackfillDiaryEntries,
|
||||
previewGroundedRemMarkdown,
|
||||
writeBackfillDiaryEntries,
|
||||
} from "./doctor.memory-core-runtime.js";
|
||||
import { asRecord, normalizeTrimmedString } from "./record-shared.js";
|
||||
import type { GatewayRequestHandlers } from "./types.js";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user