(serverList: ServerInfo[])
| 75 | |
| 76 | // Group servers by scope |
| 77 | function groupServersByScope(serverList: ServerInfo[]): Map<ConfigScope, ServerInfo[]> { |
| 78 | const groups = new Map<ConfigScope, ServerInfo[]>(); |
| 79 | for (const server of serverList) { |
| 80 | const scope = server.scope; |
| 81 | if (!groups.has(scope)) { |
| 82 | groups.set(scope, []); |
| 83 | } |
| 84 | groups.get(scope)!.push(server); |
| 85 | } |
| 86 | // Sort servers within each group alphabetically |
| 87 | for (const [, groupServers] of groups) { |
| 88 | groupServers.sort((a, b) => a.name.localeCompare(b.name)); |
| 89 | } |
| 90 | return groups; |
| 91 | } |
| 92 | export function MCPListPanel(t0) { |
| 93 | const $ = _c(78); |
| 94 | const { |
no test coverage detected