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

Function loadConfig

apps/webuiapps/src/lib/llmClient.ts:13–30  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11const CONFIG_KEY = 'webuiapps-llm-config';
12
13export async function loadConfig(): Promise<LLMConfig | null> {
14 try {
15 const persisted = await loadPersistedConfig();
16 if (persisted?.llm) {
17 localStorage.setItem(CONFIG_KEY, JSON.stringify(persisted.llm));
18 return persisted.llm;
19 }
20 } catch {
21 // API not available (production / network error)
22 }
23
24 try {
25 const raw = localStorage.getItem(CONFIG_KEY);
26 return raw ? JSON.parse(raw) : null;
27 } catch {
28 return null;
29 }
30}
31
32export async function saveConfig(
33 config: LLMConfig,

Callers 4

ChatPanelFunction · 0.90
ShellFunction · 0.90
llmClient.test.tsFile · 0.90
consolidateAppsFunction · 0.85

Calls 1

loadPersistedConfigFunction · 0.90

Tested by

no test coverage detected