()
| 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]); |
no test coverage detected