(t0)
| 18 | commands: Command[]; |
| 19 | }; |
| 20 | export function HelpV2(t0) { |
| 21 | const $ = _c(44); |
| 22 | const { |
| 23 | onClose, |
| 24 | commands |
| 25 | } = t0; |
| 26 | const { |
| 27 | rows, |
| 28 | columns |
| 29 | } = useTerminalSize(); |
| 30 | const maxHeight = Math.floor(rows / 2); |
| 31 | const insideModal = useIsInsideModal(); |
| 32 | let t1; |
| 33 | if ($[0] !== onClose) { |
| 34 | t1 = () => onClose("Help dialog dismissed", { |
| 35 | display: "system" |
| 36 | }); |
| 37 | $[0] = onClose; |
| 38 | $[1] = t1; |
| 39 | } else { |
| 40 | t1 = $[1]; |
| 41 | } |
| 42 | const close = t1; |
| 43 | let t2; |
| 44 | if ($[2] === Symbol.for("react.memo_cache_sentinel")) { |
| 45 | t2 = { |
| 46 | context: "Help" |
| 47 | }; |
| 48 | $[2] = t2; |
| 49 | } else { |
| 50 | t2 = $[2]; |
| 51 | } |
| 52 | useKeybinding("help:dismiss", close, t2); |
| 53 | const exitState = useExitOnCtrlCDWithKeybindings(close); |
| 54 | const dismissShortcut = useShortcutDisplay("help:dismiss", "Help", "esc"); |
| 55 | let antOnlyCommands; |
| 56 | let builtinCommands; |
| 57 | let t3; |
| 58 | if ($[3] !== commands) { |
| 59 | const builtinNames = builtInCommandNames(); |
| 60 | builtinCommands = commands.filter(cmd => builtinNames.has(cmd.name) && !cmd.isHidden); |
| 61 | let t4; |
| 62 | if ($[7] === Symbol.for("react.memo_cache_sentinel")) { |
| 63 | t4 = []; |
| 64 | $[7] = t4; |
| 65 | } else { |
| 66 | t4 = $[7]; |
| 67 | } |
| 68 | antOnlyCommands = t4; |
| 69 | t3 = commands.filter(cmd_2 => !builtinNames.has(cmd_2.name) && !cmd_2.isHidden); |
| 70 | $[3] = commands; |
| 71 | $[4] = antOnlyCommands; |
| 72 | $[5] = builtinCommands; |
| 73 | $[6] = t3; |
| 74 | } else { |
| 75 | antOnlyCommands = $[4]; |
| 76 | builtinCommands = $[5]; |
| 77 | t3 = $[6]; |
nothing calls this directly
no test coverage detected