(model: ModelSetting)
| 148 | } |
| 149 | |
| 150 | export function getInitialFastModeSetting(model: ModelSetting): boolean { |
| 151 | if (!isFastModeEnabled()) { |
| 152 | return false |
| 153 | } |
| 154 | if (!isFastModeAvailable()) { |
| 155 | return false |
| 156 | } |
| 157 | if (!isFastModeSupportedByModel(model)) { |
| 158 | return false |
| 159 | } |
| 160 | const settings = getInitialSettings() |
| 161 | // If per-session opt-in is required, fast mode starts off each session |
| 162 | if (settings.fastModePerSessionOptIn) { |
| 163 | return false |
| 164 | } |
| 165 | return settings.fastMode === true |
| 166 | } |
| 167 | |
| 168 | export function isFastModeSupportedByModel( |
| 169 | modelSetting: ModelSetting, |
no test coverage detected