mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 12:54:20 +01:00
Bump version to 0.8.21 (#99)
* Add timeout handling and recovery for OpenCode upgrade/install operations - Extract DEFAULT_AGENTS_MD to constants file - Add 90s timeout for opencode upgrade/install commands - Implement server recovery when upgrade/install fails - Update frontend error handling for recovery status - Add settings route tests * Add centralized query cache invalidation utility * Bump version to 0.8.21
This commit is contained in:
1 parent
3661f0a271
commit
a02f7a2e98
14 files changed
+1100
-126
No files matched your search
@@ -1,8 +1,7 @@
|
||||
import { useQuery } from '@tanstack/react-query'
|
||||
import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query'
|
||||
import { toast } from 'sonner'
|
||||
import { settingsApi } from '@/api/settings'
|
||||
import { useMutation } from '@tanstack/react-query'
|
||||
import { useQueryClient } from '@tanstack/react-query'
|
||||
import { invalidateConfigCaches, invalidateSettingsCaches } from '@/lib/queryInvalidation'
|
||||
|
||||
interface HealthResponse {
|
||||
status: 'healthy' | 'degraded' | 'unhealthy'
|
||||
@@ -34,8 +33,7 @@ export function useServerHealth(enabled = true) {
|
||||
return await settingsApi.reloadOpenCodeConfig()
|
||||
},
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['health'] })
|
||||
queryClient.invalidateQueries({ queryKey: ['opencode', 'agents'] })
|
||||
invalidateConfigCaches(queryClient)
|
||||
toast.success('Server configuration reloaded successfully')
|
||||
},
|
||||
onError: (error: unknown) => {
|
||||
@@ -53,9 +51,7 @@ export function useServerHealth(enabled = true) {
|
||||
return await settingsApi.rollbackOpenCodeConfig()
|
||||
},
|
||||
onSuccess: (data) => {
|
||||
queryClient.invalidateQueries({ queryKey: ['health'] })
|
||||
queryClient.invalidateQueries({ queryKey: ['settings'] })
|
||||
queryClient.invalidateQueries({ queryKey: ['opencode', 'agents'] })
|
||||
invalidateSettingsCaches(queryClient)
|
||||
toast.success(data.message)
|
||||
},
|
||||
onError: () => {
|
||||
|
||||
Reference in new issue
Block a user