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

Function saveCharacterCollection

apps/webuiapps/src/lib/characterManager.ts:225–236  ·  view source on GitHub ↗
(collection: CharacterCollection)

Source from the content-addressed store, hash-verified

223}
224
225export async function saveCharacterCollection(collection: CharacterCollection): Promise<void> {
226 localStorage.setItem(STORAGE_KEY, JSON.stringify(collection));
227 try {
228 await fetch(CHARACTER_API, {
229 method: 'POST',
230 headers: { 'Content-Type': 'application/json' },
231 body: JSON.stringify(collection),
232 });
233 } catch (e) {
234 console.warn('[CharacterManager] saveCharacterCollection failed:', e);
235 }
236}
237
238// ---------------------------------------------------------------------------
239// Collection helpers

Callers 2

ChatPanelFunction · 0.90
saveCharacterConfigFunction · 0.85

Calls 1

warnMethod · 0.80

Tested by

no test coverage detected