MCPcopy Create free account
hub / github.com/continuedev/continue / getServerStatusDisplay

Function getServerStatusDisplay

extensions/cli/src/ui/MCPSelector.tsx:17–40  ·  view source on GitHub ↗
(conn: MCPConnectionInfo)

Source from the content-addressed store, hash-verified

15
16// Utility function to get status icon and color based on server connection
17const 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
42interface MCPSelectorProps {
43 onCancel: () => void;

Callers 2

getMainMenuItemsFunction · 0.85
renderHeaderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected