(t0)
| 9 | onDone(approved: boolean): void; |
| 10 | }; |
| 11 | export function ApproveApiKey(t0) { |
| 12 | const $ = _c(17); |
| 13 | const { |
| 14 | customApiKeyTruncated, |
| 15 | onDone |
| 16 | } = t0; |
| 17 | let t1; |
| 18 | if ($[0] !== customApiKeyTruncated || $[1] !== onDone) { |
| 19 | t1 = function onChange(value) { |
| 20 | bb2: switch (value) { |
| 21 | case "yes": |
| 22 | { |
| 23 | saveGlobalConfig(current_0 => ({ |
| 24 | ...current_0, |
| 25 | customApiKeyResponses: { |
| 26 | ...current_0.customApiKeyResponses, |
| 27 | approved: [...(current_0.customApiKeyResponses?.approved ?? []), customApiKeyTruncated] |
| 28 | } |
| 29 | })); |
| 30 | onDone(true); |
| 31 | break bb2; |
| 32 | } |
| 33 | case "no": |
| 34 | { |
| 35 | saveGlobalConfig(current => ({ |
| 36 | ...current, |
| 37 | customApiKeyResponses: { |
| 38 | ...current.customApiKeyResponses, |
| 39 | rejected: [...(current.customApiKeyResponses?.rejected ?? []), customApiKeyTruncated] |
| 40 | } |
| 41 | })); |
| 42 | onDone(false); |
| 43 | } |
| 44 | } |
| 45 | }; |
| 46 | $[0] = customApiKeyTruncated; |
| 47 | $[1] = onDone; |
| 48 | $[2] = t1; |
| 49 | } else { |
| 50 | t1 = $[2]; |
| 51 | } |
| 52 | const onChange = t1; |
| 53 | let t2; |
| 54 | if ($[3] !== onChange) { |
| 55 | t2 = () => onChange("no"); |
| 56 | $[3] = onChange; |
| 57 | $[4] = t2; |
| 58 | } else { |
| 59 | t2 = $[4]; |
| 60 | } |
| 61 | let t3; |
| 62 | if ($[5] === Symbol.for("react.memo_cache_sentinel")) { |
| 63 | t3 = <Text bold={true}>ANTHROPIC_API_KEY</Text>; |
| 64 | $[5] = t3; |
| 65 | } else { |
| 66 | t3 = $[5]; |
| 67 | } |
| 68 | let t4; |
nothing calls this directly
no test coverage detected