aiNotConnectedMessage function
- AppLocalizations l10n,
- AiProvider provider
Localized "connect this provider first" copy for an
AiProviderNotConnectedException, worded by how the provider
authenticates: an API key to add (Claude) or an account to sign in to
(OpenAI via ChatGPT, Gemini via Google).
The provider name is a brand (AiProvider.displayName) and stays
untranslated. aiNotConnectedFallback in error_mapper.dart is the
English copy of the same two strings for surfaces without a
BuildContext.
Implementation
String aiNotConnectedMessage(AppLocalizations l10n, AiProvider provider) =>
switch (provider.authMode) {
AiAuthMode.apiKey => l10n.aiNotConnectedApiKey(provider.displayName),
AiAuthMode.oauth => l10n.aiNotConnectedOAuth(provider.displayName),
};