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

Function saveModCollection

apps/webuiapps/src/lib/modManager.ts:252–265  ·  view source on GitHub ↗
(collection: ModCollection)

Source from the content-addressed store, hash-verified

250}
251
252export async function saveModCollection(collection: ModCollection): Promise<void> {
253 localStorage.setItem(STORAGE_KEY, JSON.stringify(collection));
254 try {
255 await fetch(MODS_API, {
256 method: 'POST',
257 headers: { 'Content-Type': 'application/json' },
258 body: JSON.stringify(collection),
259 });
260 } catch {
261 // ignore
262 }
263 // Notify other components (e.g. ChatPanel) about the change
264 window.dispatchEvent(new CustomEvent('mod-collection-changed', { detail: collection }));
265}
266
267// ---------------------------------------------------------------------------
268// Collection helpers

Callers 5

ChatPanelFunction · 0.90
runConversationFunction · 0.90
ShellFunction · 0.90
saveModConfigFunction · 0.85
saveModStateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected