MCPcopy Create free account
hub / github.com/coder/mux / loadData

Function loadData

src/browser/components/WorkspaceMCPModal/WorkspaceMCPModal.tsx:58–73  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

56 reloadCacheRef.current();
57
58 const loadData = async () => {
59 setLoading(true);
60 setError(null);
61 try {
62 const [projectServers, workspaceOverrides] = await Promise.all([
63 api.mcp.list({ projectPath }),
64 api.workspace.mcp.get({ workspaceId }),
65 ]);
66 setServers(projectServers ?? {});
67 setOverrides(workspaceOverrides ?? {});
68 } catch (err) {
69 setError(err instanceof Error ? err.message : "Failed to load MCP configuration");
70 } finally {
71 setLoading(false);
72 }
73 };
74
75 void loadData();
76 }, [open, api, projectPath, workspaceId]);

Callers 1

WorkspaceMCPModalFunction · 0.85

Calls 2

getMethod · 0.65
listMethod · 0.45

Tested by

no test coverage detected