@iblai/iblai-js 2.10.0 → 2.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -100452,11 +100452,24 @@ var settingsTabLabels$3 = {
100452
100452
  },
100453
100453
  showAttachment: {
100454
100454
  label: "Show Attachment",
100455
- tooltip: "Show Attachment Options in Chat Interface"
100455
+ tooltip: "Lets people attach files to a conversation. Each surface has its own switch: In-app chat covers conversations hosted in the app, Embed widget covers the widget on your own site."
100456
100456
  },
100457
100457
  showVoiceRecord: {
100458
100458
  label: "Show Voice Record",
100459
- tooltip: "Show Voice Recording Options in Chat Interface"
100459
+ tooltip: "Lets people send a voice recording instead of typing. Each surface has its own switch: In-app chat covers conversations hosted in the app, Embed widget covers the widget on your own site."
100460
+ },
100461
+ showVoiceCall: {
100462
+ label: "Show Voice Call",
100463
+ tooltip: "Lets people start a live voice call with the agent. Each surface has its own switch: In-app chat covers conversations hosted in the app, Embed widget covers the widget on your own site."
100464
+ },
100465
+ embedShowAttachment: {
100466
+ label: "Show Attachment (embed widget)"
100467
+ },
100468
+ embedShowVoiceRecord: {
100469
+ label: "Show Voice Record (embed widget)"
100470
+ },
100471
+ embedShowVoiceCall: {
100472
+ label: "Show Voice Call (embed widget)"
100460
100473
  },
