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

Function saveConfig

apps/webuiapps/src/lib/llmClient.ts:32–46  ·  view source on GitHub ↗
(
  config: LLMConfig,
  imageGenConfig?: import('./imageGenClient').ImageGenConfig | null,
)

Source from the content-addressed store, hash-verified

30}
31
32export async function saveConfig(
33 config: LLMConfig,
34 imageGenConfig?: import('./imageGenClient').ImageGenConfig | null,
35): Promise<void> {
36 localStorage.setItem(CONFIG_KEY, JSON.stringify(config));
37
38 const persisted: import('./configPersistence').PersistedConfig = {
39 llm: config,
40 };
41 if (imageGenConfig) {
42 persisted.imageGen = imageGenConfig;
43 }
44
45 await savePersistedConfig(persisted);
46}
47
48export function loadConfigSync(): LLMConfig | null {
49 try {

Callers 2

ChatPanelFunction · 0.90
llmClient.test.tsFile · 0.90

Calls 1

savePersistedConfigFunction · 0.90

Tested by

no test coverage detected