refactor: replace OpenCode server restarts with config reloads for faster updates (#70)

This commit is contained in:
Chris Scott authored and GitHub committed 2026-01-17 12:40:22 -05:00
1 parent 8be0bbd8a0
commit 2bd2b024b8
11 files changed
+183 -107

No files matched your search

+13
View File
@@ -103,6 +103,19 @@ export const settingsApi = {
return data
},
reloadOpenCodeConfig: async (): Promise<{ success: boolean; message: string; details?: string }> => {
try {
const { data } = await axios.post(`${API_BASE_URL}/api/settings/opencode-reload`)
return data
} catch (error) {
if (axios.isAxiosError(error) && error.response?.status === 404) {
const result = await axios.post(`${API_BASE_URL}/api/settings/opencode-restart`)
return result.data
}
throw error
}
},
rollbackOpenCodeConfig: async (): Promise<{ success: boolean; message: string; configName?: string }> => {
const { data } = await axios.post(`${API_BASE_URL}/api/settings/opencode-rollback`)
return data