100461
100474
  allowCopies: {
100462
100475
  label: "Allow Copies",
@@ -100464,7 +100477,7 @@ var settingsTabLabels$3 = {
100464
100477
  },
100465
100478
  showReasoning: {
100466
100479
  label: "Verbose Reasoning",
100467
- tooltip: "Show the agent’s reasoning steps while it responds."
100480
+ tooltip: "Show the agent’s reasoning steps while it responds. This setting has one value, so it applies to both in-app chat and the embed widget."
100468
100481
  },
100469
100482
  image: {
100470
100483
  label: "Image",
@@ -100474,19 +100487,19 @@ var settingsTabLabels$3 = {
100474
100487
  },
100475
100488
  enhancedDocRetrieval: {
100476
100489
  label: "Enhanced document retrieval",
100477
- tooltip: "Run multiple search queries per question to pull in more relevant documents."
100490
+ tooltip: "Run multiple search queries per question to pull in more relevant documents. This setting has one value, so it applies to both in-app chat and the embed widget."
100478
100491
  },
100479
100492
  promptCaching: {
100480
100493
  label: "Prompt caching",
100481
- tooltip: "Cache repeated prompt context to lower latency and cost on long conversations."
100494
+ tooltip: "Cache repeated prompt context to lower latency and cost on long conversations. This setting has one value, so it applies to both in-app chat and the embed widget."
100482
100495
  },
100483
100496
  privateMode: {
100484
100497
  label: "Enable private mode",
100485
- tooltip: "When on, every conversation with this agent runs in private mode — no chat history or memory is stored for any user. Use this for sensitive or compliance-bound deployments."
100498
+ tooltip: "When on, every conversation with this agent runs in private mode — no chat history or memory is stored for any user. Use this for sensitive or compliance-bound deployments. This setting has one value, so it applies to both in-app chat and the embed widget."
100486
100499
  },
100487
100500
  smartDocRetrieval: {
100488
100501
  label: "Smart document retrieval",
100489
- tooltip: "Use function calling during voice calls to fetch documents only when needed."
100502
+ tooltip: "The agent fetches documents only when it needs them, instead of searching the knowledge base on every turn. This setting has one value, so it applies to both in-app chat and the embed widget."
100490
100503
  }
100491
100504
  },
100492
100505
  actions: {
@@ -100534,8 +100547,19 @@ var settingsTabLabels$3 = {
100534
100547
  },
100535
100548
  sections: {
100536
100549
  chatExperience: "Chat experience",
100537
- voiceCalls: "Voice & calls",
100538
- advanced: "Advanced"
100550
+ advanced: "Advanced",
100551
+ perSurface: "Surface Capabilities",
100552
+ globalSettings: "Global Capabilities"
100553
+ },
100554
+ surfaces: {
100555
+ inAppChat: "In-app chat",
100556
+ embedWidget: "Embed widget"
100557
+ },
100558
+ notes: {
100559
+ perSurface: "Set independently for in-app chat and the embed widget.",
100560
+ globalSettings: "These apply to in-app chat and the embed widget alike.",
100561
+ inAppChat: "Conversations hosted inside the app - the chat your users open here.",
100562
+ embedWidget: "The widget you embed on your own site using the snippet from the Embed tab."
100539
100563
  }
100540
100564
  };
100541
100565
  var skillsProfileAddSkillDialog$3 = {
@@ -101246,6 +101270,9 @@ var tabsSettingsTab$3 = {
101246
101270
  featuredTooltipAriaLabel: "More info about featured",
101247
101271
  showAttachmentTooltipAriaLabel: "More info about show attachment",
101248
101272
  showVoiceRecordTooltipAriaLabel: "More info about show voice record",
101273
+ showVoiceCallTooltipAriaLabel: "More info about show voice call",
101274
+ inAppChatTooltipAriaLabel: "More info about in-app chat",
101275
+ embedWidgetTooltipAriaLabel: "More info about the embed widget",
101249
101276
  allowCopiesTooltipAriaLabel: "More info about allow copies",
101250
101277
  showReasoningTooltipAriaLabel: "More info about verbose reasoning",
101251
101278
  toggleStateEnabled: "enabled",
@@ -107739,11 +107766,24 @@ var settingsTabLabels$2 = {
107739
107766
  },
107740
107767
  showAttachment: {
107741
107768
  label: "Afficher les pièces jointes",
107742
- tooltip: "Afficher les options de pièces jointes dans l'interface de chat"
107769
+ tooltip: "Permet aux personnes de joindre des fichiers à une conversation. Chaque surface a son propre interrupteur : In-app chat couvre les conversations hébergées dans l'application et Embed widget couvre le widget sur votre propre site."
107743
107770
  },
107744
107771
  showVoiceRecord: {
107745
107772
  label: "Afficher l'enregistrement vocal",
107746
- tooltip: "Afficher les options d'enregistrement vocal dans l'interface de chat"
107773
+ tooltip: "Permet aux personnes d'envoyer un enregistrement vocal au lieu d'écrire. Chaque surface a son propre interrupteur : In-app chat couvre les conversations hébergées dans l'application et Embed widget couvre le widget sur votre propre site."
107774
+ },
107775
+ showVoiceCall: {
107776
+ label: "Show Voice Call",
107777
+ tooltip: "Permet aux personnes de démarrer un appel vocal en direct avec l'agent. Chaque surface a son propre interrupteur : In-app chat couvre les conversations hébergées dans l'application et Embed widget couvre le widget sur votre propre site."
107778
+ },
107779
+ embedShowAttachment: {
107780
+ label: "Afficher les pieces jointes (widget integre)"
107781
+ },
107782
+ embedShowVoiceRecord: {
107783
+ label: "Afficher l'enregistrement vocal (widget integre)"
107784
+ },
107785
+ embedShowVoiceCall: {
107786
+ label: "Afficher les appels vocaux (widget integre)"
107747
107787
  },
107748
107788
  allowCopies: {
107749
107789
  label: "Autoriser les copies",
@@ -107751,7 +107791,7 @@ var settingsTabLabels$2 = {
107751
107791
  },
107752
107792
  showReasoning: {
107753
107793
  label: "Raisonnement détaillé",
107754
- tooltip: "Afficher les étapes de raisonnement de l'agent pendant qu'il répond."
107794
+ tooltip: "Afficher les étapes de raisonnement de l'agent pendant qu'il répond. Ce paramètre a une seule valeur ; il s'applique donc à la fois au chat dans l'application et au widget intégré."
107755
107795
  },
107756
107796
  image: {
107757
107797
  label: "Image",
@@ -107761,19 +107801,19 @@ var settingsTabLabels$2 = {
107761
107801
  },
107762
107802
  enhancedDocRetrieval: {
107763
107803
  label: "Enhanced document retrieval",
107764
- tooltip: "Run multiple search queries per question to pull in more relevant documents."
107804
+ tooltip: "Run multiple search queries per question to pull in more relevant documents. This setting has one value, so it applies to both in-app chat and the embed widget."
107765
107805
  },
107766
107806
  promptCaching: {
107767
107807
  label: "Prompt caching",
107768
- tooltip: "Cache repeated prompt context to lower latency and cost on long conversations."
107808
+ tooltip: "Cache repeated prompt context to lower latency and cost on long conversations. This setting has one value, so it applies to both in-app chat and the embed widget."
107769
107809
  },
107770
107810
  privateMode: {
107771
107811
  label: "Enable private mode",
107772
- tooltip: "When on, every conversation with this agent runs in private mode — no chat history or memory is stored for any user. Use this for sensitive or compliance-bound deployments."
107812
+ tooltip: "When on, every conversation with this agent runs in private mode — no chat history or memory is stored for any user. Use this for sensitive or compliance-bound deployments. This setting has one value, so it applies to both in-app chat and the embed widget."
107773
107813
  },
107774
107814
  smartDocRetrieval: {
107775
107815
  label: "Smart document retrieval",
107776
- tooltip: "Use function calling during voice calls to fetch documents only when needed."
107816
+ tooltip: "The agent fetches documents only when it needs them, instead of searching the knowledge base on every turn. This setting has one value, so it applies to both in-app chat and the embed widget."
107777
107817
  }
107778
107818
  },
107779
107819
  actions: {
@@ -107821,8 +107861,19 @@ var settingsTabLabels$2 = {
107821
107861
  },
107822
107862
  sections: {
107823
107863
  chatExperience: "Chat experience",
107824
- voiceCalls: "Voice & calls",
107825
- advanced: "Advanced"
107864
+ advanced: "Advanced",
107865
+ perSurface: "Capacites par surface",
107866
+ globalSettings: "Capacites globales"
107867
+ },
107868
+ surfaces: {
107869
+ inAppChat: "In-app chat",
107870
+ embedWidget: "Embed widget"
107871
+ },
107872
+ notes: {
107873
+ perSurface: "A configurer independamment pour le chat dans l'application et le widget integre.",
107874
+ globalSettings: "Ils s'appliquent aussi bien au chat dans l'application qu'au widget integre.",
107875
+ inAppChat: "Les conversations hebergees dans l'application : le chat que vos utilisateurs ouvrent ici.",
107876
+ embedWidget: "Le widget que vous integrez a votre propre site avec l'extrait de l'onglet Integration."
107826
107877
  }
107827
107878
  };
107828
107879
  var skillsProfileAddSkillDialog$2 = {
@@ -108533,6 +108584,9 @@ var tabsSettingsTab$2 = {
108533
108584
  featuredTooltipAriaLabel: "Plus d'informations sur la mise en avant",
108534
108585
  showAttachmentTooltipAriaLabel: "Plus d'informations sur l'affichage des pièces jointes",
108535
108586
  showVoiceRecordTooltipAriaLabel: "Plus d'informations sur l'affichage de l'enregistrement vocal",
108587
+ showVoiceCallTooltipAriaLabel: "More info about show voice call",
108588
+ inAppChatTooltipAriaLabel: "More info about in-app chat",
108589
+ embedWidgetTooltipAriaLabel: "More info about the embed widget",
108536
108590
  allowCopiesTooltipAriaLabel: "Plus d'informations sur l'autorisation des copies",
108537
108591
  showReasoningTooltipAriaLabel: "Plus d'informations sur le raisonnement détaillé",
108538
108592
  toggleStateEnabled: "activé",
@@ -114860,11 +114914,24 @@ var settingsTabLabels$1 = {
114860
114914
  },
114861
114915
  showAttachment: {
114862
114916
  label: "Mostrar archivos adjuntos",
114863
- tooltip: "Mostrar opciones de archivos adjuntos en la interfaz de chat"
114917
+ tooltip: "Permite que las personas adjunten archivos a una conversación. Cada superficie tiene su propio interruptor: In-app chat cubre las conversaciones alojadas en la aplicación y Embed widget cubre el widget en tu propio sitio."
114864
114918
  },
114865
114919
  showVoiceRecord: {
114866
114920
  label: "Mostrar grabación de voz",
114867
- tooltip: "Mostrar opciones de grabación de voz en la interfaz de chat"
114921
+ tooltip: "Permite que las personas envíen una grabación de voz en lugar de escribir. Cada superficie tiene su propio interruptor: In-app chat cubre las conversaciones alojadas en la aplicación y Embed widget cubre el widget en tu propio sitio."
114922
+ },
114923
+ showVoiceCall: {
114924
+ label: "Show Voice Call",
114925
+ tooltip: "Permite que las personas inicien una llamada de voz en vivo con el agente. Cada superficie tiene su propio interruptor: In-app chat cubre las conversaciones alojadas en la aplicación y Embed widget cubre el widget en tu propio sitio."
114926
+ },
114927
+ embedShowAttachment: {
114928
+ label: "Mostrar adjuntos (widget incrustado)"
114929
+ },
114930
+ embedShowVoiceRecord: {
114931
+ label: "Mostrar grabacion de voz (widget incrustado)"
114932
+ },
114933
+ embedShowVoiceCall: {
114934
+ label: "Mostrar llamadas de voz (widget incrustado)"
114868
114935
  },
114869
114936
  allowCopies: {
114870
114937
  label: "Permitir copias",
@@ -114872,7 +114939,7 @@ var settingsTabLabels$1 = {
114872
114939
  },
114873
114940
  showReasoning: {
114874
114941
  label: "Razonamiento detallado",
114875
- tooltip: "Mostrar los pasos de razonamiento del agente mientras responde."
114942
+ tooltip: "Mostrar los pasos de razonamiento del agente mientras responde. Esta configuración tiene un solo valor, por lo que se aplica tanto al chat en la aplicación como al widget insertado."
114876
114943
  },
114877
114944
  image: {
114878
114945
  label: "Imagen",
@@ -114882,19 +114949,19 @@ var settingsTabLabels$1 = {
114882
114949
  },
114883
114950
  enhancedDocRetrieval: {
114884
114951
  label: "Enhanced document retrieval",
114885
- tooltip: "Run multiple search queries per question to pull in more relevant documents."
114952
+ tooltip: "Run multiple search queries per question to pull in more relevant documents. This setting has one value, so it applies to both in-app chat and the embed widget."
114886
114953
  },
114887
114954
  promptCaching: {
114888
114955
  label: "Prompt caching",
114889
- tooltip: "Cache repeated prompt context to lower latency and cost on long conversations."
114956
+ tooltip: "Cache repeated prompt context to lower latency and cost on long conversations. This setting has one value, so it applies to both in-app chat and the embed widget."
114890
114957
  },
114891
114958
  privateMode: {
114892
114959
  label: "Enable private mode",
114893
- tooltip: "When on, every conversation with this agent runs in private mode — no chat history or memory is stored for any user. Use this for sensitive or compliance-bound deployments."
114960
+ tooltip: "When on, every conversation with this agent runs in private mode — no chat history or memory is stored for any user. Use this for sensitive or compliance-bound deployments. This setting has one value, so it applies to both in-app chat and the embed widget."
114894
114961
  },
114895
114962
  smartDocRetrieval: {
114896
114963
  label: "Smart document retrieval",
114897
- tooltip: "Use function calling during voice calls to fetch documents only when needed."
114964
+ tooltip: "The agent fetches documents only when it needs them, instead of searching the knowledge base on every turn. This setting has one value, so it applies to both in-app chat and the embed widget."
114898
114965
  }
114899
114966
  },
114900
114967
  actions: {
@@ -114942,8 +115009,19 @@ var settingsTabLabels$1 = {
114942
115009
  },
114943
115010
  sections: {
114944
115011
  chatExperience: "Chat experience",
114945
- voiceCalls: "Voice & calls",
114946
- advanced: "Advanced"
115012
+ advanced: "Advanced",
115013
+ perSurface: "Capacidades por superficie",
115014
+ globalSettings: "Capacidades globales"
115015
+ },
115016
+ surfaces: {
115017
+ inAppChat: "In-app chat",
115018
+ embedWidget: "Embed widget"
115019
+ },
115020
+ notes: {
115021
+ perSurface: "Se configuran de forma independiente para el chat en la aplicacion y el widget incrustado.",
115022
+ globalSettings: "Se aplican tanto al chat en la aplicacion como al widget incrustado.",
115023
+ inAppChat: "Conversaciones alojadas dentro de la aplicacion: el chat que tus usuarios abren aqui.",
115024
+ embedWidget: "El widget que incrustas en tu propio sitio con el fragmento de la pestana Insertar."
114947
115025
  }
114948
115026
  };
114949
115027
  var skillsProfileAddSkillDialog$1 = {
@@ -115654,6 +115732,9 @@ var tabsSettingsTab$1 = {
115654
115732
  featuredTooltipAriaLabel: "Más información sobre destacado",
115655
115733
  showAttachmentTooltipAriaLabel: "Más información sobre mostrar adjuntos",
115656
115734
  showVoiceRecordTooltipAriaLabel: "Más información sobre mostrar grabación de voz",
115735
+ showVoiceCallTooltipAriaLabel: "More info about show voice call",
115736
+ inAppChatTooltipAriaLabel: "More info about in-app chat",
115737
+ embedWidgetTooltipAriaLabel: "More info about the embed widget",
115657
115738
  allowCopiesTooltipAriaLabel: "Más información sobre permitir copias",
115658
115739
  showReasoningTooltipAriaLabel: "Más información sobre el razonamiento detallado",
115659
115740
  toggleStateEnabled: "activado",
@@ -121981,11 +122062,24 @@ var settingsTabLabels = {
121981
122062
  },
121982
122063
  showAttachment: {
121983
122064
  label: "显示附件",
121984
- tooltip: "在聊天界面中显示附件选项"
122065
+ tooltip: "允许用户在对话中添加附件。每个界面都有独立的开关:In-app chat 用于应用内托管的对话,Embed widget 用于您自己网站上的小组件。"
121985
122066
  },
121986
122067
  showVoiceRecord: {
121987
122068
  label: "显示语音录制",
121988
- tooltip: "在聊天界面中显示语音录制选项"
122069
+ tooltip: "允许用户发送语音录音而不是打字。每个界面都有独立的开关:In-app chat 用于应用内托管的对话,Embed widget 用于您自己网站上的小组件。"
122070
+ },
122071
+ showVoiceCall: {
122072
+ label: "Show Voice Call",
122073
+ tooltip: "允许用户与智能体发起实时语音通话。每个界面都有独立的开关:In-app chat 用于应用内托管的对话,Embed widget 用于您自己网站上的小组件。"
122074
+ },
122075
+ embedShowAttachment: {
122076
+ label: "显示附件(嵌入式挂件)"
122077
+ },
122078
+ embedShowVoiceRecord: {
122079
+ label: "显示语音录音(嵌入式挂件)"
122080
+ },
122081
+ embedShowVoiceCall: {
122082
+ label: "显示语音通话(嵌入式挂件)"
121989
122083
  },
121990
122084
  allowCopies: {
121991
122085
  label: "允许复制",
@@ -121993,7 +122087,7 @@ var settingsTabLabels = {
121993
122087
  },
121994
122088
  showReasoning: {
121995
122089
  label: "详细推理",
121996
- tooltip: "在智能体响应时显示其推理步骤。"
122090
+ tooltip: "在智能体响应时显示其推理步骤。 此设置只有一个值,因此同时适用于应用内聊天和嵌入式小组件。"
121997
122091
  },
121998
122092
  image: {
121999
122093
  label: "图片",
@@ -122003,19 +122097,19 @@ var settingsTabLabels = {
122003
122097
  },
122004
122098
  enhancedDocRetrieval: {
122005
122099
  label: "Enhanced document retrieval",
122006
- tooltip: "Run multiple search queries per question to pull in more relevant documents."
122100
+ tooltip: "Run multiple search queries per question to pull in more relevant documents. This setting has one value, so it applies to both in-app chat and the embed widget."
122007
122101
  },
122008
122102
  promptCaching: {
122009
122103
  label: "Prompt caching",
122010
- tooltip: "Cache repeated prompt context to lower latency and cost on long conversations."
122104
+ tooltip: "Cache repeated prompt context to lower latency and cost on long conversations. This setting has one value, so it applies to both in-app chat and the embed widget."
122011
122105
  },
122012
122106
  privateMode: {
122013
122107
  label: "Enable private mode",
122014
- tooltip: "When on, every conversation with this agent runs in private mode — no chat history or memory is stored for any user. Use this for sensitive or compliance-bound deployments."
122108
+ tooltip: "When on, every conversation with this agent runs in private mode — no chat history or memory is stored for any user. Use this for sensitive or compliance-bound deployments. This setting has one value, so it applies to both in-app chat and the embed widget."
122015
122109
  },
122016
122110
  smartDocRetrieval: {
122017
122111
  label: "Smart document retrieval",
122018
- tooltip: "Use function calling during voice calls to fetch documents only when needed."
122112
+ tooltip: "The agent fetches documents only when it needs them, instead of searching the knowledge base on every turn. This setting has one value, so it applies to both in-app chat and the embed widget."
122019
122113
  }
122020
122114
  },
122021
122115
  actions: {
@@ -122063,8 +122157,19 @@ var settingsTabLabels = {
122063
122157
  },
122064
122158
  sections: {
122065
122159
  chatExperience: "Chat experience",
122066
- voiceCalls: "Voice & calls",
122067
- advanced: "Advanced"
122160
+ advanced: "Advanced",
122161
+ perSurface: "按界面功能",
122162
+ globalSettings: "全局功能"
122163
+ },
122164
+ surfaces: {
122165
+ inAppChat: "In-app chat",
122166
+ embedWidget: "Embed widget"
122167
+ },
122168
+ notes: {
122169
+ perSurface: "分别为应用内聊天和嵌入式挂件单独设置。",
122170
+ globalSettings: "同时适用于应用内聊天和嵌入式挂件。",
122171
+ inAppChat: "应用内托管的对话,即用户在此打开的聊天。",
122172
+ embedWidget: "你使用“嵌入”标签页中的代码片段嵌入到自己网站上的挂件。"
122068
122173
  }
122069
122174
  };
122070
122175
  var skillsProfileAddSkillDialog = {
@@ -122775,6 +122880,9 @@ var tabsSettingsTab = {
122775
122880
  featuredTooltipAriaLabel: "关于精选的更多信息",
122776
122881
  showAttachmentTooltipAriaLabel: "关于显示附件的更多信息",
122777
122882
  showVoiceRecordTooltipAriaLabel: "关于显示语音录制的更多信息",
122883
+ showVoiceCallTooltipAriaLabel: "More info about show voice call",
122884
+ inAppChatTooltipAriaLabel: "More info about in-app chat",
122885
+ embedWidgetTooltipAriaLabel: "More info about the embed widget",
122778
122886
  allowCopiesTooltipAriaLabel: "关于允许复制的更多信息",
122779
122887
  showReasoningTooltipAriaLabel: "关于详细推理的更多信息",
122780
122888
  toggleStateEnabled: "已启用",
@@ -218740,6 +218848,12 @@ function Profile({ tenant, username, tenants, onClose, customization = {}, isAdm
218740
218848
  var _a;
218741
218849
  (_a = fileInputRef.current) === null || _a === void 0 ? void 0 : _a.click();
218742
218850
  };
218851
+ // The picture itself, with no editing affordance around it. The wrapper
218852
+ // below decides whether it is clickable.
218853
+ const profileAvatar = (jsxs(Avatar, { className: "h-20 w-20", children: [((_b = userMetadataEdx === null || userMetadataEdx === void 0 ? void 0 : userMetadataEdx.profile_image) === null || _b === void 0 ? void 0 : _b.has_image) ? (jsx(AvatarImage, { src: (_c = userMetadataEdx === null || userMetadataEdx === void 0 ? void 0 : userMetadataEdx.profile_image) === null || _c === void 0 ? void 0 : _c.image_url_full, alt: t('profileIndex.altProfilePicture'), className: "rounded-full object-cover w-full h-full group-hover:opacity-80 transition-opacity" })) : customization.useGravatarPicFallback ? (jsx(Gravatar, { className: "w-full h-full rounded-full object-cover group-hover:opacity-80 transition-opacity", email: userMetadata === null || userMetadata === void 0 ? void 0 : userMetadata.email, size: 80, alt: t('profileIndex.altProfilePictureGravatar') })) : (jsx(Fragment$1, {})), jsx(AvatarFallback, { className: cn('bg-blue-800 text-white text-xl rounded-full', customization.useGravatarPicFallback &&
218854
+ !((_d = userMetadataEdx === null || userMetadataEdx === void 0 ? void 0 : userMetadataEdx.profile_image) === null || _d === void 0 ? void 0 : _d.image_url_full)
218855
+ ? 'hidden'
218856
+ : ''), children: getInitials((userMetadata === null || userMetadata === void 0 ? void 0 : userMetadata.name) || (userMetadata === null || userMetadata === void 0 ? void 0 : userMetadata.username) || (userMetadata === null || userMetadata === void 0 ? void 0 : userMetadata.email) || '') })] }));
218743
218857
  const handleFileUpload = (event) => {
218744
218858
  var _a;
218745
218859
  const file = (_a = event.target.files) === null || _a === void 0 ? void 0 : _a[0];
@@ -218790,10 +218904,9 @@ function Profile({ tenant, username, tenants, onClose, customization = {}, isAdm
218790
218904
  return (jsxs("div", { className: "flex flex-col lg:flex-row h-full", children: [jsx("div", { className: "lg:hidden", children: jsx("div", { className: "px-6 py-4 border-b border-gray-200", children: jsx("h2", { className: "text-lg font-semibold text-gray-900", children: t('profileIndex.profileHeading') }) }) }), jsxs("div", { className: "hidden lg:flex bg-white border-r border-gray-200 dark:border-gray-700 flex-col overflow-hidden", style: {
218791
218905
  width: '320px',
218792
218906
  height: '100%',
218793
- }, children: [jsxs("div", { className: "flex flex-col items-center justify-center py-6 px-6 border-b border-gray-200 dark:border-gray-700 flex-shrink-0", children: [isUserMetadataEdxLoading || isUploadingProfileImage ? (jsx(Skeleton, { className: "h-20 w-20 mb-6 rounded-full", "aria-label": t('profileIndex.ariaLoadingProfileImage') })) : (jsxs("button", { type: "button", className: "relative w-20 h-20 mb-4 cursor-pointer group rounded-full focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2", onMouseEnter: () => setIsHovering(true), onMouseLeave: () => setIsHovering(false), onClick: handleAvatarClick, "aria-label": t('profileIndex.ariaUploadProfilePicture'), children: [jsxs(Avatar, { className: "h-20 w-20", children: [((_b = userMetadataEdx === null || userMetadataEdx === void 0 ? void 0 : userMetadataEdx.profile_image) === null || _b === void 0 ? void 0 : _b.has_image) ? (jsx(AvatarImage, { src: (_c = userMetadataEdx === null || userMetadataEdx === void 0 ? void 0 : userMetadataEdx.profile_image) === null || _c === void 0 ? void 0 : _c.image_url_full, alt: t('profileIndex.altProfilePicture'), className: "rounded-full object-cover w-full h-full group-hover:opacity-80 transition-opacity" })) : customization.useGravatarPicFallback ? (jsx(Gravatar, { className: "w-full h-full rounded-full object-cover group-hover:opacity-80 transition-opacity", email: userMetadata === null || userMetadata === void 0 ? void 0 : userMetadata.email, size: 80, alt: t('profileIndex.altProfilePictureGravatar') })) : (jsx(Fragment$1, {})), jsx(AvatarFallback, { className: cn('bg-blue-800 text-white text-xl rounded-full', customization.useGravatarPicFallback &&
218794
- !((_d = userMetadataEdx === null || userMetadataEdx === void 0 ? void 0 : userMetadataEdx.profile_image) === null || _d === void 0 ? void 0 : _d.image_url_full)
218795
- ? 'hidden'
218796
- : ''), children: getInitials((userMetadata === null || userMetadata === void 0 ? void 0 : userMetadata.name) || (userMetadata === null || userMetadata === void 0 ? void 0 : userMetadata.username) || (userMetadata === null || userMetadata === void 0 ? void 0 : userMetadata.email) || '') })] }), isHovering && (jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-blue-800 rounded-full border-4 border-white/20", "aria-hidden": "true", children: jsx("span", { className: "text-white text-xs font-medium text-center px-2", children: t('profileIndex.uploadOverlay') }) })), jsx("input", { ref: fileInputRef, type: "file", accept: "image/*", onChange: handleFileUpload, className: "hidden", "aria-label": t('profileIndex.ariaChooseProfilePicture'), tabIndex: -1 })] })), jsx("h2", { className: "text-base font-semibold text-gray-900 dark:text-gray-100 text-center mb-3 break-all px-2", title: userMetadata === null || userMetadata === void 0 ? void 0 : userMetadata.email, children: userMetadata === null || userMetadata === void 0 ? void 0 : userMetadata.email }), jsxs("div", { className: "flex justify-center space-x-3", children: [jsxs("div", { className: "bg-blue-100 text-blue-700 px-2 py-1 rounded font-medium flex items-center text-sm", children: [jsx(RoleIcon, { className: "h-4 w-4 mr-2", "aria-hidden": "true" }), jsx("span", { children: isAdmin ? t('profileIndex.roleAdmin') : t('profileIndex.roleUser') })] }), customization.showPlatformName && (jsx("div", { className: "bg-gray-100 text-gray-600 px-4 py-2 rounded text-xs font-medium", children: tenant.toUpperCase() }))] })] }), jsx("nav", { className: "flex-1 overflow-y-auto", style: { minHeight: 0 }, "aria-label": t('profileIndex.ariaProfileTabs'), children: jsx("div", { className: "p-4", children: jsx("div", { className: "flex flex-col space-y-1.5", role: "tablist", "aria-orientation": "vertical", children: TABS.map((tab) => (jsxs("button", { role: "tab", "aria-selected": activeTab === tab.id, "aria-controls": `${tab.id}-tabpanel`, id: `${tab.id}-tab`, onClick: () => setActiveTab(tab.id), className: `w-full justify-start px-4 py-2.5 text-left rounded-lg transition-all flex items-center text-base ${activeTab === tab.id
218907
+ }, children: [jsxs("div", { className: "flex flex-col items-center justify-center py-6 px-6 border-b border-gray-200 dark:border-gray-700 flex-shrink-0", children: [isUserMetadataEdxLoading || isUploadingProfileImage ? (jsx(Skeleton, { className: "h-20 w-20 mb-6 rounded-full", "aria-label": t('profileIndex.ariaLoadingProfileImage') })) : isReadOnly ? (
218908
+ // Someone else's profile: show the picture, offer no way to replace it.
218909
+ jsx("div", { className: "relative w-20 h-20 mb-4 rounded-full", children: profileAvatar })) : (jsxs("button", { type: "button", className: "relative w-20 h-20 mb-4 cursor-pointer group rounded-full focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2", onMouseEnter: () => setIsHovering(true), onMouseLeave: () => setIsHovering(false), onClick: handleAvatarClick, "aria-label": t('profileIndex.ariaUploadProfilePicture'), children: [profileAvatar, isHovering && (jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-blue-800 rounded-full border-4 border-white/20", "aria-hidden": "true", children: jsx("span", { className: "text-white text-xs font-medium text-center px-2", children: t('profileIndex.uploadOverlay') }) })), jsx("input", { ref: fileInputRef, type: "file", accept: "image/*", onChange: handleFileUpload, className: "hidden", "aria-label": t('profileIndex.ariaChooseProfilePicture'), tabIndex: -1 })] })), jsx("h2", { className: "text-base font-semibold text-gray-900 dark:text-gray-100 text-center mb-3 break-all px-2", title: userMetadata === null || userMetadata === void 0 ? void 0 : userMetadata.email, children: userMetadata === null || userMetadata === void 0 ? void 0 : userMetadata.email }), jsxs("div", { className: "flex justify-center space-x-3", children: [jsxs("div", { className: "bg-blue-100 text-blue-700 px-2 py-1 rounded font-medium flex items-center text-sm", children: [jsx(RoleIcon, { className: "h-4 w-4 mr-2", "aria-hidden": "true" }), jsx("span", { children: isAdmin ? t('profileIndex.roleAdmin') : t('profileIndex.roleUser') })] }), customization.showPlatformName && (jsx("div", { className: "bg-gray-100 text-gray-600 px-4 py-2 rounded text-xs font-medium", children: tenant.toUpperCase() }))] })] }), jsx("nav", { className: "flex-1 overflow-y-auto", style: { minHeight: 0 }, "aria-label": t('profileIndex.ariaProfileTabs'), children: jsx("div", { className: "p-4", children: jsx("div", { className: "flex flex-col space-y-1.5", role: "tablist", "aria-orientation": "vertical", children: TABS.map((tab) => (jsxs("button", { role: "tab", "aria-selected": activeTab === tab.id, "aria-controls": `${tab.id}-tabpanel`, id: `${tab.id}-tab`, onClick: () => setActiveTab(tab.id), className: `w-full justify-start px-4 py-2.5 text-left rounded-lg transition-all flex items-center text-base ${activeTab === tab.id
218797
218910
  ? 'bg-blue-50 text-blue-700 font-medium'
218798
218911
  : 'hover:bg-gray-50 text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-gray-100'}`, children: [jsx(tab.renderIcon, { className: "h-5 w-5 mr-3 flex-shrink-0", "aria-hidden": "true" }), jsx("span", { className: "truncate", children: tab.label })] }, tab.id))) }) }) })] }), jsx("nav", { className: "lg:hidden", "aria-label": t('profileIndex.ariaProfileTabsMobile'), children: jsx("div", { className: "w-full justify-start px-6 py-2 bg-white border-b border-gray-200 rounded-none h-auto overflow-x-auto", children: jsx("div", { className: "flex space-x-2", role: "tablist", "aria-orientation": "horizontal", children: TABS.map((tab) => (jsxs("button", { role: "tab", "aria-selected": activeTab === tab.id, "aria-controls": `${tab.id}-tabpanel`, id: `${tab.id}-tab-mobile`, onClick: () => setActiveTab(tab.id), className: `flex items-center gap-2 px-3 py-2 rounded-lg whitespace-nowrap text-sm transition-all ${activeTab === tab.id
218799
218912
  ? 'bg-blue-50 text-blue-600 font-medium'
@@ -223986,7 +224099,18 @@ const TabDescription = ({ icon, title, children }) => {
223986
224099
  };
223987
224100
  const Admin = ({ tenant, onInviteClick, hasUserTabPermission = false, hasGroupsTabPermission = false, hasRolesTabPermission = false, hasPoliciesTabPermission = false, hasTeamsTabPermission = false, hasAlertsTabPermission = false, hasInviteUserPermission = false, hasCreateTeamPermission = false, onLoadGroupPermissions, rbacPermissions = {}, enableRbac = false, showGradebookTab = false, currentSpa, authSpaUrl, onboardingBasePath, }) => {
223988
224101
  const t = useT();
223989
- return (jsx("div", { className: "border border-gray-200 rounded-lg p-6", children: jsxs(Tabs, { defaultValue: "users", "aria-label": t('profileAdmin.rbacManagementTabsAriaLabel'), children: [jsxs(TabsList, { "aria-label": t('profileAdmin.managementTabsAriaLabel'), className: "max-w-full overflow-x-auto justify-start px-1", children: [hasUserTabPermission && (jsx(TabsTrigger, { value: "users", children: t('profileAdmin.usersTab') })), hasGroupsTabPermission && (jsx(TabsTrigger, { value: "groups", children: t('profileAdmin.groupsTab') })), hasRolesTabPermission && (jsx(TabsTrigger, { value: "roles", children: t('profileAdmin.rolesTab') })), hasPoliciesTabPermission && (jsx(TabsTrigger, { value: "policies", children: t('profileAdmin.policiesTab') })), hasTeamsTabPermission && (jsx(TabsTrigger, { value: "teams", children: t('profileAdmin.teamsTab') })), hasAlertsTabPermission && (jsx(TabsTrigger, { value: "alerts", children: t('profileAdmin.alertsTab') })), jsx(TabsTrigger, { value: "applications", children: t('profileAdmin.applicationsTab') }), jsx(TabsTrigger, { value: "onboarding", children: t('profileAdmin.onboardingTab') })] }), hasUserTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "users", children: [jsx(TabDescription, { icon: jsx(Users, { className: "w-5 h-5" }), title: t('profileAdmin.usersTab'), children: t('profileAdmin.usersDescription') }), jsx(UsersTab, { tenant: tenant, onInviteClick: onInviteClick, currentSpa: currentSpa, showGradebookTab: showGradebookTab })] })), hasGroupsTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "groups", children: [jsx(TabDescription, { icon: jsx(UsersRound, { className: "w-5 h-5" }), title: t('profileAdmin.groupsTab'), children: t('profileAdmin.groupsDescription') }), jsx(GroupsTab, { tenant: tenant })] })), hasRolesTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "roles", children: [jsx(TabDescription, { icon: jsx(UserCog, { className: "w-5 h-5" }), title: t('profileAdmin.rolesTab'), children: t('profileAdmin.rolesDescription') }), jsx(RolesTab, { tenant: tenant })] })), hasPoliciesTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "policies", children: [jsx(TabDescription, { icon: jsx(ScrollText, { className: "w-5 h-5" }), title: t('profileAdmin.policiesTab'), children: t('profileAdmin.policiesDescription') }), jsx(PoliciesTab, { tenant: tenant })] })), hasTeamsTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "teams", children: [jsx(TabDescription, { icon: jsx(Shield, { className: "w-5 h-5" }), title: t('profileAdmin.teamsTab'), children: t('profileAdmin.teamsDescription') }), jsx(GroupsTab, { tenant: tenant, isTeam: true, onInviteClick: onInviteClick, hasInviteUserPermission: hasInviteUserPermission, hasCreateTeamPermission: hasCreateTeamPermission, onLoadGroupPermissions: onLoadGroupPermissions, rbacPermissions: rbacPermissions, enableRbac: enableRbac })] })), hasAlertsTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "alerts", children: [jsx(TabDescription, { icon: jsx(BellRing, { className: "w-5 h-5" }), title: t('profileAdmin.alertsTab'), children: t('profileAdmin.alertsDescription') }), jsx(AlertsTab, { tenant: tenant })] })), jsxs(TabsContent, { className: "mt-4", value: "applications", children: [jsx(TabDescription, { icon: jsx(ClipboardList, { className: "w-5 h-5" }), title: t('profileAdmin.applicationsTab'), children: t('profileAdmin.applicationsTabDescription') }), jsx(ApplicationsTab, { platformKey: tenant, authSpaUrl: authSpaUrl })] }), jsxs(TabsContent, { className: "mt-4", value: "onboarding", children: [jsx(TabDescription, { icon: jsx(UserPlus, { className: "w-5 h-5" }), title: t('profileAdmin.onboardingTab'), children: t('profileAdmin.onboardingTabDescription') }), jsx(OnboardingTab, { platformKey: tenant, onboardingBasePath: onboardingBasePath })] })] }) }));
224102
+ const { currentTenant } = useCurrentTenant();
224103
+ const storeRbacPermissions = useSelector(selectRbacPermissions);
224104
+ /**
224105
+ * A pure watcher administers nothing — Users is the only tab they get, and
224106
+ * `UsersTab` serves them the users they may watch rather than the tenant
224107
+ * roster. Their `/watchedgroups/#list` permission would otherwise open
224108
+ * Alerts and Teams, and Applications and Onboarding are ungated for
224109
+ * everyone else.
224110
+ */
224111
+ const isWatcher = isPureWatcher(storeRbacPermissions, currentTenant);
224112
+ const showUsersTab = isWatcher || hasUserTabPermission;
224113
+ return (jsx("div", { className: "border border-gray-200 rounded-lg p-6", children: jsxs(Tabs, { defaultValue: "users", "aria-label": t('profileAdmin.rbacManagementTabsAriaLabel'), children: [jsxs(TabsList, { "aria-label": t('profileAdmin.managementTabsAriaLabel'), className: "max-w-full overflow-x-auto justify-start px-1", children: [showUsersTab && jsx(TabsTrigger, { value: "users", children: t('profileAdmin.usersTab') }), !isWatcher && hasGroupsTabPermission && (jsx(TabsTrigger, { value: "groups", children: t('profileAdmin.groupsTab') })), !isWatcher && hasRolesTabPermission && (jsx(TabsTrigger, { value: "roles", children: t('profileAdmin.rolesTab') })), !isWatcher && hasPoliciesTabPermission && (jsx(TabsTrigger, { value: "policies", children: t('profileAdmin.policiesTab') })), !isWatcher && hasTeamsTabPermission && (jsx(TabsTrigger, { value: "teams", children: t('profileAdmin.teamsTab') })), !isWatcher && hasAlertsTabPermission && (jsx(TabsTrigger, { value: "alerts", children: t('profileAdmin.alertsTab') })), !isWatcher && (jsx(TabsTrigger, { value: "applications", children: t('profileAdmin.applicationsTab') })), !isWatcher && (jsx(TabsTrigger, { value: "onboarding", children: t('profileAdmin.onboardingTab') }))] }), showUsersTab && (jsxs(TabsContent, { className: "mt-4", value: "users", children: [jsx(TabDescription, { icon: jsx(Users, { className: "w-5 h-5" }), title: t('profileAdmin.usersTab'), children: t('profileAdmin.usersDescription') }), jsx(UsersTab, { tenant: tenant, onInviteClick: onInviteClick, currentSpa: currentSpa, showGradebookTab: showGradebookTab })] })), !isWatcher && hasGroupsTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "groups", children: [jsx(TabDescription, { icon: jsx(UsersRound, { className: "w-5 h-5" }), title: t('profileAdmin.groupsTab'), children: t('profileAdmin.groupsDescription') }), jsx(GroupsTab, { tenant: tenant })] })), !isWatcher && hasRolesTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "roles", children: [jsx(TabDescription, { icon: jsx(UserCog, { className: "w-5 h-5" }), title: t('profileAdmin.rolesTab'), children: t('profileAdmin.rolesDescription') }), jsx(RolesTab, { tenant: tenant })] })), !isWatcher && hasPoliciesTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "policies", children: [jsx(TabDescription, { icon: jsx(ScrollText, { className: "w-5 h-5" }), title: t('profileAdmin.policiesTab'), children: t('profileAdmin.policiesDescription') }), jsx(PoliciesTab, { tenant: tenant })] })), !isWatcher && hasTeamsTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "teams", children: [jsx(TabDescription, { icon: jsx(Shield, { className: "w-5 h-5" }), title: t('profileAdmin.teamsTab'), children: t('profileAdmin.teamsDescription') }), jsx(GroupsTab, { tenant: tenant, isTeam: true, onInviteClick: onInviteClick, hasInviteUserPermission: hasInviteUserPermission, hasCreateTeamPermission: hasCreateTeamPermission, onLoadGroupPermissions: onLoadGroupPermissions, rbacPermissions: rbacPermissions, enableRbac: enableRbac })] })), !isWatcher && hasAlertsTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "alerts", children: [jsx(TabDescription, { icon: jsx(BellRing, { className: "w-5 h-5" }), title: t('profileAdmin.alertsTab'), children: t('profileAdmin.alertsDescription') }), jsx(AlertsTab, { tenant: tenant })] })), !isWatcher && (jsxs(TabsContent, { className: "mt-4", value: "applications", children: [jsx(TabDescription, { icon: jsx(ClipboardList, { className: "w-5 h-5" }), title: t('profileAdmin.applicationsTab'), children: t('profileAdmin.applicationsTabDescription') }), jsx(ApplicationsTab, { platformKey: tenant, authSpaUrl: authSpaUrl })] })), !isWatcher && (jsxs(TabsContent, { className: "mt-4", value: "onboarding", children: [jsx(TabDescription, { icon: jsx(UserPlus, { className: "w-5 h-5" }), title: t('profileAdmin.onboardingTab'), children: t('profileAdmin.onboardingTabDescription') }), jsx(OnboardingTab, { platformKey: tenant, onboardingBasePath: onboardingBasePath })] }))] }) }));
223990
224114
  };
223991
224115
 
223992
224116
  function DeleteApiModal$1({ isOpen, onClose, apiKey, tenantKey }) {
@@ -264667,11 +264791,18 @@ function BenchmarksTab({ tenantKey, username, }) {
264667
264791
  }
264668
264792
 
264669
264793
  function Account({ tenant, tenants = [], username, onInviteClick, email, mainPlatformKey, userActiveApp = null, showPlatformName = false, isAdmin = false, targetTab = 'basic', currentPlan: _currentPlan = '', currentSPA = '', authURL, onTenantUpdate, currentPlatformBaseDomain = '', enableRbac = false, showBenchmarks = false, rbacPermissions = {}, onLoadGroupPermissions, onTabChange, defaultSupportPhone = '', enableSupportPhone, showGradebookTab = false, onboardingBasePath = '', }) {
264670
- var _a, _b, _c, _d;
264794
+ var _a, _b, _c, _d, _e;
264671
264795
  const t = useT();
264672
264796
  const currentTenant = tenants.find((ten) => ten.key === tenant);
264673
264797
  const hasMonetizationPermission = checkRbacPermission(rbacPermissions, `/platforms/${tenant}/#can_sell_items`, enableRbac);
264674
264798
  const canMonetize = (currentTenant === null || currentTenant === void 0 ? void 0 : currentTenant.enable_monetization) && hasMonetizationPermission;
264799
+ /**
264800
+ * Billing is gated by the tenant's paywall, and on top of that by the
264801
+ * selling permission whenever RBAC is on and the viewer is not an admin.
264802
+ * `checkRbacPermission` already passes everything through with RBAC off,
264803
+ * so only the admin bypass needs spelling out here.
264804
+ */
264805
+ const canSeeBilling = !!(currentTenant === null || currentTenant === void 0 ? void 0 : currentTenant.show_paywall) && (isAdmin || hasMonetizationPermission);
264675
264806
  const TABS = [
264676
264807
  { id: 'organization', label: t('profileAccount.tabOrganization'), icon: Briefcase },
264677
264808
  { id: 'management', label: t('profileAccount.tabManagement'), icon: Users },
@@ -264685,7 +264816,6 @@ function Account({ tenant, tenants = [], username, onInviteClick, email, mainPla
264685
264816
  { id: 'memory', label: t('profileAccount.tabMemory'), icon: Brain },
264686
264817
  { id: 'advanced', label: t('profileAccount.tabAdvanced'), icon: Settings$1 },
264687
264818
  ];
264688
- const [activeTab, setActiveTab] = useState(targetTab);
264689
264819
  const [organizationLogo, setOrganizationLogo] = useState(`${LOGO_ENDPOINTS.light_logo(tenant)}?v=${Date.now()}`);
264690
264820
  const hasUserTabPermission = checkRbacPermission(rbacPermissions, `/platforms/${tenant}/#can_manage_users`, enableRbac);
264691
264821
  const hasGroupsTabPermission = checkRbacPermission(rbacPermissions, `/groups/#list`, enableRbac);
@@ -264701,6 +264831,28 @@ function Account({ tenant, tenants = [], username, onInviteClick, email, mainPla
264701
264831
  hasRolesTabPermission ||
264702
264832
  hasTeamsTabPermission ||
264703
264833
  hasAlertsTabPermission;
264834
+ /**
264835
+ * Tabs this user may actually open, in the order the sidebar lists them.
264836
+ * Everything but Management is admin-only, and Billing sits outside `TABS`
264837
+ * because the paywall gates it, so it is appended last here too.
264838
+ */
264839
+ const visibleTabIds = [
264840
+ ...TABS.filter((tab) => (tab.id === 'management' ? hasManagementPermissions : isAdmin)).map((tab) => tab.id),
264841
+ ...(canSeeBilling ? ['billing'] : []),
264842
+ ];
264843
+ const visibleTabKey = visibleTabIds.join(',');
264844
+ // Entry points ask for a tab by name, and the name can be one this user has
264845
+ // no business seeing — a watcher opening the modal is sent to Organization,
264846
+ // which their sidebar does not even list. Open their first real tab instead.
264847
+ const [activeTab, setActiveTab] = useState(visibleTabIds.includes(targetTab) ? targetTab : ((_a = visibleTabIds[0]) !== null && _a !== void 0 ? _a : targetTab));
264848
+ // `tenants` can arrive after mount, which is when the paywall tab appears and
264849
+ // the permission checks settle, so re-run the same fallback once it does.
264850
+ useEffect(() => {
264851
+ const available = visibleTabKey ? visibleTabKey.split(',') : [];
264852
+ if (available.length > 0 && !available.includes(activeTab)) {
264853
+ setActiveTab(available[0]);
264854
+ }
264855
+ }, [visibleTabKey, activeTab]);
264704
264856
  useEffect(() => {
264705
264857
  const firstInput = document.getElementById('fullName');
264706
264858
  if (firstInput) {
@@ -264712,14 +264864,7 @@ function Account({ tenant, tenants = [], username, onInviteClick, email, mainPla
264712
264864
  height: '100%',
264713
264865
  }, children: [jsxs("div", { className: "flex flex-col items-center justify-center py-6 px-6 border-b border-gray-200 dark:border-gray-700 flex-shrink-0", children: [organizationLogo ? (jsx("div", { className: "w-auto h-auto max-w-[140px] max-h-[140px] overflow-hidden", children: jsx(Image$4, { src: organizationLogo, alt: t('profileAccount.organizationLogoAlt'), width: 140, height: 140, className: "object-cover w-full h-full group-hover:opacity-80 transition-opacity", onError: () => {
264714
264866
  setOrganizationLogo('');
264715
- } }) })) : (jsx(BriefcaseBusiness, { className: "h-20 w-20 mb-4 text-blue-500" })), jsxs("div", { className: "flex justify-center space-x-3 mt-3", children: [jsxs("div", { className: "bg-blue-100 text-blue-700 px-2 py-1 rounded font-medium flex items-center text-sm", children: [jsx(User, { className: "h-4 w-4 mr-2" }), isAdmin ? t('profileAccount.roleAdmin') : t('profileAccount.roleUser')] }), showPlatformName && (jsx("div", { className: "bg-gray-100 text-gray-600 px-4 py-2 rounded text-xs font-medium", children: tenant.toUpperCase() }))] })] }), jsx("div", { className: "flex-1 overflow-y-auto", style: { minHeight: 0 }, children: jsx("div", { className: "p-4", children: jsxs("div", { className: "flex flex-col space-y-1.5", children: [TABS.filter((tab) => {
264716
- if (tab.id === 'management') {
264717
- return hasManagementPermissions;
264718
- }
264719
- else {
264720
- return isAdmin;
264721
- }
264722
- }).map((tab) => (jsxs("button", { onClick: () => {
264867
+ } }) })) : (jsx(BriefcaseBusiness, { className: "h-20 w-20 mb-4 text-blue-500" })), jsxs("div", { className: "flex justify-center space-x-3 mt-3", children: [jsxs("div", { className: "bg-blue-100 text-blue-700 px-2 py-1 rounded font-medium flex items-center text-sm", children: [jsx(User, { className: "h-4 w-4 mr-2" }), isAdmin ? t('profileAccount.roleAdmin') : t('profileAccount.roleUser')] }), showPlatformName && (jsx("div", { className: "bg-gray-100 text-gray-600 px-4 py-2 rounded text-xs font-medium", children: tenant.toUpperCase() }))] })] }), jsx("div", { className: "flex-1 overflow-y-auto", style: { minHeight: 0 }, children: jsx("div", { className: "p-4", children: jsxs("div", { className: "flex flex-col space-y-1.5", children: [TABS.filter((tab) => visibleTabIds.includes(tab.id)).map((tab) => (jsxs("button", { onClick: () => {
264723
264868
  setActiveTab(tab.id);
264724
264869
  // Clear URL param when switching away from billing/monetization
264725
264870
  if ((activeTab === 'billing' || activeTab === 'monetization') &&
@@ -264732,20 +264877,13 @@ function Account({ tenant, tenants = [], username, onInviteClick, email, mainPla
264732
264877
  }
264733
264878
  }, className: `w-full justify-start px-4 py-2.5 text-left rounded-lg transition-all flex items-center text-base ${activeTab === tab.id
264734
264879
  ? 'bg-blue-50 text-blue-700 font-medium'
264735
- : 'hover:bg-gray-50 text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-gray-100'}`, children: [jsx(tab.icon, { className: "h-5 w-5 mr-3 flex-shrink-0" }), jsx("span", { className: "truncate", children: tab.label })] }, tab.id))), (currentTenant === null || currentTenant === void 0 ? void 0 : currentTenant.show_paywall) && (jsxs("button", { onClick: () => {
264880
+ : 'hover:bg-gray-50 text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-gray-100'}`, children: [jsx(tab.icon, { className: "h-5 w-5 mr-3 flex-shrink-0" }), jsx("span", { className: "truncate", children: tab.label })] }, tab.id))), canSeeBilling && (jsxs("button", { onClick: () => {
264736
264881
  setActiveTab('billing');
264737
264882
  // Set URL param for billing tab
264738
264883
  onTabChange === null || onTabChange === void 0 ? void 0 : onTabChange('billing');
264739
264884
  }, className: `w-full justify-start px-4 py-2.5 text-left rounded-lg transition-all flex items-center text-base ${activeTab === 'billing'
264740
264885
  ? 'bg-blue-50 text-blue-700 font-medium'
264741
- : 'hover:bg-gray-50 text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-gray-100'}`, children: [jsx(CreditCard, { className: "h-5 w-5 mr-3 flex-shrink-0" }), jsx("span", { className: "truncate", children: t('profileAccount.tabBilling') })] }, 'billing'))] }) }) })] }), jsx("div", { className: "lg:hidden", children: jsx("div", { className: "w-full justify-start px-6 py-2 bg-white border-b border-gray-200 rounded-none h-auto overflow-x-auto", children: jsxs("div", { className: "flex space-x-2", children: [TABS.filter((tab) => {
264742
- if (tab.id === 'management') {
264743
- return hasManagementPermissions || !enableRbac;
264744
- }
264745
- else {
264746
- return isAdmin;
264747
- }
264748
- }).map((tab) => (jsxs("button", { onClick: () => {
264886
+ : 'hover:bg-gray-50 text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-gray-100'}`, children: [jsx(CreditCard, { className: "h-5 w-5 mr-3 flex-shrink-0" }), jsx("span", { className: "truncate", children: t('profileAccount.tabBilling') })] }, 'billing'))] }) }) })] }), jsx("div", { className: "lg:hidden", children: jsx("div", { className: "w-full justify-start px-6 py-2 bg-white border-b border-gray-200 rounded-none h-auto overflow-x-auto", children: jsxs("div", { className: "flex space-x-2", children: [TABS.filter((tab) => visibleTabIds.includes(tab.id)).map((tab) => (jsxs("button", { onClick: () => {
264749
264887
  setActiveTab(tab.id);
264750
264888
  // Clear URL param when switching away from billing/monetization
264751
264889
  if ((activeTab === 'billing' || activeTab === 'monetization') &&
@@ -264758,16 +264896,16 @@ function Account({ tenant, tenants = [], username, onInviteClick, email, mainPla
264758
264896
  }
264759
264897
  }, className: `flex items-center gap-2 px-3 py-2 rounded-lg whitespace-nowrap text-sm transition-all ${activeTab === tab.id
264760
264898
  ? 'bg-blue-50 text-blue-600 font-medium'
264761
- : 'text-gray-600 hover:bg-gray-50'}`, children: [jsx(tab.icon, { className: "h-4 w-4" }), jsx("span", { className: "hidden sm:inline", children: tab.label }), jsx("span", { className: "sm:hidden", children: tab.label })] }, tab.id))), (currentTenant === null || currentTenant === void 0 ? void 0 : currentTenant.show_paywall) && (jsxs("button", { onClick: () => {
264899
+ : 'text-gray-600 hover:bg-gray-50'}`, children: [jsx(tab.icon, { className: "h-4 w-4" }), jsx("span", { className: "hidden sm:inline", children: tab.label }), jsx("span", { className: "sm:hidden", children: tab.label })] }, tab.id))), canSeeBilling && (jsxs("button", { onClick: () => {
264762
264900
  setActiveTab('billing');
264763
264901
  // Set URL param for billing tab
264764
264902
  onTabChange === null || onTabChange === void 0 ? void 0 : onTabChange('billing');
264765
264903
  }, className: `flex items-center gap-2 px-3 py-2 rounded-lg whitespace-nowrap text-sm transition-all ${activeTab === 'billing'
264766
264904
  ? 'bg-blue-50 text-blue-600 font-medium'
264767
- : 'text-gray-600 hover:bg-gray-50'}`, children: [jsx(CreditCard, { className: "h-4 w-4" }), jsx("span", { className: "hidden sm:inline", children: t('profileAccount.tabBilling') }), jsx("span", { className: "sm:hidden", children: t('profileAccount.tabBilling') })] }, 'billing'))] }) }) }), jsxs("div", { className: "flex-1 flex flex-col overflow-hidden", style: { height: '100%' }, children: [jsxs("div", { className: "hidden lg:block flex-shrink-0 p-6 border-b border-gray-200 bg-white dark:bg-gray-900", children: [jsx("h3", { className: "text-lg font-medium text-gray-900 dark:text-gray-100 mb-2", children: (_b = (_a = TABS.find((t) => t.id === activeTab)) === null || _a === void 0 ? void 0 : _a.label) !== null && _b !== void 0 ? _b : (activeTab === 'billing' ? t('profileAccount.tabBilling') : activeTab) }), jsxs("p", { className: "text-gray-600 dark:text-gray-400 text-sm", children: [activeTab === 'management' && t('profileAccount.descManagement'), activeTab === 'organization' && t('profileAccount.descOrganization'), activeTab === 'integrations' && t('profileAccount.descIntegrations'), activeTab === 'billing' && t('profileAccount.descBilling'), activeTab === 'monetization' && t('profileAccount.descMonetization'), activeTab === 'datasets' && t('profileAccount.descBenchmarks'), activeTab === 'memory' && t('profileAccount.descMemory'), activeTab === 'advanced' && t('profileAccount.descAdvanced')] })] }), jsxs("div", { className: "flex-1 p-6 space-y-6", style: {
264905
+ : 'text-gray-600 hover:bg-gray-50'}`, children: [jsx(CreditCard, { className: "h-4 w-4" }), jsx("span", { className: "hidden sm:inline", children: t('profileAccount.tabBilling') }), jsx("span", { className: "sm:hidden", children: t('profileAccount.tabBilling') })] }, 'billing'))] }) }) }), jsxs("div", { className: "flex-1 flex flex-col overflow-hidden", style: { height: '100%' }, children: [jsxs("div", { className: "hidden lg:block flex-shrink-0 p-6 border-b border-gray-200 bg-white dark:bg-gray-900", children: [jsx("h3", { className: "text-lg font-medium text-gray-900 dark:text-gray-100 mb-2", children: (_c = (_b = TABS.find((t) => t.id === activeTab)) === null || _b === void 0 ? void 0 : _b.label) !== null && _c !== void 0 ? _c : (activeTab === 'billing' ? t('profileAccount.tabBilling') : activeTab) }), jsxs("p", { className: "text-gray-600 dark:text-gray-400 text-sm", children: [activeTab === 'management' && t('profileAccount.descManagement'), activeTab === 'organization' && t('profileAccount.descOrganization'), activeTab === 'integrations' && t('profileAccount.descIntegrations'), activeTab === 'billing' && t('profileAccount.descBilling'), activeTab === 'monetization' && t('profileAccount.descMonetization'), activeTab === 'datasets' && t('profileAccount.descBenchmarks'), activeTab === 'memory' && t('profileAccount.descMemory'), activeTab === 'advanced' && t('profileAccount.descAdvanced')] })] }), jsxs("div", { className: "flex-1 p-6 space-y-6", style: {
264768
264906
  overflowY: 'auto',
264769
264907
  overflowX: 'hidden',
264770
- }, children: [jsxs("div", { className: "lg:hidden mb-6", children: [jsx("h3", { className: "text-lg font-medium text-gray-900 dark:text-gray-100 mb-2", children: (_d = (_c = TABS.find((t) => t.id === activeTab)) === null || _c === void 0 ? void 0 : _c.label) !== null && _d !== void 0 ? _d : (activeTab === 'billing' ? t('profileAccount.tabBilling') : activeTab) }), jsxs("p", { className: "text-gray-600 dark:text-gray-400 text-sm", children: [activeTab === 'billing' && t('profileAccount.descBilling'), activeTab === 'basic' && t('profileAccount.descBasic'), activeTab === 'social' && t('profileAccount.descSocial'), activeTab === 'security' && t('profileAccount.descSecurity'), activeTab === 'management' && t('profileAccount.descManagement'), activeTab === 'organization' && t('profileAccount.descOrganization'), activeTab === 'monetization' && t('profileAccount.descMonetization'), activeTab === 'datasets' && t('profileAccount.descBenchmarks'), activeTab === 'memory' && t('profileAccount.descMemory'), activeTab === 'advanced' && t('profileAccount.descAdvanced')] })] }), activeTab === 'management' && hasManagementPermissions && (jsx(Admin, { onboardingBasePath: onboardingBasePath, authSpaUrl: authURL, onInviteClick: onInviteClick, tenant: tenant, currentSpa: currentSPA, hasUserTabPermission: hasUserTabPermission, hasGroupsTabPermission: hasGroupsTabPermission, hasPoliciesTabPermission: hasPoliciesTabPermission, hasRolesTabPermission: hasRolesTabPermission, hasTeamsTabPermission: hasTeamsTabPermission, hasInviteUserPermission: hasInviteUserPermission, hasCreateTeamPermission: hasCreateTeamPermission, onLoadGroupPermissions: onLoadGroupPermissions, hasAlertsTabPermission: hasAlertsTabPermission, rbacPermissions: rbacPermissions, enableRbac: enableRbac, showGradebookTab: showGradebookTab })), activeTab === 'organization' && (jsx(OrganizationTab, { platformKey: tenant, tenant: tenants.find((ten) => ten.key === tenant), onTenantUpdate: onTenantUpdate, setOrganizationLogoFromOutside: setOrganizationLogo, defaultSupportPhone: defaultSupportPhone, enableSupportPhone: enableSupportPhone })), activeTab === 'integrations' && (jsx(IntegrationsTab, { tenantKey: tenant, username: username })), activeTab === 'billing' && (jsx(BillingTab, { tenant: tenant, userActiveApp: userActiveApp, username: username, currentUserEmail: email, mainPlatformKey: mainPlatformKey })), activeTab === 'monetization' && (jsx(MonetizationTab, { platformKey: tenant, authURL: authURL })), activeTab === 'datasets' && showBenchmarks && (jsx(BenchmarksTab, { tenantKey: tenant, username: username })), activeTab === 'memory' && jsx(MemoryAdminTab, { tenantKey: tenant, username: username }), activeTab === 'advanced' && (jsx(AdvancedTab, { platformKey: tenant, currentSPA: currentSPA, username: username, authURL: authURL, currentPlatformBaseDomain: currentPlatformBaseDomain }))] })] }), jsx(ToastProvider, {})] }));
264908
+ }, children: [jsxs("div", { className: "lg:hidden mb-6", children: [jsx("h3", { className: "text-lg font-medium text-gray-900 dark:text-gray-100 mb-2", children: (_e = (_d = TABS.find((t) => t.id === activeTab)) === null || _d === void 0 ? void 0 : _d.label) !== null && _e !== void 0 ? _e : (activeTab === 'billing' ? t('profileAccount.tabBilling') : activeTab) }), jsxs("p", { className: "text-gray-600 dark:text-gray-400 text-sm", children: [activeTab === 'billing' && t('profileAccount.descBilling'), activeTab === 'basic' && t('profileAccount.descBasic'), activeTab === 'social' && t('profileAccount.descSocial'), activeTab === 'security' && t('profileAccount.descSecurity'), activeTab === 'management' && t('profileAccount.descManagement'), activeTab === 'organization' && t('profileAccount.descOrganization'), activeTab === 'monetization' && t('profileAccount.descMonetization'), activeTab === 'datasets' && t('profileAccount.descBenchmarks'), activeTab === 'memory' && t('profileAccount.descMemory'), activeTab === 'advanced' && t('profileAccount.descAdvanced')] })] }), activeTab === 'management' && hasManagementPermissions && (jsx(Admin, { onboardingBasePath: onboardingBasePath, authSpaUrl: authURL, onInviteClick: onInviteClick, tenant: tenant, currentSpa: currentSPA, hasUserTabPermission: hasUserTabPermission, hasGroupsTabPermission: hasGroupsTabPermission, hasPoliciesTabPermission: hasPoliciesTabPermission, hasRolesTabPermission: hasRolesTabPermission, hasTeamsTabPermission: hasTeamsTabPermission, hasInviteUserPermission: hasInviteUserPermission, hasCreateTeamPermission: hasCreateTeamPermission, onLoadGroupPermissions: onLoadGroupPermissions, hasAlertsTabPermission: hasAlertsTabPermission, rbacPermissions: rbacPermissions, enableRbac: enableRbac, showGradebookTab: showGradebookTab })), activeTab === 'organization' && (jsx(OrganizationTab, { platformKey: tenant, tenant: tenants.find((ten) => ten.key === tenant), onTenantUpdate: onTenantUpdate, setOrganizationLogoFromOutside: setOrganizationLogo, defaultSupportPhone: defaultSupportPhone, enableSupportPhone: enableSupportPhone })), activeTab === 'integrations' && (jsx(IntegrationsTab, { tenantKey: tenant, username: username })), activeTab === 'billing' && canSeeBilling && (jsx(BillingTab, { tenant: tenant, userActiveApp: userActiveApp, username: username, currentUserEmail: email, mainPlatformKey: mainPlatformKey })), activeTab === 'monetization' && (jsx(MonetizationTab, { platformKey: tenant, authURL: authURL })), activeTab === 'datasets' && showBenchmarks && (jsx(BenchmarksTab, { tenantKey: tenant, username: username })), activeTab === 'memory' && jsx(MemoryAdminTab, { tenantKey: tenant, username: username }), activeTab === 'advanced' && (jsx(AdvancedTab, { platformKey: tenant, currentSPA: currentSPA, username: username, authURL: authURL, currentPlatformBaseDomain: currentPlatformBaseDomain }))] })] }), jsx(ToastProvider, {})] }));
264771
264909
  }
264772
264910
 
264773
264911
  function UserProfileModal({ isOpen, onClose, params, email, mainPlatformKey, showMentorAIDisplayCheckbox = false, showLeaderboardDisplayCheckbox = false, showGradebookTab = false, showUsernameField = false, showPlatformName = false, useGravatarPicFallback = true, enableCatalogInvite = false, targetTab = 'basic', currentPlan = '', currentSPA = '', userActiveApp = null, authURL, tenants = [], onTenantUpdate, currentPlatformBaseDomain = '', rbacPermissions = {}, enableRbac = false, onLoadGroupPermissions, onTabChange, defaultSupportPhone = '', onBillingTabRequest, onAccountDeleted, enableMemoryTab = false, showBenchmarks = false, localLLMProps, enableSupportPhone, onboardingBasePath = '', }) {
@@ -269697,8 +269835,19 @@ const AGENT_SETTINGS_TAB_LABELS = {
269697
269835
  },
269698
269836
  sections: {
269699
269837
  chatExperience: 'Chat experience',
269700
- voiceCalls: 'Voice & calls',
269701
269838
  advanced: 'Advanced',
269839
+ perSurface: 'Surface Capabilities',
269840
+ globalSettings: 'Global Capabilities',
269841
+ },
269842
+ surfaces: {
269843
+ inAppChat: 'In-app chat',
269844
+ embedWidget: 'Embed widget',
269845
+ },
269846
+ notes: {
269847
+ perSurface: 'Set independently for in-app chat and the embed widget.',
269848
+ globalSettings: 'These apply to in-app chat and the embed widget alike.',
269849
+ inAppChat: 'Conversations hosted inside the app - the chat your users open here.',
269850
+ embedWidget: 'The widget you embed on your own site using the snippet from the Embed tab.',
269702
269851
  },
269703
269852
  fields: {
269704
269853
  name: {
@@ -269745,11 +269894,24 @@ const AGENT_SETTINGS_TAB_LABELS = {
269745
269894
  },
269746
269895
  showAttachment: {
269747
269896
  label: 'Show Attachment',
269748
- tooltip: 'Show Attachment Options in Chat Interface',
269897
+ tooltip: 'Lets people attach files to a conversation. Each surface has its own switch: In-app chat covers conversations hosted in the app, Embed widget covers the widget on your own site.',
269749
269898
  },
269750
269899
  showVoiceRecord: {
269751
269900
  label: 'Show Voice Record',
269752
- tooltip: 'Show Voice Recording Options in Chat Interface',
269901
+ tooltip: 'Lets people send a voice recording instead of typing. Each surface has its own switch: In-app chat covers conversations hosted in the app, Embed widget covers the widget on your own site.',
269902
+ },
269903
+ showVoiceCall: {
269904
+ label: 'Show Voice Call',
269905
+ tooltip: 'Lets people start a live voice call with the agent. Each surface has its own switch: In-app chat covers conversations hosted in the app, Embed widget covers the widget on your own site.',
269906
+ },
269907
+ embedShowAttachment: {
269908
+ label: 'Show Attachment (embed widget)',
269909
+ },
269910
+ embedShowVoiceRecord: {
269911
+ label: 'Show Voice Record (embed widget)',
269912
+ },
269913
+ embedShowVoiceCall: {
269914
+ label: 'Show Voice Call (embed widget)',
269753
269915
  },
269754
269916
  allowCopies: {
269755
269917
  label: 'Allow Copies',
@@ -269757,23 +269919,23 @@ const AGENT_SETTINGS_TAB_LABELS = {
269757
269919
  },
269758
269920
  showReasoning: {
269759
269921
  label: 'Verbose Reasoning',
269760
- tooltip: 'Show the agent’s reasoning steps while it responds.',
269922
+ tooltip: 'Show the agent’s reasoning steps while it responds. This setting has one value, so it applies to both in-app chat and the embed widget.',
269761
269923
  },
269762
269924
  enhancedDocRetrieval: {
269763
269925
  label: 'Enhanced document retrieval',
269764
- tooltip: 'Run multiple search queries per question to pull in more relevant documents.',
269926
+ tooltip: 'Run multiple search queries per question to pull in more relevant documents. This setting has one value, so it applies to both in-app chat and the embed widget.',
269765
269927
  },
269766
269928
  promptCaching: {
269767
269929
  label: 'Prompt caching',
269768
- tooltip: 'Cache repeated prompt context to lower latency and cost on long conversations.',
269930
+ tooltip: 'Cache repeated prompt context to lower latency and cost on long conversations. This setting has one value, so it applies to both in-app chat and the embed widget.',
269769
269931
  },
269770
269932
  privateMode: {
269771
269933
  label: 'Enable private mode',
269772
- tooltip: 'When on, every conversation with this agent runs in private mode — no chat history or memory is stored for any user. Use this for sensitive or compliance-bound deployments.',
269934
+ tooltip: 'When on, every conversation with this agent runs in private mode — no chat history or memory is stored for any user. Use this for sensitive or compliance-bound deployments. This setting has one value, so it applies to both in-app chat and the embed widget.',
269773
269935
  },
269774
269936
  smartDocRetrieval: {
269775
269937
  label: 'Smart document retrieval',
269776
- tooltip: 'Use function calling during voice calls to fetch documents only when needed.',
269938
+ tooltip: 'The agent fetches documents only when it needs them, instead of searching the knowledge base on every turn. This setting has one value, so it applies to both in-app chat and the embed widget.',
269777
269939
  },
269778
269940
  image: {
269779
269941
  label: 'Image',
@@ -269839,8 +270001,19 @@ function buildSettingsTabLabels(t) {
269839
270001
  },
269840
270002
  sections: {
269841
270003
  chatExperience: t('settingsTabLabels.sections.chatExperience'),
269842
- voiceCalls: t('settingsTabLabels.sections.voiceCalls'),
269843
270004
  advanced: t('settingsTabLabels.sections.advanced'),
270005
+ perSurface: t('settingsTabLabels.sections.perSurface'),
270006
+ globalSettings: t('settingsTabLabels.sections.globalSettings'),
270007
+ },
270008
+ surfaces: {
270009
+ inAppChat: t('settingsTabLabels.surfaces.inAppChat'),
270010
+ embedWidget: t('settingsTabLabels.surfaces.embedWidget'),
270011
+ },
270012
+ notes: {
270013
+ perSurface: t('settingsTabLabels.notes.perSurface'),
270014
+ globalSettings: t('settingsTabLabels.notes.globalSettings'),
270015
+ inAppChat: t('settingsTabLabels.notes.inAppChat'),
270016
+ embedWidget: t('settingsTabLabels.notes.embedWidget'),
269844
270017
  },
269845
270018
  fields: {
269846
270019
  name: {
@@ -269893,6 +270066,19 @@ function buildSettingsTabLabels(t) {
269893
270066
  label: t('settingsTabLabels.fields.showVoiceRecord.label'),
269894
270067
  tooltip: t('settingsTabLabels.fields.showVoiceRecord.tooltip'),
269895
270068
  },
270069
+ showVoiceCall: {
270070
+ label: t('settingsTabLabels.fields.showVoiceCall.label'),
270071
+ tooltip: t('settingsTabLabels.fields.showVoiceCall.tooltip'),
270072
+ },
270073
+ embedShowAttachment: {
270074
+ label: t('settingsTabLabels.fields.embedShowAttachment.label'),
270075
+ },
270076
+ embedShowVoiceRecord: {
270077
+ label: t('settingsTabLabels.fields.embedShowVoiceRecord.label'),
270078
+ },
270079
+ embedShowVoiceCall: {
270080
+ label: t('settingsTabLabels.fields.embedShowVoiceCall.label'),
270081
+ },
269896
270082
  allowCopies: {
269897
270083
  label: t('settingsTabLabels.fields.allowCopies.label'),
269898
270084
  tooltip: t('settingsTabLabels.fields.allowCopies.tooltip'),
@@ -269983,7 +270169,7 @@ function resolveSettingsTabLabels(override, t) {
269983
270169
  }
269984
270170
 
269985
270171
  function useEditMentorSettings({ onSuccessfulSave, labels }) {
269986
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
270172
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
269987
270173
  const { tenantKey, mentorId, username, enableRBAC, executeGatedAction } = useAgentSettings();
269988
270174
  const dispatch = useDispatch();
269989
270175
  const { data: categories, isLoading: isLoadingCategories } = useGetMentorCategoriesQuery(
@@ -270024,12 +270210,16 @@ function useEditMentorSettings({ onSuccessfulSave, labels }) {
270024
270210
  is_featured: (_d = m === null || m === void 0 ? void 0 : m.is_featured) !== null && _d !== void 0 ? _d : false,
270025
270211
  show_attachment: (_e = m === null || m === void 0 ? void 0 : m.show_attachment) !== null && _e !== void 0 ? _e : true,
270026
270212
  show_voice_record: (_f = m === null || m === void 0 ? void 0 : m.show_voice_record) !== null && _f !== void 0 ? _f : true,
270027
- forkable: (_g = m === null || m === void 0 ? void 0 : m.forkable) !== null && _g !== void 0 ? _g : false,
270028
- show_reasoning: (_h = m === null || m === void 0 ? void 0 : m.show_reasoning) !== null && _h !== void 0 ? _h : false,
270029
- enable_multi_query_rag: (_j = m === null || m === void 0 ? void 0 : m.enable_multi_query_rag) !== null && _j !== void 0 ? _j : false,
270030
- enable_prompt_caching: (_k = m === null || m === void 0 ? void 0 : m.enable_prompt_caching) !== null && _k !== void 0 ? _k : false,
270031
- disable_chathistory: (_l = m === null || m === void 0 ? void 0 : m.disable_chathistory) !== null && _l !== void 0 ? _l : false,
270032
- use_function_calling_for_rag: (_m = existingCallConfig === null || existingCallConfig === void 0 ? void 0 : existingCallConfig.use_function_calling_for_rag) !== null && _m !== void 0 ? _m : false,
270213
+ show_voice_call: (_g = m === null || m === void 0 ? void 0 : m.show_voice_call) !== null && _g !== void 0 ? _g : true,
270214
+ embed_show_attachment: (_h = m === null || m === void 0 ? void 0 : m.embed_show_attachment) !== null && _h !== void 0 ? _h : true,
270215
+ embed_show_voice_record: (_j = m === null || m === void 0 ? void 0 : m.embed_show_voice_record) !== null && _j !== void 0 ? _j : true,
270216
+ embed_show_voice_call: (_k = m === null || m === void 0 ? void 0 : m.embed_show_voice_call) !== null && _k !== void 0 ? _k : true,
270217
+ forkable: (_l = m === null || m === void 0 ? void 0 : m.forkable) !== null && _l !== void 0 ? _l : false,
270218
+ show_reasoning: (_m = m === null || m === void 0 ? void 0 : m.show_reasoning) !== null && _m !== void 0 ? _m : false,
270219
+ enable_multi_query_rag: (_o = m === null || m === void 0 ? void 0 : m.enable_multi_query_rag) !== null && _o !== void 0 ? _o : false,
270220
+ enable_prompt_caching: (_p = m === null || m === void 0 ? void 0 : m.enable_prompt_caching) !== null && _p !== void 0 ? _p : false,
270221
+ disable_chathistory: (_q = m === null || m === void 0 ? void 0 : m.disable_chathistory) !== null && _q !== void 0 ? _q : false,
270222
+ use_function_calling_for_rag: (_r = existingCallConfig === null || existingCallConfig === void 0 ? void 0 : existingCallConfig.use_function_calling_for_rag) !== null && _r !== void 0 ? _r : false,
270033
270223
  },
270034
270224
  onSubmit: async ({ value }) => {
270035
270225
  var _a;
@@ -270061,6 +270251,18 @@ function useEditMentorSettings({ onSuccessfulSave, labels }) {
270061
270251
  if (value.show_voice_record !== undefined) {
270062
270252
  values.show_voice_record = value.show_voice_record;
270063
270253
  }
270254
+ if (value.show_voice_call !== undefined) {
270255
+ values.show_voice_call = value.show_voice_call;
270256
+ }
270257
+ if (value.embed_show_attachment !== undefined) {
270258
+ values.embed_show_attachment = value.embed_show_attachment;
270259
+ }
270260
+ if (value.embed_show_voice_record !== undefined) {
270261
+ values.embed_show_voice_record = value.embed_show_voice_record;
270262
+ }
270263
+ if (value.embed_show_voice_call !== undefined) {
270264
+ values.embed_show_voice_call = value.embed_show_voice_call;
270265
+ }
270064
270266
  if (value.forkable !== undefined) {
270065
270267
  values.forkable = value.forkable;
270066
270268
  // A sets forkable_with_training_data in lock-step with forkable.
@@ -270277,22 +270479,74 @@ function BasicSubTab({ form, labels, mentor, isDisabled, categories }) {
270277
270479
  }, className: "hidden" })] })] })) })) })] }));
270278
270480
  }
270279
270481
 
270482
+ /**
270483
+ * Shared column template: capability, then one column per surface. Three
270484
+ * columns need roughly a readable label plus 2 x 9rem, so the grid only forms
270485
+ * from `md` (768px) up; below that every consumer stacks. Also used by the
270486
+ * single-field toggles below the matrix so their switches line up under the
270487
+ * last column (Embed widget), keeping every switch on one right edge.
270488
+ */
270489
+ const CAPABILITY_MATRIX_GRID = 'md:grid md:grid-cols-[minmax(0,1fr)_9rem_9rem]';
270490
+ /** Each column label sits centred over its own column, with its own info icon. */
270491
+ const COLUMN_CLASS = 'hidden items-center justify-center gap-1.5 md:flex';
270492
+ /**
270493
+ * The matrix's column header row: an empty cell over the capability names,
270494
+ * then one labelled column per surface. The whole row drops out below the
270495
+ * breakpoint, where the layout stacks and every cell repeats its surface name
270496
+ * inline instead — an accepted trade-off of this layout.
270497
+ */
270498
+ function CapabilityMatrixHeader({ heading, inAppChat, embedWidget, }) {
270499
+ const column = (surface) => (jsxs("div", { className: COLUMN_CLASS, children: [jsx("span", { className: "text-xs font-semibold tracking-wide text-gray-500 uppercase", children: surface.label }), jsx(TooltipProvider, { children: jsxs(Tooltip$1, { children: [jsx(TooltipTrigger, { type: "button", "aria-label": surface.tooltipAriaLabel, children: jsx(Info$3, { className: "h-4 w-4 text-gray-400" }) }), jsx(TooltipContent, { className: "ibl-tooltip-content", children: jsx("p", { children: surface.tooltip }) })] }) })] }));
270500
+ return (jsxs("div", { className: `items-center gap-4 ${CAPABILITY_MATRIX_GRID}`, "data-testid": "capability-matrix-header", children: [jsx("h4", { className: "text-xs font-semibold tracking-wide text-gray-500 uppercase", children: heading }), column(inAppChat), column(embedWidget)] }));
270501
+ }
270502
+ /**
270503
+ * One capability of the surface matrix: the capability is named once and each
270504
+ * surface gets its own cell, so `show_*` and `embed_show_*` stay independently
270505
+ * settable instead of being restated on the Embed tab.
270506
+ *
270507
+ * Below `md` the grid collapses to stacked sub-rows, each labelled inline
270508
+ * with its surface.
270509
+ */
270510
+ function CapabilityMatrixRow({ label, tooltip, tooltipAriaLabel, inAppChatLabel, embedWidgetLabel, inAppChat, embedWidget, testId, }) {
270511
+ const cell = (surfaceLabel, control) => (jsxs("div", { className: "flex items-center justify-between gap-3 md:justify-center", children: [jsx("span", { className: "text-sm text-gray-500 md:hidden", children: surfaceLabel }), control] }));
270512
+ return (jsxs("div", { className: `flex flex-col gap-2 md:items-center ${CAPABILITY_MATRIX_GRID}`, "data-testid": testId, children: [jsxs("div", { className: "flex items-center gap-2", children: [jsx("span", { className: "text-sm font-medium text-[#646464]", children: label }), jsx(TooltipProvider, { children: jsxs(Tooltip$1, { children: [jsx(TooltipTrigger, { type: "button", "aria-label": tooltipAriaLabel, children: jsx(Info$3, { className: "h-4 w-4 text-gray-400" }) }), jsx(TooltipContent, { className: "ibl-tooltip-content", children: jsx("p", { children: tooltip }) })] }) })] }), cell(inAppChatLabel, inAppChat), cell(embedWidgetLabel, embedWidget)] }));
270513
+ }
270514
+ /** A single form-bound cell of the matrix — the switch without the row chrome. */
270515
+ function CapabilityMatrixSwitch({ form, name, label, isDisabled, permissionName, fieldPermissions, enableRBAC, }) {
270516
+ const t = useT();
270517
+ const control = (gatedDisabled) => (jsx(form.Field, { name: name, children: (field) => {
270518
+ const value = field.state.value;
270519
+ return (jsx(CustomSwitch, { checked: value, onCheckedChange: (checked) => field.handleChange(checked), disabled: isDisabled || gatedDisabled, "aria-label": t('tabsSettingsTab.toggleAriaLabel', {
270520
+ label,
270521
+ state: value
270522
+ ? t('tabsSettingsTab.toggleStateEnabled')
270523
+ : t('tabsSettingsTab.toggleStateDisabled'),
270524
+ }) }));
270525
+ } }));
270526
+ if (!permissionName) {
270527
+ return control(false);
270528
+ }
270529
+ return (jsx(WithFormPermissions, { name: permissionName,
270530
+ // @ts-expect-error permissions field type is opaque
270531
+ permissions: fieldPermissions, enableRBAC: enableRBAC, children: ({ disabled }) => control(disabled) }));
270532
+ }
270533
+
270280
270534
  /**
270281
270535
  * A single label + info-tooltip + `CustomSwitch` row bound to a boolean field
270282
270536
  * of the settings form. Collapses the block that was copy-pasted for every
270283
270537
  * capability/discovery toggle, including the state-aware switch `aria-label`
270284
270538
  * and the optional `WithFormPermissions` RBAC gate.
270285
270539
  */
270286
- function SettingToggleField({ form, name, label, tooltip, tooltipAriaLabel, isDisabled, permissionName, fieldPermissions, enableRBAC, testId, }) {
270540
+ function SettingToggleField({ form, name, label, tooltip, tooltipAriaLabel, isDisabled, permissionName, fieldPermissions, enableRBAC, testId, alignToMatrix = false, }) {
270287
270541
  const t = useT();
270288
270542
  const row = (gatedDisabled) => (jsx(form.Field, { name: name, children: (field) => {
270289
270543
  const value = field.state.value;
270290
- return (jsxs("div", { className: "flex items-center justify-between", children: [jsxs("div", { className: "flex items-center gap-2", children: [jsx("span", { className: "text-sm font-medium text-[#646464]", children: label }), jsx(TooltipProvider, { children: jsxs(Tooltip$1, { children: [jsx(TooltipTrigger, { type: "button", "aria-label": tooltipAriaLabel, children: jsx(Info$3, { className: "h-4 w-4 text-gray-400" }) }), jsx(TooltipContent, { className: "ibl-tooltip-content", children: jsx("p", { children: tooltip }) })] }) })] }), jsx(CustomSwitch, { checked: value, onCheckedChange: (checked) => field.handleChange(checked), disabled: isDisabled || gatedDisabled, "aria-label": t('tabsSettingsTab.toggleAriaLabel', {
270544
+ return (jsxs("div", { className: `flex items-center justify-between${alignToMatrix ? ` ${CAPABILITY_MATRIX_GRID}` : ''}`, children: [jsxs("div", { className: "flex items-center gap-2", children: [jsx("span", { className: "text-sm font-medium text-[#646464]", children: label }), jsx(TooltipProvider, { children: jsxs(Tooltip$1, { children: [jsx(TooltipTrigger, { type: "button", "aria-label": tooltipAriaLabel, children: jsx(Info$3, { className: "h-4 w-4 text-gray-400" }) }), jsx(TooltipContent, { className: "ibl-tooltip-content", children: jsx("p", { children: tooltip }) })] }) })] }), alignToMatrix && jsx("span", { className: "hidden md:block" }), jsx(CustomSwitch, { checked: value, onCheckedChange: (checked) => field.handleChange(checked), disabled: isDisabled || gatedDisabled, "aria-label": t('tabsSettingsTab.toggleAriaLabel', {
270291
270545
  label,
270292
270546
  state: value
270293
270547
  ? t('tabsSettingsTab.toggleStateEnabled')
270294
270548
  : t('tabsSettingsTab.toggleStateDisabled'),
270295
- }), "data-testid": testId })] }));
270549
+ }), "data-testid": testId, className: alignToMatrix ? 'md:justify-self-center' : undefined })] }));
270296
270550
  } }));
270297
270551
  if (!permissionName) {
270298
270552
  return row(false);
@@ -270342,14 +270596,33 @@ function DiscoverySubTab({ form, labels, mentor, isDisabled }) {
270342
270596
  }
270343
270597
 
270344
270598
  /**
270345
- * Capabilities sub-tab: the chat-experience, voice-&-calls, and advanced
270346
- * toggle groups.
270599
+ * Capabilities sub-tab: the per-surface capability matrix followed by the
270600
+ * chat-experience and advanced toggle groups.
270601
+ *
270602
+ * Capabilities that exist on both surfaces are stated once and given a cell
270603
+ * per surface (`show_*` for the in-app chat, `embed_show_*` for the embed
270604
+ * widget) — the two backend fields stay independent. Capabilities backed by a
270605
+ * single field render as one switch below the matrix, so they read as
270606
+ * "applies everywhere".
270347
270607
  */
270348
270608
  function CapabilitiesSubTab({ form, labels, mentor, isDisabled, tenantAllowsChatPrivacyControl, }) {
270349
270609
  const t = useT();
270350
270610
  const { enableRBAC } = useAgentSettings();
270351
270611
  const fieldPermissions = getFieldPermissions(mentor);
270352
- return (jsxs("div", { className: "space-y-6", children: [jsxs("div", { className: "space-y-3", children: [jsx("h4", { className: "text-xs font-semibold tracking-wide text-gray-500 uppercase", children: labels.sections.chatExperience }), jsx(SettingToggleField, { form: form, name: "show_attachment", label: labels.fields.showAttachment.label, tooltip: labels.fields.showAttachment.tooltip, tooltipAriaLabel: t('tabsSettingsTab.showAttachmentTooltipAriaLabel'), isDisabled: isDisabled, permissionName: "show_attachment", fieldPermissions: fieldPermissions, enableRBAC: enableRBAC }), jsx(SettingToggleField, { form: form, name: "show_reasoning", label: labels.fields.showReasoning.label, tooltip: labels.fields.showReasoning.tooltip, tooltipAriaLabel: t('tabsSettingsTab.showReasoningTooltipAriaLabel'), isDisabled: isDisabled }), jsx(SettingToggleField, { form: form, name: "enable_multi_query_rag", label: labels.fields.enhancedDocRetrieval.label, tooltip: labels.fields.enhancedDocRetrieval.tooltip, tooltipAriaLabel: t('tabsSettingsTab.enhancedDocRetrievalTooltipAriaLabel'), isDisabled: isDisabled, permissionName: "enable_multi_query_rag", fieldPermissions: fieldPermissions, enableRBAC: enableRBAC }), jsx(SettingToggleField, { form: form, name: "enable_prompt_caching", label: labels.fields.promptCaching.label, tooltip: labels.fields.promptCaching.tooltip, tooltipAriaLabel: t('tabsSettingsTab.promptCachingTooltipAriaLabel'), isDisabled: isDisabled, permissionName: "enable_prompt_caching", fieldPermissions: fieldPermissions, enableRBAC: enableRBAC })] }), jsxs("div", { className: "space-y-3", children: [jsx("h4", { className: "text-xs font-semibold tracking-wide text-gray-500 uppercase", children: labels.sections.voiceCalls }), jsx(SettingToggleField, { form: form, name: "show_voice_record", label: labels.fields.showVoiceRecord.label, tooltip: labels.fields.showVoiceRecord.tooltip, tooltipAriaLabel: t('tabsSettingsTab.showVoiceRecordTooltipAriaLabel'), isDisabled: isDisabled, permissionName: "show_voice_record", fieldPermissions: fieldPermissions, enableRBAC: enableRBAC }), jsx(SettingToggleField, { form: form, name: "use_function_calling_for_rag", label: labels.fields.smartDocRetrieval.label, tooltip: labels.fields.smartDocRetrieval.tooltip, tooltipAriaLabel: t('tabsSettingsTab.smartDocRetrievalTooltipAriaLabel'), isDisabled: isDisabled, testId: "settings-use-function-calling-for-rag-switch" })] }), jsxs("div", { className: "space-y-3", children: [jsx("h4", { className: "text-xs font-semibold tracking-wide text-gray-500 uppercase", children: labels.sections.advanced }), tenantAllowsChatPrivacyControl && (jsx(SettingToggleField, { form: form, name: "disable_chathistory", label: labels.fields.privateMode.label, tooltip: labels.fields.privateMode.tooltip, tooltipAriaLabel: t('tabsSettingsTab.privateModeTooltipAriaLabel'), isDisabled: isDisabled, permissionName: "disable_chathistory", fieldPermissions: fieldPermissions, enableRBAC: enableRBAC, testId: "settings-disable-chathistory-switch" })), jsx(SettingToggleField, { form: form, name: "forkable", label: labels.fields.allowCopies.label, tooltip: labels.fields.allowCopies.tooltip, tooltipAriaLabel: t('tabsSettingsTab.allowCopiesTooltipAriaLabel'), isDisabled: isDisabled })] })] }));
270612
+ return (jsxs("div", { className: "space-y-6", children: [jsxs("div", { className: "rounded-lg border border-gray-200 bg-gray-50 px-4 py-3", "data-testid": "capabilities-per-surface-banner", children: [jsx("h4", { className: "text-sm font-medium text-gray-900", children: labels.sections.perSurface }), jsx("p", { className: "mt-1 text-xs text-gray-600", children: labels.notes.perSurface })] }), jsxs("div", { className: "space-y-3", children: [jsx(CapabilityMatrixHeader, { heading: labels.sections.chatExperience, inAppChat: {
270613
+ label: labels.surfaces.inAppChat,
270614
+ tooltip: labels.notes.inAppChat,
270615
+ tooltipAriaLabel: t('tabsSettingsTab.inAppChatTooltipAriaLabel'),
270616
+ }, embedWidget: {
270617
+ label: labels.surfaces.embedWidget,
270618
+ tooltip: labels.notes.embedWidget,
270619
+ tooltipAriaLabel: t('tabsSettingsTab.embedWidgetTooltipAriaLabel'),
270620
+ } }), jsxs("div", { className: "space-y-4", children: [jsx(CapabilityMatrixRow, { label: labels.fields.showAttachment.label, tooltip: labels.fields.showAttachment.tooltip, tooltipAriaLabel: t('tabsSettingsTab.showAttachmentTooltipAriaLabel'), inAppChatLabel: labels.surfaces.inAppChat, embedWidgetLabel: labels.surfaces.embedWidget, testId: "capability-matrix-row-attachment", inAppChat: jsx(CapabilityMatrixSwitch, { form: form, name: "show_attachment", label: labels.fields.showAttachment.label, isDisabled: isDisabled, permissionName: "show_attachment", fieldPermissions: fieldPermissions, enableRBAC: enableRBAC }), embedWidget: jsx(CapabilityMatrixSwitch, { form: form, name: "embed_show_attachment", label: labels.fields.embedShowAttachment.label, isDisabled: isDisabled }) }), jsx(CapabilityMatrixRow, { label: labels.fields.showVoiceRecord.label, tooltip: labels.fields.showVoiceRecord.tooltip, tooltipAriaLabel: t('tabsSettingsTab.showVoiceRecordTooltipAriaLabel'), inAppChatLabel: labels.surfaces.inAppChat, embedWidgetLabel: labels.surfaces.embedWidget, testId: "capability-matrix-row-voice-record", inAppChat: jsx(CapabilityMatrixSwitch, { form: form, name: "show_voice_record", label: labels.fields.showVoiceRecord.label, isDisabled: isDisabled, permissionName: "show_voice_record", fieldPermissions: fieldPermissions, enableRBAC: enableRBAC }), embedWidget: jsx(CapabilityMatrixSwitch, { form: form, name: "embed_show_voice_record", label: labels.fields.embedShowVoiceRecord.label, isDisabled: isDisabled }) }), jsx(CapabilityMatrixRow, { label: labels.fields.showVoiceCall.label, tooltip: labels.fields.showVoiceCall.tooltip, tooltipAriaLabel: t('tabsSettingsTab.showVoiceCallTooltipAriaLabel'), inAppChatLabel: labels.surfaces.inAppChat, embedWidgetLabel: labels.surfaces.embedWidget, testId: "capability-matrix-row-voice-call", inAppChat:
270621
+ // Not RBAC-gated: `show_voice_call` is absent from the endpoint's
270622
+ // field-permission map, and `WithFormPermissions` HIDES a control
270623
+ // whose key is missing on an RBAC tenant. The Voice tab treats the
270624
+ // same field the same way.
270625
+ jsx(CapabilityMatrixSwitch, { form: form, name: "show_voice_call", label: labels.fields.showVoiceCall.label, isDisabled: isDisabled }), embedWidget: jsx(CapabilityMatrixSwitch, { form: form, name: "embed_show_voice_call", label: labels.fields.embedShowVoiceCall.label, isDisabled: isDisabled }) })] })] }), jsxs("div", { className: "rounded-lg border border-gray-200 bg-gray-50 px-4 py-3", "data-testid": "capabilities-global-settings-banner", children: [jsx("h4", { className: "text-sm font-medium text-gray-900", children: labels.sections.globalSettings }), jsx("p", { className: "mt-1 text-xs text-gray-600", children: labels.notes.globalSettings })] }), jsxs("div", { className: "space-y-4", children: [jsxs("div", { className: "space-y-3", children: [jsx("h4", { className: "text-xs font-semibold tracking-wide text-gray-500 uppercase", children: labels.sections.chatExperience }), jsx(SettingToggleField, { form: form, name: "show_reasoning", label: labels.fields.showReasoning.label, tooltip: labels.fields.showReasoning.tooltip, tooltipAriaLabel: t('tabsSettingsTab.showReasoningTooltipAriaLabel'), isDisabled: isDisabled, alignToMatrix: true }), jsx(SettingToggleField, { form: form, name: "enable_multi_query_rag", label: labels.fields.enhancedDocRetrieval.label, tooltip: labels.fields.enhancedDocRetrieval.tooltip, tooltipAriaLabel: t('tabsSettingsTab.enhancedDocRetrievalTooltipAriaLabel'), isDisabled: isDisabled, permissionName: "enable_multi_query_rag", fieldPermissions: fieldPermissions, enableRBAC: enableRBAC, alignToMatrix: true }), jsx(SettingToggleField, { form: form, name: "use_function_calling_for_rag", label: labels.fields.smartDocRetrieval.label, tooltip: labels.fields.smartDocRetrieval.tooltip, tooltipAriaLabel: t('tabsSettingsTab.smartDocRetrievalTooltipAriaLabel'), isDisabled: isDisabled, testId: "settings-use-function-calling-for-rag-switch", alignToMatrix: true }), jsx(SettingToggleField, { form: form, name: "enable_prompt_caching", label: labels.fields.promptCaching.label, tooltip: labels.fields.promptCaching.tooltip, tooltipAriaLabel: t('tabsSettingsTab.promptCachingTooltipAriaLabel'), isDisabled: isDisabled, permissionName: "enable_prompt_caching", fieldPermissions: fieldPermissions, enableRBAC: enableRBAC, alignToMatrix: true })] }), jsxs("div", { className: "space-y-3", children: [jsx("h4", { className: "text-xs font-semibold tracking-wide text-gray-500 uppercase", children: labels.sections.advanced }), tenantAllowsChatPrivacyControl && (jsx(SettingToggleField, { form: form, name: "disable_chathistory", label: labels.fields.privateMode.label, tooltip: labels.fields.privateMode.tooltip, tooltipAriaLabel: t('tabsSettingsTab.privateModeTooltipAriaLabel'), isDisabled: isDisabled, permissionName: "disable_chathistory", fieldPermissions: fieldPermissions, enableRBAC: enableRBAC, testId: "settings-disable-chathistory-switch", alignToMatrix: true })), jsx(SettingToggleField, { form: form, name: "forkable", label: labels.fields.allowCopies.label, tooltip: labels.fields.allowCopies.tooltip, tooltipAriaLabel: t('tabsSettingsTab.allowCopiesTooltipAriaLabel'), isDisabled: isDisabled, alignToMatrix: true })] })] })] }));
270353
270626
  }
270354
270627
 
270355
270628
  /* istanbul ignore next -- @preserve dynamic import is not testable in unit tests */