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

Function loadCharacterCollection

apps/webuiapps/src/lib/characterManager.ts:196–210  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

194}
195
196export async function loadCharacterCollection(): Promise<CharacterCollection | null> {
197 try {
198 const res = await fetch(CHARACTER_API);
199 if (res.ok) {
200 const data = await res.json();
201 if (data && data.activeId && data.items) {
202 localStorage.setItem(STORAGE_KEY, JSON.stringify(data));
203 return data as CharacterCollection;
204 }
205 }
206 } catch (e) {
207 console.warn('[CharacterManager] loadCharacterCollection API not available:', e);
208 }
209 return null;
210}
211
212export function loadCharacterCollectionSync(): CharacterCollection | null {
213 try {

Callers 2

ChatPanelFunction · 0.90
loadCharacterConfigFunction · 0.85

Calls 1

warnMethod · 0.80

Tested by

no test coverage detected