(
config: LLMConfig,
imageGenConfig?: import('./imageGenClient').ImageGenConfig | null,
)
| 30 | } |
| 31 | |
| 32 | export 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 | |
| 48 | export function loadConfigSync(): LLMConfig | null { |
| 49 | try { |
no test coverage detected