(t0)
| 12 | onBack: () => void; |
| 13 | }; |
| 14 | export function MCPToolDetailView(t0) { |
| 15 | const $ = _c(44); |
| 16 | const { |
| 17 | tool, |
| 18 | server, |
| 19 | onBack |
| 20 | } = t0; |
| 21 | const [toolDescription, setToolDescription] = React.useState(""); |
| 22 | let t1; |
| 23 | let toolName; |
| 24 | if ($[0] !== server.name || $[1] !== tool) { |
| 25 | toolName = getMcpDisplayName(tool.name, server.name); |
| 26 | const fullDisplayName = tool.userFacingName ? tool.userFacingName({}) : toolName; |
| 27 | t1 = extractMcpToolDisplayName(fullDisplayName); |
| 28 | $[0] = server.name; |
| 29 | $[1] = tool; |
| 30 | $[2] = t1; |
| 31 | $[3] = toolName; |
| 32 | } else { |
| 33 | t1 = $[2]; |
| 34 | toolName = $[3]; |
| 35 | } |
| 36 | const displayName = t1; |
| 37 | let t2; |
| 38 | if ($[4] !== tool) { |
| 39 | t2 = tool.isReadOnly?.({}) ?? false; |
| 40 | $[4] = tool; |
| 41 | $[5] = t2; |
| 42 | } else { |
| 43 | t2 = $[5]; |
| 44 | } |
| 45 | const isReadOnly = t2; |
| 46 | let t3; |
| 47 | if ($[6] !== tool) { |
| 48 | t3 = tool.isDestructive?.({}) ?? false; |
| 49 | $[6] = tool; |
| 50 | $[7] = t3; |
| 51 | } else { |
| 52 | t3 = $[7]; |
| 53 | } |
| 54 | const isDestructive = t3; |
| 55 | let t4; |
| 56 | if ($[8] !== tool) { |
| 57 | t4 = tool.isOpenWorld?.({}) ?? false; |
| 58 | $[8] = tool; |
| 59 | $[9] = t4; |
| 60 | } else { |
| 61 | t4 = $[9]; |
| 62 | } |
| 63 | const isOpenWorld = t4; |
| 64 | let t5; |
| 65 | let t6; |
| 66 | if ($[10] !== tool) { |
| 67 | t5 = () => { |
| 68 | const loadDescription = async function loadDescription() { |
| 69 | try { |
| 70 | const desc = await tool.description({}, { |
| 71 | isNonInteractiveSession: false, |
nothing calls this directly
no test coverage detected