mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-03 19:20:22 +00:00
fix(memory-core): preserve dated DREAMS trail
This commit is contained in:
@@ -159,7 +159,11 @@ describe("listMemoryFiles", () => {
|
||||
});
|
||||
|
||||
describe("isMemoryPath", () => {
|
||||
it("allows explicit access to top-level dreams.md", () => {
|
||||
it("allows explicit access to top-level DREAMS.md", () => {
|
||||
expect(isMemoryPath("DREAMS.md")).toBe(true);
|
||||
});
|
||||
|
||||
it("keeps explicit access compatible with legacy dreams.md", () => {
|
||||
expect(isMemoryPath("dreams.md")).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -77,7 +77,12 @@ export function isMemoryPath(relPath: string): boolean {
|
||||
if (!normalized) {
|
||||
return false;
|
||||
}
|
||||
if (normalized === "MEMORY.md" || normalized === "memory.md" || normalized === "dreams.md") {
|
||||
if (
|
||||
normalized === "MEMORY.md" ||
|
||||
normalized === "memory.md" ||
|
||||
normalized === "DREAMS.md" ||
|
||||
normalized === "dreams.md"
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
return normalized.startsWith("memory/");
|
||||
|
||||
Reference in New Issue
Block a user