MCPcopy
hub / github.com/claude-code-best/claude-code / fetchInfo

Function fetchInfo

src/components/RemoteEnvironmentDialog.tsx:35–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33 useEffect(() => {
34 let cancelled = false;
35 async function fetchInfo(): Promise<void> {
36 try {
37 const result = await getEnvironmentSelectionInfo();
38 if (cancelled) return;
39 setEnvironments(result.availableEnvironments);
40 setSelectedEnvironment(result.selectedEnvironment);
41 setSelectedEnvironmentSource(result.selectedEnvironmentSource);
42 setLoadingState(null);
43 } catch (err) {
44 if (cancelled) return;
45 const fetchError = toError(err);
46 logError(fetchError);
47 setError(fetchError.message);
48 setLoadingState(null);
49 }
50 }
51 void fetchInfo();
52 return () => {
53 cancelled = true;

Callers 1

RemoteEnvironmentDialogFunction · 0.85

Calls 3

toErrorFunction · 0.85
logErrorFunction · 0.50

Tested by

no test coverage detected