@iblai/iblai-js 2.3.5 → 2.3.6

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.
@@ -2,8 +2,8 @@ import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
2
2
  import * as React from 'react';
3
3
  import React__default, { useState, useEffect, forwardRef, createElement as createElement$3, useLayoutEffect, createContext, useContext, useMemo, useReducer, useRef, useImperativeHandle, useCallback, isValidElement, Children, PureComponent, cloneElement, Component as Component$1, useId as useId$2, useDebugValue, lazy, Suspense } from 'react';
4
4
  import * as dataLayer from '@iblai/data-layer';
5
- import { useGetUserMetadataQuery, useGetUserMetadataEdxQuery, useUpdateUserMetadataMutation, useUpdateUserMetadataEdxMutation, useUploadProfileImageMutation, useResetPasswordMutation, useSelfRetireMutation, useCreateUserInstitutionMutation, useGetUserInstitutionsQuery, useCreateUserEducationMutation, useUpdateUserEducationMutation, useDeleteUserEducationMutation, useGetUserEducationQuery, useCreateUserCompanyMutation, useGetUserCompaniesQuery, useCreateUserExperienceMutation, useUpdateUserExperienceMutation, useDeleteUserExperienceMutation, useGetUserExperienceQuery, useGetUserResumeQuery, useCreateUserResumeMutation, useGetMySubscriptionsQuery, useGetItemSubscriptionQuery, useCancelSubscriptionMutation, useGetLearnerDetailsQuery, useGetUserEnrolledCoursesQuery, useGetUserEnrolledProgramsQuery, useGetUserCatalogPathwaysQuery, useGetUsersAsAssertionsQuery, useGetUserEarnedSkillsQuery, useGetUserReportedSkillsQuery, useGetUserDesiredSkillsQuery, useCreateGlobalMemoryMutation, useGetMemsearchStatusQuery, useGetUserMemorySettingsQuery, useUpdateUserMemorySettingsMutation, useGetGlobalMemoriesQuery, useDeleteGlobalMemoryMutation, useInviteUserMutation, usePlatformInvitationsQuery, useCreateCatalogInvitationCourseBulkMutation, useGetCatalogInvitationsCourseQuery, useLazyPlatformUsersQuery, useLazyPlatformUserGroupsQuery, useGetPersonnalizedSearchQuery, useCreateCatalogInvitationProgramBulkMutation, useGetCatalogInvitationsProgramQuery, useUpdateUserRoleMutation, useUpdateUserStatusMutation, useUpdatePlatformUserRoleWithPoliciesMutation, usePlatformUsersQuery, isPoliciesResponse, platformApiSlice, featureTags, useLazyGetRbacTeamsAccessListQuery, useCreateRbacTeamsAccessMutation, useGetRbacGroupsQuery, usePlatformUserGroupsQuery, useCreateRbacGroupMutation, useUpdateRbacGroupMutation, useDeleteRbacGroupMutation, useCreatePlatformUserGroupMutation, useUpdatePlatformUserGroupMutation, useDeletePlatformUserGroupMutation, useGetRbacGroupDetailsQuery, useGetPlatformUserGroupDetailsQuery, useGetRbacPermissionsMutation, useGetRbacRolesQuery, useCreateRbacRoleMutation, useUpdateRbacRoleMutation, useDeleteRbacRoleMutation, useGetRbacRoleDetailsQuery, useGetRbacActionsDefinitionQuery, useGetRbacResourceDiscoveryQuery, useGetRbacResourceListQuery, useGetRbacPoliciesQuery, useCreateRbacPolicyMutation, useUpdateRbacPolicyMutation, useDeleteRbacPolicyMutation, useGetRbacPolicyDetailsQuery, useGetWatchedGroupsQuery, useCreateWatchedGroupMutation, useUpdateWatchedGroupMutation, useDeleteWatchedGroupMutation, useAddWatchedUserMutation, useRemoveWatchedUserMutation, useAddWatcherMutation, useUpdateWatcherMutation, useDeleteWatcherMutation, useGetWatchedUsersQuery, useGetWatchersQuery, WATCHER_NOTIFICATION_EVENTS, WATCHER_NOTIFICATION_EVENT_LABELS, useGetApplicationFormsQuery, useGetApplicationFormDetailQuery, useCreateApplicationFormMutation, useUpdateApplicationFormMutation, useGetApplicationAdminDetailQuery, useInviteApplicationCandidateMutation, useLazyGetApplicationAttachmentFileQuery, useCreateApplicationWaiverMutation, useDeleteApplicationWaiverMutation, useSubmitApplicationOverrideMutation, useUpdateApplicationPlacementMutation, useDeleteApplicationCourseAssignmentMutation, useCreateApplicationNoteMutation, useUpdateApplicationNoteMutation, useDeleteApplicationNoteMutation, useTransitionApplicationMutation, useLinkApplicationCandidateMutation, useCreateApplicationPlacementsMutation, useGetCustomMentorsQuery, useCreateApplicationCourseAssignmentsMutation, useGetApplicationBlocksQuery, useDeleteApplicationBlockMutation, useGetApplicationsPipelineStatsQuery, useGetApplicationsPipelineQuery, useDeleteApiKeyMutation, useGetApiKeyQuery, useGetApiKeyFieldPermissionsQuery, useUpdateApiKeyMutation, useGetApiKeysQuery, unwrapApiTokenList, useCreateApiKeyMutation, useCreateLLMCredentialMutation, useGetCredentialsSchemaQuery, useGetMaskedLLMCredentialsQuery, useGetLlmsQuery, useDeleteIntegrationCredentialMutation, useDeleteCredentialMutation, useCreateIntegrationCredentialMutation, useGetIntegrationCredentialsSchemaQuery, useGetMaskedIntegrationCredentialsQuery, useGetAccountBillingInfoQuery, useUpdateAutoRechargeInfoMutation, useTriggerAutoRechargeMutation, useCreateStripeCustomerPortalMutation, useSetPlatformConfigurationsMutation, useGetPlatformConfigurationsQuery, useUpdatePlatformMembershipMutation, useGetPlatformMembershipQuery, useGetCustomDomainsQuery, useCreateCustomDomainMutation, useDeleteCustomDomainMutation, useGetStudentMentorCreationStatusQuery, useSetStudentMentorCreationStatusMutation, coreApiSlice, recommendationPromptTypeEnum, useGetRecommendedPromptsListQuery, useCreateRecommendedPromptMutation, useUpdateRecommendedPromptMutation, useDeleteRecommendedPromptMutation, useLazyGetPublicPlatformImageAssetFileUrlQuery, useUpdateTenantMetadataMutation, useCreatePlatformImageAssetMutation, useGetProviderConfigQuery, useCreateProviderConfigMutation, useDeleteProviderConfigMutation, useGetExternalMappingQuery, useGetCredentialsListQuery, useCreateExternalMappingMutation, useDeleteExternalMappingMutation, useGetMemsearchConfigQuery, useUpdateMemsearchConfigMutation, useGetStripeConnectStatusQuery, useStartStripeConnectOnboardingMutation, useLazyGetStripeConnectDashboardQuery, useGetAiSearchMentorsQuery, useListPaywallsQuery, useListPricesQuery, useCreatePriceMutation, useUpdatePriceMutation, useDeletePriceMutation, useGetPaywallConfigQuery, useEnablePaywallMutation, useUpdatePaywallMutation, useLazyGetCourseMetaDataQuery, useLazyGetCourseCompletionOutlinesQuery, useLazyGetCourseEligibilityQuery, useLazyGetEdxSSOTokenQuery, useCreateCourseEnrollmentMutation, useCreateStripeCheckoutSessionMutation, useLazyGetCourseProgressQuery, useLazyGetCourseCompletionQuery, useUpdateExamAttemptMutation, useStartExamMutation, useLazyGetExamInfoQuery, useGetAgentSkillResourcesQuery, useCreateAgentSkillResourceMutation, useUpdateAgentSkillResourceMutation, useUploadAgentSkillResourceAssetMutation, useDeleteAgentSkillResourceMutation, useGetAgentSkillsQuery, useGetMentorSkillAssignmentsQuery, useCreateMentorSkillAssignmentMutation, useUpdateMentorSkillAssignmentMutation, useDeleteMentorSkillAssignmentMutation, useCreateAgentSkillMutation, useUpdateAgentSkillMutation, useDeleteAgentSkillMutation, resolveEffectiveAgentSkills, filterSlashSkills, useUpdateUserProjectMutation, useGetTrainingDocumentsQuery, useGetVectorDocumentsQuery, useGetMentorMemoriesListQuery, useGetMemoryCategoriesAdminQuery, useDeleteMentorMemoryMutation, useUpdateMentorMemoryMutation, useCreateMentorMemoryMutation, useLazyGetConnectedServiceAuthUrlQuery, useStarMentorMutation, useUnstarMentorMutation, useCreateUserProjectMutation, useDeleteUserProjectMutation, useGetUserProjectDetailsQuery, useEditTrainingDocumentMutation, useAddTrainingDocumentMutation, useLazyGetCredentialsQuery, useGetMentorSettingsQuery, useEditMentorMutation, useUploadLightLogoMutation, useUploadDarkLogoMutation, useUpdatePlatformInfoMutation, LOGO_ENDPOINTS, useCreateEvalDatasetMutation, useAddEvalDatasetItemsMutation, useUploadEvalDatasetCsvMutation, useDeleteEvalDatasetItemMutation, useListEvalDatasetItemsQuery, evalTotalPages, useListEvalDatasetsQuery, useGetUserProjectsQuery, useCreateSessionIdMutation, useGetMentorCategoriesQuery, useGetTenantChatPrivacyConfigQuery as useGetTenantChatPrivacyConfigQuery$1, useGetCallConfigurationsQuery, useCreateCallConfigurationMutation, useUpdateCallConfigurationMutation, chatPrivacyApiSlice, useDeleteMentorMutation, useForkMentorMutation, useGetToolsQuery, useLazyGetMCPServersQuery, useOauthFindMutation, useLazyStartOAuthFlowQuery, useCreateMCPServerMutation, usePartialUpdateMCPServerMutation, useCreateMCPServerConnectionMutation, usePatchMCPServerConnectionMutation, useGetConnectedServicesQuery, useGetMCPServersQuery, useGetMCPServerConnectionsQuery, useUpdateMCPServerMutation, useDeleteMCPServerMutation, useEditMentorJsonMutation, useDisconnectServiceMutation, useGetPromptCategoriesQuery, PRIVACY_ACTIONS, PRIVACY_ENTITY_TYPES, useGetVoicesQuery, useGetVoiceQuery, isBaseAgentMentor, useGetMentorGraderConfigurationQuery, useListGraderCriteriaQuery, useCreateMentorGraderConfigurationMutation, useUpdateMentorGraderConfigurationMutation, useCreateGraderCriterionMutation, useUpdateGraderCriterionMutation, useDeleteGraderCriterionMutation, useGetMentorPublicSettingsQuery, useGetChatHistoryFilterQuery, useGetChatHistoryQuery, useGetMentorSummariesQuery, useGetConversationMemoriesQuery, useGetSupportTicketsQuery, useGetSupportTicketMessagesQuery, useCreateSupportTicketMessageMutation, usePatchSupportTicketMutation, useCloseSupportTicketMutation, useCreateLtiMentorMutation, useUpdateLtiMentorMutation, useGetLtiMentorsQuery, useCreateLtiKeyMutation, useUpdateLtiKeyMutation, useDeleteLtiKeyMutation, useGetLtiKeysQuery, useCreateLtiToolMutation, useUpdateLtiToolMutation, useGetLtiToolsQuery, useGetPlatformInfoQuery, useCreatePromptMutation, useGetPromptsSearchQuery, useUpdatePromptMutation, useCreateRedirectTokenMutation, useGetShareableLinkQuery, useCreateShareableLinkMutation, useUpdateShareableLinkMutation, useCreateDisclaimerMutation, useUpdateDisclaimerMutation, useGetDisclaimersQuery, useUpdateRbacMentorAccessMutation, useGetRbacMentorAccessListQuery, useStartEvalRunMutation, useEvaluateEvalRunMutation, useGetEvalRunQuery, useDeleteEvalScoreMutation, useListEvalRunJudgesQuery, useCreateEvalScoreMutation, useDeleteEvalRunMutation, useExportEvalRunMutation, useListEvalRunsQuery, useLazyGetEvalRunQuery, evaluationsApiSlice, EVALUATIONS_TAGS, useGetPersonnalizedMentorsQuery, useCreateCallCredentialsMutation, useGetGuidedPromptsQuery, useUpdateChatSessionSharedMutation, useUpdateMessageFeedbackMutation, useLazyGetPromptsSearchQuery, useLazyGetGuidedPromptsQuery, useGetPublicMentorsQuery, useGetPeriodicAgentsQuery, useGetPeriodicAgentLogsListQuery, useCreatePeriodicAgentMutation, useDeletePeriodicAgentMutation, useDeletePromptMutation, useDeleteTrainingDocumentMutation, useGetTrainingDocumentRetrainScheduleQuery, useCreateTrainingDocumentRetrainScheduleMutation, useCreateMemoryCategoryMutation, useUpdateMemoryCategoryMutation, useDeleteMemoryCategoryMutation, useUpdateArtifactMutation, useLazyGetArtifactVersionQuery, useLazyListArtifactVersionsQuery, useSetCurrentVersionMutation, useListArtifactVersionsQuery, useLazyGetArtifactQuery, useLazyListArtifactsQuery, useEditSessionMutation } from '@iblai/data-layer';
6
- import { getInitials, useTenantMetadata, WithPermissions, canWriteField, useStripeUpgrade, openExternalUrl, CHAT_AREA_SIZE, isAlphaNumeric32, checkRbacPermission, selectNumberOfActiveChatMessages, useUsername, selectStreaming, isLoggedIn, TOOLS, hasRemoteAiConfig, isSafariBrowser, useShowAttachment, useShowVoiceCall, useShowVoiceRecorder, useMentorSettings, selectShowingSharedChat, selectRbacPermissions, useShowFreeTrialDialog, useEmbedMode, chatInputSliceSelectors, useResponsive, useAccessingPublicRoute, useVisitingTenant, useModelFileUploadCapabilities, useChatFileUpload, useVoiceChat, selectAttachedFiles, MENTOR_CHAT_DOCUMENTS_EXTENSIONS, removeFile, chatInputSliceActions, chatActions, WithFormPermissions, useTenantContext, TimeTracker, advancedTabsProperties, defaultSessionIds, pickWritableFields, ANONYMOUS_USERNAME as ANONYMOUS_USERNAME$3, redirectToAuthSpaJoinTenant, selectActiveTab, useAxdToken, useWelcomeMessage, markdownToPlainText, useCachedSessionId, use402ErrorCheck, selectTokenEnabled, selectToken, useServiceWorker, useUserAgreement, useAdvancedChat, sendMessageToParentWebsite, useMentorTools, useFileDragDrop, eventBus, RemoteEvents, selectEnableChatActionsPopup, advancedTabs, isInIframe, getAuthSpaJoinUrl, addMessage, clearFiles, MENTOR_VISIBILITY } from '@iblai/web-utils';
5
+ import { useGetUserMetadataQuery, useGetUserMetadataEdxQuery, useUpdateUserMetadataMutation, useUpdateUserMetadataEdxMutation, useUploadProfileImageMutation, useResetPasswordMutation, useSelfRetireMutation, useCreateUserInstitutionMutation, useGetUserInstitutionsQuery, useCreateUserEducationMutation, useUpdateUserEducationMutation, useDeleteUserEducationMutation, useGetUserEducationQuery, useCreateUserCompanyMutation, useGetUserCompaniesQuery, useCreateUserExperienceMutation, useUpdateUserExperienceMutation, useDeleteUserExperienceMutation, useGetUserExperienceQuery, useGetUserResumeQuery, useCreateUserResumeMutation, useGetMySubscriptionsQuery, useGetItemSubscriptionQuery, useCancelSubscriptionMutation, useGetLearnerDetailsQuery, useGetUserEnrolledCoursesQuery, useGetUserEnrolledProgramsQuery, useGetUserCatalogPathwaysQuery, useGetUsersAsAssertionsQuery, useGetUserEarnedSkillsQuery, useGetUserReportedSkillsQuery, useGetUserDesiredSkillsQuery, useCreateGlobalMemoryMutation, useGetMemsearchStatusQuery, useGetUserMemorySettingsQuery, useUpdateUserMemorySettingsMutation, useGetGlobalMemoriesQuery, useGetAllMentorMemoriesQuery, useDeleteGlobalMemoryMutation, useInviteUserMutation, usePlatformInvitationsQuery, useCreateCatalogInvitationCourseBulkMutation, useGetCatalogInvitationsCourseQuery, useLazyPlatformUsersQuery, useLazyPlatformUserGroupsQuery, useGetPersonnalizedSearchQuery, useCreateCatalogInvitationProgramBulkMutation, useGetCatalogInvitationsProgramQuery, useUpdateUserRoleMutation, useUpdateUserStatusMutation, useUpdatePlatformUserRoleWithPoliciesMutation, usePlatformUsersQuery, useGetAccessibleUsersQuery, isPoliciesResponse, platformApiSlice, featureTags, useLazyGetRbacTeamsAccessListQuery, useCreateRbacTeamsAccessMutation, useGetRbacGroupsQuery, usePlatformUserGroupsQuery, useCreateRbacGroupMutation, useUpdateRbacGroupMutation, useDeleteRbacGroupMutation, useCreatePlatformUserGroupMutation, useUpdatePlatformUserGroupMutation, useDeletePlatformUserGroupMutation, useGetRbacGroupDetailsQuery, useGetPlatformUserGroupDetailsQuery, useGetRbacPermissionsMutation, useGetRbacRolesQuery, useCreateRbacRoleMutation, useUpdateRbacRoleMutation, useDeleteRbacRoleMutation, useGetRbacRoleDetailsQuery, useGetRbacActionsDefinitionQuery, useGetRbacResourceDiscoveryQuery, useGetRbacResourceListQuery, useGetRbacPoliciesQuery, useCreateRbacPolicyMutation, useUpdateRbacPolicyMutation, useDeleteRbacPolicyMutation, useGetRbacPolicyDetailsQuery, useGetWatchedGroupsQuery, useCreateWatchedGroupMutation, useUpdateWatchedGroupMutation, useDeleteWatchedGroupMutation, useAddWatchedUserMutation, useRemoveWatchedUserMutation, useAddWatcherMutation, useUpdateWatcherMutation, useDeleteWatcherMutation, useGetWatchedUsersQuery, useGetWatchersQuery, WATCHER_NOTIFICATION_EVENTS, WATCHER_NOTIFICATION_EVENT_LABELS, useGetApplicationFormsQuery, useGetApplicationFormDetailQuery, useCreateApplicationFormMutation, useUpdateApplicationFormMutation, useGetApplicationAdminDetailQuery, useInviteApplicationCandidateMutation, useLazyGetApplicationAttachmentFileQuery, useCreateApplicationWaiverMutation, useDeleteApplicationWaiverMutation, useSubmitApplicationOverrideMutation, useUpdateApplicationPlacementMutation, useDeleteApplicationCourseAssignmentMutation, useCreateApplicationNoteMutation, useUpdateApplicationNoteMutation, useDeleteApplicationNoteMutation, useTransitionApplicationMutation, useLinkApplicationCandidateMutation, useCreateApplicationPlacementsMutation, useGetCustomMentorsQuery, useCreateApplicationCourseAssignmentsMutation, useGetApplicationBlocksQuery, useDeleteApplicationBlockMutation, useGetApplicationsPipelineStatsQuery, useGetApplicationsPipelineQuery, useDeleteApiKeyMutation, useGetApiKeyQuery, useGetApiKeyFieldPermissionsQuery, useUpdateApiKeyMutation, useGetApiKeysQuery, unwrapApiTokenList, useCreateApiKeyMutation, useCreateLLMCredentialMutation, useGetCredentialsSchemaQuery, useGetMaskedLLMCredentialsQuery, useGetLlmsQuery, useDeleteIntegrationCredentialMutation, useDeleteCredentialMutation, useCreateIntegrationCredentialMutation, useGetIntegrationCredentialsSchemaQuery, useGetMaskedIntegrationCredentialsQuery, useGetAccountBillingInfoQuery, useUpdateAutoRechargeInfoMutation, useTriggerAutoRechargeMutation, useCreateStripeCustomerPortalMutation, useSetPlatformConfigurationsMutation, useGetPlatformConfigurationsQuery, useUpdatePlatformMembershipMutation, useGetPlatformMembershipQuery, useGetCustomDomainsQuery, useCreateCustomDomainMutation, useDeleteCustomDomainMutation, useGetStudentMentorCreationStatusQuery, useSetStudentMentorCreationStatusMutation, coreApiSlice, recommendationPromptTypeEnum, useGetRecommendedPromptsListQuery, useCreateRecommendedPromptMutation, useUpdateRecommendedPromptMutation, useDeleteRecommendedPromptMutation, useLazyGetPublicPlatformImageAssetFileUrlQuery, useUpdateTenantMetadataMutation, useCreatePlatformImageAssetMutation, useGetProviderConfigQuery, useCreateProviderConfigMutation, useDeleteProviderConfigMutation, useGetExternalMappingQuery, useGetCredentialsListQuery, useCreateExternalMappingMutation, useDeleteExternalMappingMutation, useGetMemsearchConfigQuery, useUpdateMemsearchConfigMutation, useGetStripeConnectStatusQuery, useStartStripeConnectOnboardingMutation, useLazyGetStripeConnectDashboardQuery, useGetAiSearchMentorsQuery, useListPaywallsQuery, useListPricesQuery, useCreatePriceMutation, useUpdatePriceMutation, useDeletePriceMutation, useGetPaywallConfigQuery, useEnablePaywallMutation, useUpdatePaywallMutation, useStarMentorMutation, useUnstarMentorMutation, useLazyGetCourseMetaDataQuery, useLazyGetCourseCompletionOutlinesQuery, useLazyGetCourseEligibilityQuery, useLazyGetEdxSSOTokenQuery, useCreateCourseEnrollmentMutation, useCreateStripeCheckoutSessionMutation, useLazyGetCourseProgressQuery, useLazyGetCourseCompletionQuery, useUpdateExamAttemptMutation, useStartExamMutation, useLazyGetExamInfoQuery, useGetAgentSkillResourcesQuery, useCreateAgentSkillResourceMutation, useUpdateAgentSkillResourceMutation, useUploadAgentSkillResourceAssetMutation, useDeleteAgentSkillResourceMutation, useGetAgentSkillsQuery, useGetMentorSkillAssignmentsQuery, useCreateMentorSkillAssignmentMutation, useUpdateMentorSkillAssignmentMutation, useDeleteMentorSkillAssignmentMutation, useCreateAgentSkillMutation, useUpdateAgentSkillMutation, useDeleteAgentSkillMutation, resolveEffectiveAgentSkills, filterSlashSkills, useUpdateUserProjectMutation, useGetTrainingDocumentsQuery, useGetVectorDocumentsQuery, useGetMentorMemoriesListQuery, useGetMemoryCategoriesAdminQuery, useDeleteMentorMemoryMutation, useUpdateMentorMemoryMutation, useCreateMentorMemoryMutation, useLazyGetConnectedServiceAuthUrlQuery, useCreateUserProjectMutation, useDeleteUserProjectMutation, useGetUserProjectDetailsQuery, useEditTrainingDocumentMutation, useAddTrainingDocumentMutation, useLazyGetCredentialsQuery, useGetMentorSettingsQuery, useEditMentorMutation, useUploadLightLogoMutation, useUploadDarkLogoMutation, useUpdatePlatformInfoMutation, LOGO_ENDPOINTS, useCreateEvalDatasetMutation, useAddEvalDatasetItemsMutation, useUploadEvalDatasetCsvMutation, useDeleteEvalDatasetItemMutation, useListEvalDatasetItemsQuery, evalTotalPages, useListEvalDatasetsQuery, useGetUserProjectsQuery, useCreateSessionIdMutation, useGetMentorCategoriesQuery, useGetTenantChatPrivacyConfigQuery as useGetTenantChatPrivacyConfigQuery$1, useGetCallConfigurationsQuery, useCreateCallConfigurationMutation, useUpdateCallConfigurationMutation, chatPrivacyApiSlice, useDeleteMentorMutation, useForkMentorMutation, useGetToolsQuery, useLazyGetMCPServersQuery, useOauthFindMutation, useLazyStartOAuthFlowQuery, useCreateMCPServerMutation, usePartialUpdateMCPServerMutation, useCreateMCPServerConnectionMutation, usePatchMCPServerConnectionMutation, useGetConnectedServicesQuery, useGetMCPServersQuery, useGetMCPServerConnectionsQuery, useUpdateMCPServerMutation, useDeleteMCPServerMutation, useEditMentorJsonMutation, useDisconnectServiceMutation, useGetPromptCategoriesQuery, PRIVACY_ACTIONS, PRIVACY_ENTITY_TYPES, useGetVoicesQuery, useGetVoiceQuery, isBaseAgentMentor, useGetMentorGraderConfigurationQuery, useListGraderCriteriaQuery, useCreateMentorGraderConfigurationMutation, useUpdateMentorGraderConfigurationMutation, useCreateGraderCriterionMutation, useUpdateGraderCriterionMutation, useDeleteGraderCriterionMutation, useGetMentorPublicSettingsQuery, useGetChatHistoryFilterQuery, useGetChatHistoryQuery, useGetMentorSummariesQuery, useGetConversationMemoriesQuery, useGetSupportTicketsQuery, useGetSupportTicketMessagesQuery, useCreateSupportTicketMessageMutation, usePatchSupportTicketMutation, useCloseSupportTicketMutation, useCreateLtiMentorMutation, useUpdateLtiMentorMutation, useGetLtiMentorsQuery, useCreateLtiKeyMutation, useUpdateLtiKeyMutation, useDeleteLtiKeyMutation, useGetLtiKeysQuery, useCreateLtiToolMutation, useUpdateLtiToolMutation, useGetLtiToolsQuery, useGetPlatformInfoQuery, useCreatePromptMutation, useGetPromptsSearchQuery, useUpdatePromptMutation, useCreateRedirectTokenMutation, useGetShareableLinkQuery, useCreateShareableLinkMutation, useUpdateShareableLinkMutation, useCreateDisclaimerMutation, useUpdateDisclaimerMutation, useGetDisclaimersQuery, useUpdateRbacMentorAccessMutation, useGetRbacMentorAccessListQuery, useStartEvalRunMutation, useEvaluateEvalRunMutation, useGetEvalRunQuery, useDeleteEvalScoreMutation, useListEvalRunJudgesQuery, useCreateEvalScoreMutation, useDeleteEvalRunMutation, useExportEvalRunMutation, useListEvalRunsQuery, useLazyGetEvalRunQuery, evaluationsApiSlice, EVALUATIONS_TAGS, useGetPersonnalizedMentorsQuery, useCreateCallCredentialsMutation, useGetGuidedPromptsQuery, useUpdateChatSessionSharedMutation, useUpdateMessageFeedbackMutation, useLazyGetPromptsSearchQuery, useLazyGetGuidedPromptsQuery, useGetPublicMentorsQuery, useGetPeriodicAgentsQuery, useGetPeriodicAgentLogsListQuery, useCreatePeriodicAgentMutation, useDeletePeriodicAgentMutation, useDeletePromptMutation, useDeleteTrainingDocumentMutation, useGetTrainingDocumentRetrainScheduleQuery, useCreateTrainingDocumentRetrainScheduleMutation, useCreateMemoryCategoryMutation, useUpdateMemoryCategoryMutation, useDeleteMemoryCategoryMutation, useUpdateArtifactMutation, useLazyGetArtifactVersionQuery, useLazyListArtifactVersionsQuery, useSetCurrentVersionMutation, useListArtifactVersionsQuery, useLazyGetArtifactQuery, useLazyListArtifactsQuery, useEditSessionMutation } from '@iblai/data-layer';
6
+ import { getInitials, useTenantMetadata, useCurrentTenant, selectRbacPermissions, isPureWatcher, WithPermissions, canWriteField, useStripeUpgrade, openExternalUrl, CHAT_AREA_SIZE, isAlphaNumeric32, checkRbacPermission, selectNumberOfActiveChatMessages, useUsername, selectStreaming, isLoggedIn, TOOLS, hasRemoteAiConfig, isSafariBrowser, useShowAttachment, useShowVoiceCall, useShowVoiceRecorder, useMentorSettings, selectShowingSharedChat, useShowFreeTrialDialog, useEmbedMode, chatInputSliceSelectors, useResponsive, useAccessingPublicRoute, useVisitingTenant, useModelFileUploadCapabilities, useChatFileUpload, useVoiceChat, selectAttachedFiles, MENTOR_CHAT_DOCUMENTS_EXTENSIONS, removeFile, chatInputSliceActions, chatActions, WithFormPermissions, useTenantContext, TimeTracker, advancedTabsProperties, defaultSessionIds, pickWritableFields, ANONYMOUS_USERNAME as ANONYMOUS_USERNAME$3, redirectToAuthSpaJoinTenant, selectActiveTab, useAxdToken, useWelcomeMessage, markdownToPlainText, useCachedSessionId, use402ErrorCheck, selectTokenEnabled, selectToken, useServiceWorker, useUserAgreement, useAdvancedChat, sendMessageToParentWebsite, useMentorTools, useFileDragDrop, eventBus, RemoteEvents, selectEnableChatActionsPopup, advancedTabs, isInIframe, getAuthSpaJoinUrl, addMessage, clearFiles, MENTOR_VISIBILITY } from '@iblai/web-utils';
7
7
  import { useDispatch, useSelector } from 'react-redux';
