()
| 46 | } |
| 47 | |
| 48 | export function loadConfigSync(): LLMConfig | null { |
| 49 | try { |
| 50 | const raw = localStorage.getItem(CONFIG_KEY); |
| 51 | return raw ? JSON.parse(raw) : null; |
| 52 | } catch { |
| 53 | return null; |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | export interface ChatMessage { |
| 58 | role: 'system' | 'user' | 'assistant' | 'tool'; |