MCPcopy Create free account
hub / github.com/MiniMax-AI/OpenRoom / seedMetaFiles

Function seedMetaFiles

apps/webuiapps/src/lib/seedMeta.ts:24–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22let seeded = false;
23
24export async function seedMetaFiles(): Promise<void> {
25 if (seeded) return;
26 seeded = true;
27
28 const files: Array<{ path: string; name: string; content: string }> = [];
29
30 for (const [filePath, content] of Object.entries(metaFiles)) {
31 const dirMatch = filePath.match(/\.\.\/pages\/([^/]+)\//);
32 if (!dirMatch) continue;
33 const appName = DIR_TO_APP_NAME[dirMatch[1]] || dirMatch[1].toLowerCase();
34 const fileName = filePath.split('/').pop() || '';
35 if (!fileName) continue;
36 files.push({ path: `apps/${appName}`, name: fileName, content });
37 }
38
39 if (files.length > 0) {
40 await idb.putTextFilesByJSON({ files });
41 console.info(`[seedMeta] Seeded ${files.length} meta files to disk`);
42 }
43}

Callers 3

ChatPanelFunction · 0.90
runConversationFunction · 0.90
ShellFunction · 0.90

Calls 2

putTextFilesByJSONMethod · 0.80
infoMethod · 0.80

Tested by

no test coverage detected