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

Function saveModConfig

apps/webuiapps/src/lib/modManager.ts:333–338  ·  view source on GitHub ↗
(config: ModConfig)

Source from the content-addressed store, hash-verified

331}
332
333export async function saveModConfig(config: ModConfig): Promise<void> {
334 const col = loadModCollectionSync() ?? DEFAULT_MOD_COLLECTION;
335 const entry = col.items[config.id] ?? { config, state: defaultState(config) };
336 const updated = updateModEntry(col, { ...entry, config });
337 await saveModCollection(updated);
338}
339
340export async function loadModState(): Promise<ModState | null> {
341 const col = await loadModCollection();

Callers

nothing calls this directly

Calls 4

loadModCollectionSyncFunction · 0.85
defaultStateFunction · 0.85
updateModEntryFunction · 0.85
saveModCollectionFunction · 0.85

Tested by

no test coverage detected