mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-10-20 23:45:22 +08:00
feat: add beta environment banner
Add beta environment warning banner for Cloud beta deployments with i18n support (zh/en/ja)
This commit is contained in:
@@ -200,11 +200,22 @@ class SystemRouterGroup(group.RouterGroup):
|
||||
if invitation_delivery_service is None:
|
||||
invitation_delivery_service = InvitationDeliveryService(self.ap)
|
||||
|
||||
# Detect beta flag from telemetry diagnostics manager
|
||||
is_beta = False
|
||||
diagnostics = getattr(self.ap, 'diagnostics', None)
|
||||
if diagnostics is not None:
|
||||
is_beta = getattr(diagnostics, 'beta', False)
|
||||
|
||||
# Detect Cloud deployment mode
|
||||
is_cloud = getattr(getattr(self.ap, 'deployment', None), 'mode', 'oss') == 'cloud'
|
||||
|
||||
return self.success(
|
||||
data={
|
||||
'version': constants.semantic_version,
|
||||
'debug': constants.debug_mode,
|
||||
'edition': constants.edition,
|
||||
'beta': is_beta,
|
||||
'deployment_mode': 'cloud' if is_cloud else 'oss',
|
||||
'enable_marketplace': self.ap.instance_config.data.get('plugin', {}).get(
|
||||
'enable_marketplace', True
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user