MCPcopy Create free account
hub / github.com/OpenHands/OpenHands / getDefaultQueryClient

Function getDefaultQueryClient

src/query-client-config.ts:86–97  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

84let activeQueryClient: QueryClient | null = null;
85
86export const getDefaultQueryClient = () => {
87 if (!defaultQueryClient) {
88 defaultQueryClient = createAgentServerQueryClient();
89 if (import.meta.env.DEV || import.meta.env.VITE_MOCK_API === "true") {
90 (
91 window as unknown as { __OH_QUERY_CLIENT__?: typeof defaultQueryClient }
92 ).__OH_QUERY_CLIENT__ = defaultQueryClient;
93 }
94 }
95
96 return defaultQueryClient;
97};
98
99export const getQueryClient = () =>
100 activeQueryClient ?? getDefaultQueryClient();

Callers 5

AgentServerUIProvidersFunction · 0.90
getQueryClientFunction · 0.85
setQueryClientFunction · 0.85
BaseProbeFunction · 0.85

Calls 1

Tested by 1

BaseProbeFunction · 0.68