(t0)
| 37 | }; |
| 38 | const NO_PREFERENCE = '__NO_PREFERENCE__'; |
| 39 | export function ModelPicker(t0) { |
| 40 | const $ = _c(82); |
| 41 | const { |
| 42 | initial, |
| 43 | sessionModel, |
| 44 | onSelect, |
| 45 | onCancel, |
| 46 | isStandaloneCommand, |
| 47 | showFastModeNotice, |
| 48 | headerText, |
| 49 | skipSettingsWrite |
| 50 | } = t0; |
| 51 | const setAppState = useSetAppState(); |
| 52 | const exitState = useExitOnCtrlCDWithKeybindings(); |
| 53 | const initialValue = initial === null ? NO_PREFERENCE : initial; |
| 54 | const [focusedValue, setFocusedValue] = useState(initialValue); |
| 55 | const isFastMode = useAppState(_temp); |
| 56 | const [hasToggledEffort, setHasToggledEffort] = useState(false); |
| 57 | const effortValue = useAppState(_temp2); |
| 58 | let t1; |
| 59 | if ($[0] !== effortValue) { |
| 60 | t1 = effortValue !== undefined ? convertEffortValueToLevel(effortValue) : undefined; |
| 61 | $[0] = effortValue; |
| 62 | $[1] = t1; |
| 63 | } else { |
| 64 | t1 = $[1]; |
| 65 | } |
| 66 | const [effort, setEffort] = useState(t1); |
| 67 | const t2 = isFastMode ?? false; |
| 68 | let t3; |
| 69 | if ($[2] !== t2) { |
| 70 | t3 = getModelOptions(t2); |
| 71 | $[2] = t2; |
| 72 | $[3] = t3; |
| 73 | } else { |
| 74 | t3 = $[3]; |
| 75 | } |
| 76 | const modelOptions = t3; |
| 77 | let t4; |
| 78 | bb0: { |
| 79 | if (initial !== null && !modelOptions.some(opt => opt.value === initial)) { |
| 80 | let t5; |
| 81 | if ($[4] !== initial) { |
| 82 | t5 = modelDisplayString(initial); |
| 83 | $[4] = initial; |
| 84 | $[5] = t5; |
| 85 | } else { |
| 86 | t5 = $[5]; |
| 87 | } |
| 88 | let t6; |
| 89 | if ($[6] !== initial || $[7] !== t5) { |
| 90 | t6 = { |
| 91 | value: initial, |
| 92 | label: t5, |
| 93 | description: "Current model" |
| 94 | }; |
| 95 | $[6] = initial; |
| 96 | $[7] = t5; |
nothing calls this directly
no test coverage detected