(t0)
| 118 | }; |
| 119 | type PickerSelection = number | 'full' | 'always'; |
| 120 | function CopyPicker(t0) { |
| 121 | const $ = _c(33); |
| 122 | const { |
| 123 | fullText, |
| 124 | codeBlocks, |
| 125 | messageAge, |
| 126 | onDone |
| 127 | } = t0; |
| 128 | const focusedRef = useRef("full"); |
| 129 | const t1 = `${fullText.length} chars, ${countCharInString(fullText, "\n") + 1} lines`; |
| 130 | let t2; |
| 131 | if ($[0] !== t1) { |
| 132 | t2 = { |
| 133 | label: "Full response", |
| 134 | value: "full" as const, |
| 135 | description: t1 |
| 136 | }; |
| 137 | $[0] = t1; |
| 138 | $[1] = t2; |
| 139 | } else { |
| 140 | t2 = $[1]; |
| 141 | } |
| 142 | let t3; |
| 143 | if ($[2] !== codeBlocks || $[3] !== t2) { |
| 144 | let t4; |
| 145 | if ($[5] === Symbol.for("react.memo_cache_sentinel")) { |
| 146 | t4 = { |
| 147 | label: "Always copy full response", |
| 148 | value: "always" as const, |
| 149 | description: "Skip this picker in the future (revert via /config)" |
| 150 | }; |
| 151 | $[5] = t4; |
| 152 | } else { |
| 153 | t4 = $[5]; |
| 154 | } |
| 155 | t3 = [t2, ...codeBlocks.map(_temp), t4]; |
| 156 | $[2] = codeBlocks; |
| 157 | $[3] = t2; |
| 158 | $[4] = t3; |
| 159 | } else { |
| 160 | t3 = $[4]; |
| 161 | } |
| 162 | const options = t3; |
| 163 | let t4; |
| 164 | if ($[6] !== codeBlocks || $[7] !== fullText) { |
| 165 | t4 = function getSelectionContent(selected) { |
| 166 | if (selected === "full" || selected === "always") { |
| 167 | return { |
| 168 | text: fullText, |
| 169 | filename: RESPONSE_FILENAME |
| 170 | }; |
| 171 | } |
| 172 | const block_0 = codeBlocks[selected]; |
| 173 | return { |
| 174 | text: block_0.code, |
| 175 | filename: `copy${fileExtension(block_0.lang)}`, |
| 176 | blockIndex: selected |
| 177 | }; |
nothing calls this directly
no test coverage detected