@iblai/iblai-js 2.24.0 → 2.26.0

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.
@@ -2701,6 +2701,7 @@ var apiTabLabels$3 = {
2701
2701
  title: "API",
2702
2702
  description: "Manage API keys and integrations."
2703
2703
  },
2704
+ infoBox: "Use this agent from your own apps. Create API keys here to call it programmatically and build it into your product or workflow.",
2704
2705
  disclaimer: {
2705
2706
  lineOne: "Your secret API keys are listed below. Please note that we do not display your secret API keys again after you generate them.",
2706
2707
  lineTwo: "Do not share your API key with others, or expose it in the browser or other client-side code. In order to protect the security of your account, IBL may also automatically rotate any API key that we’ve found has leaked publicly."
@@ -2713,14 +2714,15 @@ var apiTabLabels$3 = {
2713
2714
  actionsColumn: "Actions",
2714
2715
  emptyState: "No API keys found",
2715
2716
  noPermission: "You do not have permission to view API keys",
2716
- deleteAriaLabel: "Delete API Key"
2717
+ deleteAriaLabel: "Delete API Key",
2718
+ notAvailable: "N/A"
2717
2719
  },
2718
2720
  actions: {
2719
2721
  createNew: "Create New"
2720
2722
  },
2721
2723
  createModal: {
2722
2724
  title: "Create API Key",
2723
- description: "Create API Key",
2725
+ description: "Name your key and optionally set an expiry date. You'll only see the key once.",
2724
2726
  nameLabel: "API Key Name",
2725
2727
  namePlaceholder: "API Key Name",
2726
2728
  nameRequired: "API Key name is required",
@@ -2729,12 +2731,14 @@ var apiTabLabels$3 = {
2729
2731
  expirationPlaceholder: "Pick a date",
2730
2732
  submit: "Submit",
2731
2733
  submitting: "Submitting...",
2734
+ cancel: "Cancel",
2732
2735
  successToast: "API Key created successfully",
2733
2736
  errorToast: "Failed to create API Key"
2734
2737
  },
2735
2738
  deleteModal: {
2736
2739
  title: "Delete API Key",
2737
2740
  confirmation: "Are you sure you want to delete the API Key with the name {name}? This action cannot be undone.",
2741
+ warning: "Any app or integration using this key will stop working immediately.",
2738
2742
  cancel: "Cancel",
2739
2743
  confirm: "Delete",
2740
2744
  confirming: "Deleting...",
@@ -2744,7 +2748,10 @@ var apiTabLabels$3 = {
2744
2748
  apiKeyModal: {
2745
2749
  title: "API Key",
2746
2750
  descriptionLineOne: "Please copy your API key and store it in a secure location. For security reasons, this key will only be displayed once and cannot be retrieved again after you leave this page.",
2747
- descriptionLineTwo: "If you lose your API key, you'll need to generate a new one."
2751
+ descriptionLineTwo: "If you lose your API key, you'll need to generate a new one.",
2752
+ description: "Copy and paste the API key.",
2753
+ copyAriaLabel: "Copy API key",
2754
+ copiedAriaLabel: "Copied"
2748
2755
  }
2749
2756
  };
2750
2757
  var apiTabTokenPolicies$3 = {
@@ -7015,6 +7022,11 @@ var toolsTabLabels$3 = {
7015
7022
  title: "Tools",
7016
7023
  description: "Configure tools and integrations for your agent."
7017
7024
  },
7025
+ infoBox: "Give your agent hands. Tools let it do things beyond chatting — look something up, call an API, trigger an action — so it can actually get work done for people.",
7026
+ moreInfoAbout: "More info about {name}",
7027
+ switchAriaLabel: "{name} {state}",
7028
+ enabled: "enabled",
7029
+ disabled: "disabled",
7018
7030
  toasts: {
7019
7031
  toggleSuccess: "Agent updated successfully",
7020
7032
  toggleError: "Failed to update tool"
@@ -7045,8 +7057,8 @@ var uiSidebar$3 = {
7045
7057
  var userProfileDropdownIndex$3 = {
7046
7058
  profile: "Profile",
7047
7059
  account: "Account",
7048
- learner: "Learner",
7049
- instructor: "Instructor",
7060
+ learner: "User",
7061
+ instructor: "Admin",
7050
7062
  help: "Help",
7051
7063
  logOut: "Log Out",
7052
7064
  moreOptions: "More options"
@@ -10217,6 +10229,7 @@ var apiTabLabels$2 = {
10217
10229
  title: "API",
10218
10230
  description: "Gérez les clés API et les intégrations."
10219
10231
  },
10232
+ infoBox: "Utilisez cet agent depuis vos propres applications. Créez ici des clés API pour l'appeler par programmation et l'intégrer à votre produit ou à votre flux de travail.",
10220
10233
  disclaimer: {
10221
10234
  lineOne: "Vos clés API secrètes sont listées ci-dessous. Veuillez noter que nous n’affichons plus vos clés API secrètes après leur génération.",
10222
10235
  lineTwo: "Ne partagez pas votre clé API avec d’autres personnes et ne l’exposez pas dans le navigateur ou dans un autre code côté client. Pour protéger la sécurité de votre compte, IBL peut également faire pivoter automatiquement toute clé API que nous avons détectée comme publiquement exposée."
@@ -10229,14 +10242,15 @@ var apiTabLabels$2 = {
10229
10242
  actionsColumn: "Actions",
10230
10243
  emptyState: "Aucune clé API trouvée",
10231
10244
  noPermission: "Vous n’avez pas la permission de consulter les clés API",
10232
- deleteAriaLabel: "Supprimer la clé API"
10245
+ deleteAriaLabel: "Supprimer la clé API",
10246
+ notAvailable: "N/A"
10233
10247
  },
10234
10248
  actions: {
10235
10249
  createNew: "Créer nouveau"
10236
10250
  },
10237
10251
  createModal: {
10238
10252
  title: "Créer une clé API",
10239
- description: "Créer une clé API",
10253
+ description: "Nommez votre clé et définissez éventuellement une date d’expiration. La clé ne s’affichera qu’une seule fois.",
10240
10254
  nameLabel: "Nom de la clé API",
10241
10255
  namePlaceholder: "Nom de la clé API",
10242
10256
  nameRequired: "Le nom de la clé API est requis",
@@ -10245,12 +10259,14 @@ var apiTabLabels$2 = {
10245
10259
  expirationPlaceholder: "Choisir une date",
10246
10260
  submit: "Soumettre",
10247
10261
  submitting: "Envoi en cours...",
10262
+ cancel: "Annuler",
10248
10263
  successToast: "Clé API créée avec succès",
10249
10264
  errorToast: "Impossible de créer la clé API"
10250
10265
  },
10251
10266
  deleteModal: {
10252
10267
  title: "Supprimer la clé API",
10253
10268
  confirmation: "Voulez-vous vraiment supprimer la clé API nommée {name} ? Cette action est irréversible.",
10269
+ warning: "Toute application ou intégration utilisant cette clé cessera immédiatement de fonctionner.",
10254
10270
  cancel: "Annuler",
10255
10271
  confirm: "Supprimer",
10256
10272
  confirming: "Suppression en cours...",
@@ -10260,7 +10276,10 @@ var apiTabLabels$2 = {
10260
10276
  apiKeyModal: {
10261
10277
  title: "Clé API",
10262
10278
  descriptionLineOne: "Veuillez copier votre clé API et la conserver dans un endroit sécurisé. Pour des raisons de sécurité, cette clé ne sera affichée qu’une seule fois et ne pourra pas être récupérée après avoir quitté cette page.",
10263
- descriptionLineTwo: "Si vous perdez votre clé API, vous devrez en générer une nouvelle."
10279
+ descriptionLineTwo: "Si vous perdez votre clé API, vous devrez en générer une nouvelle.",
10280
+ description: "Copiez et collez la clé API.",
10281
+ copyAriaLabel: "Copier la clé API",
10282
+ copiedAriaLabel: "Copiée"
10264
10283
  }
10265
10284
  };
10266
10285
  var apiTabTokenPolicies$2 = {
@@ -14697,6 +14716,11 @@ var toolsTabLabels$2 = {
14697
14716
  title: "Outils",
14698
14717
  description: "Configurez les outils et les intégrations pour votre agent."
14699
14718
  },
14719
+ infoBox: "Donnez des mains à votre agent. Les outils lui permettent d'aller au-delà de la simple conversation — rechercher une information, appeler une API, déclencher une action — pour qu'il accomplisse réellement des tâches pour les utilisateurs.",
14720
+ moreInfoAbout: "Plus d'informations sur {name}",
14721
+ switchAriaLabel: "{name} {state}",
14722
+ enabled: "activé",
14723
+ disabled: "désactivé",
14700
14724
  toasts: {
14701
14725
  toggleSuccess: "Agent mis à jour avec succès",
14702
14726
  toggleError: "Échec de la mise à jour de l'outil"
@@ -14727,8 +14751,8 @@ var uiSidebar$2 = {
14727
14751
  var userProfileDropdownIndex$2 = {
14728
14752
  profile: "Profil",
14729
14753
  account: "Compte",
14730
- learner: "Apprenant",
14731
- instructor: "Instructeur",
14754
+ learner: "Utilisateur",
14755
+ instructor: "Administrateur",
14732
14756
  help: "Aide",
14733
14757
  logOut: "Se déconnecter",
14734
14758
  moreOptions: "Plus d'options"
@@ -17733,6 +17757,7 @@ var apiTabLabels$1 = {
17733
17757
  title: "API",
17734
17758
  description: "Administre las claves API y las integraciones."
17735
17759
  },
17760
+ infoBox: "Usa este agente desde tus propias aplicaciones. Crea aquí claves de API para llamarlo mediante programación e integrarlo en tu producto o flujo de trabajo.",
17736
17761
  disclaimer: {
17737
17762
  lineOne: "Sus claves API secretas se enumeran a continuación. Tenga en cuenta que no mostramos sus claves API secretas nuevamente después de generarlas.",
17738
17763
  lineTwo: "No comparta su clave API con otros ni la exponga en el navegador u otro código del lado del cliente. Para proteger la seguridad de su cuenta, IBL también puede rotar automáticamente cualquier clave API que hayamos detectado que se ha filtrado públicamente."
@@ -17745,14 +17770,15 @@ var apiTabLabels$1 = {
17745
17770
  actionsColumn: "Acciones",
17746
17771
  emptyState: "No se encontraron claves API",
17747
17772
  noPermission: "No tiene permiso para ver las claves API",
17748
- deleteAriaLabel: "Eliminar clave API"
17773
+ deleteAriaLabel: "Eliminar clave API",
17774
+ notAvailable: "N/A"
17749
17775
  },
17750
17776
  actions: {
17751
17777
  createNew: "Crear nuevo"
17752
17778
  },
17753
17779
  createModal: {
17754
17780
  title: "Crear clave API",
17755
- description: "Crear clave API",
17781
+ description: "Asigna un nombre a tu clave y, opcionalmente, una fecha de vencimiento. Solo verás la clave una vez.",
17756
17782
  nameLabel: "Nombre de la clave API",
17757
17783
  namePlaceholder: "Nombre de la clave API",
17758
17784
  nameRequired: "El nombre de la clave API es obligatorio",
@@ -17761,12 +17787,14 @@ var apiTabLabels$1 = {
17761
17787
  expirationPlaceholder: "Seleccionar una fecha",
17762
17788
  submit: "Enviar",
17763
17789
  submitting: "Enviando...",
17790
+ cancel: "Cancelar",
17764
17791
  successToast: "Clave API creada correctamente",
17765
17792
  errorToast: "Error al crear la clave API"
17766
17793
  },
17767
17794
  deleteModal: {
17768
17795
  title: "Eliminar clave API",
17769
17796
  confirmation: "¿Está seguro de que desea eliminar la clave API con el nombre {name}? Esta acción no se puede deshacer.",
17797
+ warning: "Cualquier aplicación o integración que use esta clave dejará de funcionar de inmediato.",
17770
17798
  cancel: "Cancelar",
17771
17799
  confirm: "Eliminar",
17772
17800
  confirming: "Eliminando...",
@@ -17776,7 +17804,10 @@ var apiTabLabels$1 = {
17776
17804
  apiKeyModal: {
17777
17805
  title: "Clave API",
17778
17806
  descriptionLineOne: "Copie su clave API y guárdela en un lugar seguro. Por razones de seguridad, esta clave solo se mostrará una vez y no podrá recuperarse después de salir de esta página.",
17779
- descriptionLineTwo: "Si pierde su clave API, deberá generar una nueva."
17807
+ descriptionLineTwo: "Si pierde su clave API, deberá generar una nueva.",
17808
+ description: "Copie y pegue la clave API.",
17809
+ copyAriaLabel: "Copiar clave API",
17810
+ copiedAriaLabel: "Copiada"
17780
17811
  }
17781
17812
  };
17782
17813
  var apiTabTokenPolicies$1 = {
@@ -22213,6 +22244,11 @@ var toolsTabLabels$1 = {
22213
22244
  title: "Herramientas",
22214
22245
  description: "Configure las herramientas e integraciones para su agente."
22215
22246
  },
22247
+ infoBox: "Dale manos a tu agente. Las herramientas le permiten hacer cosas más allá de conversar —buscar información, llamar a una API, activar una acción— para que realmente pueda hacer el trabajo por las personas.",
22248
+ moreInfoAbout: "Más información sobre {name}",
22249
+ switchAriaLabel: "{name} {state}",
22250
+ enabled: "habilitado",
22251
+ disabled: "deshabilitado",
22216
22252
  toasts: {
22217
22253
  toggleSuccess: "Agente actualizado correctamente",
22218
22254
  toggleError: "Error al actualizar la herramienta"
@@ -22243,8 +22279,8 @@ var uiSidebar$1 = {
22243
22279
  var userProfileDropdownIndex$1 = {
22244
22280
  profile: "Perfil",
22245
22281
  account: "Cuenta",
22246
- learner: "Estudiante",
22247
- instructor: "Instructor",
22282
+ learner: "Usuario",
22283
+ instructor: "Administrador",
22248
22284
  help: "Ayuda",
22249
22285
  logOut: "Cerrar sesión",
22250
22286
  moreOptions: "Más opciones"
@@ -25249,6 +25285,7 @@ var apiTabLabels = {
25249
25285
  title: "API",
25250
25286
  description: "管理 API 密钥和集成。"
25251
25287
  },
25288
+ infoBox: "在您自己的应用中使用该智能体。在此创建 API 密钥,以便通过编程方式调用它,并将其集成到您的产品或工作流程中。",
25252
25289
  disclaimer: {
25253
25290
  lineOne: "您的秘密 API 密钥列表如下。请注意,生成密钥后,我们将不再显示您的秘密 API 密钥。",
25254
25291
  lineTwo: "请勿将您的 API 密钥共享给他人,也勿将其暴露在浏览器或其他客户端代码中。为了保护您账户的安全,IBL 也可能会自动轮换我们发现已公开泄露的任何 API 密钥。"
@@ -25261,14 +25298,15 @@ var apiTabLabels = {
25261
25298
  actionsColumn: "操作",
25262
25299
  emptyState: "未找到 API 密钥",
25263
25300
  noPermission: "您没有查看 API 密钥的权限",
25264
- deleteAriaLabel: "删除 API 密钥"
25301
+ deleteAriaLabel: "删除 API 密钥",
25302
+ notAvailable: "N/A"
25265
25303
  },
25266
25304
  actions: {
25267
25305
  createNew: "新建"
25268
25306
  },
25269
25307
  createModal: {
25270
25308
  title: "创建 API 密钥",
25271
- description: "创建 API 密钥",
25309
+ description: "为密钥命名,并可选择设置过期日期。密钥仅显示一次。",
25272
25310
  nameLabel: "API 密钥名称",
25273
25311
  namePlaceholder: "API 密钥名称",
25274
25312
  nameRequired: "API 密钥名称为必填项",
@@ -25277,12 +25315,14 @@ var apiTabLabels = {
25277
25315
  expirationPlaceholder: "选择日期",
25278
25316
  submit: "提交",
25279
25317
  submitting: "提交中……",
25318
+ cancel: "取消",
25280
25319
  successToast: "API 密钥创建成功",
25281
25320
  errorToast: "创建 API 密钥失败"
25282
25321
  },
25283
25322
  deleteModal: {
25284
25323
  title: "删除 API 密钥",
25285
25324
  confirmation: "您确定要删除名为「{name}」的 API 密钥吗?此操作无法撤销。",
25325
+ warning: "任何使用此密钥的应用或集成都将立即停止工作。",
25286
25326
  cancel: "取消",
25287
25327
  confirm: "删除",
25288
25328
  confirming: "删除中……",
@@ -25292,7 +25332,10 @@ var apiTabLabels = {
25292
25332
  apiKeyModal: {
25293
25333
  title: "API 密钥",
25294
25334
  descriptionLineOne: "请复制您的 API 密钥并将其保存在安全的位置。出于安全原因,该密钥仅显示一次,离开此页面后将无法再次获取。",
25295
- descriptionLineTwo: "如果您丢失了 API 密钥,将需要重新生成一个新的。"
25335
+ descriptionLineTwo: "如果您丢失了 API 密钥,将需要重新生成一个新的。",
25336
+ description: "复制并粘贴 API 密钥。",
25337
+ copyAriaLabel: "复制 API 密钥",
25338
+ copiedAriaLabel: "已复制"
25296
25339
  }
25297
25340
  };
25298
25341
  var apiTabTokenPolicies = {
@@ -29729,6 +29772,11 @@ var toolsTabLabels = {
29729
29772
  title: "工具",
29730
29773
  description: "为您的智能体配置工具和集成。"
29731
29774
  },
29775
+ infoBox: "为您的智能体赋予“双手”。工具让它能够超越单纯的聊天——查找信息、调用 API、触发操作——从而真正为用户完成工作。",
29776
+ moreInfoAbout: "关于 {name} 的更多信息",
29777
+ switchAriaLabel: "{name} {state}",
29778
+ enabled: "已启用",
29779
+ disabled: "已禁用",
29732
29780
  toasts: {
29733
29781
  toggleSuccess: "智能体已成功更新",
29734
29782
  toggleError: "更新工具失败"
@@ -29759,8 +29807,8 @@ var uiSidebar = {
29759
29807
  var userProfileDropdownIndex = {
29760
29808
  profile: "个人资料",
29761
29809
  account: "账户",
29762
- learner: "学习者",
29763
- instructor: "讲师",
29810
+ learner: "用户",
29811
+ instructor: "管理员",
29764
29812
  help: "帮助",
29765
29813
  logOut: "退出登录",
29766
29814
  moreOptions: "更多选项"
@@ -152869,7 +152917,7 @@ const PopoverContent = React.forwardRef(({ className, align = 'center', sideOffs
152869
152917
  var _a;
152870
152918
  const portalContainer = useFloatingPortalContainer();
152871
152919
  const resolvedContainer = (_a = container !== null && container !== void 0 ? container : portalContainer) !== null && _a !== void 0 ? _a : undefined;
152872
- const content = (jsx(Content2$1, { ref: ref, "data-iblai-dialog-interaction-layer": true, align: align, sideOffset: sideOffset, className: cn('bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md outline-none', className), ...props }));
152920
+ const content = (jsx(Content2$1, { ref: ref, "data-iblai-dialog-interaction-layer": true, align: align, sideOffset: sideOffset, className: cn('pointer-events-auto bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md outline-none', className), ...props }));
152873
152921
  if (!portalled) {
152874
152922
  return content;
152875
152923
  }
@@ -97244,6 +97244,7 @@ var apiTabLabels$3 = {
97244
97244
  title: "API",
97245
97245
  description: "Manage API keys and integrations."
97246
97246
  },
97247
+ infoBox: "Use this agent from your own apps. Create API keys here to call it programmatically and build it into your product or workflow.",
97247
97248
  disclaimer: {
97248
97249
  lineOne: "Your secret API keys are listed below. Please note that we do not display your secret API keys again after you generate them.",
97249
97250
  lineTwo: "Do not share your API key with others, or expose it in the browser or other client-side code. In order to protect the security of your account, IBL may also automatically rotate any API key that we’ve found has leaked publicly."
@@ -97256,14 +97257,15 @@ var apiTabLabels$3 = {
97256
97257
  actionsColumn: "Actions",
97257
97258
  emptyState: "No API keys found",
97258
97259
  noPermission: "You do not have permission to view API keys",
97259
- deleteAriaLabel: "Delete API Key"
97260
+ deleteAriaLabel: "Delete API Key",
97261
+ notAvailable: "N/A"
97260
97262
  },
97261
97263
  actions: {
97262
97264
  createNew: "Create New"
97263
97265
  },
97264
97266
  createModal: {
97265
97267
  title: "Create API Key",
97266
- description: "Create API Key",
97268
+ description: "Name your key and optionally set an expiry date. You'll only see the key once.",
97267
97269
  nameLabel: "API Key Name",
97268
97270
  namePlaceholder: "API Key Name",
97269
97271
  nameRequired: "API Key name is required",
@@ -97272,12 +97274,14 @@ var apiTabLabels$3 = {
97272
97274
  expirationPlaceholder: "Pick a date",
97273
97275
  submit: "Submit",
97274
97276
  submitting: "Submitting...",
97277
+ cancel: "Cancel",
97275
97278
  successToast: "API Key created successfully",
97276
97279
  errorToast: "Failed to create API Key"
97277
97280
  },
97278
97281
  deleteModal: {
97279
97282
  title: "Delete API Key",
97280
97283
  confirmation: "Are you sure you want to delete the API Key with the name {name}? This action cannot be undone.",
97284
+ warning: "Any app or integration using this key will stop working immediately.",
97281
97285
  cancel: "Cancel",
97282
97286
  confirm: "Delete",
97283
97287
  confirming: "Deleting...",
@@ -97287,7 +97291,10 @@ var apiTabLabels$3 = {
97287
97291
  apiKeyModal: {
97288
97292
  title: "API Key",
97289
97293
  descriptionLineOne: "Please copy your API key and store it in a secure location. For security reasons, this key will only be displayed once and cannot be retrieved again after you leave this page.",
97290
- descriptionLineTwo: "If you lose your API key, you'll need to generate a new one."
97294
+ descriptionLineTwo: "If you lose your API key, you'll need to generate a new one.",
97295
+ description: "Copy and paste the API key.",
97296
+ copyAriaLabel: "Copy API key",
97297
+ copiedAriaLabel: "Copied"
97291
97298
  }
97292
97299
  };
97293
97300
  var apiTabTokenPolicies$3 = {
@@ -101558,6 +101565,11 @@ var toolsTabLabels$3 = {
101558
101565
  title: "Tools",
101559
101566
  description: "Configure tools and integrations for your agent."
101560
101567
  },
101568
+ infoBox: "Give your agent hands. Tools let it do things beyond chatting — look something up, call an API, trigger an action — so it can actually get work done for people.",
101569
+ moreInfoAbout: "More info about {name}",
101570
+ switchAriaLabel: "{name} {state}",
101571
+ enabled: "enabled",
101572
+ disabled: "disabled",
101561
101573
  toasts: {
101562
101574
  toggleSuccess: "Agent updated successfully",
101563
101575
  toggleError: "Failed to update tool"
@@ -101588,8 +101600,8 @@ var uiSidebar$3 = {
101588
101600
  var userProfileDropdownIndex$3 = {
101589
101601
  profile: "Profile",
101590
101602
  account: "Account",
101591
- learner: "Learner",
101592
- instructor: "Instructor",
101603
+ learner: "User",
101604
+ instructor: "Admin",
101593
101605
  help: "Help",
101594
101606
  logOut: "Log Out",
101595
101607
  moreOptions: "More options"
@@ -104760,6 +104772,7 @@ var apiTabLabels$2 = {
104760
104772
  title: "API",
104761
104773
  description: "Gérez les clés API et les intégrations."
104762
104774
  },
104775
+ infoBox: "Utilisez cet agent depuis vos propres applications. Créez ici des clés API pour l'appeler par programmation et l'intégrer à votre produit ou à votre flux de travail.",
104763
104776
  disclaimer: {
104764
104777
  lineOne: "Vos clés API secrètes sont listées ci-dessous. Veuillez noter que nous n’affichons plus vos clés API secrètes après leur génération.",
104765
104778
  lineTwo: "Ne partagez pas votre clé API avec d’autres personnes et ne l’exposez pas dans le navigateur ou dans un autre code côté client. Pour protéger la sécurité de votre compte, IBL peut également faire pivoter automatiquement toute clé API que nous avons détectée comme publiquement exposée."
@@ -104772,14 +104785,15 @@ var apiTabLabels$2 = {
104772
104785
  actionsColumn: "Actions",
104773
104786
  emptyState: "Aucune clé API trouvée",
104774
104787
  noPermission: "Vous n’avez pas la permission de consulter les clés API",
104775
- deleteAriaLabel: "Supprimer la clé API"
104788
+ deleteAriaLabel: "Supprimer la clé API",
104789
+ notAvailable: "N/A"
104776
104790
  },
104777
104791
  actions: {
104778
104792
  createNew: "Créer nouveau"
104779
104793
  },
104780
104794
  createModal: {
104781
104795
  title: "Créer une clé API",
104782
- description: "Créer une clé API",
104796
+ description: "Nommez votre clé et définissez éventuellement une date d’expiration. La clé ne s’affichera qu’une seule fois.",
104783
104797
  nameLabel: "Nom de la clé API",
104784
104798
  namePlaceholder: "Nom de la clé API",
104785
104799
  nameRequired: "Le nom de la clé API est requis",
@@ -104788,12 +104802,14 @@ var apiTabLabels$2 = {
104788
104802
  expirationPlaceholder: "Choisir une date",
104789
104803
  submit: "Soumettre",
104790
104804
  submitting: "Envoi en cours...",
104805
+ cancel: "Annuler",
104791
104806
  successToast: "Clé API créée avec succès",
104792
104807
  errorToast: "Impossible de créer la clé API"
104793
104808
  },
104794
104809
  deleteModal: {
104795
104810
  title: "Supprimer la clé API",
104796
104811
  confirmation: "Voulez-vous vraiment supprimer la clé API nommée {name} ? Cette action est irréversible.",
104812
+ warning: "Toute application ou intégration utilisant cette clé cessera immédiatement de fonctionner.",
104797
104813
  cancel: "Annuler",
104798
104814
  confirm: "Supprimer",
104799
104815
  confirming: "Suppression en cours...",
@@ -104803,7 +104819,10 @@ var apiTabLabels$2 = {
104803
104819
  apiKeyModal: {
104804
104820
  title: "Clé API",
104805
104821
  descriptionLineOne: "Veuillez copier votre clé API et la conserver dans un endroit sécurisé. Pour des raisons de sécurité, cette clé ne sera affichée qu’une seule fois et ne pourra pas être récupérée après avoir quitté cette page.",
104806
- descriptionLineTwo: "Si vous perdez votre clé API, vous devrez en générer une nouvelle."
104822
+ descriptionLineTwo: "Si vous perdez votre clé API, vous devrez en générer une nouvelle.",
104823
+ description: "Copiez et collez la clé API.",
104824
+ copyAriaLabel: "Copier la clé API",
104825
+ copiedAriaLabel: "Copiée"
104807
104826
  }
104808
104827
  };
104809
104828
  var apiTabTokenPolicies$2 = {
@@ -109240,6 +109259,11 @@ var toolsTabLabels$2 = {
109240
109259
  title: "Outils",
109241
109260
  description: "Configurez les outils et les intégrations pour votre agent."
109242
109261
  },
109262
+ infoBox: "Donnez des mains à votre agent. Les outils lui permettent d'aller au-delà de la simple conversation — rechercher une information, appeler une API, déclencher une action — pour qu'il accomplisse réellement des tâches pour les utilisateurs.",
109263
+ moreInfoAbout: "Plus d'informations sur {name}",
109264
+ switchAriaLabel: "{name} {state}",
109265
+ enabled: "activé",
109266
+ disabled: "désactivé",
109243
109267
  toasts: {
109244
109268
  toggleSuccess: "Agent mis à jour avec succès",
109245
109269
  toggleError: "Échec de la mise à jour de l'outil"
@@ -109270,8 +109294,8 @@ var uiSidebar$2 = {
109270
109294
  var userProfileDropdownIndex$2 = {
109271
109295
  profile: "Profil",
109272
109296
  account: "Compte",
109273
- learner: "Apprenant",
109274
- instructor: "Instructeur",
109297
+ learner: "Utilisateur",
109298
+ instructor: "Administrateur",
109275
109299
  help: "Aide",
109276
109300
  logOut: "Se déconnecter",
109277
109301
  moreOptions: "Plus d'options"
@@ -112276,6 +112300,7 @@ var apiTabLabels$1 = {
112276
112300
  title: "API",
112277
112301
  description: "Administre las claves API y las integraciones."
112278
112302
  },
112303
+ infoBox: "Usa este agente desde tus propias aplicaciones. Crea aquí claves de API para llamarlo mediante programación e integrarlo en tu producto o flujo de trabajo.",
112279
112304
  disclaimer: {
112280
112305
  lineOne: "Sus claves API secretas se enumeran a continuación. Tenga en cuenta que no mostramos sus claves API secretas nuevamente después de generarlas.",
112281
112306
  lineTwo: "No comparta su clave API con otros ni la exponga en el navegador u otro código del lado del cliente. Para proteger la seguridad de su cuenta, IBL también puede rotar automáticamente cualquier clave API que hayamos detectado que se ha filtrado públicamente."
@@ -112288,14 +112313,15 @@ var apiTabLabels$1 = {
112288
112313
  actionsColumn: "Acciones",
112289
112314
  emptyState: "No se encontraron claves API",
112290
112315
  noPermission: "No tiene permiso para ver las claves API",
112291
- deleteAriaLabel: "Eliminar clave API"
112316
+ deleteAriaLabel: "Eliminar clave API",
112317
+ notAvailable: "N/A"
112292
112318
  },
112293
112319
  actions: {
112294
112320
  createNew: "Crear nuevo"
112295
112321
  },
112296
112322
  createModal: {
112297
112323
  title: "Crear clave API",
112298
- description: "Crear clave API",
112324
+ description: "Asigna un nombre a tu clave y, opcionalmente, una fecha de vencimiento. Solo verás la clave una vez.",
112299
112325
  nameLabel: "Nombre de la clave API",
112300
112326
  namePlaceholder: "Nombre de la clave API",
112301
112327
  nameRequired: "El nombre de la clave API es obligatorio",
@@ -112304,12 +112330,14 @@ var apiTabLabels$1 = {
112304
112330
  expirationPlaceholder: "Seleccionar una fecha",
112305
112331
  submit: "Enviar",
112306
112332
  submitting: "Enviando...",
112333
+ cancel: "Cancelar",
112307
112334
  successToast: "Clave API creada correctamente",
112308
112335
  errorToast: "Error al crear la clave API"
112309
112336
  },
112310
112337
  deleteModal: {
112311
112338
  title: "Eliminar clave API",
112312
112339
  confirmation: "¿Está seguro de que desea eliminar la clave API con el nombre {name}? Esta acción no se puede deshacer.",
112340
+ warning: "Cualquier aplicación o integración que use esta clave dejará de funcionar de inmediato.",
112313
112341
  cancel: "Cancelar",
112314
112342
  confirm: "Eliminar",
112315
112343
  confirming: "Eliminando...",
@@ -112319,7 +112347,10 @@ var apiTabLabels$1 = {
112319
112347
  apiKeyModal: {
112320
112348
  title: "Clave API",
112321
112349
  descriptionLineOne: "Copie su clave API y guárdela en un lugar seguro. Por razones de seguridad, esta clave solo se mostrará una vez y no podrá recuperarse después de salir de esta página.",
112322
- descriptionLineTwo: "Si pierde su clave API, deberá generar una nueva."
112350
+ descriptionLineTwo: "Si pierde su clave API, deberá generar una nueva.",
112351
+ description: "Copie y pegue la clave API.",
112352
+ copyAriaLabel: "Copiar clave API",
112353
+ copiedAriaLabel: "Copiada"
112323
112354
  }
112324
112355
  };
112325
112356
  var apiTabTokenPolicies$1 = {
@@ -116756,6 +116787,11 @@ var toolsTabLabels$1 = {
116756
116787
  title: "Herramientas",
116757
116788
  description: "Configure las herramientas e integraciones para su agente."
116758
116789
  },
116790
+ infoBox: "Dale manos a tu agente. Las herramientas le permiten hacer cosas más allá de conversar —buscar información, llamar a una API, activar una acción— para que realmente pueda hacer el trabajo por las personas.",
116791
+ moreInfoAbout: "Más información sobre {name}",
116792
+ switchAriaLabel: "{name} {state}",
116793
+ enabled: "habilitado",
116794
+ disabled: "deshabilitado",
116759
116795
  toasts: {
116760
116796
  toggleSuccess: "Agente actualizado correctamente",
116761
116797
  toggleError: "Error al actualizar la herramienta"
@@ -116786,8 +116822,8 @@ var uiSidebar$1 = {
116786
116822
  var userProfileDropdownIndex$1 = {
116787
116823
  profile: "Perfil",
116788
116824
  account: "Cuenta",
116789
- learner: "Estudiante",
116790
- instructor: "Instructor",
116825
+ learner: "Usuario",
116826
+ instructor: "Administrador",
116791
116827
  help: "Ayuda",
116792
116828
  logOut: "Cerrar sesión",
116793
116829
  moreOptions: "Más opciones"
@@ -119792,6 +119828,7 @@ var apiTabLabels = {
119792
119828
  title: "API",
119793
119829
  description: "管理 API 密钥和集成。"
119794
119830
  },
119831
+ infoBox: "在您自己的应用中使用该智能体。在此创建 API 密钥,以便通过编程方式调用它,并将其集成到您的产品或工作流程中。",
119795
119832
  disclaimer: {
119796
119833
  lineOne: "您的秘密 API 密钥列表如下。请注意,生成密钥后,我们将不再显示您的秘密 API 密钥。",
119797
119834
  lineTwo: "请勿将您的 API 密钥共享给他人,也勿将其暴露在浏览器或其他客户端代码中。为了保护您账户的安全,IBL 也可能会自动轮换我们发现已公开泄露的任何 API 密钥。"
@@ -119804,14 +119841,15 @@ var apiTabLabels = {
119804
119841
  actionsColumn: "操作",
119805
119842
  emptyState: "未找到 API 密钥",
119806
119843
  noPermission: "您没有查看 API 密钥的权限",
119807
- deleteAriaLabel: "删除 API 密钥"
119844
+ deleteAriaLabel: "删除 API 密钥",
119845
+ notAvailable: "N/A"
119808
119846
  },
119809
119847
  actions: {
119810
119848
  createNew: "新建"
119811
119849
  },
119812
119850
  createModal: {
119813
119851
  title: "创建 API 密钥",
119814
- description: "创建 API 密钥",
119852
+ description: "为密钥命名,并可选择设置过期日期。密钥仅显示一次。",
119815
119853
  nameLabel: "API 密钥名称",
119816
119854
  namePlaceholder: "API 密钥名称",
119817
119855
  nameRequired: "API 密钥名称为必填项",
@@ -119820,12 +119858,14 @@ var apiTabLabels = {
119820
119858
  expirationPlaceholder: "选择日期",
119821
119859
  submit: "提交",
119822
119860
  submitting: "提交中……",
119861
+ cancel: "取消",
119823
119862
  successToast: "API 密钥创建成功",
119824
119863
  errorToast: "创建 API 密钥失败"
119825
119864
  },
119826
119865
  deleteModal: {
119827
119866
  title: "删除 API 密钥",
119828
119867
  confirmation: "您确定要删除名为「{name}」的 API 密钥吗?此操作无法撤销。",
119868
+ warning: "任何使用此密钥的应用或集成都将立即停止工作。",
119829
119869
  cancel: "取消",
119830
119870
  confirm: "删除",
119831
119871
  confirming: "删除中……",
@@ -119835,7 +119875,10 @@ var apiTabLabels = {
119835
119875
  apiKeyModal: {
119836
119876
  title: "API 密钥",
119837
119877
  descriptionLineOne: "请复制您的 API 密钥并将其保存在安全的位置。出于安全原因,该密钥仅显示一次,离开此页面后将无法再次获取。",
119838
- descriptionLineTwo: "如果您丢失了 API 密钥,将需要重新生成一个新的。"
119878
+ descriptionLineTwo: "如果您丢失了 API 密钥,将需要重新生成一个新的。",
119879
+ description: "复制并粘贴 API 密钥。",
119880
+ copyAriaLabel: "复制 API 密钥",
119881
+ copiedAriaLabel: "已复制"
119839
119882
  }
119840
119883
  };
119841
119884
  var apiTabTokenPolicies = {
@@ -124272,6 +124315,11 @@ var toolsTabLabels = {
124272
124315
  title: "工具",
124273
124316
  description: "为您的智能体配置工具和集成。"
124274
124317
  },
124318
+ infoBox: "为您的智能体赋予“双手”。工具让它能够超越单纯的聊天——查找信息、调用 API、触发操作——从而真正为用户完成工作。",
124319
+ moreInfoAbout: "关于 {name} 的更多信息",
124320
+ switchAriaLabel: "{name} {state}",
124321
+ enabled: "已启用",
124322
+ disabled: "已禁用",
124275
124323
  toasts: {
124276
124324
  toggleSuccess: "智能体已成功更新",
124277
124325
  toggleError: "更新工具失败"
@@ -124302,8 +124350,8 @@ var uiSidebar = {
124302
124350
  var userProfileDropdownIndex = {
124303
124351
  profile: "个人资料",
124304
124352
  account: "账户",
124305
- learner: "学习者",
124306
- instructor: "讲师",
124353
+ learner: "用户",
124354
+ instructor: "管理员",
124307
124355
  help: "帮助",
124308
124356
  logOut: "退出登录",
124309
124357
  moreOptions: "更多选项"
@@ -185137,7 +185185,7 @@ const PopoverContent = React.forwardRef(({ className, align = 'center', sideOffs
185137
185185
  var _a;
185138
185186
  const portalContainer = useFloatingPortalContainer();
185139
185187
  const resolvedContainer = (_a = container !== null && container !== void 0 ? container : portalContainer) !== null && _a !== void 0 ? _a : undefined;
185140
- const content = (jsx(Content2$2, { ref: ref, "data-iblai-dialog-interaction-layer": true, align: align, sideOffset: sideOffset, className: cn('bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md outline-none', className), ...props }));
185188
+ const content = (jsx(Content2$2, { ref: ref, "data-iblai-dialog-interaction-layer": true, align: align, sideOffset: sideOffset, className: cn('pointer-events-auto bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md outline-none', className), ...props }));
185141
185189
  if (!portalled) {
185142
185190
  return content;
185143
185191
  }
@@ -275758,6 +275806,9 @@ const AGENT_TOOLS_TAB_LABELS = {
275758
275806
  title: 'Tools',
275759
275807
  description: 'Configure tools and integrations for your agent.',
275760
275808
  },
275809
+ infoBox: 'Give your agent hands. Tools let it do things beyond chatting — look something up, call an API, trigger an action — so it can actually get work done for people.',
275810
+ moreInfoAbout: (name) => `More info about ${name}`,
275811
+ switchAriaLabel: (name, isEnabled) => `${name} ${isEnabled ? 'enabled' : 'disabled'}`,
275761
275812
  toasts: {
275762
275813
  toggleSuccess: 'Agent updated successfully',
275763
275814
  toggleError: 'Failed to update tool',
@@ -275769,6 +275820,12 @@ function buildToolsTabLabels(t) {
275769
275820
  title: t('toolsTabLabels.header.title'),
275770
275821
  description: t('toolsTabLabels.header.description'),
275771
275822
  },
275823
+ infoBox: t('toolsTabLabels.infoBox'),
275824
+ moreInfoAbout: (name) => t('toolsTabLabels.moreInfoAbout', { name }),
275825
+ switchAriaLabel: (name, isEnabled) => t('toolsTabLabels.switchAriaLabel', {
275826
+ name,
275827
+ state: isEnabled ? t('toolsTabLabels.enabled') : t('toolsTabLabels.disabled'),
275828
+ }),
275772
275829
  toasts: {
275773
275830
  toggleSuccess: t('toolsTabLabels.toasts.toggleSuccess'),
275774
275831
  toggleError: t('toolsTabLabels.toasts.toggleError'),
@@ -275788,19 +275845,53 @@ function AgentToolsTab({ labels: labelsOverride }) {
275788
275845
  const labels = React__default.useMemo(() => resolveToolsTabLabels(labelsOverride, t), [labelsOverride, t]);
275789
275846
  const { enableRBAC } = useAgentSettings();
275790
275847
  const { tools, mentorSettings, mentorTools, toggleTool, isDisabled } = useTools({ labels });
275791
- return (jsxs(Fragment$1, { children: [jsx("div", { className: "flex hidden h-[73px] flex-shrink-0 items-center border-b border-gray-200 bg-white p-4 lg:block", children: jsxs("div", { children: [jsx("h3", { className: "mb-1 text-base font-medium text-gray-900", children: labels.header.title }), jsx("p", { className: "text-xs text-gray-700", children: labels.header.description })] }) }), jsx("div", { className: "flex-1 space-y-4 p-3", style: {
275848
+ return (jsxs(Fragment$1, { children: [jsx("div", { className: "flex hidden h-[73px] flex-shrink-0 items-center border-b border-gray-200 bg-white p-4 lg:block", children: jsxs("div", { children: [jsx("h3", { className: "mb-1 text-base font-medium text-gray-900", children: labels.header.title }), jsx("p", { className: "text-xs text-gray-700", children: labels.header.description })] }) }), jsxs("div", { className: "flex-1 space-y-4 p-3", style: {
275792
275849
  overflowY: 'auto',
275793
275850
  overflowX: 'hidden',
275794
- }, children: jsx(WithFormPermissions, { name: "mentor_tools",
275795
- // @ts-ignore
275796
- permissions: (_a = mentorSettings === null || mentorSettings === void 0 ? void 0 : mentorSettings.permissions) === null || _a === void 0 ? void 0 : _a.field, enableRBAC: enableRBAC, children: ({ disabled }) => (jsx("div", { className: "space-y-6", children: tools === null || tools === void 0 ? void 0 : tools.map((tool) => {
275797
- var _a, _b;
275798
- const isEnabled = mentorTools.includes((_a = tool === null || tool === void 0 ? void 0 : tool.slug) !== null && _a !== void 0 ? _a : '');
275799
- return (jsxs("div", { className: "flex items-center justify-between rounded-lg border p-6", children: [jsxs("div", { className: "flex items-center gap-2", children: [jsx("span", { className: "text-sm font-medium text-gray-700", children: tool === null || tool === void 0 ? void 0 : tool.display_name }), jsx(TooltipProvider, { children: jsxs(Tooltip$1, { children: [jsx(TooltipTrigger, { "aria-label": `More info about ${tool === null || tool === void 0 ? void 0 : tool.display_name}`, children: jsx(Info$3, { className: "h-4 w-4 text-gray-400" }) }), jsx(TooltipContent, { className: "ibl-tooltip-content", children: jsx("p", { children: tool === null || tool === void 0 ? void 0 : tool.description }) })] }) })] }), jsx(CustomSwitch, { checked: isEnabled, onCheckedChange: async () => {
275800
- var _a;
275801
- await toggleTool((_a = tool === null || tool === void 0 ? void 0 : tool.slug) !== null && _a !== void 0 ? _a : '');
275802
- }, disabled: isDisabled || disabled, "aria-label": `${tool === null || tool === void 0 ? void 0 : tool.display_name} ${isEnabled ? 'enabled' : 'disabled'}` })] }, (_b = tool === null || tool === void 0 ? void 0 : tool.slug) !== null && _b !== void 0 ? _b : tool === null || tool === void 0 ? void 0 : tool.name));
275803
- }) })) }) })] }));
275851
+ }, children: [jsx("div", { className: "rounded-md border border-gray-200 bg-gray-50 p-3 text-xs text-gray-600", "data-testid": "tools-info-box", children: labels.infoBox }), jsx(WithFormPermissions, { name: "mentor_tools",
275852
+ // @ts-ignore
275853
+ permissions: (_a = mentorSettings === null || mentorSettings === void 0 ? void 0 : mentorSettings.permissions) === null || _a === void 0 ? void 0 : _a.field, enableRBAC: enableRBAC, children: ({ disabled }) => (jsx("div", { className: "space-y-6", children: tools === null || tools === void 0 ? void 0 : tools.map((tool) => {
275854
+ var _a, _b, _c, _d;
275855
+ const isEnabled = mentorTools.includes((_a = tool === null || tool === void 0 ? void 0 : tool.slug) !== null && _a !== void 0 ? _a : '');
275856
+ return (jsxs("div", { className: "flex items-center justify-between rounded-lg border p-6", children: [jsxs("div", { className: "flex items-center gap-2", children: [jsx("span", { className: "text-sm font-medium text-gray-700", children: tool === null || tool === void 0 ? void 0 : tool.display_name }), jsx(TooltipProvider, { children: jsxs(Tooltip$1, { children: [jsx(TooltipTrigger, { "aria-label": labels.moreInfoAbout((_b = tool === null || tool === void 0 ? void 0 : tool.display_name) !== null && _b !== void 0 ? _b : ''), children: jsx(Info$3, { className: "h-4 w-4 text-gray-400" }) }), jsx(TooltipContent, { className: "ibl-tooltip-content", children: jsx("p", { children: tool === null || tool === void 0 ? void 0 : tool.description }) })] }) })] }), jsx(CustomSwitch, { checked: isEnabled, onCheckedChange: async () => {
275857
+ var _a;
275858
+ await toggleTool((_a = tool === null || tool === void 0 ? void 0 : tool.slug) !== null && _a !== void 0 ? _a : '');
275859
+ }, disabled: isDisabled || disabled, "aria-label": labels.switchAriaLabel((_c = tool === null || tool === void 0 ? void 0 : tool.display_name) !== null && _c !== void 0 ? _c : '', isEnabled) })] }, (_d = tool === null || tool === void 0 ? void 0 : tool.slug) !== null && _d !== void 0 ? _d : tool === null || tool === void 0 ? void 0 : tool.name));
275860
+ }) })) })] })] }));
275861
+ }
275862
+
275863
+ function useToggleTools({ activeMentorId, tenantKey, username, tools = [] }) {
275864
+ const [editMentor, { isLoading }] = useEditMentorMutation();
275865
+ async function toggleTools(toolSlug, callback, labels) {
275866
+ var _a, _b, _c, _d;
275867
+ const mentorTools = tools;
275868
+ const newMentorTools = mentorTools.includes(toolSlug)
275869
+ ? mentorTools.filter((tool) => tool !== toolSlug)
275870
+ : [...mentorTools, toolSlug];
275871
+ try {
275872
+ await editMentor({
275873
+ mentor: activeMentorId,
275874
+ org: tenantKey,
275875
+ formData: {
275876
+ tool_slugs: newMentorTools,
275877
+ can_use_tools: newMentorTools.length > 0 ? true : false,
275878
+ },
275879
+ // @ts-expect-error userId is not in the typed args but the API accepts it
275880
+ userId: username !== null && username !== void 0 ? username : '',
275881
+ }).unwrap();
275882
+ toast.success((_a = labels === null || labels === void 0 ? void 0 : labels.success) !== null && _a !== void 0 ? _a : 'Agent updated successfully');
275883
+ callback === null || callback === void 0 ? void 0 : callback();
275884
+ }
275885
+ catch (error) {
275886
+ const errorMessage = ((_b = error === null || error === void 0 ? void 0 : error.data) === null || _b === void 0 ? void 0 : _b.error) || ((_c = error === null || error === void 0 ? void 0 : error.error) === null || _c === void 0 ? void 0 : _c.error) || ((_d = labels === null || labels === void 0 ? void 0 : labels.error) !== null && _d !== void 0 ? _d : 'Failed to update tool');
275887
+ toast.error(errorMessage);
275888
+ console.error('Failed to toggle tools:', error);
275889
+ }
275890
+ }
275891
+ return {
275892
+ toggleTools,
275893
+ isLoading,
275894
+ };
275804
275895
  }
275805
275896
 
275806
275897
  const AGENT_MEMORY_TAB_LABELS = {
@@ -280688,7 +280779,7 @@ function SpendCapUsage({ tenantKey, userId, mentorId, showWhenOk = false, classN
280688
280779
  function ApiKeyModal({ isOpen, onClose, apiKey, labels }) {
280689
280780
  const { copy, status } = useCopyToClipboard(800);
280690
280781
  const Icon = status === 'success' ? Check : Copy;
280691
- return (jsx(Dialog, { open: isOpen, onOpenChange: onClose, children: jsxs(DialogContent, { children: [jsx(DialogHeader, { children: jsx(DialogTitle, { className: "ibl-dialog-title", children: labels.title }) }), jsx(DialogDescription, { className: "sr-only", children: "Copy and paste the API key." }), jsxs("div", { className: "grid gap-6", children: [jsxs("p", { className: "text-muted-foreground grid gap-2 text-sm", children: [jsx("span", { children: labels.descriptionLineOne }), jsx("span", { children: labels.descriptionLineTwo })] }), jsxs("div", { className: "flex items-center gap-4", children: [jsx(Input, { defaultValue: apiKey, readOnly: true }), jsx(Button$1, { size: "icon", className: "ibl-button-primary cursor-pointer", onClick: () => copy(apiKey), "aria-label": status === 'success' ? 'Copied' : 'Copy API key', children: jsx(Icon, { className: "h-4 w-4" }) })] })] })] }) }));
280782
+ return (jsx(Dialog, { open: isOpen, onOpenChange: onClose, children: jsxs(DialogContent, { children: [jsx(DialogHeader, { children: jsx(DialogTitle, { className: "ibl-dialog-title", children: labels.title }) }), jsx(DialogDescription, { className: "sr-only", children: labels.description }), jsxs("div", { className: "grid gap-6", children: [jsxs("p", { className: "text-muted-foreground grid gap-2 text-sm", children: [jsx("span", { children: labels.descriptionLineOne }), jsx("span", { children: labels.descriptionLineTwo })] }), jsxs("div", { className: "flex items-center gap-4", children: [jsx(Input, { defaultValue: apiKey, readOnly: true }), jsx(Button$1, { size: "icon", className: "ibl-button-primary cursor-pointer", onClick: () => copy(apiKey), "aria-label": status === 'success' ? labels.copiedAriaLabel : labels.copyAriaLabel, children: jsx(Icon, { className: "h-4 w-4" }) })] })] })] }) }));
280692
280783
  }
280693
280784
 
280694
280785
  const createApiFormDefaultValues = {
@@ -280702,9 +280793,10 @@ function daysFromCurrentDate(targetDate) {
280702
280793
  const daysDifference = Math.ceil(timeDifference / oneDay);
280703
280794
  return daysDifference * 24 * 3600;
280704
280795
  }
280705
- function CreateApiModal({ isOpen, onClose, tenantKey, username, executeGatedAction, labels, apiKeyModalLabels, }) {
280796
+ function CreateApiModal({ isOpen, onClose, tenantKey, username, executeGatedAction, onCreated, labels, apiKeyModalLabels, }) {
280706
280797
  const [apiKey, setApiKey] = React__default.useState(null);
280707
280798
  const [createApiKey, { isLoading }] = useCreateApiKeyMutation();
280799
+ const nameInputId = React__default.useId();
280708
280800
  const createApiFormSchema = React__default.useMemo(() => z$2.object({
280709
280801
  name: z$2
280710
280802
  .string()
@@ -280736,6 +280828,7 @@ function CreateApiModal({ isOpen, onClose, tenantKey, username, executeGatedActi
280736
280828
  toast.success(labels.successToast);
280737
280829
  form.reset();
280738
280830
  setApiKey(response.key);
280831
+ onCreated === null || onCreated === void 0 ? void 0 : onCreated();
280739
280832
  }
280740
280833
  catch (error) {
280741
280834
  console.error(JSON.stringify(error));
@@ -280752,21 +280845,21 @@ function CreateApiModal({ isOpen, onClose, tenantKey, username, executeGatedActi
280752
280845
  form.handleSubmit();
280753
280846
  }
280754
280847
  };
280755
- return (jsxs(Fragment$1, { children: [jsx(Dialog, { open: isOpen, onOpenChange: isLoading ? undefined : onClose, children: jsxs(DialogContent, { "aria-describedby": "api-key-creation-description", className: "w-full max-w-md", children: [jsx(DialogDescription, { className: "sr-only", children: labels.description }), jsx(DialogHeader, { children: jsx(DialogTitle, { className: "ibl-dialog-title", children: labels.title }) }), jsxs("form", { onSubmit: (formEvent) => {
280848
+ return (jsxs(Fragment$1, { children: [jsx(Dialog, { open: isOpen, onOpenChange: isLoading ? undefined : onClose, children: jsxs(DialogContent, { className: "flex max-h-[80vh] w-full max-w-lg flex-col gap-0 overflow-hidden p-0", children: [jsxs(DialogHeader, { className: "flex-shrink-0 space-y-1 border-b border-gray-200 bg-white px-4 pt-4 pr-10 pb-3 text-left", children: [jsx(DialogTitle, { className: "text-sm font-semibold text-gray-900", children: labels.title }), jsx(DialogDescription, { className: "text-xs text-gray-600", children: labels.description })] }), jsxs("form", { onSubmit: (formEvent) => {
280756
280849
  formEvent.preventDefault();
280757
280850
  formEvent.stopPropagation();
280758
280851
  handleSubmit();
280759
- }, className: "mt-5 grid gap-5", children: [jsx(form.Field, { name: "name", children: (field) => {
280760
- var _a, _b;
280761
- const hasError = ((_a = field.state.meta.errors) === null || _a === void 0 ? void 0 : _a.length) > 0;
280762
- const isDirty = field.state.meta.isDirty;
280763
- const hasErrorAndIsDirty = hasError && isDirty;
280764
- return (jsxs("div", { className: "space-y-1.5", children: [jsxs(Label$1, { className: "flex items-center text-sm font-medium text-[#646464]", children: [labels.nameLabel, jsx("span", { className: "ml-1 text-red-500", children: "*" })] }), jsx(Input, { placeholder: labels.namePlaceholder, value: field.state.value, onChange: (event) => field.handleChange(event.target.value), autoComplete: "off" }), hasErrorAndIsDirty && (jsx("p", { className: "text-xs text-red-500", children: (_b = field.state.meta.errors[0]) === null || _b === void 0 ? void 0 : _b.message }))] }));
280765
- } }), jsx(form.Field, { name: "expiration_date", children: (field) => (jsxs("div", { className: "space-y-1.5", children: [jsx(Label$1, { className: "flex items-center text-sm font-medium text-[#646464]", children: labels.expirationLabel }), jsxs(Popover, { children: [jsx(PopoverTrigger, { asChild: true, children: jsxs(Button$1, { type: "button", variant: "outline", className: cn('w-full pl-3 text-left font-normal', !field.state.value && 'text-muted-foreground'), children: [field.state.value ? (format$1(field.state.value, 'PPP')) : (jsx("span", { children: labels.expirationPlaceholder })), jsx(Calendar$1, { className: "ml-auto h-4 w-4 opacity-50" })] }) }), jsx(PopoverContent, { className: "w-auto p-0", align: "start", children: jsx(Calendar, { mode: "single",
280766
- // @ts-ignore - Calendar selected prop expects Date but form field may be null
280767
- selected: field.state.value, onSelect: field.handleChange, disabled: (date) => date && date < new Date() }) })] })] })) }), jsx(DialogFooter, { className: "justify-end", children: jsx(form.Subscribe, { selector: (state) => ({
280768
- canSubmit: state.canSubmit,
280769
- }), children: ({ canSubmit }) => (jsx(Button$1, { type: "submit", disabled: !canSubmit || isLoading, className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-white hover:opacity-90", children: isLoading ? labels.submitting : labels.submit })) }) })] })] }) }), apiKey && (jsx(ApiKeyModal, { isOpen: true, onClose: () => setApiKey(null), apiKey: apiKey, labels: apiKeyModalLabels }))] }));
280852
+ }, children: [jsxs("div", { className: "space-y-4 p-4", children: [jsx(form.Field, { name: "name", children: (field) => {
280853
+ var _a, _b;
280854
+ const hasError = ((_a = field.state.meta.errors) === null || _a === void 0 ? void 0 : _a.length) > 0;
280855
+ const isDirty = field.state.meta.isDirty;
280856
+ const hasErrorAndIsDirty = hasError && isDirty;
280857
+ return (jsxs("div", { className: "space-y-1.5", children: [jsxs(Label$1, { htmlFor: nameInputId, className: "flex items-center text-sm font-medium text-gray-700", children: [labels.nameLabel, jsx("span", { className: "ml-1 text-red-500", children: "*" })] }), jsx(Input, { id: nameInputId, placeholder: labels.namePlaceholder, value: field.state.value, onChange: (event) => field.handleChange(event.target.value), autoComplete: "off" }), hasErrorAndIsDirty && (jsx("p", { className: "text-xs text-red-500", children: (_b = field.state.meta.errors[0]) === null || _b === void 0 ? void 0 : _b.message }))] }));
280858
+ } }), jsx(form.Field, { name: "expiration_date", children: (field) => (jsxs("div", { className: "space-y-1.5", children: [jsx(Label$1, { className: "flex items-center text-sm font-medium text-gray-700", children: labels.expirationLabel }), jsxs(Popover, { children: [jsx(PopoverTrigger, { asChild: true, children: jsxs(Button$1, { type: "button", variant: "outline", className: cn('w-full pl-3 text-left font-normal', !field.state.value && 'text-muted-foreground'), children: [field.state.value ? (format$1(field.state.value, 'PPP')) : (jsx("span", { children: labels.expirationPlaceholder })), jsx(Calendar$1, { className: "ml-auto h-4 w-4 opacity-50" })] }) }), jsx(PopoverContent, { className: "w-auto p-0", align: "start", children: jsx(Calendar, { mode: "single",
280859
+ // @ts-ignore - Calendar selected prop expects Date but form field may be null
280860
+ selected: field.state.value, onSelect: field.handleChange, disabled: (date) => date && date < new Date() }) })] })] })) })] }), jsxs("div", { className: "flex flex-shrink-0 justify-end gap-2 border-t border-gray-200 bg-white px-4 py-3", children: [jsx(Button$1, { type: "button", variant: "outline", onClick: onClose, disabled: isLoading, children: labels.cancel }), jsx(form.Subscribe, { selector: (state) => ({
280861
+ canSubmit: state.canSubmit,
280862
+ }), children: ({ canSubmit }) => (jsx(Button$1, { type: "submit", disabled: !canSubmit || isLoading, className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-sm text-white hover:text-white hover:opacity-90", children: isLoading ? labels.submitting : labels.submit })) })] })] })] }) }), apiKey && (jsx(ApiKeyModal, { isOpen: true, onClose: () => setApiKey(null), apiKey: apiKey, labels: apiKeyModalLabels }))] }));
280770
280863
  }
280771
280864
 
280772
280865
  function DeleteApiModal({ isOpen, onClose, apiKey, tenantKey, labels }) {
@@ -280788,7 +280881,7 @@ function DeleteApiModal({ isOpen, onClose, apiKey, tenantKey, labels }) {
280788
280881
  }
280789
280882
  }
280790
280883
  const confirmation = labels.confirmation.split('{name}');
280791
- return (jsx(Dialog, { open: isOpen, onOpenChange: onClose, children: jsxs(DialogContent, { "aria-describedby": "delete-api-key-description", children: [jsx(DialogHeader, { children: jsx(DialogTitle, { className: "ibl-dialog-title", children: labels.title }) }), jsx("div", { className: "my-5", children: jsxs("p", { className: "text-sm text-[#646464]", children: [confirmation[0], jsx("span", { className: "font-bold italic", children: apiKey.name }), (_a = confirmation[1]) !== null && _a !== void 0 ? _a : ''] }) }), jsxs(DialogFooter, { className: "gap-3", children: [jsx(Button$1, { variant: "outline", onClick: onClose, children: labels.cancel }), jsx(Button$1, { className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-white hover:opacity-90", onClick: handleDeleteApiKey, disabled: isLoading, children: isLoading ? labels.confirming : labels.confirm })] })] }) }));
280884
+ return (jsx(Dialog, { open: isOpen, onOpenChange: (open) => !open && !isLoading && onClose(), children: jsxs(DialogContent, { className: "flex max-h-[80vh] w-full max-w-lg flex-col gap-0 overflow-hidden p-0", children: [jsxs(DialogHeader, { className: "flex-shrink-0 space-y-1 border-b border-gray-200 bg-white px-4 pt-4 pr-10 pb-3 text-left", children: [jsx(DialogTitle, { className: "text-sm font-semibold text-gray-900", children: labels.title }), jsx(DialogDescription, { className: "text-xs text-gray-600", children: labels.warning })] }), jsx("div", { className: "px-4 py-6", children: jsxs("p", { className: "text-sm leading-relaxed text-gray-700", children: [confirmation[0], jsx("code", { className: "rounded bg-gray-100 px-1.5 py-0.5 font-mono text-gray-900", children: apiKey.name }), (_a = confirmation[1]) !== null && _a !== void 0 ? _a : ''] }) }), jsxs("div", { className: "flex flex-shrink-0 justify-end gap-2 border-t border-gray-200 bg-white px-4 py-3", children: [jsx(Button$1, { variant: "outline", onClick: onClose, disabled: isLoading, children: labels.cancel }), jsx(Button$1, { className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-sm text-white hover:text-white hover:opacity-90", onClick: handleDeleteApiKey, disabled: isLoading, children: isLoading ? labels.confirming : labels.confirm })] })] }) }));
280792
280885
  }
280793
280886
 
280794
280887
  const AGENT_API_TAB_LABELS = {
@@ -280796,6 +280889,7 @@ const AGENT_API_TAB_LABELS = {
280796
280889
  title: 'API',
280797
280890
  description: 'Manage API keys and integrations.',
280798
280891
  },
280892
+ infoBox: 'Use this agent from your own apps. Create API keys here to call it programmatically and build it into your product or workflow.',
280799
280893
  disclaimer: {
280800
280894
  lineOne: 'Your secret API keys are listed below. Please note that we do not display your secret API keys again after you generate them.',
280801
280895
  lineTwo: 'Do not share your API key with others, or expose it in the browser or other client-side code. In order to protect the security of your account, IBL may also automatically rotate any API key that we\u2019ve found has leaked publicly.',
@@ -280808,13 +280902,14 @@ const AGENT_API_TAB_LABELS = {
280808
280902
  emptyState: 'No API keys found',
280809
280903
  noPermission: 'You do not have permission to view API keys',
280810
280904
  deleteAriaLabel: 'Delete API Key',
280905
+ notAvailable: 'N/A',
280811
280906
  },
280812
280907
  actions: {
280813
280908
  createNew: 'Create New',
280814
280909
  },
280815
280910
  createModal: {
280816
280911
  title: 'Create API Key',
280817
- description: 'Create API Key',
280912
+ description: "Name your key and optionally set an expiry date. You'll only see the key once.",
280818
280913
  nameLabel: 'API Key Name',
280819
280914
  namePlaceholder: 'API Key Name',
280820
280915
  nameRequired: 'API Key name is required',
@@ -280823,12 +280918,14 @@ const AGENT_API_TAB_LABELS = {
280823
280918
  expirationPlaceholder: 'Pick a date',
280824
280919
  submit: 'Submit',
280825
280920
  submitting: 'Submitting...',
280921
+ cancel: 'Cancel',
280826
280922
  successToast: 'API Key created successfully',
280827
280923
  errorToast: 'Failed to create API Key',
280828
280924
  },
280829
280925
  deleteModal: {
280830
280926
  title: 'Delete API Key',
280831
280927
  confirmation: 'Are you sure you want to delete the API Key with the name {name}? This action cannot be undone.',
280928
+ warning: 'Any app or integration using this key will stop working immediately.',
280832
280929
  cancel: 'Cancel',
280833
280930
  confirm: 'Delete',
280834
280931
  confirming: 'Deleting...',
@@ -280839,6 +280936,9 @@ const AGENT_API_TAB_LABELS = {
280839
280936
  title: 'API Key',
280840
280937
  descriptionLineOne: 'Please copy your API key and store it in a secure location. For security reasons, this key will only be displayed once and cannot be retrieved again after you leave this page.',
280841
280938
  descriptionLineTwo: "If you lose your API key, you'll need to generate a new one.",
280939
+ description: 'Copy and paste the API key.',
280940
+ copyAriaLabel: 'Copy API key',
280941
+ copiedAriaLabel: 'Copied',
280842
280942
  },
280843
280943
  };
280844
280944
  function buildApiTabLabels(t) {
@@ -280847,6 +280947,7 @@ function buildApiTabLabels(t) {
280847
280947
  title: t('apiTabLabels.header.title'),
280848
280948
  description: t('apiTabLabels.header.description'),
280849
280949
  },
280950
+ infoBox: t('apiTabLabels.infoBox'),
280850
280951
  disclaimer: {
280851
280952
  lineOne: t('apiTabLabels.disclaimer.lineOne'),
280852
280953
  lineTwo: t('apiTabLabels.disclaimer.lineTwo'),
@@ -280859,6 +280960,7 @@ function buildApiTabLabels(t) {
280859
280960
  emptyState: t('apiTabLabels.table.emptyState'),
280860
280961
  noPermission: t('apiTabLabels.table.noPermission'),
280861
280962
  deleteAriaLabel: t('apiTabLabels.table.deleteAriaLabel'),
280963
+ notAvailable: t('apiTabLabels.table.notAvailable'),
280862
280964
  },
280863
280965
  actions: {
280864
280966
  createNew: t('apiTabLabels.actions.createNew'),
@@ -280874,12 +280976,14 @@ function buildApiTabLabels(t) {
280874
280976
  expirationPlaceholder: t('apiTabLabels.createModal.expirationPlaceholder'),
280875
280977
  submit: t('apiTabLabels.createModal.submit'),
280876
280978
  submitting: t('apiTabLabels.createModal.submitting'),
280979
+ cancel: t('apiTabLabels.createModal.cancel'),
280877
280980
  successToast: t('apiTabLabels.createModal.successToast'),
280878
280981
  errorToast: t('apiTabLabels.createModal.errorToast'),
280879
280982
  },
280880
280983
  deleteModal: {
280881
280984
  title: t('apiTabLabels.deleteModal.title'),
280882
280985
  confirmation: t('apiTabLabels.deleteModal.confirmation'),
280986
+ warning: t('apiTabLabels.deleteModal.warning'),
280883
280987
  cancel: t('apiTabLabels.deleteModal.cancel'),
280884
280988
  confirm: t('apiTabLabels.deleteModal.confirm'),
280885
280989
  confirming: t('apiTabLabels.deleteModal.confirming'),
@@ -280890,6 +280994,9 @@ function buildApiTabLabels(t) {
280890
280994
  title: t('apiTabLabels.apiKeyModal.title'),
280891
280995
  descriptionLineOne: t('apiTabLabels.apiKeyModal.descriptionLineOne'),
280892
280996
  descriptionLineTwo: t('apiTabLabels.apiKeyModal.descriptionLineTwo'),
280997
+ description: t('apiTabLabels.apiKeyModal.description'),
280998
+ copyAriaLabel: t('apiTabLabels.apiKeyModal.copyAriaLabel'),
280999
+ copiedAriaLabel: t('apiTabLabels.apiKeyModal.copiedAriaLabel'),
280893
281000
  },
280894
281001
  };
280895
281002
  }
@@ -280900,14 +281007,36 @@ function resolveApiTabLabels(override, t) {
280900
281007
  return deepMerge(base, override);
280901
281008
  }
280902
281009
 
281010
+ /**
281011
+ * An out-of-range `page` (e.g. after deleting the last key on the last page)
281012
+ * comes back as a 404 `{"detail": "Invalid page."}`.
281013
+ */
281014
+ function isInvalidPageError(error) {
281015
+ const { status, data } = (error !== null && error !== void 0 ? error : {});
281016
+ if (status === 404)
281017
+ return true;
281018
+ const body = typeof data === 'string' ? data : JSON.stringify(data !== null && data !== void 0 ? data : '');
281019
+ return body.includes('Invalid page');
281020
+ }
280903
281021
  function AgentApiTab({ labels: labelsOverride }) {
280904
281022
  const { tenantKey, username, rbacPermissions, executeGatedAction } = useAgentSettings();
280905
281023
  const t = useT();
280906
281024
  const labels = React__default.useMemo(() => resolveApiTabLabels(labelsOverride, t), [labelsOverride, t]);
280907
- const { data: apiKeysResponse, isLoading: isApiKeysLoading } = useGetApiKeysQuery({
281025
+ const [page, setPage] = React__default.useState(1);
281026
+ const { data: apiKeysResponse, isLoading: isApiKeysLoading, isFetching: isApiKeysFetching, isError, error, } = useGetApiKeysQuery({
280908
281027
  platformKey: tenantKey,
281028
+ page,
281029
+ pageSize: API_KEYS_PAGE_SIZE,
280909
281030
  });
280910
- const { tokens: apiKeys } = unwrapApiTokenList(apiKeysResponse);
281031
+ const { tokens: apiKeys, count } = unwrapApiTokenList(apiKeysResponse);
281032
+ const totalPages = Math.ceil(count / API_KEYS_PAGE_SIZE);
281033
+ // Step back a page when the current one no longer exists (e.g. its last key
281034
+ // was deleted): the backend answers "Invalid page." or an empty page.
281035
+ const isPageGone = page > 1 && !isApiKeysFetching && (isError ? isInvalidPageError(error) : apiKeys.length === 0);
281036
+ React__default.useEffect(() => {
281037
+ if (isPageGone)
281038
+ setPage((current) => Math.max(1, current - 1));
281039
+ }, [isPageGone]);
280911
281040
  const [showCreateApiModal, setShowCreateApiModal] = React__default.useState(false);
280912
281041
  const [apiKeyToDelete, setApiKeyToDelete] = React__default.useState(null);
280913
281042
  function closeCreateApiModal() {
@@ -280931,14 +281060,18 @@ function AgentApiTab({ labels: labelsOverride }) {
280931
281060
  action();
280932
281061
  }
280933
281062
  };
280934
- return (jsxs(Fragment$1, { children: [jsx("div", { className: "flex hidden h-[73px] flex-shrink-0 items-center border-b border-gray-200 bg-white p-4 lg:block", children: jsxs("div", { children: [jsx("h3", { className: "mb-1 text-base font-medium text-gray-900", children: labels.header.title }), jsx("p", { className: "text-xs text-gray-700", children: labels.header.description })] }) }), jsx("div", { className: "flex-1 space-y-4 p-3 lg:p-4", style: {
281063
+ return (jsxs(Fragment$1, { children: [jsx("div", { className: "flex hidden h-[73px] flex-shrink-0 items-center border-b border-gray-200 bg-white p-4 lg:block", children: jsxs("div", { children: [jsx("h3", { className: "mb-1 text-base font-medium text-gray-900", children: labels.header.title }), jsx("p", { className: "text-xs text-gray-700", children: labels.header.description })] }) }), jsxs("div", { className: "flex-1 space-y-4 p-3 lg:p-4", style: {
280935
281064
  overflowY: 'auto',
280936
281065
  overflowX: 'hidden',
280937
- }, children: jsxs("div", { className: "space-y-6", children: [jsxs("div", { className: "space-y-4", children: [jsx("p", { className: "text-sm text-gray-700", children: labels.disclaimer.lineOne }), jsx("p", { className: "text-sm text-gray-700", children: labels.disclaimer.lineTwo })] }), isApiKeysLoading ? (jsx("div", { className: "flex w-full items-center justify-center py-10", children: jsx(Spinner, {}) })) : (jsx("div", { className: "rounded-md border", children: jsxs(Table$1, { className: "w-full", children: [jsx(TableHeader$1, { children: jsxs(TableRow$1, { children: [jsx(TableHead, { className: "p-2 text-left text-sm text-gray-700", children: labels.table.nameColumn }), jsx(TableHead, { className: "p-2 text-left text-sm text-gray-700", children: labels.table.createdColumn }), jsx(TableHead, { className: "p-2 text-left text-sm text-gray-700", children: labels.table.expiresColumn }), jsx(TableHead, { className: "p-2 text-left text-sm text-gray-700", "aria-label": labels.table.actionsColumn, children: jsx("span", { className: "sr-only", children: labels.table.actionsColumn }) })] }) }), jsx(TableBody, { children: apiKeys.length === 0 ? (jsx(TableRow$1, { children: jsx(TableCell$1, { colSpan: 5, className: "p-4 text-center text-sm text-gray-700", children: labels.table.emptyState }) })) : (jsx(WithPermissions, { rbacResource: "/apitokens/#list", rbacPermissions: rbacPermissions !== null && rbacPermissions !== void 0 ? rbacPermissions : {}, children: ({ hasPermission }) => {
280938
- if (!hasPermission)
280939
- return (jsx(TableRow$1, { children: jsx(TableCell$1, { colSpan: 5, className: "p-4 text-center text-sm text-gray-700", children: labels.table.noPermission }) }));
280940
- return (jsx(Fragment$1, { children: apiKeys.map((apiKey) => (jsxs(TableRow$1, { className: "text-sm hover:bg-blue-50", children: [jsx(TableCell$1, { className: "p-2 whitespace-nowrap text-gray-700", children: apiKey.name }), jsx(TableCell$1, { className: "p-2 whitespace-nowrap text-gray-700", children: apiKey.created ? format$1(apiKey.created, 'PPP') : 'N/A' }), jsx(TableCell$1, { className: "p-2 whitespace-nowrap text-gray-700", children: apiKey.expires ? format$1(apiKey.expires, 'PPP') : 'N/A' }), jsx(TableCell$1, { className: "p-2", children: jsx(WithPermissions, { rbacResource: "/apitokens/#create", rbacPermissions: rbacPermissions !== null && rbacPermissions !== void 0 ? rbacPermissions : {}, children: ({ hasPermission }) => hasPermission && (jsxs(Button$1, { variant: "ghost", size: "sm", className: "cursor-pointer", onClick: () => handleDeleteClick(apiKey.name), children: [jsx(Trash, { className: "h-4 w-4" }), jsx("span", { className: "sr-only", children: labels.table.deleteAriaLabel })] })) }) })] }, apiKey.name))) }));
280941
- } })) })] }) })), jsx(WithPermissions, { rbacResource: "/apitokens/#create", rbacPermissions: rbacPermissions !== null && rbacPermissions !== void 0 ? rbacPermissions : {}, children: ({ hasPermission }) => hasPermission && (jsx(Button$1, { onClick: openCreateApiModal, className: "cursor-pointer bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-white hover:opacity-90", children: labels.actions.createNew })) }), jsx(CreateApiModal, { isOpen: showCreateApiModal, onClose: closeCreateApiModal, tenantKey: tenantKey, username: username !== null && username !== void 0 ? username : '', executeGatedAction: executeGatedAction, labels: labels.createModal, apiKeyModalLabels: labels.apiKeyModal }), apiKeyToDelete && (jsx(DeleteApiModal, { isOpen: !!apiKeyToDelete, onClose: closeDeleteApiModal, apiKey: apiKeyToDelete, tenantKey: tenantKey, labels: labels.deleteModal }))] }) })] }));
281066
+ }, children: [jsxs("div", { className: "space-y-2 rounded-md border border-gray-200 bg-gray-50 p-3 text-xs text-gray-600", "data-testid": "api-info-box", children: [jsx("p", { children: labels.infoBox }), jsx("p", { children: labels.disclaimer.lineOne }), jsx("p", { children: labels.disclaimer.lineTwo })] }), jsxs("div", { className: "space-y-4", children: [jsx("div", { className: "flex justify-end", children: jsx(WithPermissions, { rbacResource: "/apitokens/#create", rbacPermissions: rbacPermissions !== null && rbacPermissions !== void 0 ? rbacPermissions : {}, children: ({ hasPermission }) => hasPermission && (jsxs(Button$1, { onClick: openCreateApiModal, size: "sm", "data-testid": "api-key-create-button", className: "cursor-pointer whitespace-nowrap bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-white hover:opacity-90", children: [jsx(Plus, { className: "h-4 w-4" }), labels.actions.createNew] })) }) }), isApiKeysLoading ? (jsx("div", { className: "flex w-full items-center justify-center py-10", children: jsx(Spinner, {}) })) : (jsx("div", { className: "rounded-md border", children: jsxs(Table$1, { className: "w-full", children: [jsx(TableHeader$1, { children: jsxs(TableRow$1, { children: [jsx(TableHead, { className: "p-2 text-left text-sm text-gray-700", children: labels.table.nameColumn }), jsx(TableHead, { className: "p-2 text-left text-sm text-gray-700", children: labels.table.createdColumn }), jsx(TableHead, { className: "p-2 text-left text-sm text-gray-700", children: labels.table.expiresColumn }), jsx(TableHead, { className: "p-2 text-left text-sm text-gray-700", "aria-label": labels.table.actionsColumn, children: jsx("span", { className: "sr-only", children: labels.table.actionsColumn }) })] }) }), jsx(TableBody, { children: apiKeys.length === 0 ? (jsx(TableRow$1, { children: jsx(TableCell$1, { colSpan: 5, className: "p-4 text-center text-sm text-gray-700", children: labels.table.emptyState }) })) : (jsx(WithPermissions, { rbacResource: "/apitokens/#list", rbacPermissions: rbacPermissions !== null && rbacPermissions !== void 0 ? rbacPermissions : {}, children: ({ hasPermission }) => {
281067
+ if (!hasPermission)
281068
+ return (jsx(TableRow$1, { children: jsx(TableCell$1, { colSpan: 5, className: "p-4 text-center text-sm text-gray-700", children: labels.table.noPermission }) }));
281069
+ return (jsx(Fragment$1, { children: apiKeys.map((apiKey) => (jsxs(TableRow$1, { className: "text-sm hover:bg-blue-50", children: [jsx(TableCell$1, { className: "p-2 whitespace-nowrap text-gray-700", children: apiKey.name }), jsx(TableCell$1, { className: "p-2 whitespace-nowrap text-gray-700", children: apiKey.created
281070
+ ? format$1(apiKey.created, 'PPP')
281071
+ : labels.table.notAvailable }), jsx(TableCell$1, { className: "p-2 whitespace-nowrap text-gray-700", children: apiKey.expires
281072
+ ? format$1(apiKey.expires, 'PPP')
281073
+ : labels.table.notAvailable }), jsx(TableCell$1, { className: "p-2", children: jsx(WithPermissions, { rbacResource: "/apitokens/#create", rbacPermissions: rbacPermissions !== null && rbacPermissions !== void 0 ? rbacPermissions : {}, children: ({ hasPermission }) => hasPermission && (jsxs(Button$1, { variant: "ghost", size: "sm", className: "cursor-pointer", onClick: () => handleDeleteClick(apiKey.name), children: [jsx(Trash, { className: "h-4 w-4" }), jsx("span", { className: "sr-only", children: labels.table.deleteAriaLabel })] })) }) })] }, apiKey.name))) }));
281074
+ } })) })] }) })), totalPages > 1 && (jsx(IblPagination, { currentPage: page, totalPages: totalPages, onPageChange: setPage, disabled: isApiKeysFetching })), jsx(CreateApiModal, { isOpen: showCreateApiModal, onClose: closeCreateApiModal, tenantKey: tenantKey, username: username !== null && username !== void 0 ? username : '', executeGatedAction: executeGatedAction, onCreated: () => setPage(1), labels: labels.createModal, apiKeyModalLabels: labels.apiKeyModal }), apiKeyToDelete && (jsx(DeleteApiModal, { isOpen: !!apiKeyToDelete, onClose: closeDeleteApiModal, apiKey: apiKeyToDelete, tenantKey: tenantKey, labels: labels.deleteModal }))] })] })] }));
280942
281075
  }
280943
281076
 
280944
281077
  const ANONYMOUS_USERNAME$2 = 'anonymous';
@@ -342802,5 +342935,5 @@ var index_es = /*#__PURE__*/Object.freeze({
342802
342935
  vectorsRatio: vectorsRatio
342803
342936
  });
342804
342937
 
342805
- export { AGENT_ACCESS_TAB_LABELS, AGENT_ANALYTICS_TAB_LABELS, AGENT_API_TAB_LABELS, AGENT_DATASETS_TAB_LABELS, AGENT_DISCLAIMERS_TAB_LABELS, AGENT_EMBED_TAB_LABELS, AGENT_EVALUATION_TAB_LABELS, AGENT_GRADER_TAB_LABELS, AGENT_HISTORY_TAB_LABELS, AGENT_HUMAN_SUPPORT_TAB_LABELS, AGENT_LLM_TAB_LABELS, AGENT_LTI_TAB_LABELS, AGENT_MEMORY_TAB_LABELS, AGENT_PICKER_LABELS, AGENT_PRIVACY_TAB_LABELS, AGENT_PROMPTS_TAB_LABELS, AGENT_SAFETY_TAB_LABELS, AGENT_SCREENSHARE_TAB_LABELS, AGENT_SEARCH_LABELS, AGENT_SETTINGS_TAB_LABELS, AGENT_SKILLS_TAB_LABELS, AGENT_SPEND_CAPS_TAB_LABELS, AGENT_TASKS_TAB_LABELS, AGENT_TOOLS_TAB_LABELS, AGENT_VOICE_TAB_LABELS, Account, AgentAccessTab, AgentAnalyticsTab, AgentApiTab, AgentCard, AgentDatasetsTab, AgentDisclaimersTab, AgentEmbedTab, AgentEmptyState, AgentEvaluationTab, AgentGraderTab, AgentHistoryTab, AgentHumanSupportTab, AgentLLMTab, AgentLtiTab, AgentMemoryTab, AgentPrivacyTab, AgentPromptsTab, AgentSafetyTab, AgentScreenShareTab, AgentSearch, AgentSearchFilters, AgentSearchInput, AgentSettingsProvider, AgentSettingsTab, AgentSkillsTab, AgentSpendCapsTab, AgentTasksTab, AgentToolsTab, AgentVoiceTab, AppSidebar, CATALOGS, Chat, ClientErrorPage, ConversationStarters$1 as ConversationStarters, CopyButton, CopyMentorModal, CourseBox, CourseContentLayout, CourseContentTabPage, CreatePathwayModal, CredentialDetailModal, CredentialMiniBox, DEFAULT_ANALYTICS_HUB_TABS, DEFAULT_LOCALE, DeleteMentorModal, EMPTY_PROGRAM_SETTINGS_FORM, EdxIframe, ErrorPage, GRADING_TOOL_NAME, GreetingMethod, LLMProviderModal, LocalModelRow, McpTab, MediaBox, MentorSelectionGrid, NavBar, OrganizationTab, PLATFORM_SIDEBAR_FLYOUT_ITEM_COLOR, PLATFORM_SIDEBAR_FLYOUT_TITLE_COLOR, PLATFORM_SIDEBAR_NAV_ACTIVE_BG_OPEN, PLATFORM_SIDEBAR_NAV_MUTED, PathwayDetailModal, PlatformAccountSheet, PlatformSidebar, PlatformSidebarCollapsedLabelFlyout, PlatformSidebarCollapsedNavFlyout, PlatformSidebarFooter, PlatformSidebarNavDivider, PlatformSidebarNavSection, PlatformSidebarSubNavItem, ProfileInfoCards, ProfileTabs, ProgramDetailModal, ProjectsSidebarDropdown, SPEND_CAPS_SUB_TABS, SUPPORTED_LOCALES, SidebarInset, SidebarProvider, SidebarTrigger, SpendCapUsage, SsoLogin, StarButton, UserProfileDropdown, UserProfileModal, WebContainersI18nProvider, formatDateString, getCatalog, getProviderName, initializeLocalStorageWithObject, isValidLocale, resolveAgentPickerLabels, resolveAgentSearchLabels, resolveLLMTabLabels, resolveSettingsTabLabels, useAgentSearch, useAgentSearchWithPagination, useAgentSettings, useAgentStar, useGetChatDetails, usePlatformSidebarFooterActions, usePlatformSidebarNavCallback, useSidebar, useT, useTimeTracker, useWebContainersI18n, useWebContainersLocale };
342938
+ export { AGENT_ACCESS_TAB_LABELS, AGENT_ANALYTICS_TAB_LABELS, AGENT_API_TAB_LABELS, AGENT_DATASETS_TAB_LABELS, AGENT_DISCLAIMERS_TAB_LABELS, AGENT_EMBED_TAB_LABELS, AGENT_EVALUATION_TAB_LABELS, AGENT_GRADER_TAB_LABELS, AGENT_HISTORY_TAB_LABELS, AGENT_HUMAN_SUPPORT_TAB_LABELS, AGENT_LLM_TAB_LABELS, AGENT_LTI_TAB_LABELS, AGENT_MEMORY_TAB_LABELS, AGENT_PICKER_LABELS, AGENT_PRIVACY_TAB_LABELS, AGENT_PROMPTS_TAB_LABELS, AGENT_SAFETY_TAB_LABELS, AGENT_SCREENSHARE_TAB_LABELS, AGENT_SEARCH_LABELS, AGENT_SETTINGS_TAB_LABELS, AGENT_SKILLS_TAB_LABELS, AGENT_SPEND_CAPS_TAB_LABELS, AGENT_TASKS_TAB_LABELS, AGENT_TOOLS_TAB_LABELS, AGENT_VOICE_TAB_LABELS, Account, AgentAccessTab, AgentAnalyticsTab, AgentApiTab, AgentCard, AgentDatasetsTab, AgentDisclaimersTab, AgentEmbedTab, AgentEmptyState, AgentEvaluationTab, AgentGraderTab, AgentHistoryTab, AgentHumanSupportTab, AgentLLMTab, AgentLtiTab, AgentMemoryTab, AgentPrivacyTab, AgentPromptsTab, AgentSafetyTab, AgentScreenShareTab, AgentSearch, AgentSearchFilters, AgentSearchInput, AgentSettingsProvider, AgentSettingsTab, AgentSkillsTab, AgentSpendCapsTab, AgentTasksTab, AgentToolsTab, AgentVoiceTab, AppSidebar, CATALOGS, Chat, ClientErrorPage, ConversationStarters$1 as ConversationStarters, CopyButton, CopyMentorModal, CourseBox, CourseContentLayout, CourseContentTabPage, CreatePathwayModal, CredentialDetailModal, CredentialMiniBox, DEFAULT_ANALYTICS_HUB_TABS, DEFAULT_LOCALE, DeleteMentorModal, EMPTY_PROGRAM_SETTINGS_FORM, EdxIframe, ErrorPage, GRADING_TOOL_NAME, GreetingMethod, LLMProviderModal, LocalModelRow, McpTab, MediaBox, MentorSelectionGrid, NavBar, OrganizationTab, PLATFORM_SIDEBAR_FLYOUT_ITEM_COLOR, PLATFORM_SIDEBAR_FLYOUT_TITLE_COLOR, PLATFORM_SIDEBAR_NAV_ACTIVE_BG_OPEN, PLATFORM_SIDEBAR_NAV_MUTED, PathwayDetailModal, PlatformAccountSheet, PlatformSidebar, PlatformSidebarCollapsedLabelFlyout, PlatformSidebarCollapsedNavFlyout, PlatformSidebarFooter, PlatformSidebarNavDivider, PlatformSidebarNavSection, PlatformSidebarSubNavItem, ProfileInfoCards, ProfileTabs, ProgramDetailModal, ProjectsSidebarDropdown, SPEND_CAPS_SUB_TABS, SUPPORTED_LOCALES, SidebarInset, SidebarProvider, SidebarTrigger, SpendCapUsage, SsoLogin, StarButton, UserProfileDropdown, UserProfileModal, WebContainersI18nProvider, formatDateString, getCatalog, getProviderName, initializeLocalStorageWithObject, isValidLocale, resolveAgentPickerLabels, resolveAgentSearchLabels, resolveLLMTabLabels, resolveSettingsTabLabels, useAgentSearch, useAgentSearchWithPagination, useAgentSettings, useAgentStar, useGetChatDetails, usePlatformSidebarFooterActions, usePlatformSidebarNavCallback, useSidebar, useT, useTimeTracker, useToggleTools, useWebContainersI18n, useWebContainersLocale };
342806
342939
  //# sourceMappingURL=index.esm.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iblai/iblai-js",
3
- "version": "2.24.0",
3
+ "version": "2.26.0",
4
4
  "description": "Unified JavaScript SDK for IBL.ai — re-exports data-layer, web-containers, and web-utils under a single package",
5
5
  "type": "module",
6
6
  "engines": {
@@ -76,9 +76,9 @@
76
76
  "axios": "1.13.6",
77
77
  "dotenv": "16.6.1",
78
78
  "winston": "3.19.0",
79
- "@iblai/data-layer": "1.23.0",
80
- "@iblai/mcp": "1.21.0",
81
- "@iblai/web-containers": "1.31.0",
79
+ "@iblai/data-layer": "1.24.0",
80
+ "@iblai/mcp": "1.22.0",
81
+ "@iblai/web-containers": "1.32.0",
82
82
  "@iblai/web-utils": "2.6.0"
83
83
  },
84
84
  "peerDependencies": {