RemoteConfigMapping extension

Single canonical mapping from the server/preview config shape (RemoteConfig) to the runtime BotConfiguration. Used by BOTH the real /api/project/config/ fetch (ChatRepository) AND the dashboard live-preview (web_embed parses the postMessage payload via RemoteConfig.fromJson then calls this). Keeping it in one place means a new server config field only has to be added to RemoteConfig

  • this method — the preview can no longer silently drop it.
on

Methods

toBotConfiguration({required String userID, required String projectSecretKey, Uint8List? avatar, String? currentLocale, String? userIdSignature, bool isPreviewMode = false, Map<String, dynamic>? userContext, String? authToken}) BotConfiguration

Available on RemoteConfig, provided by the RemoteConfigMapping extension