8
8
  import { toast } from 'sonner';
9
9
  import { useSearchParams, useParams, useRouter, usePathname } from 'next/navigation';
@@ -97537,6 +97537,37 @@ var analyticsAnalyticsFinancialStats$3 = {
97537
97537
  goToLastPage: "Go to last page",
97538
97538
  paginationShowing: "Showing {from} to {to} of {total} results"
97539
97539
  };
97540
+ var analyticsAnalyticsMemoryStats$3 = {
97541
+ noPermission: "You do not have permission to view user memories.",
97542
+ scopeLabel: "Memory scope",
97543
+ scopeMentor: "This Agent",
97544
+ scopeAllMentors: "All Agents",
97545
+ scopeGlobal: "Global",
97546
+ searchAgents: "Search Agents…",
97547
+ searchAgentsTitle: "Search Agents",
97548
+ clearAgentSearch: "Clear Agent Search",
97549
+ contentPlaceholder: "Search memory content",
97550
+ pickDateRange: "Pick a Date Range",
97551
+ allCategories: "All Categories",
97552
+ byCategory: "Memories by Category",
97553
+ categoryCount: "{count} ({percent}%)",
97554
+ loadError: "An error occurred while loading memories.",
97555
+ noMemories: "No memories have been captured yet.",
97556
+ detailTitle: "Memory Detail",
97557
+ detailUser: "User",
97558
+ detailAgent: "Agent",
97559
+ detailCategory: "Category",
97560
+ detailSource: "Source",
97561
+ detailCaptured: "Captured",
97562
+ detailSession: "Session",
97563
+ sourceAuto: "Auto-captured",
97564
+ sourceManual: "Added manually",
97565
+ colUser: "USER",
97566
+ colMemory: "MEMORY",
97567
+ colAgent: "AGENT",
97568
+ colCategory: "CATEGORY",
97569
+ colCaptured: "CAPTURED"
97570
+ };
97540
97571
  var analyticsAnalyticsMonetizationStats$3 = {
97541
97572
  totalRevenue: "Total Revenue",
97542
97573
  totalSales: "Total Sales",
@@ -97782,6 +97813,13 @@ var analyticsStatCard$3 = {
97782
97813
  ariaLabel: "{title} mini card",
97783
97814
  ariaLabelValue: "{title} mini card value"
97784
97815
  };
97816
+ var analyticsUserFilterSelect$3 = {
97817
+ filterByUser: "Filter by user",
97818
+ you: "You",
97819
+ searchPlaceholder: "Search users…",
97820
+ noUsersFound: "No users found.",
97821
+ loadingUsers: "Loading users…"
97822
+ };
97785
97823
  var apiTabApiKeyModal$3 = {
97786
97824
  title: "API Key",
97787
97825
  dialogDescription: "Copy and paste the API key.",
@@ -99485,12 +99523,14 @@ var memoryMemoryTab$3 = {
99485
99523
  useMemoryLabelDesc: "When enabled, the AI will use what it knows about you to personalize responses.",
99486
99524
  useMemoryAriaLabel: "Use memory in responses {state}",
99487
99525
  sectionMyMemories: "My Memories",
99526
+ sectionMyMemoriesPreview: "Memories",
99488
99527
  addMemoryButton: "Add Memory",
99489
99528
  autoGeneratedMemoryAriaLabel: "Auto-generated memory",
99490
99529
  manuallyAddedMemoryAriaLabel: "Manually added memory",
99491
99530
  autoBadge: "auto",
99492
99531
  deleteMemoryAriaLabel: "Delete memory: {excerpt}",
99493
99532
  noMemoriesYet: "No memories yet. The AI will start remembering information from your conversations, or you can add memories manually.",
99533
+ noMemoriesYetPreview: "No memories yet. The AI has not recorded any information from this user's conversations.",
99494
99534
  stateEnabled: "enabled",
99495
99535
  stateDisabled: "disabled"
99496
99536
  };
@@ -101696,6 +101736,10 @@ var analyticsTabLabels$3 = {
101696
101736
  label: "Transcripts",
101697
101737
  description: "Read full conversation transcripts message by message."
101698
101738
  },
101739
+ memory: {
101740
+ label: "Memory",
101741
+ description: "What this agent remembers about each user it talks to."
101742
+ },
101699
101743
  financial: {
101700
101744
  label: "Costs",
101701
101745
  description: "Track token usage and what this agent is costing you."
@@ -102815,6 +102859,7 @@ var en = {
102815
102859
  analyticsAnalyticsCourseDetail: analyticsAnalyticsCourseDetail$3,
102816
102860
  analyticsAnalyticsCourses: analyticsAnalyticsCourses$3,
102817
102861
  analyticsAnalyticsFinancialStats: analyticsAnalyticsFinancialStats$3,
102862
+ analyticsAnalyticsMemoryStats: analyticsAnalyticsMemoryStats$3,
102818
102863
  analyticsAnalyticsMonetizationStats: analyticsAnalyticsMonetizationStats$3,
102819
102864
  analyticsAnalyticsOverview: analyticsAnalyticsOverview$3,
102820
102865
  analyticsAnalyticsProgramDetail: analyticsAnalyticsProgramDetail$3,
@@ -102825,6 +102870,7 @@ var en = {
102825
102870
  analyticsAnalyticsUsersStats: analyticsAnalyticsUsersStats$3,
102826
102871
  analyticsGroupsFilterDropdown: analyticsGroupsFilterDropdown$3,
102827
102872
  analyticsStatCard: analyticsStatCard$3,
102873
+ analyticsUserFilterSelect: analyticsUserFilterSelect$3,
102828
102874
  apiTabApiKeyModal: apiTabApiKeyModal$3,
102829
102875
  apiTabCreateApiModal2: apiTabCreateApiModal2$3,
102830
102876
  apiTabDeleteApiModal2: apiTabDeleteApiModal2$3,
@@ -103757,6 +103803,37 @@ var analyticsAnalyticsFinancialStats$2 = {
103757
103803
  goToLastPage: "Aller à la dernière page",
103758
103804
  paginationShowing: "Affichage de {from} à {to} sur {total} résultats"
103759
103805
  };
103806
+ var analyticsAnalyticsMemoryStats$2 = {
103807
+ noPermission: "Vous n'avez pas l'autorisation de consulter les mémoires des utilisateurs.",
103808
+ scopeLabel: "Portée de la mémoire",
103809
+ scopeMentor: "Cet agent",
103810
+ scopeAllMentors: "Tous les agents",
103811
+ scopeGlobal: "Global",
103812
+ searchAgents: "Rechercher des agents…",
103813
+ searchAgentsTitle: "Rechercher des agents",
103814
+ clearAgentSearch: "Effacer la recherche d'agent",
103815
+ contentPlaceholder: "Rechercher dans le contenu des mémoires",
103816
+ pickDateRange: "Choisir une plage de dates",
103817
+ allCategories: "Toutes les catégories",
103818
+ byCategory: "Mémoires par catégorie",
103819
+ categoryCount: "{count} ({percent}%)",
103820
+ loadError: "Une erreur s'est produite lors du chargement des mémoires.",
103821
+ noMemories: "Aucune mémoire n'a encore été capturée.",
103822
+ detailTitle: "Détail de la mémoire",
103823
+ detailUser: "Utilisateur",
103824
+ detailAgent: "Agent",
103825
+ detailCategory: "Catégorie",
103826
+ detailSource: "Source",
103827
+ detailCaptured: "Capturée",
103828
+ detailSession: "Session",
103829
+ sourceAuto: "Capturée automatiquement",
103830
+ sourceManual: "Ajoutée manuellement",
103831
+ colUser: "UTILISATEUR",
103832
+ colMemory: "MÉMOIRE",
103833
+ colAgent: "AGENT",
103834
+ colCategory: "CATÉGORIE",
103835
+ colCaptured: "CAPTURÉE"
103836
+ };
103760
103837
  var analyticsAnalyticsMonetizationStats$2 = {
103761
103838
  totalRevenue: "Revenu total",
103762
103839
  totalSales: "Ventes totales",
@@ -104002,6 +104079,13 @@ var analyticsStatCard$2 = {
104002
104079
  ariaLabel: "mini carte {title}",
104003
104080
  ariaLabelValue: "valeur de la mini carte {title}"
104004
104081
  };
104082
+ var analyticsUserFilterSelect$2 = {
104083
+ filterByUser: "Filtrer par utilisateur",
104084
+ you: "Vous",
104085
+ searchPlaceholder: "Rechercher des utilisateurs…",
104086
+ noUsersFound: "Aucun utilisateur trouvé.",
104087
+ loadingUsers: "Chargement des utilisateurs…"
104088
+ };
104005
104089
  var apiTabApiKeyModal$2 = {
104006
104090
  title: "Clé API",
104007
104091
  dialogDescription: "Copiez et collez la clé API.",
@@ -105817,12 +105901,14 @@ var memoryMemoryTab$2 = {
105817
105901
  useMemoryLabelDesc: "Lorsque cette option est activée, l'IA utilisera ce qu'elle sait de vous pour personnaliser ses réponses.",
105818
105902
  useMemoryAriaLabel: "Utilisation de la mémoire dans les réponses {state}",
105819
105903
  sectionMyMemories: "Mes souvenirs",
105904
+ sectionMyMemoriesPreview: "Souvenirs",
105820
105905
  addMemoryButton: "Ajouter un souvenir",
105821
105906
  autoGeneratedMemoryAriaLabel: "Souvenir généré automatiquement",
105822
105907
  manuallyAddedMemoryAriaLabel: "Souvenir ajouté manuellement",
105823
105908
  autoBadge: "auto",
105824
105909
  deleteMemoryAriaLabel: "Supprimer le souvenir : {excerpt}",
105825
105910
  noMemoriesYet: "Aucun souvenir pour l'instant. L'IA commencera à mémoriser des informations de vos conversations, ou vous pouvez ajouter des souvenirs manuellement.",
105911
+ noMemoriesYetPreview: "Aucun souvenir pour l'instant. L'IA n'a enregistré aucune information des conversations de cet utilisateur.",
105826
105912
  stateEnabled: "activée",
105827
105913
  stateDisabled: "désactivée"
105828
105914
  };
@@ -108028,6 +108114,10 @@ var analyticsTabLabels$2 = {
108028
108114
  label: "Transcriptions",
108029
108115
  description: "Lisez les transcriptions complètes des conversations, message par message."
108030
108116
  },
108117
+ memory: {
108118
+ label: "Mémoire",
108119
+ description: "Ce que cet agent retient de chaque utilisateur avec qui il échange."
108120
+ },
108031
108121
  financial: {
108032
108122
  label: "Coûts",
108033
108123
  description: "Suivez l'utilisation des jetons et ce que cet agent vous coûte."
@@ -109035,6 +109125,7 @@ var fr = {
109035
109125
  analyticsAnalyticsCourseDetail: analyticsAnalyticsCourseDetail$2,
109036
109126
  analyticsAnalyticsCourses: analyticsAnalyticsCourses$2,
109037
109127
  analyticsAnalyticsFinancialStats: analyticsAnalyticsFinancialStats$2,
109128
+ analyticsAnalyticsMemoryStats: analyticsAnalyticsMemoryStats$2,
109038
109129
  analyticsAnalyticsMonetizationStats: analyticsAnalyticsMonetizationStats$2,
109039
109130
  analyticsAnalyticsOverview: analyticsAnalyticsOverview$2,
109040
109131
  analyticsAnalyticsProgramDetail: analyticsAnalyticsProgramDetail$2,
@@ -109045,6 +109136,7 @@ var fr = {
109045
109136
  analyticsAnalyticsUsersStats: analyticsAnalyticsUsersStats$2,
109046
109137
  analyticsGroupsFilterDropdown: analyticsGroupsFilterDropdown$2,
109047
109138
  analyticsStatCard: analyticsStatCard$2,
109139
+ analyticsUserFilterSelect: analyticsUserFilterSelect$2,
109048
109140
  apiTabApiKeyModal: apiTabApiKeyModal$2,
109049
109141
  apiTabCreateApiModal2: apiTabCreateApiModal2$2,
109050
109142
  apiTabDeleteApiModal2: apiTabDeleteApiModal2$2,
@@ -109977,6 +110069,37 @@ var analyticsAnalyticsFinancialStats$1 = {
109977
110069
  goToLastPage: "Ir a la última página",
109978
110070
  paginationShowing: "Mostrando {from} a {to} de {total} resultados"
109979
110071
  };
110072
+ var analyticsAnalyticsMemoryStats$1 = {
110073
+ noPermission: "No tienes permiso para ver los recuerdos de los usuarios.",
110074
+ scopeLabel: "Alcance de la memoria",
110075
+ scopeMentor: "Este agente",
110076
+ scopeAllMentors: "Todos los agentes",
110077
+ scopeGlobal: "Global",
110078
+ searchAgents: "Buscar agentes…",
110079
+ searchAgentsTitle: "Buscar agentes",
110080
+ clearAgentSearch: "Borrar la búsqueda de agentes",
110081
+ contentPlaceholder: "Buscar en el contenido de los recuerdos",
110082
+ pickDateRange: "Elige un rango de fechas",
110083
+ allCategories: "Todas las categorías",
110084
+ byCategory: "Recuerdos por categoría",
110085
+ categoryCount: "{count} ({percent}%)",
110086
+ loadError: "Se produjo un error al cargar los recuerdos.",
110087
+ noMemories: "Todavía no se ha capturado ningún recuerdo.",
110088
+ detailTitle: "Detalle del recuerdo",
110089
+ detailUser: "Usuario",
110090
+ detailAgent: "Agente",
110091
+ detailCategory: "Categoría",
110092
+ detailSource: "Origen",
110093
+ detailCaptured: "Capturado",
110094
+ detailSession: "Sesión",
110095
+ sourceAuto: "Capturado automáticamente",
110096
+ sourceManual: "Añadido manualmente",
110097
+ colUser: "USUARIO",
110098
+ colMemory: "RECUERDO",
110099
+ colAgent: "AGENTE",
110100
+ colCategory: "CATEGORÍA",
110101
+ colCaptured: "CAPTURADO"
110102
+ };
109980
110103
  var analyticsAnalyticsMonetizationStats$1 = {
109981
110104
  totalRevenue: "Ingresos totales",
109982
110105
  totalSales: "Ventas totales",
@@ -110222,6 +110345,13 @@ var analyticsStatCard$1 = {
110222
110345
  ariaLabel: "mini tarjeta {title}",
110223
110346
  ariaLabelValue: "valor de la mini tarjeta {title}"
110224
110347
  };
110348
+ var analyticsUserFilterSelect$1 = {
110349
+ filterByUser: "Filtrar por usuario",
110350
+ you: "Tú",
110351
+ searchPlaceholder: "Buscar usuarios…",
110352
+ noUsersFound: "No se encontraron usuarios.",
110353
+ loadingUsers: "Cargando usuarios…"
110354
+ };
110225
110355
  var apiTabApiKeyModal$1 = {
110226
110356
  title: "Clave API",
110227
110357
  dialogDescription: "Copie y pegue la clave API.",
@@ -112037,12 +112167,14 @@ var memoryMemoryTab$1 = {
112037
112167
  useMemoryLabelDesc: "Cuando está habilitado, la IA usará lo que sabe sobre usted para personalizar las respuestas.",
112038
112168
  useMemoryAriaLabel: "Uso de memoria en las respuestas {state}",
112039
112169
  sectionMyMemories: "Mis memorias",
112170
+ sectionMyMemoriesPreview: "Memorias",
112040
112171
  addMemoryButton: "Añadir memoria",
112041
112172
  autoGeneratedMemoryAriaLabel: "Memoria generada automáticamente",
112042
112173
  manuallyAddedMemoryAriaLabel: "Memoria añadida manualmente",
112043
112174
  autoBadge: "auto",
112044
112175
  deleteMemoryAriaLabel: "Eliminar memoria: {excerpt}",
112045
112176
  noMemoriesYet: "Aún no hay memorias. La IA comenzará a recordar información de sus conversaciones, o puede añadir memorias manualmente.",
112177
+ noMemoriesYetPreview: "Aún no hay memorias. La IA no ha registrado información de las conversaciones de este usuario.",
112046
112178
  stateEnabled: "habilitada",
112047
112179
  stateDisabled: "deshabilitada"
112048
112180
  };
@@ -114248,6 +114380,10 @@ var analyticsTabLabels$1 = {
114248
114380
  label: "Transcripciones",
114249
114381
  description: "Lee las transcripciones completas de las conversaciones, mensaje a mensaje."
114250
114382
  },
114383
+ memory: {
114384
+ label: "Memoria",
114385
+ description: "Lo que este agente recuerda de cada usuario con el que habla."
114386
+ },
114251
114387
  financial: {
114252
114388
  label: "Costos",
114253
114389
  description: "Controla el uso de tokens y lo que te cuesta este agente."
@@ -115255,6 +115391,7 @@ var es = {
115255
115391
  analyticsAnalyticsCourseDetail: analyticsAnalyticsCourseDetail$1,
115256
115392
  analyticsAnalyticsCourses: analyticsAnalyticsCourses$1,
115257
115393
  analyticsAnalyticsFinancialStats: analyticsAnalyticsFinancialStats$1,
115394
+ analyticsAnalyticsMemoryStats: analyticsAnalyticsMemoryStats$1,
115258
115395
  analyticsAnalyticsMonetizationStats: analyticsAnalyticsMonetizationStats$1,
115259
115396
  analyticsAnalyticsOverview: analyticsAnalyticsOverview$1,
115260
115397
  analyticsAnalyticsProgramDetail: analyticsAnalyticsProgramDetail$1,
@@ -115265,6 +115402,7 @@ var es = {
115265
115402
  analyticsAnalyticsUsersStats: analyticsAnalyticsUsersStats$1,
115266
115403
  analyticsGroupsFilterDropdown: analyticsGroupsFilterDropdown$1,
115267
115404
  analyticsStatCard: analyticsStatCard$1,
115405
+ analyticsUserFilterSelect: analyticsUserFilterSelect$1,
115268
115406
  apiTabApiKeyModal: apiTabApiKeyModal$1,
115269
115407
  apiTabCreateApiModal2: apiTabCreateApiModal2$1,
115270
115408
  apiTabDeleteApiModal2: apiTabDeleteApiModal2$1,
@@ -116197,6 +116335,37 @@ var analyticsAnalyticsFinancialStats = {
116197
116335
  goToLastPage: "转到最后一页",
116198
116336
  paginationShowing: "显示第 {from} 至 {to} 条,共 {total} 条结果"
116199
116337
  };
116338
+ var analyticsAnalyticsMemoryStats = {
116339
+ noPermission: "您没有查看用户记忆的权限。",
116340
+ scopeLabel: "记忆范围",
116341
+ scopeMentor: "当前智能体",
116342
+ scopeAllMentors: "所有智能体",
116343
+ scopeGlobal: "全局",
116344
+ searchAgents: "搜索智能体…",
116345
+ searchAgentsTitle: "搜索智能体",
116346
+ clearAgentSearch: "清除智能体搜索",
116347
+ contentPlaceholder: "搜索记忆内容",
116348
+ pickDateRange: "选择日期范围",
116349
+ allCategories: "所有类别",
116350
+ byCategory: "按类别统计记忆",
116351
+ categoryCount: "{count} ({percent}%)",
116352
+ loadError: "加载记忆时发生错误。",
116353
+ noMemories: "尚未捕获任何记忆。",
116354
+ detailTitle: "记忆详情",
116355
+ detailUser: "用户",
116356
+ detailAgent: "智能体",
116357
+ detailCategory: "类别",
116358
+ detailSource: "来源",
116359
+ detailCaptured: "捕获时间",
116360
+ detailSession: "会话",
116361
+ sourceAuto: "自动捕获",
116362
+ sourceManual: "手动添加",
116363
+ colUser: "用户",
116364
+ colMemory: "记忆",
116365
+ colAgent: "智能体",
116366
+ colCategory: "类别",
116367
+ colCaptured: "捕获时间"
116368
+ };
116200
116369
  var analyticsAnalyticsMonetizationStats = {
116201
116370
  totalRevenue: "总收入",
116202
116371
  totalSales: "总销售额",
@@ -116442,6 +116611,13 @@ var analyticsStatCard = {
116442
116611
  ariaLabel: "{title} 迷你卡片",
116443
116612
  ariaLabelValue: "{title} 迷你卡片值"
116444
116613
  };
116614
+ var analyticsUserFilterSelect = {
116615
+ filterByUser: "按用户筛选",
116616
+ you: "我",
116617
+ searchPlaceholder: "搜索用户…",
116618
+ noUsersFound: "未找到用户。",
116619
+ loadingUsers: "正在加载用户…"
116620
+ };
116445
116621
  var apiTabApiKeyModal = {
116446
116622
  title: "API 密钥",
116447
116623
  dialogDescription: "复制并粘贴 API 密钥。",
@@ -118257,12 +118433,14 @@ var memoryMemoryTab = {
118257
118433
  useMemoryLabelDesc: "启用后,AI 将利用它对您的了解来个性化回复。",
118258
118434
  useMemoryAriaLabel: "在回复中使用记忆{state}",
118259
118435
  sectionMyMemories: "我的记忆",
118436
+ sectionMyMemoriesPreview: "记忆",
118260
118437
  addMemoryButton: "添加记忆",
118261
118438
  autoGeneratedMemoryAriaLabel: "自动生成的记忆",
118262
118439
  manuallyAddedMemoryAriaLabel: "手动添加的记忆",
118263
118440
  autoBadge: "自动",
118264
118441
  deleteMemoryAriaLabel: "删除记忆:{excerpt}",
118265
118442
  noMemoriesYet: "暂无记忆。AI 将开始记住您对话中的信息,或者您也可以手动添加记忆。",
118443
+ noMemoriesYetPreview: "暂无记忆。AI 尚未记录该用户对话中的任何信息。",
118266
118444
  stateEnabled: "已启用",
118267
118445
  stateDisabled: "已禁用"
118268
118446
  };
@@ -120468,6 +120646,10 @@ var analyticsTabLabels = {
120468
120646
  label: "对话记录",
120469
120647
  description: "逐条阅读完整的对话记录。"
120470
120648
  },
120649
+ memory: {
120650
+ label: "记忆",
120651
+ description: "该智能体记住的与其对话的每位用户的相关信息。"
120652
+ },
120471
120653
  financial: {
120472
120654
  label: "费用",
120473
120655
  description: "跟踪令牌用量以及该智能体的花费。"
@@ -121475,6 +121657,7 @@ var zh = {
121475
121657
  analyticsAnalyticsCourseDetail: analyticsAnalyticsCourseDetail,
121476
121658
  analyticsAnalyticsCourses: analyticsAnalyticsCourses,
121477
121659
  analyticsAnalyticsFinancialStats: analyticsAnalyticsFinancialStats,
121660
+ analyticsAnalyticsMemoryStats: analyticsAnalyticsMemoryStats,
121478
121661
  analyticsAnalyticsMonetizationStats: analyticsAnalyticsMonetizationStats,
121479
121662
  analyticsAnalyticsOverview: analyticsAnalyticsOverview,
121480
121663
  analyticsAnalyticsProgramDetail: analyticsAnalyticsProgramDetail,
@@ -121485,6 +121668,7 @@ var zh = {
121485
121668
  analyticsAnalyticsUsersStats: analyticsAnalyticsUsersStats,
121486
121669
  analyticsGroupsFilterDropdown: analyticsGroupsFilterDropdown,
121487
121670
  analyticsStatCard: analyticsStatCard,
121671
+ analyticsUserFilterSelect: analyticsUserFilterSelect,
121488
121672
  apiTabApiKeyModal: apiTabApiKeyModal,
121489
121673
  apiTabCreateApiModal2: apiTabCreateApiModal2,
121490
121674
  apiTabDeleteApiModal2: apiTabDeleteApiModal2,
@@ -124462,11 +124646,10 @@ const getUserName$1 = () => {
124462
124646
  };
124463
124647
 
124464
124648
  /**
124465
- * True when the logged-in user is viewing someone else's profile (preview
124466
- * mode), so editing affordances can be hidden. Reads the current username from
124467
- * localStorage after mount to stay SSR-safe.
124649
+ * The signed-in user's username, or an empty string before it is known. Read
124650
+ * from localStorage after mount to stay SSR-safe.
124468
124651
  */
124469
- function useIsProfilePreview(username) {
124652
+ function useCurrentUsername() {
124470
124653
  const [currentUsername, setCurrentUsername] = useState('');
124471
124654
  useEffect(() => {
124472
124655
  try {
@@ -124476,6 +124659,14 @@ function useIsProfilePreview(username) {
124476
124659
  setCurrentUsername('');
124477
124660
  }
124478
124661
  }, []);
124662
+ return currentUsername;
124663
+ }
124664
+ /**
124665
+ * True when the logged-in user is viewing someone else's profile (preview
124666
+ * mode), so editing affordances can be hidden.
124667
+ */
124668
+ function useIsProfilePreview(username) {
124669
+ const currentUsername = useCurrentUsername();
124479
124670
  return !!currentUsername && currentUsername !== username;
124480
124671
  }
124481
124672
 
@@ -175623,7 +175814,7 @@ function DetailRow({ label, children }) {
175623
175814
  return (jsxs("div", { className: "flex items-center justify-between gap-4 py-2", children: [jsx("span", { className: "text-sm text-gray-500", children: label }), jsx("span", { className: "text-sm font-medium text-gray-900 text-right", children: children })] }));
175624
175815
  }
175625
175816
 
175626
- const PAGE_SIZE$9 = 8;
175817
+ const PAGE_SIZE$a = 8;
175627
175818
  const CONTENT_TYPES = [
175628
175819
  { value: 'courses', labelKey: 'gradebookGradebookTab.typeCourses', icon: GraduationCap },
175629
175820
  { value: 'programs', labelKey: 'gradebookGradebookTab.typePrograms', icon: Layers },
@@ -175654,14 +175845,14 @@ function useGradebookData(type, org, username, page, search) {
175654
175845
  username,
175655
175846
  query: {
175656
175847
  page,
175657
- page_size: PAGE_SIZE$9,
175848
+ page_size: PAGE_SIZE$a,
175658
175849
  platform_key: org,
175659
175850
  ...(trimmed ? { search: trimmed } : {}),
175660
175851
  },
175661
175852
  }, { skip: type !== 'courses', refetchOnMountOrArgChange: true });
175662
175853
  const programsQ = useGetUserEnrolledProgramsQuery([{ username, platformKey: org }], { skip: type !== 'programs' });
175663
175854
  const pathwaysQ = useGetUserCatalogPathwaysQuery({ username, platform_key: org }, { skip: type !== 'pathways' });
175664
- const credentialsQ = useGetUsersAsAssertionsQuery({ platformKey: org, userId: username, page, pageSize: PAGE_SIZE$9 }, { skip: type !== 'credentials', refetchOnMountOrArgChange: true });
175855
+ const credentialsQ = useGetUsersAsAssertionsQuery({ platformKey: org, userId: username, page, pageSize: PAGE_SIZE$a }, { skip: type !== 'credentials', refetchOnMountOrArgChange: true });
175665
175856
  const earnedQ = useGetUserEarnedSkillsQuery([{ org, userId: username }], { skip: type !== 'skills' });
175666
175857
  const reportedQ = useGetUserReportedSkillsQuery([{ username }], { skip: type !== 'skills' });
175667
175858
  const desiredQ = useGetUserDesiredSkillsQuery([{ username }], { skip: type !== 'skills' });
@@ -175671,12 +175862,12 @@ function useGradebookData(type, org, username, page, search) {
175671
175862
  const filtered = trimmed
175672
175863
  ? rows.filter((row) => row.name.toLowerCase().includes(trimmed.toLowerCase()))
175673
175864
  : rows;
175674
- const start = (page - 1) * PAGE_SIZE$9;
175865
+ const start = (page - 1) * PAGE_SIZE$a;
175675
175866
  return {
175676
- rows: filtered.slice(start, start + PAGE_SIZE$9),
175867
+ rows: filtered.slice(start, start + PAGE_SIZE$a),
175677
175868
  total: filtered.length,
175678
175869
  hasPrev: page > 1,
175679
- hasNext: start + PAGE_SIZE$9 < filtered.length,
175870
+ hasNext: start + PAGE_SIZE$a < filtered.length,
175680
175871
  };
175681
175872
  };
175682
175873
  switch (type) {
@@ -175733,7 +175924,7 @@ function useGradebookData(type, org, username, page, search) {
175733
175924
  rows,
175734
175925
  total,
175735
175926
  hasPrev: page > 1,
175736
- hasNext: page * PAGE_SIZE$9 < total,
175927
+ hasNext: page * PAGE_SIZE$a < total,
175737
175928
  isLoading: credentialsQ.isLoading,
175738
175929
  isFetching: credentialsQ.isFetching,
175739
175930
  isError: credentialsQ.isError,
@@ -175972,29 +176163,58 @@ const IblPagination = ({ currentPage, totalPages, onPageChange, disabled = false
175972
176163
 
175973
176164
  const MEMORIES_PAGE_SIZE = 25;
175974
176165
  function MemoryTab({ org, username }) {
175975
- var _a, _b, _c;
176166
+ var _a, _b;
175976
176167
  const t = useT();
175977
176168
  const [isAddDialogOpen, setIsAddDialogOpen] = useState(false);
175978
176169
  const [deletingId, setDeletingId] = useState(null);
175979
176170
  const [currentPage, setCurrentPage] = useState(1);
176171
+ // Viewing someone else's profile, which lists both of that user's memory
176172
+ // collections — global and per-agent — instead of just your own global feed.
176173
+ const isPreview = useIsProfilePreview(username);
176174
+ const currentUsername = useCurrentUsername();
175980
176175
  // Platform memsearch status (available to students and admins)
175981
176176
  const { data: memsearchStatus, isLoading: isLoadingConfig, isError: isConfigError, } = useGetMemsearchStatusQuery({
175982
176177
  org,
175983
176178
  userId: username,
175984
- });
176179
+ }, { skip: isPreview });
175985
176180
  // User memory settings
175986
176181
  const { data: settings, isLoading: isLoadingSettings } = useGetUserMemorySettingsQuery({
175987
176182
  org,
175988
176183
  userId: username,
175989
- });
176184
+ }, { skip: isPreview });
175990
176185
  const [updateSettings, { isLoading: isUpdatingSettings }] = useUpdateUserMemorySettingsMutation();
175991
- // Global memories
175992
- const { data: memoriesData, isLoading: isLoadingMemories } = useGetGlobalMemoriesQuery({
176186
+ const memoriesParams = { page: currentPage, page_size: MEMORIES_PAGE_SIZE };
176187
+ // Global memories. On your own profile this is the plain call — your username
176188
+ // in the path. Previewing someone else addresses it the way the analytics
176189
+ // memory tab does: the caller in the `{user_id}` path segment, and the user
176190
+ // being looked at in the `user_id` param.
176191
+ const { data: globalMemoriesData, isLoading: isLoadingGlobalMemories } = useGetGlobalMemoriesQuery(isPreview
176192
+ ? { org, userId: currentUsername, params: { ...memoriesParams, user_id: username } }
176193
+ : { org, userId: username, params: memoriesParams }, { skip: isPreview && !currentUsername });
176194
+ // Agent memories across every mentor, addressed the same way. Only fetched in
176195
+ // preview, where the tab shows both of the profile owner's collections.
176196
+ const { data: mentorMemoriesData, isLoading: isLoadingMentorMemories } = useGetAllMentorMemoriesQuery({
175993
176197
  org,
175994
- userId: username,
175995
- params: { page: currentPage, page_size: MEMORIES_PAGE_SIZE },
175996
- });
175997
- const totalPages = (memoriesData === null || memoriesData === void 0 ? void 0 : memoriesData.count) ? Math.ceil(memoriesData.count / MEMORIES_PAGE_SIZE) : 0;
176198
+ userId: currentUsername,
176199
+ params: { ...memoriesParams, user_id: username },
176200
+ }, { skip: !isPreview || !currentUsername });
176201
+ const memories = useMemo(() => {
176202
+ var _a, _b;
176203
+ const globalMemories = (_a = globalMemoriesData === null || globalMemoriesData === void 0 ? void 0 : globalMemoriesData.results) !== null && _a !== void 0 ? _a : [];
176204
+ if (!isPreview)
176205
+ return globalMemories;
176206
+ // Both collections are newest-first on their own; interleave them so the
176207
+ // combined list still reads chronologically.
176208
+ return [...((_b = mentorMemoriesData === null || mentorMemoriesData === void 0 ? void 0 : mentorMemoriesData.results) !== null && _b !== void 0 ? _b : []), ...globalMemories].sort((a, b) => new Date(b.created_at).getTime() - new Date(a.created_at).getTime());
176209
+ }, [isPreview, globalMemoriesData, mentorMemoriesData]);
176210
+ const isLoadingMemories = isLoadingGlobalMemories || (isPreview && isLoadingMentorMemories);
176211
+ // The two collections page independently at the same size, so a page shows
176212
+ // that page of each and the pager spans whichever collection is longer.
176213
+ const totalPages = useMemo(() => {
176214
+ const pageCount = (count) => (count ? Math.ceil(count / MEMORIES_PAGE_SIZE) : 0);
176215
+ const globalPages = pageCount(globalMemoriesData === null || globalMemoriesData === void 0 ? void 0 : globalMemoriesData.count);
176216
+ return isPreview ? Math.max(globalPages, pageCount(mentorMemoriesData === null || mentorMemoriesData === void 0 ? void 0 : mentorMemoriesData.count)) : globalPages;
176217
+ }, [isPreview, globalMemoriesData, mentorMemoriesData]);
175998
176218
  const [deleteMemory] = useDeleteGlobalMemoryMutation();
175999
176219
  const handleToggleSetting = async (key, checked) => {
176000
176220
  try {
@@ -176033,7 +176253,7 @@ function MemoryTab({ org, username }) {
176033
176253
  if (!isConfigError && memsearchStatus && !memsearchStatus.enable_memsearch) {
176034
176254
  return (jsx("div", { className: "max-w-2xl", children: jsx("div", { className: "rounded-lg border px-6 py-8 text-center", style: { borderColor: 'oklch(.922 0 0)' }, children: jsx("p", { className: "text-sm text-gray-500", children: t('memoryMemoryTab.memoryFeatureDisabled') }) }) }));
176035
176255
  }
176036
- return (jsxs("div", { className: "space-y-8", children: [jsxs("div", { className: "space-y-4", children: [jsx("h4", { className: "text-sm font-semibold text-gray-700 dark:text-gray-300 tracking-wide", children: t('memoryMemoryTab.sectionMemoryPersonalization') }), jsxs("div", { className: "flex items-center justify-between rounded-lg border px-6 py-5", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsxs("div", { className: "flex-1 mr-4", children: [jsx("span", { className: "text-sm font-medium text-gray-900 dark:text-gray-100", children: t('memoryMemoryTab.autoCaptureLabelTitle') }), jsx("p", { className: "text-xs text-gray-500 dark:text-gray-400 mt-1", children: t('memoryMemoryTab.autoCaptureLabelDesc') })] }), jsx(Switch, { checked: (_a = settings === null || settings === void 0 ? void 0 : settings.auto_capture_enabled) !== null && _a !== void 0 ? _a : false, onCheckedChange: (checked) => handleToggleSetting('auto_capture_enabled', checked), disabled: isUpdatingSettings, "aria-label": t('memoryMemoryTab.autoCaptureAriaLabel', {
176256
+ return (jsxs("div", { className: "space-y-8", children: [!isPreview && (jsxs("div", { className: "space-y-4", children: [!isPreview && (jsx("h4", { className: "text-sm font-semibold text-gray-700 dark:text-gray-300 tracking-wide", children: t('memoryMemoryTab.sectionMemoryPersonalization') })), jsxs("div", { className: "flex items-center justify-between rounded-lg border px-6 py-5", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsxs("div", { className: "flex-1 mr-4", children: [jsx("span", { className: "text-sm font-medium text-gray-900 dark:text-gray-100", children: t('memoryMemoryTab.autoCaptureLabelTitle') }), jsx("p", { className: "text-xs text-gray-500 dark:text-gray-400 mt-1", children: t('memoryMemoryTab.autoCaptureLabelDesc') })] }), jsx(Switch, { checked: (_a = settings === null || settings === void 0 ? void 0 : settings.auto_capture_enabled) !== null && _a !== void 0 ? _a : false, onCheckedChange: (checked) => handleToggleSetting('auto_capture_enabled', checked), disabled: isUpdatingSettings, "aria-label": t('memoryMemoryTab.autoCaptureAriaLabel', {
176037
176257
  state: (settings === null || settings === void 0 ? void 0 : settings.auto_capture_enabled)
176038
176258
  ? t('memoryMemoryTab.stateEnabled')
176039
176259
  : t('memoryMemoryTab.stateDisabled'),
@@ -176041,9 +176261,13 @@ function MemoryTab({ org, username }) {
176041
176261
  state: (settings === null || settings === void 0 ? void 0 : settings.use_memory_in_responses)
176042
176262
  ? t('memoryMemoryTab.stateEnabled')
176043
176263
  : t('memoryMemoryTab.stateDisabled'),
176044
- }), className: "cursor-pointer data-[state=checked]:bg-blue-500 flex-shrink-0" })] })] }), jsxs("div", { className: "space-y-4", children: [jsxs("div", { className: "flex items-center justify-between", children: [jsx("h4", { className: "text-sm font-semibold text-gray-700 dark:text-gray-300 tracking-wide", children: t('memoryMemoryTab.sectionMyMemories') }), jsxs(Button$1, { variant: "outline", size: "sm", onClick: () => setIsAddDialogOpen(true), className: "text-xs", children: [jsx(Plus, { className: "h-3 w-3 mr-1" }), t('memoryMemoryTab.addMemoryButton')] })] }), isLoadingMemories ? (jsx("div", { className: "space-y-3", children: [1, 2, 3].map((i) => (jsx(Skeleton, { className: "h-16 w-full rounded-lg" }, i))) })) : ((_c = memoriesData === null || memoriesData === void 0 ? void 0 : memoriesData.results) === null || _c === void 0 ? void 0 : _c.length) ? (jsx("div", { className: "space-y-3", children: memoriesData.results.map((memory) => (jsxs("div", { className: "group flex items-start gap-3 rounded-lg border px-4 py-3", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx("div", { className: "flex-shrink-0 mt-0.5", children: memory.is_auto_generated ? (jsx(Bot, { className: "h-4 w-4 text-blue-500", "aria-label": t('memoryMemoryTab.autoGeneratedMemoryAriaLabel') })) : (jsx(User, { className: "h-4 w-4 text-gray-400", "aria-label": t('memoryMemoryTab.manuallyAddedMemoryAriaLabel') })) }), jsxs("div", { className: "flex-1 min-w-0", children: [jsx("p", { className: "text-sm text-gray-800 dark:text-gray-200", children: memory.content }), jsxs("p", { className: "text-xs text-gray-400 mt-1", children: [new Date(memory.created_at).toLocaleDateString(), memory.is_auto_generated && (jsx("span", { className: "ml-2 inline-flex items-center rounded-full bg-blue-50 px-1.5 py-0.5 text-[10px] font-medium text-blue-600", children: t('memoryMemoryTab.autoBadge') }))] })] }), jsx("button", { type: "button", onClick: () => handleDeleteMemory(memory.id), disabled: deletingId === memory.id, className: "flex-shrink-0 opacity-0 group-hover:opacity-100 transition-opacity p-1 rounded hover:bg-gray-100 text-gray-400 hover:text-gray-600 focus:opacity-100 focus:outline-none focus:ring-2 focus:ring-gray-300", "aria-label": t('memoryMemoryTab.deleteMemoryAriaLabel', {
176264
+ }), className: "cursor-pointer data-[state=checked]:bg-blue-500 flex-shrink-0" })] })] })), jsxs("div", { className: "space-y-4", children: [jsxs("div", { className: "flex items-center justify-between", children: [jsx("h4", { className: "text-sm font-semibold text-gray-700 dark:text-gray-300 tracking-wide", children: isPreview
176265
+ ? t('memoryMemoryTab.sectionMyMemoriesPreview')
176266
+ : t('memoryMemoryTab.sectionMyMemories') }), !isPreview && (jsxs(Button$1, { variant: "outline", size: "sm", onClick: () => setIsAddDialogOpen(true), className: "text-xs", children: [jsx(Plus, { className: "h-3 w-3 mr-1" }), t('memoryMemoryTab.addMemoryButton')] }))] }), isLoadingMemories ? (jsx("div", { className: "space-y-3", children: [1, 2, 3].map((i) => (jsx(Skeleton, { className: "h-16 w-full rounded-lg" }, i))) })) : memories.length ? (jsx("div", { className: "space-y-3", children: memories.map((memory) => (jsxs("div", { className: "group flex items-start gap-3 rounded-lg border px-4 py-3", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx("div", { className: "flex-shrink-0 mt-0.5", children: memory.is_auto_generated ? (jsx(Bot, { className: "h-4 w-4 text-blue-500", "aria-label": t('memoryMemoryTab.autoGeneratedMemoryAriaLabel') })) : (jsx(User, { className: "h-4 w-4 text-gray-400", "aria-label": t('memoryMemoryTab.manuallyAddedMemoryAriaLabel') })) }), jsxs("div", { className: "flex-1 min-w-0", children: [jsx("p", { className: "text-sm text-gray-800 dark:text-gray-200", children: memory.content }), jsxs("p", { className: "text-xs text-gray-400 mt-1", children: [new Date(memory.created_at).toLocaleDateString(), memory.is_auto_generated && (jsx("span", { className: "ml-2 inline-flex items-center rounded-full bg-blue-50 px-1.5 py-0.5 text-[10px] font-medium text-blue-600", children: t('memoryMemoryTab.autoBadge') }))] })] }), !isPreview && (jsx("button", { type: "button", onClick: () => handleDeleteMemory(memory.id), disabled: deletingId === memory.id, className: "flex-shrink-0 opacity-0 group-hover:opacity-100 transition-opacity p-1 rounded hover:bg-gray-100 text-gray-400 hover:text-gray-600 focus:opacity-100 focus:outline-none focus:ring-2 focus:ring-gray-300", "aria-label": t('memoryMemoryTab.deleteMemoryAriaLabel', {
176045
176267
  excerpt: memory.content.substring(0, 30),
176046
- }), children: deletingId === memory.id ? (jsx("div", { className: "w-4 h-4 border-2 border-gray-500 border-t-transparent rounded-full animate-spin" })) : (jsx(Trash2, { className: "h-4 w-4" })) })] }, memory.id))) })) : (jsx("div", { className: "rounded-lg border px-6 py-8 text-center", style: { borderColor: 'oklch(.922 0 0)' }, children: jsx("p", { className: "text-sm text-gray-500", children: t('memoryMemoryTab.noMemoriesYet') }) })), totalPages > 1 && (jsx(IblPagination, { currentPage: currentPage, totalPages: totalPages, onPageChange: setCurrentPage, disabled: isLoadingMemories }))] }), jsx(AddMemoryDialog, { open: isAddDialogOpen, onOpenChange: setIsAddDialogOpen, org: org, username: username })] }));
176268
+ }), children: deletingId === memory.id ? (jsx("div", { className: "w-4 h-4 border-2 border-gray-500 border-t-transparent rounded-full animate-spin" })) : (jsx(Trash2, { className: "h-4 w-4" })) }))] }, `${'mentor_id' in memory ? memory.mentor_id : 'global'}-${memory.id}`))) })) : (jsx("div", { className: "rounded-lg border px-6 py-8 text-center", style: { borderColor: 'oklch(.922 0 0)' }, children: jsx("p", { className: "text-sm text-gray-500", children: isPreview
176269
+ ? t('memoryMemoryTab.noMemoriesYetPreview')
176270
+ : t('memoryMemoryTab.noMemoriesYet') }) })), totalPages > 1 && (jsx(IblPagination, { currentPage: currentPage, totalPages: totalPages, onPageChange: setCurrentPage, disabled: isLoadingMemories }))] }), jsx(AddMemoryDialog, { open: isAddDialogOpen, onOpenChange: setIsAddDialogOpen, org: org, username: username })] }));
176047
176271
  }
176048
176272
 
176049
176273
  var _a$1;
@@ -178184,7 +178408,9 @@ const PopoverContent = React.forwardRef(({ className, align = 'center', sideOffs
178184
178408
  });
178185
178409
  PopoverContent.displayName = Content2$2.displayName;
178186
178410
 
178411
+ const PAGE_SIZE$9 = 10;
178187
178412
  function UsersTab({ tenant, onInviteClick, currentSpa, showGradebookTab = false, }) {
178413
+ var _a, _b;
178188
178414
  const t = useT();
178189
178415
  const dispatch = useDispatch();
178190
178416
  const [page, setPage] = useState(1);
@@ -178196,14 +178422,35 @@ function UsersTab({ tenant, onInviteClick, currentSpa, showGradebookTab = false,
178196
178422
  const [updatingUserIds, setUpdatingUserIds] = useState(new Set());
178197
178423
  const [openPolicyPopover, setOpenPolicyPopover] = useState(null);
178198
178424
  const [selectedUser, setSelectedUser] = useState(null);
178199
- const { data: users, refetch: refetchPlatformUsers, isLoading, } = usePlatformUsersQuery({
178425
+ const { currentTenant } = useCurrentTenant();
178426
+ const rbacPermissions = useSelector(selectRbacPermissions);
178427
+ // A pure watcher administers nothing: the platform users endpoint 403s for
178428
+ // them, so they get the RBAC-scoped list of users they may read instead —
178429
+ // name and email only, with no invite, role, policy or status controls.
178430
+ const isWatcher = isPureWatcher(rbacPermissions, currentTenant);
178431
+ const { data: users, refetch: refetchPlatformUsers, isLoading: isLoadingPlatformUsers, } = usePlatformUsersQuery({
178200
178432
  page,
178201
- page_size: 10,
178433
+ page_size: PAGE_SIZE$9,
178202
178434
  platform_key: tenant,
178203
178435
  platform_org: tenant,
178204
178436
  query: debouncedSearchQuery,
178205
178437
  return_policies: 'true',
178206
- });
178438
+ }, { skip: isWatcher });
178439
+ // The accessible endpoint scopes itself to the caller's platform from their
178440
+ // token, so it takes no tenant param. It also filters per field instead of
178441
+ // with one search param, hence the "@" routing the term to `email` and
178442
+ // anything else to `username`.
178443
+ const { data: accessibleUsers, isLoading: isLoadingAccessibleUsers } = useGetAccessibleUsersQuery({
178444
+ // TODO to use required_action: 'Ibl.Core/Users/read',
178445
+ required_action: 'Ibl.Mentor/Memory/list',
178446
+ page,
178447
+ page_size: PAGE_SIZE$9,
178448
+ sort: 'name',
178449
+ ...(debouncedSearchQuery.includes('@')
178450
+ ? { email: debouncedSearchQuery }
178451
+ : { username: debouncedSearchQuery }),
178452
+ }, { skip: !isWatcher });
178453
+ const isLoading = isWatcher ? isLoadingAccessibleUsers : isLoadingPlatformUsers;
178207
178454
  useEffect(() => {
178208
178455
  const handler = setTimeout(() => {
178209
178456
  if (searchQuery.length > 2) {
@@ -178220,7 +178467,10 @@ function UsersTab({ tenant, onInviteClick, currentSpa, showGradebookTab = false,
178220
178467
  }, [searchQuery]);
178221
178468
  const handlePageChange = async (newPage) => {
178222
178469
  setPage(newPage);
178223
- await refetchPlatformUsers();
178470
+ // The watcher list is served by the other (skipped) query — changing `page`
178471
+ // is enough to refetch it.
178472
+ if (!isWatcher)
178473
+ await refetchPlatformUsers();
178224
178474
  };
178225
178475
  const handleUserRoleChange = async (user) => {
178226
178476
  const userId = user === null || user === void 0 ? void 0 : user.user_id;
@@ -178338,8 +178588,6 @@ function UsersTab({ tenant, onInviteClick, currentSpa, showGradebookTab = false,
178338
178588
  });
178339
178589
  }
178340
178590
  };
178341
- // Calculate total pages
178342
- const totalPages = users ? Math.ceil(users.count / 10) : 0; // Assuming 10 users per page
178343
178591
  // Extract allowed policies and user data
178344
178592
  const isResultsWithPolicies = (users === null || users === void 0 ? void 0 : users.results) ? isPoliciesResponse(users.results) : false;
178345
178593
  const allowedPolicies = isResultsWithPolicies
@@ -178348,31 +178596,55 @@ function UsersTab({ tenant, onInviteClick, currentSpa, showGradebookTab = false,
178348
178596
  const userData = isResultsWithPolicies
178349
178597
  ? (users === null || users === void 0 ? void 0 : users.results).data
178350
178598
  : [];
178351
- return (jsxs("div", { className: "mt-4", children: [jsxs("div", { className: "flex justify-between items-center gap-1", children: [jsxs("div", { className: "relative mb-6 max-w-sm", children: [jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }), jsx(Input, { type: "text", value: searchQuery, onChange: (event) => setQuerySearch(event.target.value), placeholder: t('tabsUserstab.searchPlaceholder'), className: "pl-10 pr-10 focus:ring-blue-500 focus:border-blue-500 h-[35px]", "aria-label": t('tabsUserstab.searchAriaLabel') }), searchQuery.length > 0 && (searchQuery !== debouncedSearchQuery || isLoading) && (jsx(LoaderCircle, { "data-testid": "search-spinner", className: "absolute right-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400 animate-spin", "aria-hidden": "true" }))] }), jsx("div", { className: "mb-6", children: jsx(Button$1, { className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] hover:opacity-90 text-white h-[35px]", onClick: onInviteClick, children: t('tabsUserstab.inviteButton') }) })] }), isLoading ? (jsx("div", { className: "flex justify-center items-center h-64", children: jsx(Spinner, {}) })) : (jsxs(Fragment$1, { children: [jsx("div", { className: "bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg overflow-x-auto", children: jsxs("table", { className: "w-full text-sm", children: [jsx("thead", { className: "bg-gray-50 dark:bg-gray-700 border-b border-gray-200 dark:border-gray-600", children: jsxs("tr", { children: [jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[16%]", children: t('tabsUserstab.columnName') }), jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[25%]", children: t('tabsUserstab.columnEmail') }), jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[16%]", children: t('tabsUserstab.columnRole') }), jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[25%]", children: t('tabsUserstab.columnPolicies') }), jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[18%]", children: t('tabsUserstab.columnStatus') })] }) }), jsxs("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-600", children: [userData.map((user, index) => (jsxs("tr", { onClick: () => setSelectedUser(user), className: "cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-700/50 transition-colors", children: [jsx("td", { "aria-label": 'user-management-name-column', className: "px-6 py-4 text-gray-900 dark:text-gray-100 text-sm whitespace-nowrap overflow-hidden text-ellipsis max-w-0", children: jsx("button", { type: "button", onClick: (e) => {
178352
- e.stopPropagation();
178353
- setSelectedUser(user);
178354
- }, className: "block max-w-full truncate text-left hover:text-blue-600 hover:underline focus:outline-none focus:text-blue-600", "aria-label": t('tabsUserstab.viewProfileAriaLabel', { name: user.name }), children: user.name }) }), jsx("td", { "aria-label": 'user-management-email-column', className: "px-6 py-4 text-gray-600 dark:text-gray-300 text-sm max-w-0", children: jsx("div", { className: "truncate", children: user.email }) }), jsx("td", { className: "px-6 py-4", onClick: (e) => e.stopPropagation(), children: jsxs(Select$1, { value: user.is_admin ? 'admin' : 'student', onValueChange: () => handleUserRoleChange(user), children: [jsx(SelectTrigger, { className: "w-full text-sm", children: jsx(SelectValue, {}) }), jsxs(SelectContent, { className: "text-sm", children: [jsx(SelectItem, { value: "admin", children: t('tabsUserstab.roleAdmin') }), jsx(SelectItem, { value: "student", children: t('tabsUserstab.roleUser') })] })] }) }), jsx("td", { className: "px-6 py-4", onClick: (e) => e.stopPropagation(), children: jsxs(Popover, { modal: true, open: openPolicyPopover === user.user_id, onOpenChange: (open) => setOpenPolicyPopover(open ? user.user_id : null), children: [jsx(PopoverTrigger, { asChild: true, children: jsxs(Button$1, { variant: "outline", role: "combobox", "aria-expanded": openPolicyPopover === user.user_id, "aria-label": t('tabsUserstab.selectPoliciesAriaLabel', {
178599
+ const rows = isWatcher
178600
+ ? ((_a = accessibleUsers === null || accessibleUsers === void 0 ? void 0 : accessibleUsers.results) !== null && _a !== void 0 ? _a : []).map((user) => ({
178601
+ key: user.id,
178602
+ name: user.name,
178603
+ email: user.email,
178604
+ username: user.username,
178605
+ isAdmin: false,
178606
+ }))
178607
+ : userData.map((user) => ({
178608
+ key: user.user_id,
178609
+ name: user.name,
178610
+ email: user.email,
178611
+ username: user.username,
178612
+ isAdmin: user.is_admin,
178613
+ managed: user,
178614
+ }));
178615
+ const totalCount = (_b = (isWatcher ? accessibleUsers === null || accessibleUsers === void 0 ? void 0 : accessibleUsers.count : users === null || users === void 0 ? void 0 : users.count)) !== null && _b !== void 0 ? _b : 0;
178616
+ const totalPages = Math.ceil(totalCount / PAGE_SIZE$9);
178617
+ return (jsxs("div", { className: "mt-4", children: [jsxs("div", { className: "flex justify-between items-center gap-1", children: [jsxs("div", { className: "relative mb-6 max-w-sm", children: [jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }), jsx(Input, { type: "text", value: searchQuery, onChange: (event) => setQuerySearch(event.target.value), placeholder: t('tabsUserstab.searchPlaceholder'), className: "pl-10 pr-10 focus:ring-blue-500 focus:border-blue-500 h-[35px]", "aria-label": t('tabsUserstab.searchAriaLabel') }), searchQuery.length > 0 && (searchQuery !== debouncedSearchQuery || isLoading) && (jsx(LoaderCircle, { "data-testid": "search-spinner", className: "absolute right-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400 animate-spin", "aria-hidden": "true" }))] }), !isWatcher && (jsx("div", { className: "mb-6", children: jsx(Button$1, { className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] hover:opacity-90 text-white h-[35px]", onClick: onInviteClick, children: t('tabsUserstab.inviteButton') }) }))] }), isLoading ? (jsx("div", { className: "flex justify-center items-center h-64", children: jsx(Spinner, {}) })) : (jsxs(Fragment$1, { children: [jsx("div", { className: "bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg overflow-x-auto", children: jsxs("table", { className: "w-full text-sm", children: [jsx("thead", { className: "bg-gray-50 dark:bg-gray-700 border-b border-gray-200 dark:border-gray-600", children: jsxs("tr", { children: [jsx("th", { className: `px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400 ${isWatcher ? 'w-[40%]' : 'w-[16%]'}`, children: t('tabsUserstab.columnName') }), jsx("th", { className: `px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400 ${isWatcher ? 'w-[60%]' : 'w-[25%]'}`, children: t('tabsUserstab.columnEmail') }), !isWatcher && (jsxs(Fragment$1, { children: [jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[16%]", children: t('tabsUserstab.columnRole') }), jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[25%]", children: t('tabsUserstab.columnPolicies') }), jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[18%]", children: t('tabsUserstab.columnStatus') })] }))] }) }), jsxs("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-600", children: [rows.map((row) => {
178618
+ // Only set on the admin path — see {@link UserRow}.
178619
+ const user = row.managed;
178620
+ return (jsxs("tr", { onClick: () => setSelectedUser(row), className: "cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-700/50 transition-colors", children: [jsx("td", { "aria-label": 'user-management-name-column', className: "px-6 py-4 text-gray-900 dark:text-gray-100 text-sm whitespace-nowrap overflow-hidden text-ellipsis max-w-0", children: jsx("button", { type: "button", onClick: (e) => {
178621
+ e.stopPropagation();
178622
+ setSelectedUser(row);
178623
+ }, className: "block max-w-full truncate text-left hover:text-blue-600 hover:underline focus:outline-none focus:text-blue-600", "aria-label": t('tabsUserstab.viewProfileAriaLabel', { name: row.name }), children: row.name }) }), jsx("td", { "aria-label": 'user-management-email-column', className: "px-6 py-4 text-gray-600 dark:text-gray-300 text-sm max-w-0", children: jsx("div", { className: "truncate", children: row.email }) }), user && (jsxs(Fragment$1, { children: [jsx("td", { className: "px-6 py-4", onClick: (e) => e.stopPropagation(), children: jsxs(Select$1, { value: user.is_admin ? 'admin' : 'student', onValueChange: () => handleUserRoleChange(user), children: [jsx(SelectTrigger, { className: "w-full text-sm", children: jsx(SelectValue, {}) }), jsxs(SelectContent, { className: "text-sm", children: [jsx(SelectItem, { value: "admin", children: t('tabsUserstab.roleAdmin') }), jsx(SelectItem, { value: "student", children: t('tabsUserstab.roleUser') })] })] }) }), jsx("td", { className: "px-6 py-4", onClick: (e) => e.stopPropagation(), children: jsxs(Popover, { modal: true, open: openPolicyPopover === user.user_id, onOpenChange: (open) => setOpenPolicyPopover(open ? user.user_id : null), children: [jsx(PopoverTrigger, { asChild: true, children: jsxs(Button$1, { variant: "outline", role: "combobox", "aria-expanded": openPolicyPopover === user.user_id, "aria-label": t('tabsUserstab.selectPoliciesAriaLabel', {
178624
+ name: user.name,
178625
+ }), className: "w-full justify-between text-sm h-9 font-normal", disabled: updatingUserIds.has(user === null || user === void 0 ? void 0 : user.user_id), children: [jsx("span", { className: "truncate", children: user.is_admin
178626
+ ? t('tabsUserstab.allPoliciesSelected', {
178627
+ count: allowedPolicies.length,
178628
+ })
178629
+ : user.policies && user.policies.length > 0
178630
+ ? t('tabsUserstab.nPoliciesSelected', {
178631
+ count: user.policies.length,
178632
+ })
178633
+ : t('tabsUserstab.noPolicies') }), openPolicyPopover === user.user_id ? (jsx(ChevronUp, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })) : (jsx(ChevronDown, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" }))] }) }), jsx(PopoverContent, { className: "w-64 p-3", align: "start", children: jsxs("div", { className: "space-y-2", children: [jsx("div", { className: "text-sm font-medium mb-2", children: t('tabsUserstab.selectPoliciesHeading') }), allowedPolicies.map((policy) => {
178634
+ var _a;
178635
+ return (jsxs("div", { className: "flex items-center space-x-2", children: [jsx(Checkbox, { id: `${user.user_id}-${policy}`, checked: user.is_admin || ((_a = user.policies) === null || _a === void 0 ? void 0 : _a.includes(policy)), onCheckedChange: (checked) => handlePolicyChange(user, policy, checked), disabled: user.is_admin || updatingUserIds.has(user === null || user === void 0 ? void 0 : user.user_id), "aria-label": t('tabsUserstab.togglePolicyAriaLabel', {
178636
+ policy,
178637
+ name: user.name,
178638
+ }) }), jsx("label", { htmlFor: `${user.user_id}-${policy}`, className: `text-sm font-normal ${user.is_admin ? 'cursor-default' : 'cursor-pointer'}`, children: policy })] }, policy));
178639
+ })] }) })] }) }), jsx("td", { className: "px-6 py-4", onClick: (e) => e.stopPropagation(), children: jsx(Switch, { checked: user.active, onCheckedChange: (checked) => handleUserStatusChange(user, checked), disabled: updatingUserIds.has(user === null || user === void 0 ? void 0 : user.user_id), "aria-label": t('tabsUserstab.toggleStatusAriaLabel', {
178355
178640
  name: user.name,
178356
- }), className: "w-full justify-between text-sm h-9 font-normal", disabled: updatingUserIds.has(user === null || user === void 0 ? void 0 : user.user_id), children: [jsx("span", { className: "truncate", children: user.is_admin
178357
- ? t('tabsUserstab.allPoliciesSelected', {
178358
- count: allowedPolicies.length,
178359
- })
178360
- : user.policies && user.policies.length > 0
178361
- ? t('tabsUserstab.nPoliciesSelected', {
178362
- count: user.policies.length,
178363
- })
178364
- : t('tabsUserstab.noPolicies') }), openPolicyPopover === user.user_id ? (jsx(ChevronUp, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })) : (jsx(ChevronDown, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" }))] }) }), jsx(PopoverContent, { className: "w-64 p-3", align: "start", children: jsxs("div", { className: "space-y-2", children: [jsx("div", { className: "text-sm font-medium mb-2", children: t('tabsUserstab.selectPoliciesHeading') }), allowedPolicies.map((policy) => {
178365
- var _a;
178366
- return (jsxs("div", { className: "flex items-center space-x-2", children: [jsx(Checkbox, { id: `${user.user_id}-${policy}`, checked: user.is_admin || ((_a = user.policies) === null || _a === void 0 ? void 0 : _a.includes(policy)), onCheckedChange: (checked) => handlePolicyChange(user, policy, checked), disabled: user.is_admin || updatingUserIds.has(user === null || user === void 0 ? void 0 : user.user_id), "aria-label": t('tabsUserstab.togglePolicyAriaLabel', {
178367
- policy,
178368
- name: user.name,
178369
- }) }), jsx("label", { htmlFor: `${user.user_id}-${policy}`, className: `text-sm font-normal ${user.is_admin ? 'cursor-default' : 'cursor-pointer'}`, children: policy })] }, policy));
178370
- })] }) })] }) }), jsx("td", { className: "px-6 py-4", onClick: (e) => e.stopPropagation(), children: jsx(Switch, { checked: user.active, onCheckedChange: (checked) => handleUserStatusChange(user, checked), disabled: updatingUserIds.has(user === null || user === void 0 ? void 0 : user.user_id), "aria-label": t('tabsUserstab.toggleStatusAriaLabel', { name: user.name }), className: "cursor-pointer data-[state=checked]:bg-blue-500 disabled:cursor-not-allowed disabled:opacity-50" }) })] }, index))), (!userData || userData.length === 0) && (jsx("tr", { children: jsx("td", { colSpan: 5, className: "px-6 py-8 text-center text-gray-500 dark:text-gray-400", children: t('tabsUserstab.noUsersFound') }) }))] })] }) }), jsx(AdvancedPagination, { variant: "footer", className: "-mx-6 -mb-6 mt-4 rounded-b-lg", totalPages: totalPages, currentPage: page, onPageChange: (_page) => handlePageChange(_page), totalCount: users === null || users === void 0 ? void 0 : users.count, itemsPerPage: 10, itemLabel: "users" })] })), selectedUser && (jsx(Dialog, { open: !!selectedUser, onOpenChange: (open) => {
178641
+ }), className: "cursor-pointer data-[state=checked]:bg-blue-500 disabled:cursor-not-allowed disabled:opacity-50" }) })] }))] }, row.key));
178642
+ }), rows.length === 0 && (jsx("tr", { children: jsx("td", { colSpan: isWatcher ? 2 : 5, className: "px-6 py-8 text-center text-gray-500 dark:text-gray-400", children: t('tabsUserstab.noUsersFound') }) }))] })] }) }), jsx(AdvancedPagination, { variant: "footer", className: "-mx-6 -mb-6 mt-4 rounded-b-lg", totalPages: totalPages, currentPage: page, onPageChange: (_page) => handlePageChange(_page), totalCount: totalCount, itemsPerPage: PAGE_SIZE$9, itemLabel: "users" })] })), selectedUser && (jsx(Dialog, { open: !!selectedUser, onOpenChange: (open) => {
178371
178643
  if (!open)
178372
178644
  setSelectedUser(null);
178373
- }, children: jsxs(DialogContent, { autoFocus: false, className: "max-w-7xl w-[85vw] p-0 gap-0 overflow-hidden bg-white profile-component-dialog", style: { height: '85vh', display: 'flex', flexDirection: 'column' }, children: [jsx(DialogTitle, { className: "sr-only", children: t('tabsUserstab.profileDialogTitle') }), jsx(DialogDescription, { className: "sr-only", children: t('tabsUserstab.profileDialogDescription') }), jsx(Profile, { tenant: tenant, tenants: [], username: selectedUser.username, isAdmin: selectedUser.is_admin, currentSPA: currentSpa, onClose: () => setSelectedUser(null), customization: {
178645
+ }, children: jsxs(DialogContent, { autoFocus: false, className: "max-w-7xl w-[85vw] p-0 gap-0 overflow-hidden bg-white profile-component-dialog", style: { height: '85vh', display: 'flex', flexDirection: 'column' }, children: [jsx(DialogTitle, { className: "sr-only", children: t('tabsUserstab.profileDialogTitle') }), jsx(DialogDescription, { className: "sr-only", children: t('tabsUserstab.profileDialogDescription') }), jsx(Profile, { tenant: tenant, tenants: [], username: selectedUser.username, isAdmin: selectedUser.isAdmin, currentSPA: currentSpa, onClose: () => setSelectedUser(null), customization: {
178374
178646
  showGradebookTab: showGradebookTab,
178375
- } })] }) }))] }));
178647
+ }, enableMemoryTab: true })] }) }))] }));
178376
178648
  }
178377
178649
 
178378
178650
  // Permission options for teams access
@@ -251993,6 +252265,147 @@ function Markdown({ children, className }) {
251993
252265
  const AnalyticsSettingsContext = createContext({});
251994
252266
  AnalyticsSettingsContext.Provider;
251995
252267
 
252268
+ /**
252269
+ * Core agent search hook — thin wrapper around `useGetAiSearchMentorsQuery`.
252270
+ *
252271
+ * This is the low-level building block. For a higher-level hook that manages
252272
+ * search state, debounce, and pagination controls, use
252273
+ * `useAgentSearchWithPagination`.
252274
+ */
252275
+ function useAgentSearch({ tenantKey, query, limit = 6, offset, starred, featured, category, subjects, llm, types, includeMainPublicMentors, orderDirection, skip = false, }) {
252276
+ var _a, _b, _c;
252277
+ const { data, isLoading, isFetching, refetch } = useGetAiSearchMentorsQuery({
252278
+ platform_key: tenantKey,
252279
+ query: query || undefined,
252280
+ limit,
252281
+ ...(offset !== undefined && { offset }),
252282
+ ...(starred !== undefined && { starred }),
252283
+ ...(featured !== undefined && { featured }),
252284
+ ...(category && { category }),
252285
+ ...(subjects && { subjects }),
252286
+ ...(llm && { llm }),
252287
+ ...(types && { types }),
252288
+ ...(includeMainPublicMentors !== undefined && {
252289
+ include_main_public_mentors: includeMainPublicMentors,
252290
+ }),
252291
+ ...(orderDirection && { order_direction: orderDirection }),
252292
+ }, { skip: skip || !tenantKey });
252293
+ return {
252294
+ agents: ((_a = data === null || data === void 0 ? void 0 : data.results) !== null && _a !== void 0 ? _a : []),
252295
+ facets: data === null || data === void 0 ? void 0 : data.facets,
252296
+ hasMore: !!(data === null || data === void 0 ? void 0 : data.next),
252297
+ totalCount: (_b = data === null || data === void 0 ? void 0 : data.count) !== null && _b !== void 0 ? _b : 0,
252298
+ totalPages: (_c = data === null || data === void 0 ? void 0 : data.total_pages) !== null && _c !== void 0 ? _c : 0,
252299
+ isLoading,
252300
+ isFetching,
252301
+ refetch,
252302
+ };
252303
+ }
252304
+
252305
+ function c$3(e,u,c){var i=this,a=useRef(null),o=useRef(0),f=useRef(null),l=useRef([]),v=useRef(),m=useRef(),d=useRef(e),g=useRef(true);d.current=e;var p="undefined"!=typeof window,w=!u&&0!==u&&p;if("function"!=typeof e)throw new TypeError("Expected a function");u=+u||0;var s=!!(c=c||{}).leading,x=!("trailing"in c)||!!c.trailing,h="maxWait"in c,y="debounceOnServer"in c&&!!c.debounceOnServer,F=h?Math.max(+c.maxWait||0,u):null;useEffect(function(){return g.current=true,function(){g.current=false;}},[]);var A=useMemo(function(){var r=function(r){var n=l.current,t=v.current;return l.current=v.current=null,o.current=r,m.current=d.current.apply(t,n)},n=function(r,n){w&&cancelAnimationFrame(f.current),f.current=w?requestAnimationFrame(r):setTimeout(r,n);},t=function(r){if(!g.current)return false;var n=r-a.current;return !a.current||n>=u||n<0||h&&r-o.current>=F},e=function(n){return f.current=null,x&&l.current?r(n):(l.current=v.current=null,m.current)},c=function r(){var c=Date.now();if(t(c))return e(c);if(g.current){var i=u-(c-a.current),f=h?Math.min(i,F-(c-o.current)):i;n(r,f);}},A=function(){if(p||y){var e=Date.now(),d=t(e);if(l.current=[].slice.call(arguments),v.current=i,a.current=e,d){if(!f.current&&g.current)return o.current=a.current,n(c,u),s?r(a.current):m.current;if(h)return n(c,u),r(a.current)}return f.current||n(c,u),m.current}};return A.cancel=function(){f.current&&(w?cancelAnimationFrame(f.current):clearTimeout(f.current)),o.current=0,l.current=a.current=v.current=f.current=null;},A.isPending=function(){return !!f.current},A.flush=function(){return f.current?e(Date.now()):m.current},A},[s,h,u,F,x,w,p,y]);return A}function i$8(r,n){return r===n}function a$3(n,t,a){var o=i$8,f=useRef(n),l=useState({})[1],v=c$3(useCallback(function(r){f.current=r,l({});},[l]),t,a),m=useRef(n);return o(m.current,n)||(v(n),m.current=n),[f.current,v]}
252306
+
252307
+ /**
252308
+ * Higher-level agent search hook that manages search state, debounce, and
252309
+ * pagination controls on top of `useAgentSearch`.
252310
+ *
252311
+ * Use this for simple list/table views (MyMentorsModal, SettingsModal).
252312
+ * For the full explore page with sections, use `useAgentSearch` directly.
252313
+ */
252314
+ function useAgentSearchWithPagination({ itemsPerPage = 6, paginationMode = 'paginated', debounceMs = 500, ...queryConfig }) {
252315
+ const [searchQuery, setSearchQuery] = React__default.useState('');
252316
+ const [debouncedQuery] = a$3(searchQuery, debounceMs);
252317
+ const [currentPage, setCurrentPage] = React__default.useState(1);
252318
+ const [infiniteLimit, setInfiniteLimit] = React__default.useState(itemsPerPage);
252319
+ // Reset pagination when search changes
252320
+ React__default.useEffect(() => {
252321
+ setCurrentPage(1);
252322
+ setInfiniteLimit(itemsPerPage);
252323
+ }, [debouncedQuery, itemsPerPage]);
252324
+ const isPaginated = paginationMode === 'paginated';
252325
+ const result = useAgentSearch({
252326
+ ...queryConfig,
252327
+ query: debouncedQuery,
252328
+ limit: isPaginated ? itemsPerPage : infiniteLimit,
252329
+ offset: isPaginated ? (currentPage - 1) * itemsPerPage : undefined,
252330
+ });
252331
+ const totalPages = Math.ceil(result.totalCount / itemsPerPage);
252332
+ const handlePageChange = React__default.useCallback((page) => {
252333
+ setCurrentPage(page);
252334
+ }, []);
252335
+ const loadMore = React__default.useCallback(() => {
252336
+ setInfiniteLimit((prev) => prev + itemsPerPage);
252337
+ }, [itemsPerPage]);
252338
+ return {
252339
+ ...result,
252340
+ searchQuery,
252341
+ setSearchQuery,
252342
+ debouncedQuery,
252343
+ currentPage,
252344
+ totalPages,
252345
+ handlePageChange,
252346
+ loadMore,
252347
+ };
252348
+ }
252349
+
252350
+ /**
252351
+ * Hook for starring / un-starring agents.
252352
+ *
252353
+ * Extracted so the star logic can be shared by any component that renders
252354
+ * agent cards with a favorite toggle.
252355
+ */
252356
+ function useAgentStar({ tenantKey, username, onUnauthenticatedAction, }) {
252357
+ const [starAgent] = useStarMentorMutation();
252358
+ const [unstarAgent] = useUnstarMentorMutation();
252359
+ const [togglingAgentId, setTogglingAgentId] = React__default.useState(null);
252360
+ const toggleFavorite = React__default.useCallback(async (agent, event) => {
252361
+ event.stopPropagation();
252362
+ if (!username) {
252363
+ onUnauthenticatedAction === null || onUnauthenticatedAction === void 0 ? void 0 : onUnauthenticatedAction();
252364
+ return;
252365
+ }
252366
+ if (!tenantKey)
252367
+ return;
252368
+ setTogglingAgentId(String(agent.id));
252369
+ try {
252370
+ const mutation = agent.starred ? unstarAgent : starAgent;
252371
+ await mutation({
252372
+ org: tenantKey,
252373
+ // @ts-expect-error userId param type mismatch in data-layer
252374
+ userId: username,
252375
+ mentor: agent.unique_id || '',
252376
+ }).unwrap();
252377
+ }
252378
+ catch (error) {
252379
+ console.error('Error toggling favorite:', error);
252380
+ }
252381
+ finally {
252382
+ setTogglingAgentId(null);
252383
+ }
252384
+ }, [username, tenantKey, starAgent, unstarAgent, onUnauthenticatedAction]);
252385
+ return { toggleFavorite, togglingAgentId };
252386
+ }
252387
+
252388
+ function MentorSelectionGrid({ selectedMentorIds, onMentorSelect, searchQuery, onSearchChange, tenantKey, itemsPerPage = 8, showSearch = true, minHeight = '400px', }) {
252389
+ const t = useT();
252390
+ const { agents: mentors, isLoading: isMentorsLoading, isFetching: isMentorsFetching, currentPage, totalPages, setSearchQuery: setMentorSearch, handlePageChange, } = useAgentSearchWithPagination({ tenantKey, itemsPerPage });
252391
+ // Update search query with debounce effect handled by the hook
252392
+ React__default.useEffect(() => {
252393
+ setMentorSearch(searchQuery);
252394
+ }, [searchQuery]);
252395
+ const isMentorSelected = (mentorId) => {
252396
+ return selectedMentorIds.includes(mentorId);
252397
+ };
252398
+ return (jsxs("div", { className: "space-y-4", children: [showSearch && (jsxs("div", { className: "relative", children: [isMentorsFetching ? (jsx(Spinner, { className: "absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2 transform text-gray-400" })) : (jsx(Search, { className: "absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2 transform text-gray-400" })), jsx(Input, { placeholder: t('mentorsMentorSelectionGrid.searchAgentsPlaceholder'), value: searchQuery, onChange: (e) => onSearchChange(e.target.value), className: "h-10 border-gray-200 pl-10 focus:border-blue-500 focus:ring-0" })] })), jsxs("div", { className: "space-y-4", children: [jsx("div", { className: "grid max-h-96 auto-rows-min grid-cols-1 items-start gap-3 overflow-y-auto rounded-lg border border-gray-200 p-4 md:max-h-none md:grid-cols-2", style: { minHeight }, children: isMentorsLoading ? (jsx("div", { className: "col-span-full py-8 text-center text-gray-500", children: t('mentorsMentorSelectionGrid.loadingAgents') })) : mentors.length === 0 ? (jsx("div", { className: "col-span-full py-8 text-center text-gray-500", children: t('mentorsMentorSelectionGrid.noAgentsFound') })) : (mentors.map((mentor) => {
252399
+ const isSelected = isMentorSelected(mentor.unique_id || '');
252400
+ const isAlreadyAdded = selectedMentorIds.includes(mentor.unique_id || '');
252401
+ return (jsxs("button", { onClick: () => onMentorSelect(mentor), className: `flex cursor-pointer items-center gap-3 rounded-lg border-2 p-3 transition-all ${isSelected
252402
+ ? 'border-blue-500 bg-blue-50'
252403
+ : isAlreadyAdded
252404
+ ? 'bg-blue-25 border-blue-300'
252405
+ : 'border-gray-200 hover:border-gray-300 hover:bg-gray-50'}`, children: [jsxs(Avatar, { className: "h-12 w-12 flex-shrink-0", children: [jsx(AvatarImage, { src: mentor.profile_image || '/placeholder.svg', alt: mentor.name }), jsx(AvatarFallback, { children: mentor.name.substring(0, 2) })] }), jsxs("div", { className: "flex min-w-0 flex-1 flex-col justify-start text-left", children: [jsx("h4", { className: "truncate text-sm font-medium text-gray-900", children: mentor.name }), jsx("p", { className: "line-clamp-2 text-xs text-gray-600", children: mentor.description })] }), isSelected && (jsx("div", { className: "flex-shrink-0", children: jsx("div", { className: "flex h-6 w-6 items-center justify-center rounded-full bg-blue-600", children: jsx(Check, { className: "h-4 w-4 text-white" }) }) })), isAlreadyAdded && !isSelected && (jsx("div", { className: "flex-shrink-0", children: jsx("div", { className: "flex h-6 w-6 items-center justify-center rounded-full bg-blue-400", children: jsx(Check, { className: "h-4 w-4 text-white" }) }) }))] }, mentor.unique_id));
252406
+ })) }), jsx(IblPagination, { currentPage: currentPage, totalPages: totalPages, onPageChange: handlePageChange, disabled: isMentorsFetching || isMentorsLoading })] })] }));
252407
+ }
252408
+
251996
252409
  const SkeletonMultiplier = ({ Skeleton, multiplier }) => {
251997
252410
  return (jsx(Fragment$1, { children: Array.from({ length: multiplier }).map((_, index) => (jsx(Skeleton, {}, index))) }));
251998
252411
  };
@@ -253724,8 +254137,6 @@ function useSlashSkillPicker({ inputValue, setInputValue, skills, isLoading = fa
253724
254137
  };
253725
254138
  }
253726
254139
 
253727
- function c$3(e,u,c){var i=this,a=useRef(null),o=useRef(0),f=useRef(null),l=useRef([]),v=useRef(),m=useRef(),d=useRef(e),g=useRef(true);d.current=e;var p="undefined"!=typeof window,w=!u&&0!==u&&p;if("function"!=typeof e)throw new TypeError("Expected a function");u=+u||0;var s=!!(c=c||{}).leading,x=!("trailing"in c)||!!c.trailing,h="maxWait"in c,y="debounceOnServer"in c&&!!c.debounceOnServer,F=h?Math.max(+c.maxWait||0,u):null;useEffect(function(){return g.current=true,function(){g.current=false;}},[]);var A=useMemo(function(){var r=function(r){var n=l.current,t=v.current;return l.current=v.current=null,o.current=r,m.current=d.current.apply(t,n)},n=function(r,n){w&&cancelAnimationFrame(f.current),f.current=w?requestAnimationFrame(r):setTimeout(r,n);},t=function(r){if(!g.current)return false;var n=r-a.current;return !a.current||n>=u||n<0||h&&r-o.current>=F},e=function(n){return f.current=null,x&&l.current?r(n):(l.current=v.current=null,m.current)},c=function r(){var c=Date.now();if(t(c))return e(c);if(g.current){var i=u-(c-a.current),f=h?Math.min(i,F-(c-o.current)):i;n(r,f);}},A=function(){if(p||y){var e=Date.now(),d=t(e);if(l.current=[].slice.call(arguments),v.current=i,a.current=e,d){if(!f.current&&g.current)return o.current=a.current,n(c,u),s?r(a.current):m.current;if(h)return n(c,u),r(a.current)}return f.current||n(c,u),m.current}};return A.cancel=function(){f.current&&(w?cancelAnimationFrame(f.current):clearTimeout(f.current)),o.current=0,l.current=a.current=v.current=f.current=null;},A.isPending=function(){return !!f.current},A.flush=function(){return f.current?e(Date.now()):m.current},A},[s,h,u,F,x,w,p,y]);return A}function i$8(r,n){return r===n}function a$3(n,t,a){var o=i$8,f=useRef(n),l=useState({})[1],v=c$3(useCallback(function(r){f.current=r,l({});},[l]),t,a),m=useRef(n);return o(m.current,n)||(v(n),m.current=n),[f.current,v]}
253728
-
253729
254140
  lazy(() => Promise.resolve().then(function () { return createProjectModal; }).then((mod) => ({
253730
254141
  default: mod.CreateProjectModal,
253731
254142
  })));
@@ -256129,145 +256540,6 @@ var minimumMentorAlert = /*#__PURE__*/Object.freeze({
256129
256540
  MinimumMentorAlert: MinimumMentorAlert
256130
256541
  });
256131
256542
 
256132
- /**
256133
- * Core agent search hook — thin wrapper around `useGetAiSearchMentorsQuery`.
256134
- *
256135
- * This is the low-level building block. For a higher-level hook that manages
256136
- * search state, debounce, and pagination controls, use
256137
- * `useAgentSearchWithPagination`.
256138
- */
256139
- function useAgentSearch({ tenantKey, query, limit = 6, offset, starred, featured, category, subjects, llm, types, includeMainPublicMentors, orderDirection, skip = false, }) {
256140
- var _a, _b, _c;
256141
- const { data, isLoading, isFetching, refetch } = useGetAiSearchMentorsQuery({
256142
- platform_key: tenantKey,
256143
- query: query || undefined,
256144
- limit,
256145
- ...(offset !== undefined && { offset }),
256146
- ...(starred !== undefined && { starred }),
256147
- ...(featured !== undefined && { featured }),
256148
- ...(category && { category }),
256149
- ...(subjects && { subjects }),
256150
- ...(llm && { llm }),
256151
- ...(types && { types }),
256152
- ...(includeMainPublicMentors !== undefined && {
256153
- include_main_public_mentors: includeMainPublicMentors,
256154
- }),
256155
- ...(orderDirection && { order_direction: orderDirection }),
256156
- }, { skip: skip || !tenantKey });
256157
- return {
256158
- agents: ((_a = data === null || data === void 0 ? void 0 : data.results) !== null && _a !== void 0 ? _a : []),
256159
- facets: data === null || data === void 0 ? void 0 : data.facets,
256160
- hasMore: !!(data === null || data === void 0 ? void 0 : data.next),
256161
- totalCount: (_b = data === null || data === void 0 ? void 0 : data.count) !== null && _b !== void 0 ? _b : 0,
256162
- totalPages: (_c = data === null || data === void 0 ? void 0 : data.total_pages) !== null && _c !== void 0 ? _c : 0,
256163
- isLoading,
256164
- isFetching,
256165
- refetch,
256166
- };
256167
- }
256168
-
256169
- /**
256170
- * Higher-level agent search hook that manages search state, debounce, and
256171
- * pagination controls on top of `useAgentSearch`.
256172
- *
256173
- * Use this for simple list/table views (MyMentorsModal, SettingsModal).
256174
- * For the full explore page with sections, use `useAgentSearch` directly.
256175
- */
256176
- function useAgentSearchWithPagination({ itemsPerPage = 6, paginationMode = 'paginated', debounceMs = 500, ...queryConfig }) {
256177
- const [searchQuery, setSearchQuery] = React__default.useState('');
256178
- const [debouncedQuery] = a$3(searchQuery, debounceMs);
256179
- const [currentPage, setCurrentPage] = React__default.useState(1);
256180
- const [infiniteLimit, setInfiniteLimit] = React__default.useState(itemsPerPage);
256181
- // Reset pagination when search changes
256182
- React__default.useEffect(() => {
256183
- setCurrentPage(1);
256184
- setInfiniteLimit(itemsPerPage);
256185
- }, [debouncedQuery, itemsPerPage]);
256186
- const isPaginated = paginationMode === 'paginated';
256187
- const result = useAgentSearch({
256188
- ...queryConfig,
256189
- query: debouncedQuery,
256190
- limit: isPaginated ? itemsPerPage : infiniteLimit,
256191
- offset: isPaginated ? (currentPage - 1) * itemsPerPage : undefined,
256192
- });
256193
- const totalPages = Math.ceil(result.totalCount / itemsPerPage);
256194
- const handlePageChange = React__default.useCallback((page) => {
256195
- setCurrentPage(page);
256196
- }, []);
256197
- const loadMore = React__default.useCallback(() => {
256198
- setInfiniteLimit((prev) => prev + itemsPerPage);
256199
- }, [itemsPerPage]);
256200
- return {
256201
- ...result,
256202
- searchQuery,
256203
- setSearchQuery,
256204
- debouncedQuery,
256205
- currentPage,
256206
- totalPages,
256207
- handlePageChange,
256208
- loadMore,
256209
- };
256210
- }
256211
-
256212
- /**
256213
- * Hook for starring / un-starring agents.
256214
- *
256215
- * Extracted so the star logic can be shared by any component that renders
256216
- * agent cards with a favorite toggle.
256217
- */
256218
- function useAgentStar({ tenantKey, username, onUnauthenticatedAction, }) {
256219
- const [starAgent] = useStarMentorMutation();
256220
- const [unstarAgent] = useUnstarMentorMutation();
256221
- const [togglingAgentId, setTogglingAgentId] = React__default.useState(null);
256222
- const toggleFavorite = React__default.useCallback(async (agent, event) => {
256223
- event.stopPropagation();
256224
- if (!username) {
256225
- onUnauthenticatedAction === null || onUnauthenticatedAction === void 0 ? void 0 : onUnauthenticatedAction();
256226
- return;
256227
- }
256228
- if (!tenantKey)
256229
- return;
256230
- setTogglingAgentId(String(agent.id));
256231
- try {
256232
- const mutation = agent.starred ? unstarAgent : starAgent;
256233
- await mutation({
256234
- org: tenantKey,
256235
- // @ts-expect-error userId param type mismatch in data-layer
256236
- userId: username,
256237
- mentor: agent.unique_id || '',
256238
- }).unwrap();
256239
- }
256240
- catch (error) {
256241
- console.error('Error toggling favorite:', error);
256242
- }
256243
- finally {
256244
- setTogglingAgentId(null);
256245
- }
256246
- }, [username, tenantKey, starAgent, unstarAgent, onUnauthenticatedAction]);
256247
- return { toggleFavorite, togglingAgentId };
256248
- }
256249
-
256250
- function MentorSelectionGrid({ selectedMentorIds, onMentorSelect, searchQuery, onSearchChange, tenantKey, itemsPerPage = 8, showSearch = true, minHeight = '400px', }) {
256251
- const t = useT();
256252
- const { agents: mentors, isLoading: isMentorsLoading, isFetching: isMentorsFetching, currentPage, totalPages, setSearchQuery: setMentorSearch, handlePageChange, } = useAgentSearchWithPagination({ tenantKey, itemsPerPage });
256253
- // Update search query with debounce effect handled by the hook
256254
- React__default.useEffect(() => {
256255
- setMentorSearch(searchQuery);
256256
- }, [searchQuery]);
256257
- const isMentorSelected = (mentorId) => {
256258
- return selectedMentorIds.includes(mentorId);
256259
- };
256260
- return (jsxs("div", { className: "space-y-4", children: [showSearch && (jsxs("div", { className: "relative", children: [isMentorsFetching ? (jsx(Spinner, { className: "absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2 transform text-gray-400" })) : (jsx(Search, { className: "absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2 transform text-gray-400" })), jsx(Input, { placeholder: t('mentorsMentorSelectionGrid.searchAgentsPlaceholder'), value: searchQuery, onChange: (e) => onSearchChange(e.target.value), className: "h-10 border-gray-200 pl-10 focus:border-blue-500 focus:ring-0" })] })), jsxs("div", { className: "space-y-4", children: [jsx("div", { className: "grid max-h-96 auto-rows-min grid-cols-1 items-start gap-3 overflow-y-auto rounded-lg border border-gray-200 p-4 md:max-h-none md:grid-cols-2", style: { minHeight }, children: isMentorsLoading ? (jsx("div", { className: "col-span-full py-8 text-center text-gray-500", children: t('mentorsMentorSelectionGrid.loadingAgents') })) : mentors.length === 0 ? (jsx("div", { className: "col-span-full py-8 text-center text-gray-500", children: t('mentorsMentorSelectionGrid.noAgentsFound') })) : (mentors.map((mentor) => {
256261
- const isSelected = isMentorSelected(mentor.unique_id || '');
256262
- const isAlreadyAdded = selectedMentorIds.includes(mentor.unique_id || '');
256263
- return (jsxs("button", { onClick: () => onMentorSelect(mentor), className: `flex cursor-pointer items-center gap-3 rounded-lg border-2 p-3 transition-all ${isSelected
256264
- ? 'border-blue-500 bg-blue-50'
256265
- : isAlreadyAdded
256266
- ? 'bg-blue-25 border-blue-300'
256267
- : 'border-gray-200 hover:border-gray-300 hover:bg-gray-50'}`, children: [jsxs(Avatar, { className: "h-12 w-12 flex-shrink-0", children: [jsx(AvatarImage, { src: mentor.profile_image || '/placeholder.svg', alt: mentor.name }), jsx(AvatarFallback, { children: mentor.name.substring(0, 2) })] }), jsxs("div", { className: "flex min-w-0 flex-1 flex-col justify-start text-left", children: [jsx("h4", { className: "truncate text-sm font-medium text-gray-900", children: mentor.name }), jsx("p", { className: "line-clamp-2 text-xs text-gray-600", children: mentor.description })] }), isSelected && (jsx("div", { className: "flex-shrink-0", children: jsx("div", { className: "flex h-6 w-6 items-center justify-center rounded-full bg-blue-600", children: jsx(Check, { className: "h-4 w-4 text-white" }) }) })), isAlreadyAdded && !isSelected && (jsx("div", { className: "flex-shrink-0", children: jsx("div", { className: "flex h-6 w-6 items-center justify-center rounded-full bg-blue-400", children: jsx(Check, { className: "h-4 w-4 text-white" }) }) }))] }, mentor.unique_id));
256268
- })) }), jsx(IblPagination, { currentPage: currentPage, totalPages: totalPages, onPageChange: handlePageChange, disabled: isMentorsFetching || isMentorsLoading })] })] }));
256269
- }
256270
-
256271
256543
  function CreateProjectModal$1({ isOpen, onClose, tenantKey, username, navigateToMentorInProject, }) {
256272
256544
  const t = useT();
256273
256545
  const dispatch = useDispatch();
@@ -262487,7 +262759,7 @@ function PlatformSidebarFooter({ collapsed, config, }) {
262487
262759
  * defined for completeness so adding "Organization" later is a one-line
262488
262760
  * change.
262489
262761
  */
262490
- function PlatformAccountSheet({ tab, onClose, tenantKey, username, email, onInviteClick, mainPlatformKey, authUrl, currentSpa, platformBaseDomain, }) {
262762
+ function PlatformAccountSheet({ tab, onClose, tenantKey, username, email, onInviteClick, mainPlatformKey, authUrl, currentSpa, platformBaseDomain, showGradebookTab = false, }) {
262491
262763
  const t = useT();
262492
262764
  const open = tab !== null;
262493
262765
  const accountTabTitles = {
@@ -262510,7 +262782,7 @@ function PlatformAccountSheet({ tab, onClose, tenantKey, username, email, onInvi
262510
262782
  // RBAC is off for this entry point — admin users see every
262511
262783
  // sub-tab. Tenant-level access is already gated by the
262512
262784
  // sidebar footer visibility rules.
262513
- hasUserTabPermission: true, hasGroupsTabPermission: true, hasRolesTabPermission: true, hasPoliciesTabPermission: true, hasTeamsTabPermission: true, hasAlertsTabPermission: true, hasInviteUserPermission: true, hasCreateTeamPermission: true, enableRbac: false, rbacPermissions: {} })), tab === 'integrations' && jsx(IntegrationsTab, { tenantKey: tenantKey, username: username }), tab === 'billing' && (jsx(BillingTab, { tenant: tenantKey, username: username, mainPlatformKey: mainPlatformKey, currentUserEmail: email })), tab === 'monetization' && jsx(MonetizationTab, { platformKey: tenantKey, authURL: authUrl }), tab === 'advanced' && (jsx(AdvancedTab, { platformKey: tenantKey, username: username, currentSPA: currentSpa, authURL: authUrl, currentPlatformBaseDomain: platformBaseDomain }))] })] }) }));
262785
+ hasUserTabPermission: true, hasGroupsTabPermission: true, hasRolesTabPermission: true, hasPoliciesTabPermission: true, hasTeamsTabPermission: true, hasAlertsTabPermission: true, hasInviteUserPermission: true, hasCreateTeamPermission: true, enableRbac: false, rbacPermissions: {}, showGradebookTab: showGradebookTab })), tab === 'integrations' && jsx(IntegrationsTab, { tenantKey: tenantKey, username: username }), tab === 'billing' && (jsx(BillingTab, { tenant: tenantKey, username: username, mainPlatformKey: mainPlatformKey, currentUserEmail: email })), tab === 'monetization' && jsx(MonetizationTab, { platformKey: tenantKey, authURL: authUrl }), tab === 'advanced' && (jsx(AdvancedTab, { platformKey: tenantKey, username: username, currentSPA: currentSpa, authURL: authUrl, currentPlatformBaseDomain: platformBaseDomain }))] })] }) }));
262514
262786
  }
262515
262787
 
262516
262788
  /**
@@ -265070,6 +265342,7 @@ const ANALYTICS_HUB_ICONS = {
265070
265342
  users: Users,
265071
265343
  topics: MessageSquare,
265072
265344
  transcripts: FileText,
265345
+ memory: Brain,
265073
265346
  financial: DollarSign,
265074
265347
  audit: ScrollText,
265075
265348
  reports: ChartColumn,
@@ -265084,6 +265357,7 @@ const ANALYTICS_HUB_ORDER = [
265084
265357
  { value: 'users', key: 'users' },
265085
265358
  { value: 'topics', key: 'topics' },
265086
265359
  { value: 'transcripts', key: 'transcripts' },
265360
+ { value: 'memory', key: 'memory' },
265087
265361
  { value: 'financial', key: 'financial' },
265088
265362
  { value: 'audit', key: 'audit' },
265089
265363
  { value: 'reports', key: 'reports' },
@@ -265119,6 +265393,10 @@ const AGENT_ANALYTICS_TAB_LABELS = {
265119
265393
  label: 'Transcripts',
265120
265394
  description: 'Read full conversation transcripts message by message.',
265121
265395
  },
265396
+ memory: {
265397
+ label: 'Memory',
265398
+ description: 'What this agent remembers about each user it talks to.',
265399
+ },
265122
265400
  financial: {
265123
265401
  label: 'Costs',
265124
265402
  description: 'Track token usage and what this agent is costing you.',