(updates: Partial<OpencodeConfig>)
| 119 | }; |
| 120 | |
| 121 | const updateConfig = async (updates: Partial<OpencodeConfig>) => { |
| 122 | if (!config) return; |
| 123 | try { |
| 124 | await saveConfig({ ...config, ...updates }); |
| 125 | toast.success("Settings saved"); |
| 126 | } catch (err: any) { |
| 127 | const msg = err.response?.data?.error || err.message || "Unknown error"; |
| 128 | toast.error(`Failed to save settings: ${msg}`); |
| 129 | } |
| 130 | }; |
| 131 | |
| 132 | const handleSetPath = async () => { |
| 133 | try { |
no test coverage detected