(t0)
| 95 | })).sort((a, b) => a.serverName.localeCompare(b.serverName)); |
| 96 | } |
| 97 | export function ToolSelector(t0) { |
| 98 | const $ = _c(69); |
| 99 | const { |
| 100 | tools, |
| 101 | initialTools, |
| 102 | onComplete, |
| 103 | onCancel |
| 104 | } = t0; |
| 105 | let t1; |
| 106 | if ($[0] !== tools) { |
| 107 | t1 = filterToolsForAgent({ |
| 108 | tools, |
| 109 | isBuiltIn: false, |
| 110 | isAsync: false |
| 111 | }); |
| 112 | $[0] = tools; |
| 113 | $[1] = t1; |
| 114 | } else { |
| 115 | t1 = $[1]; |
| 116 | } |
| 117 | const customAgentTools = t1; |
| 118 | let t2; |
| 119 | if ($[2] !== customAgentTools || $[3] !== initialTools) { |
| 120 | t2 = !initialTools || initialTools.includes("*") ? customAgentTools.map(_temp) : initialTools; |
| 121 | $[2] = customAgentTools; |
| 122 | $[3] = initialTools; |
| 123 | $[4] = t2; |
| 124 | } else { |
| 125 | t2 = $[4]; |
| 126 | } |
| 127 | const expandedInitialTools = t2; |
| 128 | const [selectedTools, setSelectedTools] = useState(expandedInitialTools); |
| 129 | const [focusIndex, setFocusIndex] = useState(0); |
| 130 | const [showIndividualTools, setShowIndividualTools] = useState(false); |
| 131 | let t3; |
| 132 | if ($[5] !== customAgentTools) { |
| 133 | t3 = new Set(customAgentTools.map(_temp2)); |
| 134 | $[5] = customAgentTools; |
| 135 | $[6] = t3; |
| 136 | } else { |
| 137 | t3 = $[6]; |
| 138 | } |
| 139 | const toolNames = t3; |
| 140 | let t4; |
| 141 | if ($[7] !== selectedTools || $[8] !== toolNames) { |
| 142 | let t5; |
| 143 | if ($[10] !== toolNames) { |
| 144 | t5 = name => toolNames.has(name); |
| 145 | $[10] = toolNames; |
| 146 | $[11] = t5; |
| 147 | } else { |
| 148 | t5 = $[11]; |
| 149 | } |
| 150 | t4 = selectedTools.filter(t5); |
| 151 | $[7] = selectedTools; |
| 152 | $[8] = toolNames; |
| 153 | $[9] = t4; |
| 154 | } else { |
nothing calls this directly
no test coverage detected