MCPcopy
hub / github.com/jamiepine/voicebox / useServerHealth

Function useServerHealth

app/src/lib/hooks/useServer.ts:5–14  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3import { useServerStore } from '@/stores/serverStore';
4
5export function useServerHealth() {
6 const serverUrl = useServerStore((state) => state.serverUrl);
7
8 return useQuery({
9 queryKey: ['server', 'health', serverUrl],
10 queryFn: () => apiClient.getHealth(),
11 refetchInterval: 30000, // Check every 30 seconds
12 retry: 1,
13 });
14}

Callers 5

GpuAccelerationFunction · 0.90
ServerStatusFunction · 0.90
ConnectionFormFunction · 0.90
GpuPageFunction · 0.90
GeneralPageFunction · 0.90

Calls 1

getHealthMethod · 0.80

Tested by

no test coverage detected