(model: string)
| 217 | * - Everyone else: mark as dismissed so it never shows |
| 218 | */ |
| 219 | export function shouldShowEffortCallout(model: string): boolean { |
| 220 | // Only show for Opus 4.6 for now |
| 221 | const parsed = parseUserSpecifiedModel(model); |
| 222 | if (!parsed.toLowerCase().includes('opus-4-6')) { |
| 223 | return false; |
| 224 | } |
| 225 | const config = getGlobalConfig(); |
| 226 | if (config.effortCalloutV2Dismissed) return false; |
| 227 | |
| 228 | // Don't show to brand-new users — they never knew the old default, so this |
| 229 | // isn't a change for them. Mark as dismissed so it stays suppressed. |
| 230 | if (config.numStartups <= 1) { |
| 231 | markV2Dismissed(); |
| 232 | return false; |
| 233 | } |
| 234 | |
| 235 | // Pro users already had medium default before this PR. Show the new copy, |
| 236 | // but skip if they already saw the v1 dialog — no point nagging twice. |
| 237 | if (isProSubscriber()) { |
| 238 | if (config.effortCalloutDismissed) { |
| 239 | markV2Dismissed(); |
| 240 | return false; |
| 241 | } |
| 242 | return getOpusDefaultEffortConfig().enabled; |
| 243 | } |
| 244 | |
| 245 | // Max/Team are the target of the tengu_grey_step2 config. |
| 246 | // Don't mark dismissed when config is disabled — they should see the dialog |
| 247 | // once it's enabled for them. |
| 248 | if (isMaxSubscriber() || isTeamSubscriber()) { |
| 249 | return getOpusDefaultEffortConfig().enabled; |
| 250 | } |
| 251 | |
| 252 | // Everyone else (free tier, API key, non-subscribers): not in scope. |
| 253 | markV2Dismissed(); |
| 254 | return false; |
| 255 | } |
| 256 | function markV2Dismissed(): void { |
| 257 | saveGlobalConfig(current => { |
| 258 | if (current.effortCalloutV2Dismissed) return current; |
no test coverage detected