MCPcopy
hub / github.com/codeaashu/claude-code / shouldShowEffortCallout

Function shouldShowEffortCallout

src/components/EffortCallout.tsx:219–255  ·  view source on GitHub ↗
(model: string)

Source from the content-addressed store, hash-verified

217 * - Everyone else: mark as dismissed so it never shows
218 */
219export 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}
256function markV2Dismissed(): void {
257 saveGlobalConfig(current => {
258 if (current.effortCalloutV2Dismissed) return current;

Callers 1

REPLFunction · 0.85

Calls 7

parseUserSpecifiedModelFunction · 0.85
getGlobalConfigFunction · 0.85
markV2DismissedFunction · 0.85
isProSubscriberFunction · 0.85
isMaxSubscriberFunction · 0.85
isTeamSubscriberFunction · 0.85

Tested by

no test coverage detected