()
| 64 | |
| 65 | /** Synchronous read from localStorage cache. */ |
| 66 | export function loadImageGenConfigSync(): ImageGenConfig | null { |
| 67 | try { |
| 68 | const raw = localStorage.getItem(CONFIG_KEY); |
| 69 | return raw ? JSON.parse(raw) : null; |
| 70 | } catch { |
| 71 | return null; |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | export function saveImageGenConfig(config: ImageGenConfig): void { |
| 76 | localStorage.setItem(CONFIG_KEY, JSON.stringify(config)); |
no outgoing calls
no test coverage detected