(tools: Tools)
| 75 | |
| 76 | // Helper to get MCP server buckets dynamically |
| 77 | function getMcpServerBuckets(tools: Tools): Array<{ |
| 78 | serverName: string; |
| 79 | tools: Tools; |
| 80 | }> { |
| 81 | const serverMap = new Map<string, Tool[]>(); |
| 82 | tools.forEach(tool => { |
| 83 | if (isMcpTool(tool)) { |
| 84 | const mcpInfo = mcpInfoFromString(tool.name); |
| 85 | if (mcpInfo?.serverName) { |
| 86 | const existing = serverMap.get(mcpInfo.serverName) || []; |
| 87 | existing.push(tool); |
| 88 | serverMap.set(mcpInfo.serverName, existing); |
| 89 | } |
| 90 | } |
| 91 | }); |
| 92 | return Array.from(serverMap.entries()).map(([serverName, tools]) => ({ |
| 93 | serverName, |
| 94 | tools |
| 95 | })).sort((a, b) => a.serverName.localeCompare(b.serverName)); |
| 96 | } |
| 97 | export function ToolSelector(t0) { |
| 98 | const $ = _c(69); |
| 99 | const { |
no test coverage detected