mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-09 03:22:40 +00:00
chore(deadcode): drop retired memory wiki vault metadata
This commit is contained in:
@@ -35,9 +35,12 @@ describe("initializeMemoryWikiVault", () => {
|
||||
await expect(fs.readFile(path.join(rootDir, "WIKI.md"), "utf8")).resolves.toContain(
|
||||
"Render mode: `obsidian`",
|
||||
);
|
||||
await expect(
|
||||
fs.readFile(path.join(rootDir, ".openclaw-wiki", "state.json"), "utf8"),
|
||||
).resolves.toContain('"renderMode": "obsidian"');
|
||||
await expect(fs.access(path.join(rootDir, ".openclaw-wiki", "state.json"))).rejects.toThrow(
|
||||
/ENOENT/,
|
||||
);
|
||||
await expect(fs.access(path.join(rootDir, ".openclaw-wiki", "locks"))).rejects.toThrow(
|
||||
/ENOENT/,
|
||||
);
|
||||
});
|
||||
|
||||
it("is idempotent when the vault already exists", async () => {
|
||||
|
||||
@@ -20,7 +20,6 @@ export const WIKI_VAULT_DIRECTORIES = [
|
||||
"_attachments",
|
||||
"_views",
|
||||
".openclaw-wiki",
|
||||
".openclaw-wiki/locks",
|
||||
".openclaw-wiki/cache",
|
||||
] as const;
|
||||
|
||||
@@ -125,22 +124,6 @@ export async function initializeMemoryWikiVault(
|
||||
withTrailingNewline("# Inbox\n\nDrop raw ideas, questions, and source links here.\n"),
|
||||
createdFiles,
|
||||
);
|
||||
await writeFileIfMissing(
|
||||
rootDir,
|
||||
".openclaw-wiki/state.json",
|
||||
withTrailingNewline(
|
||||
JSON.stringify(
|
||||
{
|
||||
version: 1,
|
||||
createdAt: resolveMemoryWikiTimestamp(options?.nowMs),
|
||||
renderMode: config.vault.renderMode,
|
||||
},
|
||||
null,
|
||||
2,
|
||||
),
|
||||
),
|
||||
createdFiles,
|
||||
);
|
||||
await writeFileIfMissing(rootDir, ".openclaw-wiki/log.jsonl", "", createdFiles);
|
||||
|
||||
if (createdDirectories.length > 0 || createdFiles.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user