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