apiKeyConflictNotice top-level property
Auth conflict: API key overriding config key.
Implementation
final StatusNoticeDefinition apiKeyConflictNotice = StatusNoticeDefinition(
id: 'api-key-conflict',
type: StatusNoticeType.warning,
isActive: (ctx) =>
ctx.apiKeySource != null &&
ctx.apiKeySource != 'none' &&
(ctx.apiKeySource == 'ANTHROPIC_API_KEY' ||
ctx.apiKeySource == 'apiKeyHelper'),
render: (ctx, context) {
final theme = Theme.of(context);
return Container(
margin: const EdgeInsets.only(top: 8),
child: Row(
children: [
Icon(Icons.warning_amber, size: 16, color: theme.colorScheme.error),
const SizedBox(width: 6),
Expanded(
child: Text(
'Auth conflict: Using ${ctx.apiKeySource} instead of Anthropic Console key. '
'Either unset ${ctx.apiKeySource}, or run `neomage /logout`.',
style: TextStyle(fontSize: 12, color: theme.colorScheme.error),
),
),
],
),
);
},
);