(conn: MCPConnectionInfo)
| 15 | |
| 16 | // Utility function to get status icon and color based on server connection |
| 17 | const getServerStatusDisplay = (conn: MCPConnectionInfo) => { |
| 18 | let icon = "⚪️"; // note, white circle causes extra blank line bug |
| 19 | let color: "green" | "yellow" | "red" | "white" | "dim" = "white"; |
| 20 | let statusText = conn.status; |
| 21 | |
| 22 | if (conn.status === "connecting") { |
| 23 | icon = "🟡"; |
| 24 | color = "yellow"; |
| 25 | } else if (conn.status === "error") { |
| 26 | icon = "🔴"; |
| 27 | color = "red"; |
| 28 | } else if (conn.status === "connected") { |
| 29 | if (conn.warnings && conn.warnings.length > 0) { |
| 30 | icon = "🟡"; |
| 31 | color = "yellow"; |
| 32 | statusText = "connected (with warnings)" as MCPServerStatus; |
| 33 | } else { |
| 34 | icon = "🟢"; |
| 35 | color = "green"; |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | return { icon, color, statusText }; |
| 40 | }; |
| 41 | |
| 42 | interface MCPSelectorProps { |
| 43 | onCancel: () => void; |
no outgoing calls
no test coverage detected