@iblai/iblai-js 1.26.2 → 1.26.4

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,7 +2,7 @@ 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, useCallback, useReducer, useRef, useImperativeHandle, 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, useGetRbacPoliciesQuery, useCreateRbacPolicyMutation, useUpdateRbacPolicyMutation, useDeleteRbacPolicyMutation, useGetRbacPolicyDetailsQuery, useGetWatchedGroupsQuery, useCreateWatchedGroupMutation, useUpdateWatchedGroupMutation, useDeleteWatchedGroupMutation, useAddWatchedUserMutation, useRemoveWatchedUserMutation, useAddWatcherMutation, useUpdateWatcherMutation, useDeleteWatcherMutation, useGetWatchedUsersQuery, useGetWatchersQuery, WATCHER_NOTIFICATION_EVENTS, WATCHER_NOTIFICATION_EVENT_LABELS, useDeleteApiKeyMutation, useGetApiKeysQuery, 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, useGetCustomMentorsQuery, useGetStripeConnectStatusQuery, useStartStripeConnectOnboardingMutation, useLazyGetStripeConnectDashboardQuery, useGetAiSearchMentorsQuery, useListPaywallsQuery, useListPricesQuery, useCreatePriceMutation, useUpdatePriceMutation, useDeletePriceMutation, useGetPaywallConfigQuery, useEnablePaywallMutation, useUpdatePaywallMutation, useLazyGetCourseMetaDataQuery, useLazyGetCourseCompletionOutlinesQuery, useLazyGetCourseEligibilityQuery, useLazyGetEdxSSOTokenQuery, useCreateCourseEnrollmentMutation, useCreateStripeCheckoutSessionMutation, useLazyGetCourseProgressQuery, useLazyGetCourseCompletionQuery, useUpdateExamAttemptMutation, useStartExamMutation, useLazyGetExamInfoQuery, useUpdateUserProjectMutation, useGetTrainingDocumentsQuery, useGetVectorDocumentsQuery, useGetMentorMemoriesListQuery, useGetMemoryCategoriesAdminQuery, useDeleteMentorMemoryMutation, useUpdateMentorMemoryMutation, useCreateMentorMemoryMutation, useLazyGetConnectedServiceAuthUrlQuery, useStarMentorMutation, useUnstarMentorMutation, useCreateUserProjectMutation, useDeleteUserProjectMutation, useGetUserProjectDetailsQuery, useEditTrainingDocumentMutation, useAddTrainingDocumentMutation, useLazyGetCredentialsQuery, useGetMentorSettingsQuery, useEditMentorMutation, useUploadLightLogoMutation, useUploadDarkLogoMutation, useUpdatePlatformInfoMutation, LOGO_ENDPOINTS, useGetUserProjectsQuery, useCreateSessionIdMutation, useGetMentorCategoriesQuery, 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, useGetCallConfigurationsQuery, useCreateCallConfigurationMutation, useUpdateCallConfigurationMutation, useGetMentorPublicSettingsQuery, useGetChatHistoryFilterQuery, useGetChatHistoryQuery, useGetMentorSummariesQuery, useGetConversationMemoriesQuery, useCreateLtiMentorMutation, useUpdateLtiMentorMutation, useGetLtiMentorsQuery, useCreateLtiKeyMutation, useUpdateLtiKeyMutation, useDeleteLtiKeyMutation, useGetLtiKeysQuery, useCreateLtiToolMutation, useUpdateLtiToolMutation, useGetLtiToolsQuery, useGetPlatformInfoQuery, useCreatePromptMutation, useGetPromptsSearchQuery, useUpdatePromptMutation, useCreateRedirectTokenMutation, useGetShareableLinkQuery, useCreateShareableLinkMutation, useUpdateShareableLinkMutation, useCreateDisclaimerMutation, useUpdateDisclaimerMutation, useGetDisclaimersQuery, useUpdateRbacMentorAccessMutation, useGetRbacMentorAccessListQuery, 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';
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, useGetRbacPoliciesQuery, useCreateRbacPolicyMutation, useUpdateRbacPolicyMutation, useDeleteRbacPolicyMutation, useGetRbacPolicyDetailsQuery, useGetWatchedGroupsQuery, useCreateWatchedGroupMutation, useUpdateWatchedGroupMutation, useDeleteWatchedGroupMutation, useAddWatchedUserMutation, useRemoveWatchedUserMutation, useAddWatcherMutation, useUpdateWatcherMutation, useDeleteWatcherMutation, useGetWatchedUsersQuery, useGetWatchersQuery, WATCHER_NOTIFICATION_EVENTS, WATCHER_NOTIFICATION_EVENT_LABELS, useDeleteApiKeyMutation, useGetApiKeysQuery, 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, useGetCustomMentorsQuery, useGetStripeConnectStatusQuery, useStartStripeConnectOnboardingMutation, useLazyGetStripeConnectDashboardQuery, useGetAiSearchMentorsQuery, useListPaywallsQuery, useListPricesQuery, useCreatePriceMutation, useUpdatePriceMutation, useDeletePriceMutation, useGetPaywallConfigQuery, useEnablePaywallMutation, useUpdatePaywallMutation, useLazyGetCourseMetaDataQuery, useLazyGetCourseCompletionOutlinesQuery, useLazyGetCourseEligibilityQuery, useLazyGetEdxSSOTokenQuery, useCreateCourseEnrollmentMutation, useCreateStripeCheckoutSessionMutation, useLazyGetCourseProgressQuery, useLazyGetCourseCompletionQuery, useUpdateExamAttemptMutation, useStartExamMutation, useLazyGetExamInfoQuery, 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, 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, useGetCallConfigurationsQuery, useCreateCallConfigurationMutation, useUpdateCallConfigurationMutation, useGetMentorPublicSettingsQuery, useGetChatHistoryFilterQuery, useGetChatHistoryQuery, useGetMentorSummariesQuery, useGetConversationMemoriesQuery, 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
6
  import { getInitials, useTenantMetadata, WithPermissions, useStripeUpgrade, openExternalUrl, CHAT_AREA_SIZE, isAlphaNumeric32, checkRbacPermission, selectNumberOfActiveChatMessages, useUsername, selectStreaming, isLoggedIn, TOOLS, 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, ANONYMOUS_USERNAME as ANONYMOUS_USERNAME$2, 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';
@@ -99941,7 +99941,9 @@ var profileAccount$3 = {
99941
99941
  descAdvanced: "Configure advanced organization settings.",
99942
99942
  descBasic: "Manage your basic account information and preferences.",
99943
99943
  descSocial: "Connect and manage your social media accounts.",
99944
- descSecurity: "Update your security settings and password."
99944
+ descSecurity: "Update your security settings and password.",
99945
+ tabBenchmarks: "Benchmarks",
99946
+ descBenchmarks: "Build benchmark suites of test inputs to evaluate agents."
99945
99947
  };
99946
99948
  var profileAddCreditsModal$3 = {
99947
99949
  title: "Add Credits",
@@ -101943,6 +101945,220 @@ var ltiTabLabels$3 = {
101943
101945
  toolError: "Something went wrong with the LTI tool"
101944
101946
  }
101945
101947
  };
101948
+ var evaluationTabLabels$3 = {
101949
+ header: {
101950
+ title: "Evals",
101951
+ description: "Run this agent against a benchmark and score the responses.",
101952
+ infoBox: "Measure how well your agent performs. Run it against a benchmark — a set of test questions — and every response gets scored, so you can catch weak spots and track improvements as you refine the agent."
101953
+ },
101954
+ benchmarkPicker: {
101955
+ placeholder: "Select a benchmark",
101956
+ searchPlaceholder: "Search benchmarks...",
101957
+ empty: "No benchmarks found"
101958
+ },
101959
+ actions: {
101960
+ newExperiment: "New Evaluation",
101961
+ manageBenchmarks: "Manage benchmarks",
101962
+ viewResults: "View results",
101963
+ evaluate: "New review",
101964
+ exportCsv: "Export CSV",
101965
+ exporting: "Exporting...",
101966
+ checkStatus: "Check status",
101967
+ checkingStatus: "Checking...",
101968
+ notReadyHint: "Available once the evaluation completes",
101969
+ "delete": "Delete",
101970
+ rowMenuAriaLabel: "Actions for {name}"
101971
+ },
101972
+ checkStatusToast: {
101973
+ pending: "Evaluation is still running",
101974
+ completed: "Evaluation completed",
101975
+ failed: "Evaluation failed"
101976
+ },
101977
+ table: {
101978
+ experimentColumn: "EVALUATION",
101979
+ statusColumn: "STATUS",
101980
+ initiatedByColumn: "INITIATED BY",
101981
+ createdColumn: "CREATED",
101982
+ actionsColumn: "ACTIONS",
101983
+ emptyState: "No evaluations yet for this agent on benchmark \"{dataset}\"."
101984
+ },
101985
+ emptyBenchmarks: "No benchmarks yet. Use \"Manage benchmarks\" above to create one.",
101986
+ exportErrorToast: "Failed to export evaluation",
101987
+ startExperimentModal: {
101988
+ title: "New Evaluation",
101989
+ description: "Run this agent against every item in the selected benchmark. Results show up here once the run completes in the background.",
101990
+ benchmarkLabel: "Benchmark",
101991
+ experimentNameLabel: "Evaluation name",
101992
+ experimentNamePlaceholder: "Auto-generated if left blank",
101993
+ cancel: "Cancel",
101994
+ start: "Start Evaluation",
101995
+ successToast: "Evaluation started",
101996
+ errorToast: "Failed to start evaluation"
101997
+ },
101998
+ manageBenchmarksModal: {
101999
+ title: "Manage benchmarks",
102000
+ description: "Create and edit tenant-wide benchmarks without leaving the agent settings."
102001
+ },
102002
+ detailModal: {
102003
+ benchmarkLabel: "Benchmark",
102004
+ startedPrefix: "started",
102005
+ tracesSuffixSingular: "trace produced",
102006
+ tracesSuffixPlural: "traces produced",
102007
+ waitingHint: "Waiting for the evaluation to produce traces. This page auto-refreshes.",
102008
+ noScoresHint: "No scores yet",
102009
+ newReview: "New review",
102010
+ scoreNameLabel: "Score name",
102011
+ scoreNamePlaceholder: "accuracy",
102012
+ scoreValueLabel: "Value",
102013
+ scoreValuePlaceholder: "0.0",
102014
+ scoreCommentLabel: "Comment",
102015
+ scoreCommentPlaceholder: "Optional",
102016
+ addScore: "Add",
102017
+ scoreInputError: "Score name and numeric value are required",
102018
+ scoreRangeError: "Score value must be between 0 and 1",
102019
+ scoreAddedToast: "Score added",
102020
+ scoreErrorToast: "Failed to add score",
102021
+ scoreRemovedToast: "Score removed",
102022
+ scoreRemoveErrorToast: "Failed to remove score",
102023
+ traceLabel: "Trace",
102024
+ itemLabel: "item",
102025
+ removeScoreAriaLabel: "Remove score",
102026
+ inputLabel: "Input",
102027
+ expectedOutputLabel: "Expected output",
102028
+ actualOutputLabel: "Actual output",
102029
+ errorLabel: "Error",
102030
+ noOutputHint: "No output yet",
102031
+ scoresHeading: "Scores",
102032
+ addScoreHeading: "Add a score",
102033
+ reviewsHeading: "Reviews",
102034
+ reviewsHint: "Reviews are LLM-as-Judge runs that score every trace in this experiment. Scores from completed reviews appear under each item below.",
102035
+ reviewsRunningLabel: "running",
102036
+ reviewsCompletedLabel: "complete",
102037
+ reviewsFailedLabel: "failed",
102038
+ reviewUnnamedScore: "Untitled score",
102039
+ reviewFinishedPrefix: "finished",
102040
+ reviewStartedPrefix: "started",
102041
+ reviewStatus: {
102042
+ pending: "Queued",
102043
+ running: "Running",
102044
+ completed: "Complete",
102045
+ failed: "Failed"
102046
+ },
102047
+ refresh: "Refresh",
102048
+ reviewDetailsAriaLabel: "Toggle review details",
102049
+ reviewCriteriaLabel: "Criteria",
102050
+ reviewScoresProducedLabel: "Scores produced",
102051
+ reviewNoScoresYet: "No scores recorded for this review yet.",
102052
+ scoresSuffixSingular: "score",
102053
+ scoresSuffixPlural: "scores"
102054
+ },
102055
+ evaluateModal: {
102056
+ title: "Evaluate",
102057
+ description: "Use an LLM to score every trace in this evaluation.",
102058
+ criteriaLabel: "Criteria",
102059
+ criteriaPlaceholder: "e.g. Evaluate the response on:\n1. Accuracy\n2. Completeness\n3. Clarity\nWeight accuracy most heavily.",
102060
+ scoreNameLabel: "Score name",
102061
+ scoreNamePlaceholder: "e.g. quality",
102062
+ maxConcurrencyLabel: "Max concurrency",
102063
+ llmLabel: "LLM",
102064
+ selectLlmPlaceholder: "Select LLM",
102065
+ cancel: "Cancel",
102066
+ submit: "Evaluate",
102067
+ validationError: "Criteria, score name and LLM are required",
102068
+ successToast: "Evaluation started",
102069
+ errorToast: "Failed to start evaluation",
102070
+ pickerTitle: "Select LLM",
102071
+ pickerDescription: "Pick a provider then a model.",
102072
+ pickerSelectorAriaLabel: "LLM Model Selector",
102073
+ pickerSearchPlaceholder: "Search providers...",
102074
+ pickerEmpty: "No providers",
102075
+ pickerLogoAlt: "{name} logo"
102076
+ },
102077
+ deleteModal: {
102078
+ title: "Delete Evaluation",
102079
+ confirmation: "Are you sure you want to delete this evaluation? This action cannot be undone.",
102080
+ cancel: "Cancel",
102081
+ confirm: "Delete",
102082
+ confirming: "Deleting...",
102083
+ successToast: "Evaluation deleted",
102084
+ errorToast: "Failed to delete evaluation"
102085
+ }
102086
+ };
102087
+ var benchmarksIndex$3 = {
102088
+ searchPlaceholder: "Search benchmarks",
102089
+ searchAriaLabel: "Search benchmarks",
102090
+ newBenchmark: "New Benchmark",
102091
+ nameColumn: "Name",
102092
+ descriptionColumn: "Description",
102093
+ createdColumn: "Created",
102094
+ actionsColumn: "Actions",
102095
+ viewItemsAriaLabel: "View items in {name}",
102096
+ loading: "Loading...",
102097
+ empty: "No benchmarks found"
102098
+ };
102099
+ var benchmarksCreateBenchmarkModal$3 = {
102100
+ title: "New Benchmark",
102101
+ description: "Create a benchmark to group test inputs for agent evaluation runs.",
102102
+ nameLabel: "Name",
102103
+ namePlaceholder: "qa-eval-v1",
102104
+ descriptionLabel: "Description",
102105
+ descriptionPlaceholder: "What is this benchmark for?",
102106
+ nameRequired: "Benchmark name is required",
102107
+ cancel: "Cancel",
102108
+ create: "Create",
102109
+ successToast: "Benchmark created",
102110
+ errorToast: "Failed to create benchmark"
102111
+ };
102112
+ var benchmarksBenchmarkItemsModal$3 = {
102113
+ description: "Question/answer pairs used to evaluate agents against this benchmark.",
102114
+ addItems: "Add Q&A",
102115
+ questionColumn: "Question",
102116
+ answerColumn: "Answer",
102117
+ actionsColumn: "Actions",
102118
+ deleteItemAriaLabel: "Delete Q&A",
102119
+ empty: "No Q&A in this benchmark yet"
102120
+ };
102121
+ var benchmarksDeleteItemConfirm$3 = {
102122
+ title: "Delete Q&A",
102123
+ confirmation: "Are you sure you want to delete this Q&A pair? This action cannot be undone.",
102124
+ cancel: "Cancel",
102125
+ "delete": "Delete",
102126
+ deleting: "Deleting...",
102127
+ successToast: "Q&A deleted",
102128
+ errorToast: "Failed to delete Q&A"
102129
+ };
102130
+ var benchmarksAddItemsModal$3 = {
102131
+ title: "Add Q&A to {name}",
102132
+ description: "Add question/answer pairs directly or upload a CSV file.",
102133
+ manualTab: "Manual",
102134
+ csvTab: "CSV Upload",
102135
+ questionLabel: "Question",
102136
+ questionPlaceholder: "What is machine learning?",
102137
+ answerLabel: "Answer",
102138
+ answerPlaceholder: "Optional",
102139
+ removeRowAriaLabel: "Remove row",
102140
+ addRow: "Add row",
102141
+ cancel: "Cancel",
102142
+ add: "Add",
102143
+ rowRequired: "Add at least one row with a question",
102144
+ addedToast: "{count, plural, one {Added # Q&A pair} other {Added # Q&A pairs}}",
102145
+ addErrorToast: "Failed to add Q&A",
102146
+ csvFormatTitle: "CSV format",
102147
+ csvRuleEncoding: "UTF-8 encoded",
102148
+ csvRuleRequiredPrefix: "Required column:",
102149
+ csvRuleRequiredSuffix: "(the question)",
102150
+ csvRuleOptionalPrefix: "Optional column:",
102151
+ csvRuleOptionalSuffix: "(the answer)",
102152
+ csvRuleMaxSize: "Max file size 10 MB, up to 10,000 rows",
102153
+ csvRuleBlankSkipped: "Rows with a blank question are skipped",
102154
+ downloadSample: "Download sample CSV",
102155
+ csvFileLabel: "CSV file",
102156
+ selectedFile: "Selected: {name} ({size} KB)",
102157
+ csvRequired: "Select a CSV file",
102158
+ uploadedToast: "{count, plural, one {Uploaded # Q&A pair} other {Uploaded # Q&A pairs}}",
102159
+ uploadErrorToast: "Failed to upload CSV",
102160
+ upload: "Upload"
102161
+ };
101946
102162
  var platformSidebar$3 = {
101947
102163
  collapseSidebar: "Collapse sidebar",
101948
102164
  expandSidebar: "Expand sidebar",
@@ -102205,6 +102421,12 @@ var en = {
102205
102421
  workflowsDeleteWorkflowModal: workflowsDeleteWorkflowModal$3,
102206
102422
  workflowsToolDialogs: workflowsToolDialogs$3,
102207
102423
  ltiTabLabels: ltiTabLabels$3,
102424
+ evaluationTabLabels: evaluationTabLabels$3,
102425
+ benchmarksIndex: benchmarksIndex$3,
102426
+ benchmarksCreateBenchmarkModal: benchmarksCreateBenchmarkModal$3,
102427
+ benchmarksBenchmarkItemsModal: benchmarksBenchmarkItemsModal$3,
102428
+ benchmarksDeleteItemConfirm: benchmarksDeleteItemConfirm$3,
102429
+ benchmarksAddItemsModal: benchmarksAddItemsModal$3,
102208
102430
  platformSidebar: platformSidebar$3,
102209
102431
  platformNavbar: platformNavbar$3
102210
102432
  };
@@ -105323,7 +105545,9 @@ var profileAccount$2 = {
105323
105545
  descAdvanced: "Configurer les paramètres avancés de l'organisation.",
105324
105546
  descBasic: "Gérer vos informations de compte de base et vos préférences.",
105325
105547
  descSocial: "Connecter et gérer vos comptes de réseaux sociaux.",
105326
- descSecurity: "Mettre à jour vos paramètres de sécurité et votre mot de passe."
105548
+ descSecurity: "Mettre à jour vos paramètres de sécurité et votre mot de passe.",
105549
+ tabBenchmarks: "Benchmarks",
105550
+ descBenchmarks: "Créez des suites de benchmarks d'entrées de test pour évaluer les agents."
105327
105551
  };
105328
105552
  var profileAddCreditsModal$2 = {
105329
105553
  title: "Ajouter des crédits",
@@ -107325,6 +107549,220 @@ var ltiTabLabels$2 = {
107325
107549
  toolError: "Un problème est survenu avec l'outil LTI"
107326
107550
  }
107327
107551
  };
107552
+ var evaluationTabLabels$2 = {
107553
+ header: {
107554
+ title: "Évaluations",
107555
+ description: "Exécutez cet agent sur un benchmark et notez les réponses.",
107556
+ infoBox: "Mesurez les performances réelles de votre agent. Exécutez-le sur un benchmark — un ensemble de questions de test — et chaque réponse est notée, pour repérer les points faibles et suivre les progrès à mesure que vous perfectionnez l'agent."
107557
+ },
107558
+ benchmarkPicker: {
107559
+ placeholder: "Sélectionner un benchmark",
107560
+ searchPlaceholder: "Rechercher des benchmarks...",
107561
+ empty: "Aucun benchmark trouvé"
107562
+ },
107563
+ actions: {
107564
+ newExperiment: "Nouvelle évaluation",
107565
+ manageBenchmarks: "Gérer les benchmarks",
107566
+ viewResults: "Voir les résultats",
107567
+ evaluate: "Nouvelle revue",
107568
+ exportCsv: "Exporter en CSV",
107569
+ exporting: "Exportation...",
107570
+ checkStatus: "Vérifier le statut",
107571
+ checkingStatus: "Vérification...",
107572
+ notReadyHint: "Disponible une fois l'évaluation terminée",
107573
+ "delete": "Supprimer",
107574
+ rowMenuAriaLabel: "Actions pour {name}"
107575
+ },
107576
+ checkStatusToast: {
107577
+ pending: "L'évaluation est toujours en cours",
107578
+ completed: "Évaluation terminée",
107579
+ failed: "L'évaluation a échoué"
107580
+ },
107581
+ table: {
107582
+ experimentColumn: "ÉVALUATION",
107583
+ statusColumn: "STATUT",
107584
+ initiatedByColumn: "INITIÉE PAR",
107585
+ createdColumn: "CRÉÉE",
107586
+ actionsColumn: "ACTIONS",
107587
+ emptyState: "Aucune évaluation pour cet agent sur le benchmark \"{dataset}\" pour le moment."
107588
+ },
107589
+ emptyBenchmarks: "Aucun benchmark pour le moment. Utilisez \"Gérer les benchmarks\" ci-dessus pour en créer un.",
107590
+ exportErrorToast: "Échec de l'exportation de l'évaluation",
107591
+ startExperimentModal: {
107592
+ title: "Nouvelle évaluation",
107593
+ description: "Exécutez cet agent sur chaque élément du benchmark sélectionné. Les résultats apparaîtront ici une fois l'exécution terminée en arrière-plan.",
107594
+ benchmarkLabel: "Benchmark",
107595
+ experimentNameLabel: "Nom de l'évaluation",
107596
+ experimentNamePlaceholder: "Généré automatiquement si laissé vide",
107597
+ cancel: "Annuler",
107598
+ start: "Lancer l'évaluation",
107599
+ successToast: "Évaluation lancée",
107600
+ errorToast: "Échec du lancement de l'évaluation"
107601
+ },
107602
+ manageBenchmarksModal: {
107603
+ title: "Gérer les benchmarks",
107604
+ description: "Créez et modifiez les benchmarks de l'organisation sans quitter les paramètres de l'agent."
107605
+ },
107606
+ detailModal: {
107607
+ benchmarkLabel: "Benchmark",
107608
+ startedPrefix: "démarrée",
107609
+ tracesSuffixSingular: "trace produite",
107610
+ tracesSuffixPlural: "traces produites",
107611
+ waitingHint: "En attente que l'évaluation produise des traces. Cette page s'actualise automatiquement.",
107612
+ noScoresHint: "Pas encore de scores",
107613
+ newReview: "Nouvelle revue",
107614
+ scoreNameLabel: "Nom du score",
107615
+ scoreNamePlaceholder: "précision",
107616
+ scoreValueLabel: "Valeur",
107617
+ scoreValuePlaceholder: "0.0",
107618
+ scoreCommentLabel: "Commentaire",
107619
+ scoreCommentPlaceholder: "Facultatif",
107620
+ addScore: "Ajouter",
107621
+ scoreInputError: "Le nom du score et une valeur numérique sont requis",
107622
+ scoreRangeError: "La valeur du score doit être comprise entre 0 et 1",
107623
+ scoreAddedToast: "Score ajouté",
107624
+ scoreErrorToast: "Échec de l'ajout du score",
107625
+ scoreRemovedToast: "Score supprimé",
107626
+ scoreRemoveErrorToast: "Échec de la suppression du score",
107627
+ traceLabel: "Trace",
107628
+ itemLabel: "élément",
107629
+ removeScoreAriaLabel: "Supprimer le score",
107630
+ inputLabel: "Entrée",
107631
+ expectedOutputLabel: "Sortie attendue",
107632
+ actualOutputLabel: "Sortie réelle",
107633
+ errorLabel: "Erreur",
107634
+ noOutputHint: "Pas encore de sortie",
107635
+ scoresHeading: "Scores",
107636
+ addScoreHeading: "Ajouter un score",
107637
+ reviewsHeading: "Revues",
107638
+ reviewsHint: "Les revues sont des exécutions LLM-juge qui notent chaque trace de cette expérience. Les scores des revues terminées apparaissent sous chaque élément ci-dessous.",
107639
+ reviewsRunningLabel: "en cours",
107640
+ reviewsCompletedLabel: "terminées",
107641
+ reviewsFailedLabel: "échouées",
107642
+ reviewUnnamedScore: "Score sans titre",
107643
+ reviewFinishedPrefix: "terminée",
107644
+ reviewStartedPrefix: "démarrée",
107645
+ reviewStatus: {
107646
+ pending: "En file d'attente",
107647
+ running: "En cours",
107648
+ completed: "Terminée",
107649
+ failed: "Échouée"
107650
+ },
107651
+ refresh: "Actualiser",
107652
+ reviewDetailsAriaLabel: "Afficher ou masquer les détails de la revue",
107653
+ reviewCriteriaLabel: "Critères",
107654
+ reviewScoresProducedLabel: "Scores produits",
107655
+ reviewNoScoresYet: "Aucun score enregistré pour cette revue pour le moment.",
107656
+ scoresSuffixSingular: "score",
107657
+ scoresSuffixPlural: "scores"
107658
+ },
107659
+ evaluateModal: {
107660
+ title: "Évaluer",
107661
+ description: "Utilisez un LLM pour noter chaque trace de cette évaluation.",
107662
+ criteriaLabel: "Critères",
107663
+ criteriaPlaceholder: "ex. Évaluez la réponse selon :\n1. Exactitude\n2. Exhaustivité\n3. Clarté\nAccordez le plus de poids à l'exactitude.",
107664
+ scoreNameLabel: "Nom du score",
107665
+ scoreNamePlaceholder: "ex. qualité",
107666
+ maxConcurrencyLabel: "Concurrence maximale",
107667
+ llmLabel: "LLM",
107668
+ selectLlmPlaceholder: "Sélectionner un LLM",
107669
+ cancel: "Annuler",
107670
+ submit: "Évaluer",
107671
+ validationError: "Les critères, le nom du score et le LLM sont requis",
107672
+ successToast: "Évaluation lancée",
107673
+ errorToast: "Échec du lancement de l'évaluation",
107674
+ pickerTitle: "Sélectionner un LLM",
107675
+ pickerDescription: "Choisissez un fournisseur puis un modèle.",
107676
+ pickerSelectorAriaLabel: "Sélecteur de modèle LLM",
107677
+ pickerSearchPlaceholder: "Rechercher des fournisseurs...",
107678
+ pickerEmpty: "Aucun fournisseur",
107679
+ pickerLogoAlt: "Logo de {name}"
107680
+ },
107681
+ deleteModal: {
107682
+ title: "Supprimer l'évaluation",
107683
+ confirmation: "Voulez-vous vraiment supprimer cette évaluation ? Cette action est irréversible.",
107684
+ cancel: "Annuler",
107685
+ confirm: "Supprimer",
107686
+ confirming: "Suppression...",
107687
+ successToast: "Évaluation supprimée",
107688
+ errorToast: "Échec de la suppression de l'évaluation"
107689
+ }
107690
+ };
107691
+ var benchmarksIndex$2 = {
107692
+ searchPlaceholder: "Rechercher des benchmarks",
107693
+ searchAriaLabel: "Rechercher des benchmarks",
107694
+ newBenchmark: "Nouveau benchmark",
107695
+ nameColumn: "Nom",
107696
+ descriptionColumn: "Description",
107697
+ createdColumn: "Créé",
107698
+ actionsColumn: "Actions",
107699
+ viewItemsAriaLabel: "Voir les éléments de {name}",
107700
+ loading: "Chargement...",
107701
+ empty: "Aucun benchmark trouvé"
107702
+ };
107703
+ var benchmarksCreateBenchmarkModal$2 = {
107704
+ title: "Nouveau benchmark",
107705
+ description: "Créez un benchmark pour regrouper des entrées de test pour les évaluations de l'agent.",
107706
+ nameLabel: "Nom",
107707
+ namePlaceholder: "qa-eval-v1",
107708
+ descriptionLabel: "Description",
107709
+ descriptionPlaceholder: "À quoi sert ce benchmark ?",
107710
+ nameRequired: "Le nom du benchmark est requis",
107711
+ cancel: "Annuler",
107712
+ create: "Créer",
107713
+ successToast: "Benchmark créé",
107714
+ errorToast: "Échec de la création du benchmark"
107715
+ };
107716
+ var benchmarksBenchmarkItemsModal$2 = {
107717
+ description: "Paires question-réponse utilisées pour évaluer les agents sur ce benchmark.",
107718
+ addItems: "Ajouter des questions-réponses",
107719
+ questionColumn: "Question",
107720
+ answerColumn: "Réponse",
107721
+ actionsColumn: "Actions",
107722
+ deleteItemAriaLabel: "Supprimer la question-réponse",
107723
+ empty: "Aucune question-réponse dans ce benchmark pour le moment"
107724
+ };
107725
+ var benchmarksDeleteItemConfirm$2 = {
107726
+ title: "Supprimer la question-réponse",
107727
+ confirmation: "Voulez-vous vraiment supprimer cette paire question-réponse ? Cette action est irréversible.",
107728
+ cancel: "Annuler",
107729
+ "delete": "Supprimer",
107730
+ deleting: "Suppression...",
107731
+ successToast: "Question-réponse supprimée",
107732
+ errorToast: "Échec de la suppression de la question-réponse"
107733
+ };
107734
+ var benchmarksAddItemsModal$2 = {
107735
+ title: "Ajouter des questions-réponses à {name}",
107736
+ description: "Ajoutez des paires question-réponse directement ou importez un fichier CSV.",
107737
+ manualTab: "Manuel",
107738
+ csvTab: "Import CSV",
107739
+ questionLabel: "Question",
107740
+ questionPlaceholder: "Qu'est-ce que l'apprentissage automatique ?",
107741
+ answerLabel: "Réponse",
107742
+ answerPlaceholder: "Facultatif",
107743
+ removeRowAriaLabel: "Supprimer la ligne",
107744
+ addRow: "Ajouter une ligne",
107745
+ cancel: "Annuler",
107746
+ add: "Ajouter",
107747
+ rowRequired: "Ajoutez au moins une ligne avec une question",
107748
+ addedToast: "{count, plural, one {# paire question-réponse ajoutée} other {# paires question-réponse ajoutées}}",
107749
+ addErrorToast: "Échec de l'ajout des questions-réponses",
107750
+ csvFormatTitle: "Format CSV",
107751
+ csvRuleEncoding: "Encodé en UTF-8",
107752
+ csvRuleRequiredPrefix: "Colonne requise :",
107753
+ csvRuleRequiredSuffix: "(la question)",
107754
+ csvRuleOptionalPrefix: "Colonne facultative :",
107755
+ csvRuleOptionalSuffix: "(la réponse)",
107756
+ csvRuleMaxSize: "Taille maximale du fichier 10 Mo, jusqu'à 10 000 lignes",
107757
+ csvRuleBlankSkipped: "Les lignes sans question sont ignorées",
107758
+ downloadSample: "Télécharger un CSV d’exemple",
107759
+ csvFileLabel: "Fichier CSV",
107760
+ selectedFile: "Sélectionné : {name} ({size} Ko)",
107761
+ csvRequired: "Sélectionnez un fichier CSV",
107762
+ uploadedToast: "{count, plural, one {# paire question-réponse importée} other {# paires question-réponse importées}}",
107763
+ uploadErrorToast: "Échec de l'import du CSV",
107764
+ upload: "Importer"
107765
+ };
107328
107766
  var platformSidebar$2 = {
107329
107767
  collapseSidebar: "Réduire la barre latérale",
107330
107768
  expandSidebar: "Développer la barre latérale",
@@ -107587,6 +108025,12 @@ var fr = {
107587
108025
  workflowsDeleteWorkflowModal: workflowsDeleteWorkflowModal$2,
107588
108026
  workflowsToolDialogs: workflowsToolDialogs$2,
107589
108027
  ltiTabLabels: ltiTabLabels$2,
108028
+ evaluationTabLabels: evaluationTabLabels$2,
108029
+ benchmarksIndex: benchmarksIndex$2,
108030
+ benchmarksCreateBenchmarkModal: benchmarksCreateBenchmarkModal$2,
108031
+ benchmarksBenchmarkItemsModal: benchmarksBenchmarkItemsModal$2,
108032
+ benchmarksDeleteItemConfirm: benchmarksDeleteItemConfirm$2,
108033
+ benchmarksAddItemsModal: benchmarksAddItemsModal$2,
107590
108034
  platformSidebar: platformSidebar$2,
107591
108035
  platformNavbar: platformNavbar$2
107592
108036
  };
@@ -110705,7 +111149,9 @@ var profileAccount$1 = {
110705
111149
  descAdvanced: "Configurar los ajustes avanzados de la organización.",
110706
111150
  descBasic: "Gestionar su información básica de cuenta y preferencias.",
110707
111151
  descSocial: "Conectar y gestionar sus cuentas de redes sociales.",
110708
- descSecurity: "Actualizar su configuración de seguridad y contraseña."
111152
+ descSecurity: "Actualizar su configuración de seguridad y contraseña.",
111153
+ tabBenchmarks: "Benchmarks",
111154
+ descBenchmarks: "Cree suites de benchmarks con entradas de prueba para evaluar agentes."
110709
111155
  };
110710
111156
  var profileAddCreditsModal$1 = {
110711
111157
  title: "Agregar créditos",
@@ -112707,6 +113153,220 @@ var ltiTabLabels$1 = {
112707
113153
  toolError: "Algo salió mal con la herramienta LTI"
112708
113154
  }
112709
113155
  };
113156
+ var evaluationTabLabels$1 = {
113157
+ header: {
113158
+ title: "Evaluaciones",
113159
+ description: "Ejecuta este agente contra un benchmark y puntúa las respuestas.",
113160
+ infoBox: "Mide el rendimiento real de tu agente. Ejecútalo contra un benchmark — un conjunto de preguntas de prueba — y cada respuesta se puntúa, para detectar puntos débiles y seguir las mejoras a medida que ajustas el agente."
113161
+ },
113162
+ benchmarkPicker: {
113163
+ placeholder: "Selecciona un benchmark",
113164
+ searchPlaceholder: "Buscar benchmarks...",
113165
+ empty: "No se encontraron benchmarks"
113166
+ },
113167
+ actions: {
113168
+ newExperiment: "Nueva evaluación",
113169
+ manageBenchmarks: "Gestionar benchmarks",
113170
+ viewResults: "Ver resultados",
113171
+ evaluate: "Nueva revisión",
113172
+ exportCsv: "Exportar CSV",
113173
+ exporting: "Exportando...",
113174
+ checkStatus: "Comprobar estado",
113175
+ checkingStatus: "Comprobando...",
113176
+ notReadyHint: "Disponible cuando la evaluación termine",
113177
+ "delete": "Eliminar",
113178
+ rowMenuAriaLabel: "Acciones para {name}"
113179
+ },
113180
+ checkStatusToast: {
113181
+ pending: "La evaluación sigue en curso",
113182
+ completed: "Evaluación completada",
113183
+ failed: "La evaluación falló"
113184
+ },
113185
+ table: {
113186
+ experimentColumn: "EVALUACIÓN",
113187
+ statusColumn: "ESTADO",
113188
+ initiatedByColumn: "INICIADA POR",
113189
+ createdColumn: "CREADA",
113190
+ actionsColumn: "ACCIONES",
113191
+ emptyState: "Aún no hay evaluaciones de este agente en el benchmark \"{dataset}\"."
113192
+ },
113193
+ emptyBenchmarks: "Aún no hay benchmarks. Usa \"Gestionar benchmarks\" arriba para crear uno.",
113194
+ exportErrorToast: "No se pudo exportar la evaluación",
113195
+ startExperimentModal: {
113196
+ title: "Nueva evaluación",
113197
+ description: "Ejecuta este agente contra cada elemento del benchmark seleccionado. Los resultados aparecerán aquí cuando la ejecución termine en segundo plano.",
113198
+ benchmarkLabel: "Benchmark",
113199
+ experimentNameLabel: "Nombre de la evaluación",
113200
+ experimentNamePlaceholder: "Se genera automáticamente si se deja en blanco",
113201
+ cancel: "Cancelar",
113202
+ start: "Iniciar evaluación",
113203
+ successToast: "Evaluación iniciada",
113204
+ errorToast: "No se pudo iniciar la evaluación"
113205
+ },
113206
+ manageBenchmarksModal: {
113207
+ title: "Gestionar benchmarks",
113208
+ description: "Crea y edita los benchmarks de toda la organización sin salir de la configuración del agente."
113209
+ },
113210
+ detailModal: {
113211
+ benchmarkLabel: "Benchmark",
113212
+ startedPrefix: "iniciada",
113213
+ tracesSuffixSingular: "traza generada",
113214
+ tracesSuffixPlural: "trazas generadas",
113215
+ waitingHint: "Esperando a que la evaluación genere trazas. Esta página se actualiza automáticamente.",
113216
+ noScoresHint: "Aún no hay puntuaciones",
113217
+ newReview: "Nueva revisión",
113218
+ scoreNameLabel: "Nombre de la puntuación",
113219
+ scoreNamePlaceholder: "precisión",
113220
+ scoreValueLabel: "Valor",
113221
+ scoreValuePlaceholder: "0.0",
113222
+ scoreCommentLabel: "Comentario",
113223
+ scoreCommentPlaceholder: "Opcional",
113224
+ addScore: "Añadir",
113225
+ scoreInputError: "Se requieren el nombre de la puntuación y un valor numérico",
113226
+ scoreRangeError: "El valor de la puntuación debe estar entre 0 y 1",
113227
+ scoreAddedToast: "Puntuación añadida",
113228
+ scoreErrorToast: "No se pudo añadir la puntuación",
113229
+ scoreRemovedToast: "Puntuación eliminada",
113230
+ scoreRemoveErrorToast: "No se pudo eliminar la puntuación",
113231
+ traceLabel: "Traza",
113232
+ itemLabel: "elemento",
113233
+ removeScoreAriaLabel: "Eliminar puntuación",
113234
+ inputLabel: "Entrada",
113235
+ expectedOutputLabel: "Salida esperada",
113236
+ actualOutputLabel: "Salida real",
113237
+ errorLabel: "Error",
113238
+ noOutputHint: "Aún sin salida",
113239
+ scoresHeading: "Puntuaciones",
113240
+ addScoreHeading: "Añadir una puntuación",
113241
+ reviewsHeading: "Revisiones",
113242
+ reviewsHint: "Las revisiones son ejecuciones de LLM como juez que puntúan cada traza de este experimento. Las puntuaciones de las revisiones completadas aparecen bajo cada elemento más abajo.",
113243
+ reviewsRunningLabel: "en curso",
113244
+ reviewsCompletedLabel: "completadas",
113245
+ reviewsFailedLabel: "fallidas",
113246
+ reviewUnnamedScore: "Puntuación sin título",
113247
+ reviewFinishedPrefix: "finalizada",
113248
+ reviewStartedPrefix: "iniciada",
113249
+ reviewStatus: {
113250
+ pending: "En cola",
113251
+ running: "En curso",
113252
+ completed: "Completada",
113253
+ failed: "Fallida"
113254
+ },
113255
+ refresh: "Actualizar",
113256
+ reviewDetailsAriaLabel: "Mostrar u ocultar detalles de la revisión",
113257
+ reviewCriteriaLabel: "Criterios",
113258
+ reviewScoresProducedLabel: "Puntuaciones generadas",
113259
+ reviewNoScoresYet: "Aún no hay puntuaciones registradas para esta revisión.",
113260
+ scoresSuffixSingular: "puntuación",
113261
+ scoresSuffixPlural: "puntuaciones"
113262
+ },
113263
+ evaluateModal: {
113264
+ title: "Evaluar",
113265
+ description: "Usa un LLM para puntuar cada traza de esta evaluación.",
113266
+ criteriaLabel: "Criterios",
113267
+ criteriaPlaceholder: "p. ej. Evalúa la respuesta según:\n1. Precisión\n2. Exhaustividad\n3. Claridad\nDa más peso a la precisión.",
113268
+ scoreNameLabel: "Nombre de la puntuación",
113269
+ scoreNamePlaceholder: "p. ej. calidad",
113270
+ maxConcurrencyLabel: "Concurrencia máxima",
113271
+ llmLabel: "LLM",
113272
+ selectLlmPlaceholder: "Seleccionar LLM",
113273
+ cancel: "Cancelar",
113274
+ submit: "Evaluar",
113275
+ validationError: "Se requieren los criterios, el nombre de la puntuación y el LLM",
113276
+ successToast: "Evaluación iniciada",
113277
+ errorToast: "No se pudo iniciar la evaluación",
113278
+ pickerTitle: "Seleccionar LLM",
113279
+ pickerDescription: "Elige un proveedor y luego un modelo.",
113280
+ pickerSelectorAriaLabel: "Selector de modelo LLM",
113281
+ pickerSearchPlaceholder: "Buscar proveedores...",
113282
+ pickerEmpty: "Sin proveedores",
113283
+ pickerLogoAlt: "Logotipo de {name}"
113284
+ },
113285
+ deleteModal: {
113286
+ title: "Eliminar evaluación",
113287
+ confirmation: "¿Seguro que quieres eliminar esta evaluación? Esta acción no se puede deshacer.",
113288
+ cancel: "Cancelar",
113289
+ confirm: "Eliminar",
113290
+ confirming: "Eliminando...",
113291
+ successToast: "Evaluación eliminada",
113292
+ errorToast: "No se pudo eliminar la evaluación"
113293
+ }
113294
+ };
113295
+ var benchmarksIndex$1 = {
113296
+ searchPlaceholder: "Buscar benchmarks",
113297
+ searchAriaLabel: "Buscar benchmarks",
113298
+ newBenchmark: "Nuevo benchmark",
113299
+ nameColumn: "Nombre",
113300
+ descriptionColumn: "Descripción",
113301
+ createdColumn: "Creado",
113302
+ actionsColumn: "Acciones",
113303
+ viewItemsAriaLabel: "Ver elementos de {name}",
113304
+ loading: "Cargando...",
113305
+ empty: "No se encontraron benchmarks"
113306
+ };
113307
+ var benchmarksCreateBenchmarkModal$1 = {
113308
+ title: "Nuevo benchmark",
113309
+ description: "Crea un benchmark para agrupar entradas de prueba para las evaluaciones del agente.",
113310
+ nameLabel: "Nombre",
113311
+ namePlaceholder: "qa-eval-v1",
113312
+ descriptionLabel: "Descripción",
113313
+ descriptionPlaceholder: "¿Para qué es este benchmark?",
113314
+ nameRequired: "El nombre del benchmark es obligatorio",
113315
+ cancel: "Cancelar",
113316
+ create: "Crear",
113317
+ successToast: "Benchmark creado",
113318
+ errorToast: "No se pudo crear el benchmark"
113319
+ };
113320
+ var benchmarksBenchmarkItemsModal$1 = {
113321
+ description: "Pares de pregunta y respuesta usados para evaluar agentes con este benchmark.",
113322
+ addItems: "Añadir preguntas y respuestas",
113323
+ questionColumn: "Pregunta",
113324
+ answerColumn: "Respuesta",
113325
+ actionsColumn: "Acciones",
113326
+ deleteItemAriaLabel: "Eliminar pregunta y respuesta",
113327
+ empty: "Este benchmark aún no tiene preguntas y respuestas"
113328
+ };
113329
+ var benchmarksDeleteItemConfirm$1 = {
113330
+ title: "Eliminar pregunta y respuesta",
113331
+ confirmation: "¿Seguro que quieres eliminar este par de pregunta y respuesta? Esta acción no se puede deshacer.",
113332
+ cancel: "Cancelar",
113333
+ "delete": "Eliminar",
113334
+ deleting: "Eliminando...",
113335
+ successToast: "Pregunta y respuesta eliminadas",
113336
+ errorToast: "No se pudo eliminar la pregunta y respuesta"
113337
+ };
113338
+ var benchmarksAddItemsModal$1 = {
113339
+ title: "Añadir preguntas y respuestas a {name}",
113340
+ description: "Añade pares de pregunta y respuesta directamente o sube un archivo CSV.",
113341
+ manualTab: "Manual",
113342
+ csvTab: "Subir CSV",
113343
+ questionLabel: "Pregunta",
113344
+ questionPlaceholder: "¿Qué es el aprendizaje automático?",
113345
+ answerLabel: "Respuesta",
113346
+ answerPlaceholder: "Opcional",
113347
+ removeRowAriaLabel: "Eliminar fila",
113348
+ addRow: "Añadir fila",
113349
+ cancel: "Cancelar",
113350
+ add: "Añadir",
113351
+ rowRequired: "Añade al menos una fila con una pregunta",
113352
+ addedToast: "{count, plural, one {Se añadió # par de pregunta y respuesta} other {Se añadieron # pares de pregunta y respuesta}}",
113353
+ addErrorToast: "No se pudieron añadir las preguntas y respuestas",
113354
+ csvFormatTitle: "Formato CSV",
113355
+ csvRuleEncoding: "Codificado en UTF-8",
113356
+ csvRuleRequiredPrefix: "Columna obligatoria:",
113357
+ csvRuleRequiredSuffix: "(la pregunta)",
113358
+ csvRuleOptionalPrefix: "Columna opcional:",
113359
+ csvRuleOptionalSuffix: "(la respuesta)",
113360
+ csvRuleMaxSize: "Tamaño máximo de archivo 10 MB, hasta 10,000 filas",
113361
+ csvRuleBlankSkipped: "Las filas sin pregunta se omiten",
113362
+ downloadSample: "Descargar CSV de ejemplo",
113363
+ csvFileLabel: "Archivo CSV",
113364
+ selectedFile: "Seleccionado: {name} ({size} KB)",
113365
+ csvRequired: "Selecciona un archivo CSV",
113366
+ uploadedToast: "{count, plural, one {Se subió # par de pregunta y respuesta} other {Se subieron # pares de pregunta y respuesta}}",
113367
+ uploadErrorToast: "No se pudo subir el CSV",
113368
+ upload: "Subir"
113369
+ };
112710
113370
  var platformSidebar$1 = {
112711
113371
  collapseSidebar: "Contraer barra lateral",
112712
113372
  expandSidebar: "Expandir barra lateral",
@@ -112969,6 +113629,12 @@ var es = {
112969
113629
  workflowsDeleteWorkflowModal: workflowsDeleteWorkflowModal$1,
112970
113630
  workflowsToolDialogs: workflowsToolDialogs$1,
112971
113631
  ltiTabLabels: ltiTabLabels$1,
113632
+ evaluationTabLabels: evaluationTabLabels$1,
113633
+ benchmarksIndex: benchmarksIndex$1,
113634
+ benchmarksCreateBenchmarkModal: benchmarksCreateBenchmarkModal$1,
113635
+ benchmarksBenchmarkItemsModal: benchmarksBenchmarkItemsModal$1,
113636
+ benchmarksDeleteItemConfirm: benchmarksDeleteItemConfirm$1,
113637
+ benchmarksAddItemsModal: benchmarksAddItemsModal$1,
112972
113638
  platformSidebar: platformSidebar$1,
112973
113639
  platformNavbar: platformNavbar$1
112974
113640
  };
@@ -116087,7 +116753,9 @@ var profileAccount = {
116087
116753
  descAdvanced: "配置组织的高级设置。",
116088
116754
  descBasic: "管理您的基本账户信息和偏好设置。",
116089
116755
  descSocial: "连接和管理您的社交媒体账户。",
116090
- descSecurity: "更新您的安全设置和密码。"
116756
+ descSecurity: "更新您的安全设置和密码。",
116757
+ tabBenchmarks: "基准测试",
116758
+ descBenchmarks: "构建包含测试输入的基准测试套件,以评估智能体。"
116091
116759
  };
116092
116760
  var profileAddCreditsModal = {
116093
116761
  title: "添加积分",
@@ -118089,6 +118757,220 @@ var ltiTabLabels = {
118089
118757
  toolError: "LTI 工具出现问题"
118090
118758
  }
118091
118759
  };
118760
+ var evaluationTabLabels = {
118761
+ header: {
118762
+ title: "评估",
118763
+ description: "让此智能体在基准测试上运行并为回答打分。",
118764
+ infoBox: "衡量智能体的实际表现。让它在基准测试(一组测试问题)上运行,每个回答都会被打分,帮助你发现薄弱环节,并在不断优化智能体的过程中追踪改进。"
118765
+ },
118766
+ benchmarkPicker: {
118767
+ placeholder: "选择基准测试",
118768
+ searchPlaceholder: "搜索基准测试...",
118769
+ empty: "未找到基准测试"
118770
+ },
118771
+ actions: {
118772
+ newExperiment: "新建评估",
118773
+ manageBenchmarks: "管理基准测试",
118774
+ viewResults: "查看结果",
118775
+ evaluate: "新建审查",
118776
+ exportCsv: "导出 CSV",
118777
+ exporting: "导出中...",
118778
+ checkStatus: "检查状态",
118779
+ checkingStatus: "检查中...",
118780
+ notReadyHint: "评估完成后可用",
118781
+ "delete": "删除",
118782
+ rowMenuAriaLabel: "{name} 的操作"
118783
+ },
118784
+ checkStatusToast: {
118785
+ pending: "评估仍在运行",
118786
+ completed: "评估已完成",
118787
+ failed: "评估失败"
118788
+ },
118789
+ table: {
118790
+ experimentColumn: "评估",
118791
+ statusColumn: "状态",
118792
+ initiatedByColumn: "发起人",
118793
+ createdColumn: "创建时间",
118794
+ actionsColumn: "操作",
118795
+ emptyState: "此智能体在基准测试\"{dataset}\"上暂无评估。"
118796
+ },
118797
+ emptyBenchmarks: "还没有基准测试。请使用上方的\"管理基准测试\"创建一个。",
118798
+ exportErrorToast: "导出评估失败",
118799
+ startExperimentModal: {
118800
+ title: "新建评估",
118801
+ description: "让此智能体对所选基准测试中的每个条目运行。后台运行完成后,结果将显示在这里。",
118802
+ benchmarkLabel: "基准测试",
118803
+ experimentNameLabel: "评估名称",
118804
+ experimentNamePlaceholder: "留空则自动生成",
118805
+ cancel: "取消",
118806
+ start: "开始评估",
118807
+ successToast: "评估已开始",
118808
+ errorToast: "启动评估失败"
118809
+ },
118810
+ manageBenchmarksModal: {
118811
+ title: "管理基准测试",
118812
+ description: "无需离开智能体设置即可创建和编辑租户级基准测试。"
118813
+ },
118814
+ detailModal: {
118815
+ benchmarkLabel: "基准测试",
118816
+ startedPrefix: "开始于",
118817
+ tracesSuffixSingular: "条追踪已生成",
118818
+ tracesSuffixPlural: "条追踪已生成",
118819
+ waitingHint: "正在等待评估生成追踪。此页面会自动刷新。",
118820
+ noScoresHint: "暂无评分",
118821
+ newReview: "新建审查",
118822
+ scoreNameLabel: "评分名称",
118823
+ scoreNamePlaceholder: "准确率",
118824
+ scoreValueLabel: "数值",
118825
+ scoreValuePlaceholder: "0.0",
118826
+ scoreCommentLabel: "备注",
118827
+ scoreCommentPlaceholder: "可选",
118828
+ addScore: "添加",
118829
+ scoreInputError: "需要评分名称和数值",
118830
+ scoreRangeError: "评分数值必须介于 0 和 1 之间",
118831
+ scoreAddedToast: "评分已添加",
118832
+ scoreErrorToast: "添加评分失败",
118833
+ scoreRemovedToast: "评分已删除",
118834
+ scoreRemoveErrorToast: "删除评分失败",
118835
+ traceLabel: "追踪",
118836
+ itemLabel: "条目",
118837
+ removeScoreAriaLabel: "删除评分",
118838
+ inputLabel: "输入",
118839
+ expectedOutputLabel: "预期输出",
118840
+ actualOutputLabel: "实际输出",
118841
+ errorLabel: "错误",
118842
+ noOutputHint: "暂无输出",
118843
+ scoresHeading: "评分",
118844
+ addScoreHeading: "添加评分",
118845
+ reviewsHeading: "审查",
118846
+ reviewsHint: "审查是以 LLM 作为评审的运行,会为此实验中的每条追踪打分。已完成审查的评分会显示在下方每个条目下。",
118847
+ reviewsRunningLabel: "运行中",
118848
+ reviewsCompletedLabel: "已完成",
118849
+ reviewsFailedLabel: "失败",
118850
+ reviewUnnamedScore: "未命名评分",
118851
+ reviewFinishedPrefix: "完成于",
118852
+ reviewStartedPrefix: "开始于",
118853
+ reviewStatus: {
118854
+ pending: "排队中",
118855
+ running: "运行中",
118856
+ completed: "已完成",
118857
+ failed: "失败"
118858
+ },
118859
+ refresh: "刷新",
118860
+ reviewDetailsAriaLabel: "切换审查详情",
118861
+ reviewCriteriaLabel: "标准",
118862
+ reviewScoresProducedLabel: "已生成的评分",
118863
+ reviewNoScoresYet: "该审查暂无评分记录。",
118864
+ scoresSuffixSingular: "项评分",
118865
+ scoresSuffixPlural: "项评分"
118866
+ },
118867
+ evaluateModal: {
118868
+ title: "评估",
118869
+ description: "使用 LLM 为此评估中的每条追踪打分。",
118870
+ criteriaLabel: "评判标准",
118871
+ criteriaPlaceholder: "例如:从以下方面评估回答:\n1. 准确性\n2. 完整性\n3. 清晰度\n准确性权重最高。",
118872
+ scoreNameLabel: "评分名称",
118873
+ scoreNamePlaceholder: "例如 quality",
118874
+ maxConcurrencyLabel: "最大并发数",
118875
+ llmLabel: "LLM",
118876
+ selectLlmPlaceholder: "选择 LLM",
118877
+ cancel: "取消",
118878
+ submit: "评估",
118879
+ validationError: "需要填写评判标准、评分名称和 LLM",
118880
+ successToast: "评估已开始",
118881
+ errorToast: "启动评估失败",
118882
+ pickerTitle: "选择 LLM",
118883
+ pickerDescription: "先选择提供商,再选择模型。",
118884
+ pickerSelectorAriaLabel: "LLM 模型选择器",
118885
+ pickerSearchPlaceholder: "搜索提供商...",
118886
+ pickerEmpty: "暂无提供商",
118887
+ pickerLogoAlt: "{name} 徽标"
118888
+ },
118889
+ deleteModal: {
118890
+ title: "删除评估",
118891
+ confirmation: "确定要删除此评估吗?此操作无法撤销。",
118892
+ cancel: "取消",
118893
+ confirm: "删除",
118894
+ confirming: "删除中...",
118895
+ successToast: "评估已删除",
118896
+ errorToast: "删除评估失败"
118897
+ }
118898
+ };
118899
+ var benchmarksIndex = {
118900
+ searchPlaceholder: "搜索基准测试",
118901
+ searchAriaLabel: "搜索基准测试",
118902
+ newBenchmark: "新建基准测试",
118903
+ nameColumn: "名称",
118904
+ descriptionColumn: "描述",
118905
+ createdColumn: "创建时间",
118906
+ actionsColumn: "操作",
118907
+ viewItemsAriaLabel: "查看 {name} 中的条目",
118908
+ loading: "加载中...",
118909
+ empty: "未找到基准测试"
118910
+ };
118911
+ var benchmarksCreateBenchmarkModal = {
118912
+ title: "新建基准测试",
118913
+ description: "创建基准测试以归组用于智能体评估运行的测试输入。",
118914
+ nameLabel: "名称",
118915
+ namePlaceholder: "qa-eval-v1",
118916
+ descriptionLabel: "描述",
118917
+ descriptionPlaceholder: "这个基准测试的用途是什么?",
118918
+ nameRequired: "基准测试名称为必填项",
118919
+ cancel: "取消",
118920
+ create: "创建",
118921
+ successToast: "基准测试已创建",
118922
+ errorToast: "创建基准测试失败"
118923
+ };
118924
+ var benchmarksBenchmarkItemsModal = {
118925
+ description: "用于在此基准测试上评估智能体的问答对。",
118926
+ addItems: "添加问答",
118927
+ questionColumn: "问题",
118928
+ answerColumn: "答案",
118929
+ actionsColumn: "操作",
118930
+ deleteItemAriaLabel: "删除问答",
118931
+ empty: "此基准测试还没有问答"
118932
+ };
118933
+ var benchmarksDeleteItemConfirm = {
118934
+ title: "删除问答",
118935
+ confirmation: "确定要删除这组问答吗?此操作无法撤销。",
118936
+ cancel: "取消",
118937
+ "delete": "删除",
118938
+ deleting: "删除中...",
118939
+ successToast: "问答已删除",
118940
+ errorToast: "删除问答失败"
118941
+ };
118942
+ var benchmarksAddItemsModal = {
118943
+ title: "向 {name} 添加问答",
118944
+ description: "直接添加问答对或上传 CSV 文件。",
118945
+ manualTab: "手动",
118946
+ csvTab: "CSV 上传",
118947
+ questionLabel: "问题",
118948
+ questionPlaceholder: "什么是机器学习?",
118949
+ answerLabel: "答案",
118950
+ answerPlaceholder: "可选",
118951
+ removeRowAriaLabel: "删除行",
118952
+ addRow: "添加行",
118953
+ cancel: "取消",
118954
+ add: "添加",
118955
+ rowRequired: "至少添加一行并填写问题",
118956
+ addedToast: "已添加 {count} 组问答",
118957
+ addErrorToast: "添加问答失败",
118958
+ csvFormatTitle: "CSV 格式",
118959
+ csvRuleEncoding: "UTF-8 编码",
118960
+ csvRuleRequiredPrefix: "必需列:",
118961
+ csvRuleRequiredSuffix: "(问题)",
118962
+ csvRuleOptionalPrefix: "可选列:",
118963
+ csvRuleOptionalSuffix: "(答案)",
118964
+ csvRuleMaxSize: "文件最大 10 MB,最多 10,000 行",
118965
+ csvRuleBlankSkipped: "问题为空的行将被跳过",
118966
+ downloadSample: "下载示例 CSV",
118967
+ csvFileLabel: "CSV 文件",
118968
+ selectedFile: "已选择:{name}({size} KB)",
118969
+ csvRequired: "请选择一个 CSV 文件",
118970
+ uploadedToast: "已上传 {count} 组问答",
118971
+ uploadErrorToast: "上传 CSV 失败",
118972
+ upload: "上传"
118973
+ };
118092
118974
  var platformSidebar = {
118093
118975
  collapseSidebar: "收起侧边栏",
118094
118976
  expandSidebar: "展开侧边栏",
@@ -118351,6 +119233,12 @@ var zh = {
118351
119233
  workflowsDeleteWorkflowModal: workflowsDeleteWorkflowModal,
118352
119234
  workflowsToolDialogs: workflowsToolDialogs,
118353
119235
  ltiTabLabels: ltiTabLabels,
119236
+ evaluationTabLabels: evaluationTabLabels,
119237
+ benchmarksIndex: benchmarksIndex,
119238
+ benchmarksCreateBenchmarkModal: benchmarksCreateBenchmarkModal,
119239
+ benchmarksBenchmarkItemsModal: benchmarksBenchmarkItemsModal,
119240
+ benchmarksDeleteItemConfirm: benchmarksDeleteItemConfirm,
119241
+ benchmarksAddItemsModal: benchmarksAddItemsModal,
118354
119242
  platformSidebar: platformSidebar,
118355
119243
  platformNavbar: platformNavbar
118356
119244
  };
@@ -173005,7 +173893,7 @@ function DetailRow({ label, children }) {
173005
173893
  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 })] }));
173006
173894
  }
173007
173895
 
173008
- const PAGE_SIZE$5 = 8;
173896
+ const PAGE_SIZE$8 = 8;
173009
173897
  const CONTENT_TYPES = [
173010
173898
  { value: 'courses', labelKey: 'gradebookGradebookTab.typeCourses', icon: GraduationCap },
173011
173899
  { value: 'programs', labelKey: 'gradebookGradebookTab.typePrograms', icon: Layers },
@@ -173036,14 +173924,14 @@ function useGradebookData(type, org, username, page, search) {
173036
173924
  username,
173037
173925
  query: {
173038
173926
  page,
173039
- page_size: PAGE_SIZE$5,
173927
+ page_size: PAGE_SIZE$8,
173040
173928
  platform_key: org,
173041
173929
  ...(trimmed ? { search: trimmed } : {}),
173042
173930
  },
173043
173931
  }, { skip: type !== 'courses', refetchOnMountOrArgChange: true });
173044
173932
  const programsQ = useGetUserEnrolledProgramsQuery([{ username, platformKey: org }], { skip: type !== 'programs' });
173045
173933
  const pathwaysQ = useGetUserCatalogPathwaysQuery({ username, platform_key: org }, { skip: type !== 'pathways' });
173046
- const credentialsQ = useGetUsersAsAssertionsQuery({ platformKey: org, userId: username, page, pageSize: PAGE_SIZE$5 }, { skip: type !== 'credentials', refetchOnMountOrArgChange: true });
173934
+ const credentialsQ = useGetUsersAsAssertionsQuery({ platformKey: org, userId: username, page, pageSize: PAGE_SIZE$8 }, { skip: type !== 'credentials', refetchOnMountOrArgChange: true });
173047
173935
  const earnedQ = useGetUserEarnedSkillsQuery([{ org, userId: username }], { skip: type !== 'skills' });
173048
173936
  const reportedQ = useGetUserReportedSkillsQuery([{ username }], { skip: type !== 'skills' });
173049
173937
  const desiredQ = useGetUserDesiredSkillsQuery([{ username }], { skip: type !== 'skills' });
@@ -173053,12 +173941,12 @@ function useGradebookData(type, org, username, page, search) {
173053
173941
  const filtered = trimmed
173054
173942
  ? rows.filter((row) => row.name.toLowerCase().includes(trimmed.toLowerCase()))
173055
173943
  : rows;
173056
- const start = (page - 1) * PAGE_SIZE$5;
173944
+ const start = (page - 1) * PAGE_SIZE$8;
173057
173945
  return {
173058
- rows: filtered.slice(start, start + PAGE_SIZE$5),
173946
+ rows: filtered.slice(start, start + PAGE_SIZE$8),
173059
173947
  total: filtered.length,
173060
173948
  hasPrev: page > 1,
173061
- hasNext: start + PAGE_SIZE$5 < filtered.length,
173949
+ hasNext: start + PAGE_SIZE$8 < filtered.length,
173062
173950
  };
173063
173951
  };
173064
173952
  switch (type) {
@@ -173115,7 +174003,7 @@ function useGradebookData(type, org, username, page, search) {
173115
174003
  rows,
173116
174004
  total,
173117
174005
  hasPrev: page > 1,
173118
- hasNext: page * PAGE_SIZE$5 < total,
174006
+ hasNext: page * PAGE_SIZE$8 < total,
173119
174007
  isLoading: credentialsQ.isLoading,
173120
174008
  isFetching: credentialsQ.isFetching,
173121
174009
  isError: credentialsQ.isError,
@@ -176872,7 +177760,7 @@ function PoliciesTab({ tenant }) {
176872
177760
  : t('tabsPoliciestab.createPolicy') }) }) }), editing && (policyDetails === null || policyDetails === void 0 ? void 0 : policyDetails.is_internal) && (jsx(TooltipContent, { children: jsx("p", { children: t('tabsPoliciestab.cannotEditInternal') }) }))] }) })] })] }) })] }));
176873
177761
  }
176874
177762
 
176875
- const PAGE_SIZE$4 = 10;
177763
+ const PAGE_SIZE$7 = 10;
176876
177764
  function normalizeEvents(events) {
176877
177765
  if (!events)
176878
177766
  return [];
@@ -176921,8 +177809,8 @@ function AlertsTab({ tenant }) {
176921
177809
  const { data: watchedGroupsData, isLoading, isError, refetch, } = useGetWatchedGroupsQuery({
176922
177810
  params: {
176923
177811
  platform_key: tenant,
176924
- limit: PAGE_SIZE$4,
176925
- offset: (page - 1) * PAGE_SIZE$4,
177812
+ limit: PAGE_SIZE$7,
177813
+ offset: (page - 1) * PAGE_SIZE$7,
176926
177814
  },
176927
177815
  });
176928
177816
  const groups = useMemo(() => {
@@ -176935,7 +177823,7 @@ function AlertsTab({ tenant }) {
176935
177823
  return results;
176936
177824
  }, [watchedGroupsData, debouncedSearchQuery]);
176937
177825
  const totalPages = watchedGroupsData
176938
- ? Math.max(1, Math.ceil(watchedGroupsData.count / PAGE_SIZE$4))
177826
+ ? Math.max(1, Math.ceil(watchedGroupsData.count / PAGE_SIZE$7))
176939
177827
  : 0;
176940
177828
  const handlePageChange = async (newPage) => {
176941
177829
  setPage(newPage);
@@ -177244,7 +178132,7 @@ function AlertsTab({ tenant }) {
177244
178132
  setDeletingGroupId(null);
177245
178133
  }
177246
178134
  }
177247
- return (jsxs("div", { className: "mt-4", children: [jsxs("div", { className: "flex mb-6 gap-2 flex-row items-center justify-between", children: [jsxs("div", { className: "relative max-w-sm w-full sm:w-auto", children: [jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }), jsx(Input, { value: searchQuery, onChange: (e) => setSearchQuery(e.target.value), placeholder: t('tabsAlertstab.searchAlertsPlaceholder'), "aria-label": t('tabsAlertstab.searchAlertsAriaLabel'), className: "pl-10 pr-10 focus:ring-blue-500 focus:border-blue-500 h-[35px]" }), 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: "flex gap-2", children: jsx(Button$1, { onClick: openNew, "aria-label": t('tabsAlertstab.newAlertAriaLabel'), className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] hover:opacity-90 text-white h-[35px]", children: t('tabsAlertstab.newAlert') }) })] }), isLoading && (jsx("div", { className: "flex justify-center items-center h-64", children: jsx("div", { className: "py-8 text-center text-sm text-gray-500 dark:text-gray-400", children: t('tabsAlertstab.loading') }) })), isError && (jsx("div", { className: "py-8 text-center text-sm text-red-500", children: t('tabsAlertstab.failedToLoadAlerts') })), !isLoading && !isError && (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", children: t('tabsAlertstab.columnName') }), jsx("th", { className: "px-6 py-3 text-right font-medium text-gray-500 dark:text-gray-400 w-[120px]" })] }) }), jsxs("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-600", children: [groups.map((g) => (jsxs("tr", { children: [jsx("td", { className: "px-6 py-4 text-gray-900 dark:text-gray-100 text-sm", children: g.name }), jsx("td", { className: "px-6 py-4", children: jsxs("div", { className: "flex gap-2 justify-end", children: [jsx(Button$1, { variant: "ghost", size: "sm", onClick: () => openEdit(g), disabled: deletingGroupId === g.id, "aria-label": t('tabsAlertstab.editAlertAriaLabel', { name: g.name }), children: jsx(Pencil, { className: "h-4 w-4", "aria-hidden": "true" }) }), jsx(Button$1, { variant: "ghost", size: "sm", onClick: () => onDelete(g), className: "text-red-600 hover:text-red-700", disabled: deletingGroupId === g.id, "aria-label": t('tabsAlertstab.deleteAlertAriaLabel', { name: g.name }), children: deletingGroupId === g.id ? (jsx(LoaderCircle, { className: "h-4 w-4 animate-spin", "aria-hidden": "true" })) : (jsx(Trash2, { className: "h-4 w-4", "aria-hidden": "true" })) })] }) })] }, g.id))), groups.length === 0 && (jsx("tr", { children: jsx("td", { colSpan: 2, className: "px-6 py-8 text-center text-gray-500 dark:text-gray-400", children: t('tabsAlertstab.noAlertsFound') }) }))] })] }) })), !isLoading && !isError && (jsx(AdvancedPagination, { variant: "footer", className: "-mx-6 -mb-6 mt-4 rounded-b-lg", totalPages: totalPages, currentPage: page, onPageChange: (newPage) => handlePageChange(newPage), totalCount: watchedGroupsData === null || watchedGroupsData === void 0 ? void 0 : watchedGroupsData.count, itemsPerPage: PAGE_SIZE$4, itemLabel: "alerts" })), jsx(Dialog, { open: isOpen, onOpenChange: setIsOpen, children: jsxs(DialogContent, { "aria-describedby": undefined, className: "max-w-2xl max-h-[90vh] overflow-y-auto", children: [jsx(DialogHeader, { children: jsx(DialogTitle, { children: editingGroup ? t('tabsAlertstab.editAlert') : t('tabsAlertstab.newAlert') }) }), jsxs("div", { className: "space-y-5", children: [jsxs("div", { className: "grid gap-1.5", children: [jsx(Label$1, { htmlFor: "wg-name", children: t('tabsAlertstab.nameLabel') }), jsx(Input, { id: "wg-name", value: name, onChange: (e) => setName(e.target.value), placeholder: t('tabsAlertstab.enterAlertNamePlaceholder'), required: true })] }), jsxs("div", { className: "grid gap-1.5", children: [jsx(Label$1, { children: t('tabsAlertstab.watchedUsersLabel') }), jsx("p", { className: "text-xs text-gray-500 dark:text-gray-400", children: t('tabsAlertstab.watchedUsersDescription') }), watchedUsers.length > 0 ? (jsx("div", { className: "space-y-2 max-h-48 overflow-y-auto border border-gray-200 dark:border-gray-700 rounded-md p-2", children: watchedUsers.map((user) => (jsxs("div", { className: "flex items-center justify-between bg-gray-50 dark:bg-gray-800 p-2 rounded-md", children: [jsxs("div", { className: "flex flex-col", children: [jsx("span", { className: "text-sm font-medium text-gray-900 dark:text-gray-100", children: user.name || user.username }), user.email && (jsx("span", { className: "text-xs text-gray-500 dark:text-gray-400", children: user.email }))] }), jsx(Button$1, { type: "button", variant: "ghost", size: "sm", onClick: () => removeWatchedUserDraft(user.id), className: "h-8 w-8 p-0 text-red-600 hover:text-red-700 hover:bg-red-50 dark:hover:bg-red-900/20", "aria-label": t('tabsAlertstab.removeWatchedUserAriaLabel', {
178135
+ return (jsxs("div", { className: "mt-4", children: [jsxs("div", { className: "flex mb-6 gap-2 flex-row items-center justify-between", children: [jsxs("div", { className: "relative max-w-sm w-full sm:w-auto", children: [jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }), jsx(Input, { value: searchQuery, onChange: (e) => setSearchQuery(e.target.value), placeholder: t('tabsAlertstab.searchAlertsPlaceholder'), "aria-label": t('tabsAlertstab.searchAlertsAriaLabel'), className: "pl-10 pr-10 focus:ring-blue-500 focus:border-blue-500 h-[35px]" }), 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: "flex gap-2", children: jsx(Button$1, { onClick: openNew, "aria-label": t('tabsAlertstab.newAlertAriaLabel'), className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] hover:opacity-90 text-white h-[35px]", children: t('tabsAlertstab.newAlert') }) })] }), isLoading && (jsx("div", { className: "flex justify-center items-center h-64", children: jsx("div", { className: "py-8 text-center text-sm text-gray-500 dark:text-gray-400", children: t('tabsAlertstab.loading') }) })), isError && (jsx("div", { className: "py-8 text-center text-sm text-red-500", children: t('tabsAlertstab.failedToLoadAlerts') })), !isLoading && !isError && (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", children: t('tabsAlertstab.columnName') }), jsx("th", { className: "px-6 py-3 text-right font-medium text-gray-500 dark:text-gray-400 w-[120px]" })] }) }), jsxs("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-600", children: [groups.map((g) => (jsxs("tr", { children: [jsx("td", { className: "px-6 py-4 text-gray-900 dark:text-gray-100 text-sm", children: g.name }), jsx("td", { className: "px-6 py-4", children: jsxs("div", { className: "flex gap-2 justify-end", children: [jsx(Button$1, { variant: "ghost", size: "sm", onClick: () => openEdit(g), disabled: deletingGroupId === g.id, "aria-label": t('tabsAlertstab.editAlertAriaLabel', { name: g.name }), children: jsx(Pencil, { className: "h-4 w-4", "aria-hidden": "true" }) }), jsx(Button$1, { variant: "ghost", size: "sm", onClick: () => onDelete(g), className: "text-red-600 hover:text-red-700", disabled: deletingGroupId === g.id, "aria-label": t('tabsAlertstab.deleteAlertAriaLabel', { name: g.name }), children: deletingGroupId === g.id ? (jsx(LoaderCircle, { className: "h-4 w-4 animate-spin", "aria-hidden": "true" })) : (jsx(Trash2, { className: "h-4 w-4", "aria-hidden": "true" })) })] }) })] }, g.id))), groups.length === 0 && (jsx("tr", { children: jsx("td", { colSpan: 2, className: "px-6 py-8 text-center text-gray-500 dark:text-gray-400", children: t('tabsAlertstab.noAlertsFound') }) }))] })] }) })), !isLoading && !isError && (jsx(AdvancedPagination, { variant: "footer", className: "-mx-6 -mb-6 mt-4 rounded-b-lg", totalPages: totalPages, currentPage: page, onPageChange: (newPage) => handlePageChange(newPage), totalCount: watchedGroupsData === null || watchedGroupsData === void 0 ? void 0 : watchedGroupsData.count, itemsPerPage: PAGE_SIZE$7, itemLabel: "alerts" })), jsx(Dialog, { open: isOpen, onOpenChange: setIsOpen, children: jsxs(DialogContent, { "aria-describedby": undefined, className: "max-w-2xl max-h-[90vh] overflow-y-auto", children: [jsx(DialogHeader, { children: jsx(DialogTitle, { children: editingGroup ? t('tabsAlertstab.editAlert') : t('tabsAlertstab.newAlert') }) }), jsxs("div", { className: "space-y-5", children: [jsxs("div", { className: "grid gap-1.5", children: [jsx(Label$1, { htmlFor: "wg-name", children: t('tabsAlertstab.nameLabel') }), jsx(Input, { id: "wg-name", value: name, onChange: (e) => setName(e.target.value), placeholder: t('tabsAlertstab.enterAlertNamePlaceholder'), required: true })] }), jsxs("div", { className: "grid gap-1.5", children: [jsx(Label$1, { children: t('tabsAlertstab.watchedUsersLabel') }), jsx("p", { className: "text-xs text-gray-500 dark:text-gray-400", children: t('tabsAlertstab.watchedUsersDescription') }), watchedUsers.length > 0 ? (jsx("div", { className: "space-y-2 max-h-48 overflow-y-auto border border-gray-200 dark:border-gray-700 rounded-md p-2", children: watchedUsers.map((user) => (jsxs("div", { className: "flex items-center justify-between bg-gray-50 dark:bg-gray-800 p-2 rounded-md", children: [jsxs("div", { className: "flex flex-col", children: [jsx("span", { className: "text-sm font-medium text-gray-900 dark:text-gray-100", children: user.name || user.username }), user.email && (jsx("span", { className: "text-xs text-gray-500 dark:text-gray-400", children: user.email }))] }), jsx(Button$1, { type: "button", variant: "ghost", size: "sm", onClick: () => removeWatchedUserDraft(user.id), className: "h-8 w-8 p-0 text-red-600 hover:text-red-700 hover:bg-red-50 dark:hover:bg-red-900/20", "aria-label": t('tabsAlertstab.removeWatchedUserAriaLabel', {
177248
178136
  username: user.username,
177249
178137
  }), children: jsx(X$2, { className: "h-4 w-4" }) })] }, user.id))) })) : (jsx("div", { className: "text-sm text-gray-500 dark:text-gray-400 p-4 text-center border border-dashed border-gray-300 dark:border-gray-600 rounded-md", children: t('tabsAlertstab.noWatchedUsersAdded') })), jsxs("div", { className: "relative", children: [jsx(Input, { value: watchedUserSearch, onChange: (e) => {
177250
178138
  setWatchedUserSearch(e.target.value);
@@ -184261,7 +185149,7 @@ function ItemSearchDropdown({ platformKey, onSelect, }) {
184261
185149
  }, children: [jsx("div", { className: "flex-1 min-w-0", children: jsx("span", { className: "text-sm font-medium text-gray-900 dark:text-gray-100 block truncate", children: item.name }) }), jsx(Badge, { variant: "secondary", className: "text-xs shrink-0 capitalize", children: displayItemType(item.itemType) })] }, `${item.itemType}-${item.id}`)))) : isFetching ? (jsx("div", { className: "px-3 py-4 text-center text-sm text-gray-400", children: t('monetizationItemSearchDropdown.searching') })) : (jsx("div", { className: "px-3 py-4 text-center text-sm text-gray-400", children: t('monetizationItemSearchDropdown.noItemsFound') })) }))] }));
184262
185150
  }
184263
185151
 
184264
- const PAGE_SIZE$3 = 8;
185152
+ const PAGE_SIZE$6 = 8;
184265
185153
  function PaywalledItemsList({ platformKey, onSelectItem, onAddCustomItem, }) {
184266
185154
  const t = useT();
184267
185155
  const [page, setPage] = useState(1);
@@ -184269,7 +185157,7 @@ function PaywalledItemsList({ platformKey, onSelectItem, onAddCustomItem, }) {
184269
185157
  const { data: paywalls, isLoading } = useListPaywallsQuery({
184270
185158
  platform_key: platformKey,
184271
185159
  page,
184272
- page_size: PAGE_SIZE$3,
185160
+ page_size: PAGE_SIZE$6,
184273
185161
  ...(statusFilter !== 'all' && { is_enabled: statusFilter === 'active' }),
184274
185162
  }, { refetchOnMountOrArgChange: true });
184275
185163
  return (jsxs("div", { className: "space-y-4", children: [jsx(Card, { className: "shadow-sm border", style: { borderColor: 'oklch(.922 0 0)' }, children: jsxs(CardContent, { className: "p-4", children: [jsx("h4", { className: "text-sm font-medium text-gray-700 dark:text-gray-300 mb-3", children: t('monetizationPaywalledItemsList.configureItemForSale') }), jsxs("div", { className: "flex items-center gap-2", children: [jsx(ItemSearchDropdown, { platformKey: platformKey, onSelect: (itemType, uniqueId, name) => onSelectItem(itemType, uniqueId, name) }), jsx(Button$1, { variant: "outline", size: "icon", onClick: onAddCustomItem, className: "shrink-0 cursor-pointer", title: t('monetizationPaywalledItemsList.addCustomItemTitle'), children: jsx(Plus, { className: "h-4 w-4" }) })] })] }) }), jsxs("div", { className: "space-y-2", children: [jsxs("div", { className: "flex items-center justify-between", children: [jsx("h4", { className: "text-sm font-medium text-gray-500", children: t('monetizationPaywalledItemsList.configuredItems') }), jsxs(Select$1, { value: statusFilter, onValueChange: (v) => {
@@ -184292,7 +185180,7 @@ function PaywalledItemsList({ platformKey, onSelectItem, onAddCustomItem, }) {
184292
185180
  : 'bg-gray-100 text-gray-500 border-gray-200 hover:bg-gray-100', children: pw.is_enabled
184293
185181
  ? t('monetizationPaywalledItemsList.statusActive')
184294
185182
  : t('monetizationPaywalledItemsList.statusDisabled') })] }) }, `${pw.item_type}-${pw.item_id}`));
184295
- }), jsx(AdvancedPagination, { variant: "footer", className: "mt-2 rounded-lg border", currentPage: page, totalPages: Math.ceil(paywalls.count / PAGE_SIZE$3), onPageChange: setPage, totalCount: paywalls.count, itemsPerPage: PAGE_SIZE$3, itemLabel: "items" })] })) : (jsx("p", { className: "text-sm text-gray-400 text-center py-6", children: statusFilter !== 'all'
185183
+ }), jsx(AdvancedPagination, { variant: "footer", className: "mt-2 rounded-lg border", currentPage: page, totalPages: Math.ceil(paywalls.count / PAGE_SIZE$6), onPageChange: setPage, totalCount: paywalls.count, itemsPerPage: PAGE_SIZE$6, itemLabel: "items" })] })) : (jsx("p", { className: "text-sm text-gray-400 text-center py-6", children: statusFilter !== 'all'
184296
185184
  ? t('monetizationPaywalledItemsList.noFilteredItemsFound', { status: statusFilter })
184297
185185
  : t('monetizationPaywalledItemsList.noItemsConfigured') }))] })] }));
184298
185186
  }
@@ -249333,7 +250221,7 @@ function RetrievedDocumentsButton({ sessionId }) {
249333
250221
  return (jsxs(Fragment$1, { children: [jsxs(Button$1, { variant: "outline", size: "sm", className: "flex items-center gap-2 border-gray-200 bg-white text-gray-700 hover:bg-gray-50", onClick: () => setIsOpen(true), children: [jsx(FileText, { className: "h-4 w-4 text-blue-600" }), jsx("span", { children: t('retrievedDocumentsButton.title') })] }), jsx(Dialog, { open: isOpen, onOpenChange: setIsOpen, children: jsxs(DialogContent, { className: "flex max-h-[80vh] flex-col gap-0 p-0 sm:max-w-[425px] md:max-w-[600px]", children: [jsx(DialogHeader, { className: "border-b px-4 py-2", children: jsxs(DialogTitle, { className: "flex items-center gap-2 text-base font-medium text-[#646464]", children: [jsx(FileText, { className: "h-5 w-5 text-blue-600" }), t('retrievedDocumentsButton.title')] }) }), jsx("div", { className: "flex-1 overflow-hidden", children: jsx(DocumentSidebar, { isModal: true, sessionId: sessionId }) })] }) })] }));
249334
250222
  }
249335
250223
 
249336
- const PAGE_SIZE$2 = 10;
250224
+ const PAGE_SIZE$5 = 10;
249337
250225
  const MemoryMenu = ({ onClose, mentorId, tenantKey, username }) => {
249338
250226
  const t = useT();
249339
250227
  const [page, setPage] = useState(1);
@@ -249351,7 +250239,7 @@ const MemoryMenu = ({ onClose, mentorId, tenantKey, username }) => {
249351
250239
  mentorId,
249352
250240
  params: {
249353
250241
  page,
249354
- page_size: PAGE_SIZE$2,
250242
+ page_size: PAGE_SIZE$5,
249355
250243
  my_memory: true,
249356
250244
  },
249357
250245
  }, {
@@ -252531,7 +253419,219 @@ function OrganizationTab({ platformKey, setOrganizationLogoFromOutside, tenant,
252531
253419
  }, className: "hidden" })] })] })] })] }));
252532
253420
  }
252533
253421
 
252534
- function Account({ tenant, tenants = [], username, onInviteClick, email, mainPlatformKey, userActiveApp = null, showPlatformName = false, isAdmin = false, targetTab = 'basic', currentPlan: _currentPlan = '', currentSPA = '', authURL, onTenantUpdate, currentPlatformBaseDomain = '', enableRbac = false, rbacPermissions = {}, onLoadGroupPermissions, onTabChange, defaultSupportPhone = '', enableSupportPhone, showGradebookTab = false, }) {
253422
+ function CreateBenchmarkModal({ isOpen, onClose, tenantKey, username }) {
253423
+ const t = useT();
253424
+ const [name, setName] = useState('');
253425
+ const [description, setDescription] = useState('');
253426
+ const [createDataset, { isLoading }] = useCreateEvalDatasetMutation();
253427
+ const reset = () => {
253428
+ setName('');
253429
+ setDescription('');
253430
+ };
253431
+ const handleClose = () => {
253432
+ if (isLoading)
253433
+ return;
253434
+ reset();
253435
+ onClose();
253436
+ };
253437
+ const handleSubmit = async (event) => {
253438
+ var _a;
253439
+ event.preventDefault();
253440
+ if (!name.trim()) {
253441
+ toast.error(t('benchmarksCreateBenchmarkModal.nameRequired'));
253442
+ return;
253443
+ }
253444
+ try {
253445
+ await createDataset({
253446
+ org: tenantKey,
253447
+ userId: username,
253448
+ body: { name: name.trim(), description: description.trim() || undefined },
253449
+ }).unwrap();
253450
+ toast.success(t('benchmarksCreateBenchmarkModal.successToast'));
253451
+ reset();
253452
+ onClose();
253453
+ }
253454
+ catch (error) {
253455
+ const detail = error === null || error === void 0 ? void 0 : error.data;
253456
+ toast.error((detail === null || detail === void 0 ? void 0 : detail.detail) || ((_a = detail === null || detail === void 0 ? void 0 : detail.name) === null || _a === void 0 ? void 0 : _a[0]) || t('benchmarksCreateBenchmarkModal.errorToast'));
253457
+ }
253458
+ };
253459
+ return (jsx(Dialog, { open: isOpen, onOpenChange: (open) => !open && handleClose(), children: jsxs(DialogContent, { "aria-label": "create-benchmark", className: "w-full max-w-md", children: [jsxs(DialogHeader, { children: [jsx(DialogTitle, { children: t('benchmarksCreateBenchmarkModal.title') }), jsx(DialogDescription, { children: t('benchmarksCreateBenchmarkModal.description') })] }), jsxs("form", { onSubmit: handleSubmit, className: "grid gap-4 mt-3", children: [jsxs("div", { className: "grid gap-1.5", children: [jsx(Label$1, { htmlFor: "benchmark-name", children: t('benchmarksCreateBenchmarkModal.nameLabel') }), jsx(Input, { id: "benchmark-name", value: name, onChange: (event) => setName(event.target.value), placeholder: t('benchmarksCreateBenchmarkModal.namePlaceholder'), maxLength: 255, autoFocus: true, disabled: isLoading })] }), jsxs("div", { className: "grid gap-1.5", children: [jsx(Label$1, { htmlFor: "benchmark-description", children: t('benchmarksCreateBenchmarkModal.descriptionLabel') }), jsx(Textarea, { id: "benchmark-description", value: description, onChange: (event) => setDescription(event.target.value), placeholder: t('benchmarksCreateBenchmarkModal.descriptionPlaceholder'), rows: 3, disabled: isLoading })] }), jsxs(DialogFooter, { className: "mt-2", children: [jsx(Button$1, { type: "button", variant: "outline", onClick: handleClose, disabled: isLoading, children: t('benchmarksCreateBenchmarkModal.cancel') }), jsxs(Button$1, { type: "submit", disabled: isLoading || !name.trim(), className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-white hover:opacity-90", children: [isLoading && jsx(LoaderCircle, { className: "h-4 w-4 mr-1 animate-spin" }), t('benchmarksCreateBenchmarkModal.create')] })] })] })] }) }));
253460
+ }
253461
+
253462
+ const CSV_SAMPLE = `input,expected_output
253463
+ What is the capital of France?,Paris
253464
+ Who wrote 1984?,George Orwell
253465
+ Explain photosynthesis in one sentence.,`;
253466
+ const blankRow = () => ({ input: '', expected_output: '' });
253467
+ function AddItemsModal({ isOpen, onClose, tenantKey, username, datasetName }) {
253468
+ const t = useT();
253469
+ const [rows, setRows] = useState([blankRow()]);
253470
+ const [csvFile, setCsvFile] = useState(null);
253471
+ const fileInputRef = useRef(null);
253472
+ const [addItems, { isLoading: isAddingItems }] = useAddEvalDatasetItemsMutation();
253473
+ const [uploadCsv, { isLoading: isUploading }] = useUploadEvalDatasetCsvMutation();
253474
+ const isBusy = isAddingItems || isUploading;
253475
+ const reset = () => {
253476
+ setRows([blankRow()]);
253477
+ setCsvFile(null);
253478
+ if (fileInputRef.current)
253479
+ fileInputRef.current.value = '';
253480
+ };
253481
+ const handleClose = () => {
253482
+ if (isBusy)
253483
+ return;
253484
+ reset();
253485
+ onClose();
253486
+ };
253487
+ const handleAddManual = async () => {
253488
+ var _a;
253489
+ const items = rows
253490
+ .map((row) => ({
253491
+ input: row.input.trim(),
253492
+ expected_output: row.expected_output.trim() || undefined,
253493
+ }))
253494
+ .filter((item) => item.input.length > 0);
253495
+ if (items.length === 0) {
253496
+ toast.error(t('benchmarksAddItemsModal.rowRequired'));
253497
+ return;
253498
+ }
253499
+ try {
253500
+ const result = await addItems({
253501
+ org: tenantKey,
253502
+ userId: username,
253503
+ datasetName,
253504
+ body: { items },
253505
+ }).unwrap();
253506
+ toast.success(t('benchmarksAddItemsModal.addedToast', { count: result.created }));
253507
+ reset();
253508
+ onClose();
253509
+ }
253510
+ catch (error) {
253511
+ const detail = (_a = error === null || error === void 0 ? void 0 : error.data) === null || _a === void 0 ? void 0 : _a.detail;
253512
+ toast.error(detail || t('benchmarksAddItemsModal.addErrorToast'));
253513
+ }
253514
+ };
253515
+ const handleUpload = async () => {
253516
+ var _a;
253517
+ if (!csvFile) {
253518
+ toast.error(t('benchmarksAddItemsModal.csvRequired'));
253519
+ return;
253520
+ }
253521
+ const formData = new FormData();
253522
+ formData.append('file', csvFile);
253523
+ try {
253524
+ const result = await uploadCsv({
253525
+ org: tenantKey,
253526
+ userId: username,
253527
+ datasetName,
253528
+ formData,
253529
+ }).unwrap();
253530
+ toast.success(t('benchmarksAddItemsModal.uploadedToast', { count: result.created }));
253531
+ reset();
253532
+ onClose();
253533
+ }
253534
+ catch (error) {
253535
+ const detail = (_a = error === null || error === void 0 ? void 0 : error.data) === null || _a === void 0 ? void 0 : _a.detail;
253536
+ toast.error(detail || t('benchmarksAddItemsModal.uploadErrorToast'));
253537
+ }
253538
+ };
253539
+ const downloadSample = () => {
253540
+ const blob = new Blob([CSV_SAMPLE], { type: 'text/csv;charset=utf-8;' });
253541
+ const url = URL.createObjectURL(blob);
253542
+ const link = document.createElement('a');
253543
+ link.href = url;
253544
+ link.download = 'benchmark_items_sample.csv';
253545
+ document.body.appendChild(link);
253546
+ link.click();
253547
+ document.body.removeChild(link);
253548
+ URL.revokeObjectURL(url);
253549
+ };
253550
+ return (jsx(Dialog, { open: isOpen, onOpenChange: (open) => !open && handleClose(), children: jsxs(DialogContent, { "aria-label": "add-benchmark-items", className: "w-full max-w-2xl max-h-[90vh] overflow-y-auto", children: [jsxs(DialogHeader, { children: [jsx(DialogTitle, { children: t('benchmarksAddItemsModal.title', { name: datasetName }) }), jsx(DialogDescription, { children: t('benchmarksAddItemsModal.description') })] }), jsxs(Tabs, { defaultValue: "manual", className: "mt-2", children: [jsxs(TabsList, { children: [jsx(TabsTrigger, { value: "manual", children: t('benchmarksAddItemsModal.manualTab') }), jsx(TabsTrigger, { value: "csv", children: t('benchmarksAddItemsModal.csvTab') })] }), jsxs(TabsContent, { value: "manual", className: "space-y-3 mt-4", children: [jsx("div", { className: "space-y-3", children: rows.map((row, index) => (jsxs("div", { className: "grid gap-2 sm:grid-cols-[1fr_1fr_auto] items-start border border-gray-200 rounded-md p-3", children: [jsxs("div", { className: "grid gap-1.5", children: [jsx(Label$1, { htmlFor: `item-input-${index}`, children: t('benchmarksAddItemsModal.questionLabel') }), jsx(Textarea, { id: `item-input-${index}`, value: row.input, onChange: (event) => setRows((prev) => prev.map((current, i) => i === index ? { ...current, input: event.target.value } : current)), placeholder: t('benchmarksAddItemsModal.questionPlaceholder'), rows: 2, disabled: isBusy })] }), jsxs("div", { className: "grid gap-1.5", children: [jsx(Label$1, { htmlFor: `item-expected-${index}`, children: t('benchmarksAddItemsModal.answerLabel') }), jsx(Textarea, { id: `item-expected-${index}`, value: row.expected_output, onChange: (event) => setRows((prev) => prev.map((current, i) => i === index
253551
+ ? { ...current, expected_output: event.target.value }
253552
+ : current)), placeholder: t('benchmarksAddItemsModal.answerPlaceholder'), rows: 2, disabled: isBusy })] }), jsx("div", { className: "flex sm:items-end", children: jsx(Button$1, { type: "button", variant: "ghost", size: "sm", disabled: isBusy || rows.length === 1, "aria-label": t('benchmarksAddItemsModal.removeRowAriaLabel'), onClick: () => setRows((prev) => prev.filter((_, i) => i !== index)), children: jsx(Trash2, { className: "h-4 w-4 text-red-500" }) }) })] }, index))) }), jsxs(Button$1, { type: "button", variant: "outline", size: "sm", disabled: isBusy, onClick: () => setRows((prev) => [...prev, blankRow()]), children: [jsx(Plus, { className: "h-4 w-4 mr-1" }), t('benchmarksAddItemsModal.addRow')] }), jsxs(DialogFooter, { className: "mt-4", children: [jsx(Button$1, { variant: "outline", onClick: handleClose, disabled: isBusy, children: t('benchmarksAddItemsModal.cancel') }), jsxs(Button$1, { onClick: handleAddManual, disabled: isBusy, className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-white hover:opacity-90", children: [isAddingItems && jsx(LoaderCircle, { className: "h-4 w-4 mr-1 animate-spin" }), t('benchmarksAddItemsModal.add')] })] })] }), jsxs(TabsContent, { value: "csv", className: "space-y-4 mt-4", children: [jsxs("div", { className: "rounded-md border border-gray-200 bg-gray-50 p-3 text-sm text-gray-700", children: [jsx("p", { className: "font-medium mb-1", children: t('benchmarksAddItemsModal.csvFormatTitle') }), jsxs("ul", { className: "list-disc pl-5 space-y-0.5 text-xs", children: [jsx("li", { children: t('benchmarksAddItemsModal.csvRuleEncoding') }), jsxs("li", { children: [t('benchmarksAddItemsModal.csvRuleRequiredPrefix'), ' ', jsx("code", { className: "bg-white px-1 rounded", children: "input" }), ' ', t('benchmarksAddItemsModal.csvRuleRequiredSuffix')] }), jsxs("li", { children: [t('benchmarksAddItemsModal.csvRuleOptionalPrefix'), ' ', jsx("code", { className: "bg-white px-1 rounded", children: "expected_output" }), ' ', t('benchmarksAddItemsModal.csvRuleOptionalSuffix')] }), jsx("li", { children: t('benchmarksAddItemsModal.csvRuleMaxSize') }), jsx("li", { children: t('benchmarksAddItemsModal.csvRuleBlankSkipped') })] }), jsx(Button$1, { type: "button", variant: "link", size: "sm", className: "px-0 mt-1 text-blue-600", onClick: downloadSample, children: t('benchmarksAddItemsModal.downloadSample') })] }), jsxs("div", { className: "grid gap-1.5", children: [jsx(Label$1, { htmlFor: "csv-file", children: t('benchmarksAddItemsModal.csvFileLabel') }), jsx(Input, { id: "csv-file", ref: fileInputRef, type: "file", accept: ".csv,text/csv", onChange: (event) => { var _a, _b; return setCsvFile((_b = (_a = event.target.files) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : null); }, disabled: isBusy }), csvFile && (jsx("p", { className: "text-xs text-gray-600", children: t('benchmarksAddItemsModal.selectedFile', {
253553
+ name: csvFile.name,
253554
+ size: Math.round(csvFile.size / 1024),
253555
+ }) }))] }), jsxs(DialogFooter, { children: [jsx(Button$1, { variant: "outline", onClick: handleClose, disabled: isBusy, children: t('benchmarksAddItemsModal.cancel') }), jsxs(Button$1, { onClick: handleUpload, disabled: isBusy || !csvFile, className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-white hover:opacity-90", children: [isUploading ? (jsx(LoaderCircle, { className: "h-4 w-4 mr-1 animate-spin" })) : (jsx(Upload, { className: "h-4 w-4 mr-1" })), t('benchmarksAddItemsModal.upload')] })] })] })] })] }) }));
253556
+ }
253557
+
253558
+ function DeleteItemConfirm({ isOpen, onClose, tenantKey, username, datasetName, itemId, }) {
253559
+ const t = useT();
253560
+ const [deleteItem, { isLoading }] = useDeleteEvalDatasetItemMutation();
253561
+ const handleDelete = async () => {
253562
+ var _a;
253563
+ try {
253564
+ await deleteItem({
253565
+ org: tenantKey,
253566
+ userId: username,
253567
+ datasetName,
253568
+ itemId,
253569
+ }).unwrap();
253570
+ toast.success(t('benchmarksDeleteItemConfirm.successToast'));
253571
+ onClose();
253572
+ }
253573
+ catch (error) {
253574
+ const detail = (_a = error === null || error === void 0 ? void 0 : error.data) === null || _a === void 0 ? void 0 : _a.detail;
253575
+ toast.error(detail || t('benchmarksDeleteItemConfirm.errorToast'));
253576
+ }
253577
+ };
253578
+ return (jsx(Dialog, { open: isOpen, onOpenChange: (open) => !open && !isLoading && onClose(), children: jsxs(DialogContent, { "aria-label": "delete-benchmark-item", className: "max-w-md mx-4 sm:mx-auto", children: [jsx(DialogHeader, { children: jsx(DialogTitle, { children: t('benchmarksDeleteItemConfirm.title') }) }), jsx("p", { className: "text-sm text-muted-foreground", children: t('benchmarksDeleteItemConfirm.confirmation') }), jsxs(DialogFooter, { className: "gap-2 mt-4", children: [jsx(Button$1, { variant: "outline", onClick: onClose, disabled: isLoading, children: t('benchmarksDeleteItemConfirm.cancel') }), jsx(Button$1, { className: "ibl-button-primary", onClick: handleDelete, disabled: isLoading, children: isLoading
253579
+ ? t('benchmarksDeleteItemConfirm.deleting')
253580
+ : t('benchmarksDeleteItemConfirm.delete') })] })] }) }));
253581
+ }
253582
+
253583
+ const PAGE_SIZE$4 = 10;
253584
+ function BenchmarkItemsModal({ isOpen, onClose, tenantKey, username, datasetName }) {
253585
+ var _a;
253586
+ const t = useT();
253587
+ const [page, setPage] = useState(1);
253588
+ const [showAdd, setShowAdd] = useState(false);
253589
+ const [deleteItemId, setDeleteItemId] = useState(null);
253590
+ const { data, isLoading } = useListEvalDatasetItemsQuery({
253591
+ org: tenantKey,
253592
+ userId: username,
253593
+ datasetName,
253594
+ page,
253595
+ limit: PAGE_SIZE$4,
253596
+ });
253597
+ const items = (_a = data === null || data === void 0 ? void 0 : data.results) !== null && _a !== void 0 ? _a : [];
253598
+ const totalPages = evalTotalPages(data === null || data === void 0 ? void 0 : data.count, PAGE_SIZE$4);
253599
+ return (jsx(Dialog, { open: isOpen, onOpenChange: (open) => !open && onClose(), children: jsxs(DialogContent, { "aria-label": "benchmark-items", className: "w-full max-w-4xl max-h-[90vh] overflow-y-auto", children: [jsxs(DialogHeader, { children: [jsx(DialogTitle, { children: datasetName }), jsx(DialogDescription, { children: t('benchmarksBenchmarkItemsModal.description') })] }), jsx("div", { className: "flex justify-end mb-4", children: jsxs(Button$1, { onClick: () => setShowAdd(true), className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] hover:opacity-90 text-white h-[35px]", children: [jsx(Plus, { className: "h-4 w-4 mr-1" }), t('benchmarksBenchmarkItemsModal.addItems')] }) }), isLoading ? (jsx("div", { className: "flex justify-center items-center h-40", 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-4 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[45%]", children: t('benchmarksBenchmarkItemsModal.questionColumn') }), jsx("th", { className: "px-4 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[45%]", children: t('benchmarksBenchmarkItemsModal.answerColumn') }), jsx("th", { className: "px-4 py-3 text-right font-medium text-gray-500 dark:text-gray-400 w-[10%]", children: t('benchmarksBenchmarkItemsModal.actionsColumn') })] }) }), jsxs("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-600", children: [items.map((item) => {
253600
+ var _a;
253601
+ return (jsxs("tr", { className: "align-top", children: [jsx("td", { className: "px-4 py-3 text-gray-900 dark:text-gray-100", children: jsx("div", { className: "line-clamp-3 break-words", children: typeof item.input === 'string' ? item.input : JSON.stringify(item.input) }) }), jsx("td", { className: "px-4 py-3 text-gray-600 dark:text-gray-300", children: jsx("div", { className: "line-clamp-3 break-words", children: (_a = item.expected_output) !== null && _a !== void 0 ? _a : jsx("span", { className: "text-gray-400", children: "\u2014" }) }) }), jsx("td", { className: "px-4 py-3 text-right", children: jsx(Button$1, { variant: "ghost", size: "sm", "aria-label": t('benchmarksBenchmarkItemsModal.deleteItemAriaLabel'), onClick: () => setDeleteItemId(item.id), children: jsx(Trash2, { className: "h-4 w-4 text-red-500" }) }) })] }, item.id));
253602
+ }), items.length === 0 && (jsx("tr", { children: jsx("td", { colSpan: 3, className: "px-4 py-8 text-center text-gray-500 dark:text-gray-400", children: t('benchmarksBenchmarkItemsModal.empty') }) }))] })] }) }), totalPages > 1 && (jsx("div", { className: "mt-6", children: jsx(AdvancedPagination, { totalPages: totalPages, currentPage: page, onPageChange: setPage }) }))] })), jsx(AddItemsModal, { isOpen: showAdd, onClose: () => setShowAdd(false), tenantKey: tenantKey, username: username, datasetName: datasetName }), deleteItemId && (jsx(DeleteItemConfirm, { isOpen: !!deleteItemId, onClose: () => setDeleteItemId(null), tenantKey: tenantKey, username: username, datasetName: datasetName, itemId: deleteItemId }))] }) }));
253603
+ }
253604
+
253605
+ const PAGE_SIZE$3 = 10;
253606
+ function BenchmarksTab({ tenantKey, username, }) {
253607
+ var _a;
253608
+ const t = useT();
253609
+ const [page, setPage] = useState(1);
253610
+ const [searchQuery, setSearchQuery] = useState('');
253611
+ const [showCreate, setShowCreate] = useState(false);
253612
+ const [viewBenchmark, setViewBenchmark] = useState(null);
253613
+ const { data, isLoading, isFetching } = useListEvalDatasetsQuery({
253614
+ org: tenantKey,
253615
+ userId: username,
253616
+ page,
253617
+ limit: PAGE_SIZE$3,
253618
+ });
253619
+ const benchmarks = (_a = data === null || data === void 0 ? void 0 : data.results) !== null && _a !== void 0 ? _a : [];
253620
+ const filtered = searchQuery.trim()
253621
+ ? benchmarks.filter((benchmark) => benchmark.name.toLowerCase().includes(searchQuery.toLowerCase()))
253622
+ : benchmarks;
253623
+ const totalPages = evalTotalPages(data === null || data === void 0 ? void 0 : data.count, PAGE_SIZE$3);
253624
+ return (jsxs("div", { className: "mt-4", children: [jsxs("div", { className: "flex justify-between items-center gap-1 flex-wrap", children: [jsxs("div", { className: "relative mb-6 max-w-sm w-full sm:w-auto", 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) => setSearchQuery(event.target.value), placeholder: t('benchmarksIndex.searchPlaceholder'), className: "pl-10 pr-10 focus:ring-blue-500 focus:border-blue-500 h-[35px]", "aria-label": t('benchmarksIndex.searchAriaLabel') })] }), jsx("div", { className: "mb-6", children: jsxs(Button$1, { className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] hover:opacity-90 text-white h-[35px]", onClick: () => setShowCreate(true), children: [jsx(Plus, { className: "h-4 w-4 mr-1" }), t('benchmarksIndex.newBenchmark')] }) })] }), 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-[28%]", children: t('benchmarksIndex.nameColumn') }), jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[36%]", children: t('benchmarksIndex.descriptionColumn') }), jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[20%]", children: t('benchmarksIndex.createdColumn') }), jsx("th", { className: "px-6 py-3 text-right font-medium text-gray-500 dark:text-gray-400 w-[16%]", children: t('benchmarksIndex.actionsColumn') })] }) }), jsxs("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-600", children: [filtered.map((benchmark) => (jsxs("tr", { children: [jsx("td", { className: "px-6 py-4 text-gray-900 dark:text-gray-100 max-w-0", children: jsx("div", { className: "truncate font-medium", children: benchmark.name }) }), jsx("td", { className: "px-6 py-4 text-gray-600 dark:text-gray-300 max-w-0", children: jsx("div", { className: "truncate", children: benchmark.description || '—' }) }), jsx("td", { className: "px-6 py-4 text-gray-600 dark:text-gray-300 whitespace-nowrap", children: benchmark.created_at
253625
+ ? formatDistanceToNow(new Date(benchmark.created_at), {
253626
+ addSuffix: true,
253627
+ })
253628
+ : '—' }), jsx("td", { className: "px-6 py-4", children: jsx("div", { className: "flex justify-end gap-2", children: jsx(Button$1, { variant: "ghost", size: "sm", "aria-label": t('benchmarksIndex.viewItemsAriaLabel', {
253629
+ name: benchmark.name,
253630
+ }), onClick: () => setViewBenchmark(benchmark.name), children: jsx(Eye, { className: "h-4 w-4" }) }) }) })] }, benchmark.name))), filtered.length === 0 && (jsx("tr", { children: jsx("td", { colSpan: 4, className: "px-6 py-8 text-center text-gray-500 dark:text-gray-400", children: isFetching ? t('benchmarksIndex.loading') : t('benchmarksIndex.empty') }) }))] })] }) }), totalPages > 1 && (jsx("div", { className: "mt-6", children: jsx(AdvancedPagination, { totalPages: totalPages, currentPage: page, onPageChange: setPage }) }))] })), jsx(CreateBenchmarkModal, { isOpen: showCreate, onClose: () => setShowCreate(false), tenantKey: tenantKey, username: username }), viewBenchmark && (jsx(BenchmarkItemsModal, { isOpen: !!viewBenchmark, onClose: () => setViewBenchmark(null), tenantKey: tenantKey, username: username, datasetName: viewBenchmark }))] }));
253631
+ }
253632
+
253633
+ function Account({ tenant, tenants = [], username, onInviteClick, email, mainPlatformKey, userActiveApp = null, showPlatformName = false, isAdmin = false, targetTab = 'basic', currentPlan: _currentPlan = '', currentSPA = '', authURL, onTenantUpdate, currentPlatformBaseDomain = '', enableRbac = false, showBenchmarks = false, rbacPermissions = {}, onLoadGroupPermissions, onTabChange, defaultSupportPhone = '', enableSupportPhone, showGradebookTab = false, }) {
253634
+ var _a, _b, _c, _d;
252535
253635
  const t = useT();
252536
253636
  const currentTenant = tenants.find((ten) => ten.key === tenant);
252537
253637
  const hasMonetizationPermission = checkRbacPermission(rbacPermissions, `/platforms/${tenant}/#can_sell_items`, enableRbac);
@@ -252543,6 +253643,9 @@ function Account({ tenant, tenants = [], username, onInviteClick, email, mainPla
252543
253643
  ...(canMonetize
252544
253644
  ? [{ id: 'monetization', label: t('profileAccount.tabMonetization'), icon: Coins }]
252545
253645
  : []),
253646
+ ...(showBenchmarks
253647
+ ? [{ id: 'datasets', label: t('profileAccount.tabBenchmarks'), icon: ListChecks }]
253648
+ : []),
252546
253649
  { id: 'advanced', label: t('profileAccount.tabAdvanced'), icon: Settings$1 },
252547
253650
  ];
252548
253651
  const [activeTab, setActiveTab] = useState(targetTab);
@@ -252624,13 +253727,13 @@ function Account({ tenant, tenants = [], username, onInviteClick, email, mainPla
252624
253727
  onTabChange === null || onTabChange === void 0 ? void 0 : onTabChange('billing');
252625
253728
  }, className: `flex items-center gap-2 px-3 py-2 rounded-lg whitespace-nowrap text-sm transition-all ${activeTab === 'billing'
252626
253729
  ? 'bg-blue-50 text-blue-600 font-medium'
252627
- : 'text-gray-600 hover:bg-gray-50'}`, children: [jsx(CreditCard, { className: "h-4 w-4" }), jsx("span", { className: "hidden sm:inline", children: t('profileAccount.tabBilling') }), jsx("span", { className: "sm:hidden", children: t('profileAccount.tabBilling') })] }, 'billing'))] }) }) }), jsxs("div", { className: "flex-1 flex flex-col overflow-hidden", style: { height: '100%' }, children: [jsxs("div", { className: "hidden lg:block flex-shrink-0 p-6 border-b border-gray-200 bg-white dark:bg-gray-900", children: [jsx("h3", { className: "text-lg font-medium text-gray-900 dark:text-gray-100 mb-2 capitalize", children: activeTab }), jsxs("p", { className: "text-gray-600 dark:text-gray-400 text-sm", children: [activeTab === 'management' && t('profileAccount.descManagement'), activeTab === 'organization' && t('profileAccount.descOrganization'), activeTab === 'integrations' && t('profileAccount.descIntegrations'), activeTab === 'billing' && t('profileAccount.descBilling'), activeTab === 'monetization' && t('profileAccount.descMonetization'), activeTab === 'advanced' && t('profileAccount.descAdvanced')] })] }), jsxs("div", { className: "flex-1 p-6 space-y-6", style: {
253730
+ : 'text-gray-600 hover:bg-gray-50'}`, children: [jsx(CreditCard, { className: "h-4 w-4" }), jsx("span", { className: "hidden sm:inline", children: t('profileAccount.tabBilling') }), jsx("span", { className: "sm:hidden", children: t('profileAccount.tabBilling') })] }, 'billing'))] }) }) }), jsxs("div", { className: "flex-1 flex flex-col overflow-hidden", style: { height: '100%' }, children: [jsxs("div", { className: "hidden lg:block flex-shrink-0 p-6 border-b border-gray-200 bg-white dark:bg-gray-900", children: [jsx("h3", { className: "text-lg font-medium text-gray-900 dark:text-gray-100 mb-2", children: (_b = (_a = TABS.find((t) => t.id === activeTab)) === null || _a === void 0 ? void 0 : _a.label) !== null && _b !== void 0 ? _b : activeTab }), jsxs("p", { className: "text-gray-600 dark:text-gray-400 text-sm", children: [activeTab === 'management' && t('profileAccount.descManagement'), activeTab === 'organization' && t('profileAccount.descOrganization'), activeTab === 'integrations' && t('profileAccount.descIntegrations'), activeTab === 'billing' && t('profileAccount.descBilling'), activeTab === 'monetization' && t('profileAccount.descMonetization'), activeTab === 'datasets' && t('profileAccount.descBenchmarks'), activeTab === 'advanced' && t('profileAccount.descAdvanced')] })] }), jsxs("div", { className: "flex-1 p-6 space-y-6", style: {
252628
253731
  overflowY: 'auto',
252629
253732
  overflowX: 'hidden',
252630
- }, children: [jsxs("div", { className: "lg:hidden mb-6", children: [jsx("h3", { className: "text-lg font-medium text-gray-900 dark:text-gray-100 mb-2 capitalize", children: activeTab }), jsxs("p", { className: "text-gray-600 dark:text-gray-400 text-sm", children: [activeTab === 'basic' && t('profileAccount.descBasic'), activeTab === 'social' && t('profileAccount.descSocial'), activeTab === 'security' && t('profileAccount.descSecurity'), activeTab === 'management' && t('profileAccount.descManagement'), activeTab === 'organization' && t('profileAccount.descOrganization'), activeTab === 'monetization' && t('profileAccount.descMonetization'), activeTab === 'advanced' && t('profileAccount.descAdvanced')] })] }), activeTab === 'management' && hasManagementPermissions && (jsx(Admin, { onInviteClick: onInviteClick, tenant: tenant, currentSpa: currentSPA, hasUserTabPermission: hasUserTabPermission, hasGroupsTabPermission: hasGroupsTabPermission, hasPoliciesTabPermission: hasPoliciesTabPermission, hasRolesTabPermission: hasRolesTabPermission, hasTeamsTabPermission: hasTeamsTabPermission, hasInviteUserPermission: hasInviteUserPermission, hasCreateTeamPermission: hasCreateTeamPermission, onLoadGroupPermissions: onLoadGroupPermissions, hasAlertsTabPermission: hasAlertsTabPermission, rbacPermissions: rbacPermissions, enableRbac: enableRbac, showGradebookTab: showGradebookTab })), activeTab === 'organization' && (jsx(OrganizationTab, { platformKey: tenant, tenant: tenants.find((ten) => ten.key === tenant), onTenantUpdate: onTenantUpdate, setOrganizationLogoFromOutside: setOrganizationLogo, defaultSupportPhone: defaultSupportPhone, enableSupportPhone: enableSupportPhone })), activeTab === 'integrations' && (jsx(IntegrationsTab, { tenantKey: tenant, username: username })), activeTab === 'billing' && (jsx(BillingTab, { tenant: tenant, userActiveApp: userActiveApp, username: username, currentUserEmail: email, mainPlatformKey: mainPlatformKey })), activeTab === 'monetization' && (jsx(MonetizationTab, { platformKey: tenant, authURL: authURL })), activeTab === 'advanced' && (jsx(AdvancedTab, { platformKey: tenant, currentSPA: currentSPA, username: username, authURL: authURL, currentPlatformBaseDomain: currentPlatformBaseDomain }))] })] }), jsx(ToastProvider, {})] }));
253733
+ }, children: [jsxs("div", { className: "lg:hidden mb-6", children: [jsx("h3", { className: "text-lg font-medium text-gray-900 dark:text-gray-100 mb-2", children: (_d = (_c = TABS.find((t) => t.id === activeTab)) === null || _c === void 0 ? void 0 : _c.label) !== null && _d !== void 0 ? _d : activeTab }), jsxs("p", { className: "text-gray-600 dark:text-gray-400 text-sm", children: [activeTab === 'basic' && t('profileAccount.descBasic'), activeTab === 'social' && t('profileAccount.descSocial'), activeTab === 'security' && t('profileAccount.descSecurity'), activeTab === 'management' && t('profileAccount.descManagement'), activeTab === 'organization' && t('profileAccount.descOrganization'), activeTab === 'monetization' && t('profileAccount.descMonetization'), activeTab === 'datasets' && t('profileAccount.descBenchmarks'), activeTab === 'advanced' && t('profileAccount.descAdvanced')] })] }), activeTab === 'management' && hasManagementPermissions && (jsx(Admin, { onInviteClick: onInviteClick, tenant: tenant, currentSpa: currentSPA, hasUserTabPermission: hasUserTabPermission, hasGroupsTabPermission: hasGroupsTabPermission, hasPoliciesTabPermission: hasPoliciesTabPermission, hasRolesTabPermission: hasRolesTabPermission, hasTeamsTabPermission: hasTeamsTabPermission, hasInviteUserPermission: hasInviteUserPermission, hasCreateTeamPermission: hasCreateTeamPermission, onLoadGroupPermissions: onLoadGroupPermissions, hasAlertsTabPermission: hasAlertsTabPermission, rbacPermissions: rbacPermissions, enableRbac: enableRbac, showGradebookTab: showGradebookTab })), activeTab === 'organization' && (jsx(OrganizationTab, { platformKey: tenant, tenant: tenants.find((ten) => ten.key === tenant), onTenantUpdate: onTenantUpdate, setOrganizationLogoFromOutside: setOrganizationLogo, defaultSupportPhone: defaultSupportPhone, enableSupportPhone: enableSupportPhone })), activeTab === 'integrations' && (jsx(IntegrationsTab, { tenantKey: tenant, username: username })), activeTab === 'billing' && (jsx(BillingTab, { tenant: tenant, userActiveApp: userActiveApp, username: username, currentUserEmail: email, mainPlatformKey: mainPlatformKey })), activeTab === 'monetization' && (jsx(MonetizationTab, { platformKey: tenant, authURL: authURL })), activeTab === 'datasets' && showBenchmarks && (jsx(BenchmarksTab, { tenantKey: tenant, username: username })), activeTab === 'advanced' && (jsx(AdvancedTab, { platformKey: tenant, currentSPA: currentSPA, username: username, authURL: authURL, currentPlatformBaseDomain: currentPlatformBaseDomain }))] })] }), jsx(ToastProvider, {})] }));
252631
253734
  }
252632
253735
 
252633
- function UserProfileModal({ isOpen, onClose, params, email, mainPlatformKey, showMentorAIDisplayCheckbox = false, showLeaderboardDisplayCheckbox = false, showGradebookTab = false, showUsernameField = false, showPlatformName = false, useGravatarPicFallback = true, enableCatalogInvite = false, targetTab = 'basic', currentPlan = '', currentSPA = '', userActiveApp = null, authURL, tenants = [], onTenantUpdate, currentPlatformBaseDomain = '', rbacPermissions = {}, enableRbac = false, onLoadGroupPermissions, onTabChange, defaultSupportPhone = '', onBillingTabRequest, onAccountDeleted, enableMemoryTab = false, localLLMProps, systemControlProps, enableSupportPhone, }) {
253736
+ function UserProfileModal({ isOpen, onClose, params, email, mainPlatformKey, showMentorAIDisplayCheckbox = false, showLeaderboardDisplayCheckbox = false, showGradebookTab = false, showUsernameField = false, showPlatformName = false, useGravatarPicFallback = true, enableCatalogInvite = false, targetTab = 'basic', currentPlan = '', currentSPA = '', userActiveApp = null, authURL, tenants = [], onTenantUpdate, currentPlatformBaseDomain = '', rbacPermissions = {}, enableRbac = false, onLoadGroupPermissions, onTabChange, defaultSupportPhone = '', onBillingTabRequest, onAccountDeleted, enableMemoryTab = false, showBenchmarks = false, localLLMProps, systemControlProps, enableSupportPhone, }) {
252634
253737
  const t = useT();
252635
253738
  console.log('[UserProfileModal] localLLMProps received:', {
252636
253739
  isAvailable: localLLMProps === null || localLLMProps === void 0 ? void 0 : localLLMProps.isAvailable,
@@ -252696,7 +253799,14 @@ function UserProfileModal({ isOpen, onClose, params, email, mainPlatformKey, sho
252696
253799
  showPlatformName: showPlatformName,
252697
253800
  useGravatarPicFallback: useGravatarPicFallback,
252698
253801
  showGradebookTab: showGradebookTab,
252699
- }, isAdmin: params.isAdmin, targetTab: targetTab, onClose: onClose, onAccountDeleted: onAccountDeleted, enableMemoryTab: enableMemoryTab, localLLMProps: localLLMProps, systemControlProps: systemControlProps })), ['organization', 'management', 'integrations', 'billing', 'monetization'].includes(targetTab) && (jsxs(Fragment$1, { children: [jsx(Account, { onInviteClick: () => setIsInviteUserDialogOpen(true), tenant: params.tenantKey, tenants: tenants, username: getUserName$1(), email: email, mainPlatformKey: mainPlatformKey, showUsernameField: showUsernameField, showPlatformName: showPlatformName, useGravatarPicFallback: useGravatarPicFallback, onClose: onClose, isAdmin: params.isAdmin, targetTab: targetTab, currentPlan: currentPlan, currentSPA: currentSPA, userActiveApp: userActiveApp, authURL: authURL, onTenantUpdate: onTenantUpdate, currentPlatformBaseDomain: currentPlatformBaseDomain, rbacPermissions: rbacPermissions, enableRbac: enableRbac, onLoadGroupPermissions: onLoadGroupPermissions, onTabChange: onTabChange, defaultSupportPhone: defaultSupportPhone, enableSupportPhone: enableSupportPhone, showGradebookTab: showGradebookTab }), isInviteUserDialogOpen && (jsx(InviteUserDialog, { tenant: params.tenantKey, onClose: () => setIsInviteUserDialogOpen(false), isOpen: isInviteUserDialogOpen, enableCatalogInvite: enableCatalogInvite, hasManageUsersPermission: hasManageUsersPermission })), isInvitedUsersDialogOpen && (jsx(InvitedUsersDialog, { onClose: () => setIsInvitedUsersDialogOpen(false), tenant: params.tenantKey }))] }))] }) }) }));
253802
+ }, isAdmin: params.isAdmin, targetTab: targetTab, onClose: onClose, onAccountDeleted: onAccountDeleted, enableMemoryTab: enableMemoryTab, localLLMProps: localLLMProps, systemControlProps: systemControlProps })), [
253803
+ 'organization',
253804
+ 'management',
253805
+ 'integrations',
253806
+ 'billing',
253807
+ 'monetization',
253808
+ 'datasets',
253809
+ ].includes(targetTab) && (jsxs(Fragment$1, { children: [jsx(Account, { onInviteClick: () => setIsInviteUserDialogOpen(true), tenant: params.tenantKey, tenants: tenants, username: getUserName$1(), email: email, mainPlatformKey: mainPlatformKey, showUsernameField: showUsernameField, showPlatformName: showPlatformName, useGravatarPicFallback: useGravatarPicFallback, onClose: onClose, isAdmin: params.isAdmin, targetTab: targetTab, currentPlan: currentPlan, currentSPA: currentSPA, userActiveApp: userActiveApp, authURL: authURL, onTenantUpdate: onTenantUpdate, currentPlatformBaseDomain: currentPlatformBaseDomain, rbacPermissions: rbacPermissions, enableRbac: enableRbac, onLoadGroupPermissions: onLoadGroupPermissions, onTabChange: onTabChange, defaultSupportPhone: defaultSupportPhone, showBenchmarks: showBenchmarks, enableSupportPhone: enableSupportPhone, showGradebookTab: showGradebookTab }), isInviteUserDialogOpen && (jsx(InviteUserDialog, { tenant: params.tenantKey, onClose: () => setIsInviteUserDialogOpen(false), isOpen: isInviteUserDialogOpen, enableCatalogInvite: enableCatalogInvite, hasManageUsersPermission: hasManageUsersPermission })), isInvitedUsersDialogOpen && (jsx(InvitedUsersDialog, { onClose: () => setIsInvitedUsersDialogOpen(false), tenant: params.tenantKey }))] }))] }) }) }));
252700
253810
  }
252701
253811
 
252702
253812
  const IS_SERVER = typeof window === 'undefined';
@@ -253453,7 +254563,7 @@ localLLMProps,
253453
254563
  // System Control props
253454
254564
  systemControlProps,
253455
254565
  // Controlled modal state
253456
- isModalOpen, onModalOpenChange, defaultActiveTab, onAccountDeleted, enableMemoryTab, }) {
254566
+ isModalOpen, onModalOpenChange, defaultActiveTab, onAccountDeleted, enableMemoryTab, showBenchmarks = false, }) {
253457
254567
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
253458
254568
  const t = useT();
253459
254569
  // Use hooks to fetch user metadata
@@ -253688,6 +254798,7 @@ isModalOpen, onModalOpenChange, defaultActiveTab, onAccountDeleted, enableMemory
253688
254798
  },
253689
254799
  onAccountDeleted,
253690
254800
  enableMemoryTab,
254801
+ showBenchmarks,
253691
254802
  };
253692
254803
  if (CustomProfileModal) {
253693
254804
  return jsx(CustomProfileModal, { ...modalProps });
@@ -258908,7 +260019,7 @@ const BulkDeleteMemoryModal$1 = dynamic(() => Promise.resolve().then(function ()
258908
260019
  const ManageCategoriesModal$1 = dynamic(() => Promise.resolve().then(function () { return manageCategoriesModal; }).then((module) => ({
258909
260020
  default: module.ManageCategoriesModal,
258910
260021
  })), { ssr: false });
258911
- const PAGE_SIZE$1 = 20;
260022
+ const PAGE_SIZE$2 = 20;
258912
260023
  const SNAPSHOT_PAGE_SIZE = 1000;
258913
260024
  function ManageMemories({ tenantKey, username, mentorId }) {
258914
260025
  var _a, _b, _c, _d, _e;
@@ -258923,7 +260034,7 @@ function ManageMemories({ tenantKey, username, mentorId }) {
258923
260034
  setPage(1);
258924
260035
  }, [selectedLearner, dateRange, selectedCategorySlug]);
258925
260036
  const listParams = useMemo(() => {
258926
- const params = { page, page_size: PAGE_SIZE$1 };
260037
+ const params = { page, page_size: PAGE_SIZE$2 };
258927
260038
  if (selectedLearner)
258928
260039
  params.email = selectedLearner;
258929
260040
  if (selectedCategorySlug !== 'all')
@@ -258942,7 +260053,7 @@ function ManageMemories({ tenantKey, username, mentorId }) {
258942
260053
  }, {
258943
260054
  skip: !tenantKey || !username || !mentorId,
258944
260055
  });
258945
- const totalPages = Math.max(1, Math.ceil(((_a = listResponse === null || listResponse === void 0 ? void 0 : listResponse.count) !== null && _a !== void 0 ? _a : 0) / PAGE_SIZE$1));
260056
+ const totalPages = Math.max(1, Math.ceil(((_a = listResponse === null || listResponse === void 0 ? void 0 : listResponse.count) !== null && _a !== void 0 ? _a : 0) / PAGE_SIZE$2));
258946
260057
  const { data: adminCategories } = useGetMemoryCategoriesAdminQuery({
258947
260058
  org: tenantKey,
258948
260059
  mentorId,
@@ -261862,11 +262973,11 @@ function toTitleCase(name) {
261862
262973
  return name;
261863
262974
  return name
261864
262975
  .split(/\s+/)
261865
- .map((word) => word.length > 0 ? word[0].toUpperCase() + word.slice(1).toLowerCase() : word)
262976
+ .map((word) => (word.length > 0 ? word[0].toUpperCase() + word.slice(1).toLowerCase() : word))
261866
262977
  .join(' ');
261867
262978
  }
261868
262979
 
261869
- const PAGE_SIZE = 20;
262980
+ const PAGE_SIZE$1 = 20;
261870
262981
  function VoicePicker({ org, userId, provider, selectedVoiceId, onSelect, disabled, labels, }) {
261871
262982
  var _a, _b;
261872
262983
  const t = useT();
@@ -261886,13 +262997,13 @@ function VoicePicker({ org, userId, provider, selectedVoiceId, onSelect, disable
261886
262997
  userId,
261887
262998
  provider,
261888
262999
  page,
261889
- pageSize: PAGE_SIZE,
263000
+ pageSize: PAGE_SIZE$1,
261890
263001
  ...(debouncedSearch ? { search: debouncedSearch } : {}),
261891
263002
  }, { skip: !org || !userId });
261892
263003
  const paginated = data;
261893
263004
  const voices = (_a = paginated === null || paginated === void 0 ? void 0 : paginated.results) !== null && _a !== void 0 ? _a : [];
261894
263005
  const total = (_b = paginated === null || paginated === void 0 ? void 0 : paginated.count) !== null && _b !== void 0 ? _b : 0;
261895
- const totalPages = total > 0 ? Math.ceil(total / PAGE_SIZE) : 1;
263006
+ const totalPages = total > 0 ? Math.ceil(total / PAGE_SIZE$1) : 1;
261896
263007
  // Whenever a voice id is saved on the mentor settings, fetch it directly
261897
263008
  // so we can pin it at the top of the list. Otherwise the user can land
261898
263009
  // on a page that doesn't contain the selected voice and the selection
@@ -261981,8 +263092,7 @@ function VoicePickerTrigger({ org, userId, provider, selectedVoice, onSelect, di
261981
263092
  const audioUrl = (selectedVoice === null || selectedVoice === void 0 ? void 0 : selectedVoice.audio_url) || '';
261982
263093
  const isPlaying = selectedVoice != null && playingId === selectedVoice.id;
261983
263094
  const showPlayLoader = isPlaying && isPreviewLoading;
261984
- return (jsxs(Fragment$1, { children: [jsxs("div", { className: cn('flex w-full items-center gap-2 rounded-lg border-2 border-gray-200 bg-white p-3 transition-colors', !disabled &&
261985
- 'hover:border-blue-300 focus-within:border-blue-500', disabled && 'cursor-not-allowed opacity-60'), "data-testid": testId !== null && testId !== void 0 ? testId : 'voice-picker-trigger', children: [jsxs("button", { type: "button", disabled: disabled, onClick: () => setIsOpen(true), "aria-haspopup": "dialog", "aria-expanded": isOpen, className: "flex min-w-0 flex-1 items-center gap-3 text-left focus-visible:outline-none", "data-testid": testId ? `${testId}-open` : 'voice-picker-trigger-open', children: [jsx("span", { className: "flex h-9 w-9 flex-shrink-0 items-center justify-center rounded-full bg-blue-50 text-blue-600", children: jsx(Volume2, { className: "h-4 w-4", "aria-hidden": "true" }) }), jsxs("span", { className: "flex min-w-0 flex-col", children: [jsx("span", { className: "truncate text-sm font-medium text-gray-900", children: displayName !== null && displayName !== void 0 ? displayName : emptyLabel }), language && (jsx("span", { className: "truncate text-xs text-gray-500", children: language }))] })] }), audioUrl && selectedVoice && (jsx(Button$1, { type: "button", variant: "ghost", size: "icon", className: "h-8 w-8 flex-shrink-0 text-gray-500 hover:text-blue-600", disabled: disabled, onClick: (e) => {
263095
+ return (jsxs(Fragment$1, { children: [jsxs("div", { className: cn('flex w-full items-center gap-2 rounded-lg border-2 border-gray-200 bg-white p-3 transition-colors', !disabled && 'hover:border-blue-300 focus-within:border-blue-500', disabled && 'cursor-not-allowed opacity-60'), "data-testid": testId !== null && testId !== void 0 ? testId : 'voice-picker-trigger', children: [jsxs("button", { type: "button", disabled: disabled, onClick: () => setIsOpen(true), "aria-haspopup": "dialog", "aria-expanded": isOpen, className: "flex min-w-0 flex-1 items-center gap-3 text-left focus-visible:outline-none", "data-testid": testId ? `${testId}-open` : 'voice-picker-trigger-open', children: [jsx("span", { className: "flex h-9 w-9 flex-shrink-0 items-center justify-center rounded-full bg-blue-50 text-blue-600", children: jsx(Volume2, { className: "h-4 w-4", "aria-hidden": "true" }) }), jsxs("span", { className: "flex min-w-0 flex-col", children: [jsx("span", { className: "truncate text-sm font-medium text-gray-900", children: displayName !== null && displayName !== void 0 ? displayName : emptyLabel }), language && jsx("span", { className: "truncate text-xs text-gray-500", children: language })] })] }), audioUrl && selectedVoice && (jsx(Button$1, { type: "button", variant: "ghost", size: "icon", className: "h-8 w-8 flex-shrink-0 text-gray-500 hover:text-blue-600", disabled: disabled, onClick: (e) => {
261986
263096
  e.stopPropagation();
261987
263097
  play(selectedVoice.id, audioUrl);
261988
263098
  }, "aria-label": labels.previewAria(displayName !== null && displayName !== void 0 ? displayName : '', isPlaying ? 'stop' : 'play'), "data-testid": testId ? `${testId}-preview` : 'voice-picker-trigger-preview', children: showPlayLoader ? (jsx(LoaderCircle, { className: "h-4 w-4 animate-spin" })) : isPlaying ? (jsx(Pause, { className: "h-4 w-4" })) : (jsx(Play, { className: "h-4 w-4" })) })), jsx(ChevronDown, { className: "h-4 w-4 flex-shrink-0 text-gray-400", "aria-hidden": "true" })] }), jsx(VoicePickerModal, { isOpen: isOpen, onClose: () => setIsOpen(false), org: org, userId: userId, provider: provider, selectedVoiceId: (_a = selectedVoice === null || selectedVoice === void 0 ? void 0 : selectedVoice.id) !== null && _a !== void 0 ? _a : null, onSelect: onSelect, labels: labels, title: modalTitle, description: modalDescription })] }));
@@ -266822,6 +267932,1000 @@ function AgentAccessTab({ labels: labelsProp, onPermissionsLoaded }) {
266822
267932
  }, children: editingPolicy && (jsxs(DialogContent, { className: "max-w-2xl", children: [jsxs(DialogHeader, { children: [jsx(DialogTitle, { children: labels.editDialog.title.replace('{role}', formatRoleName(editingPolicy.role)) }), jsx(DialogDescription, { children: labels.editDialog.description.replace('{role}', formatRoleName(editingPolicy.role)) })] }), jsx(RoleAccessPanel, { policy: editingPolicy, onAccessUpdated: handleRefetch, hasUsersPermission: hasUsersPermission, hasGroupsPermission: hasGroupsPermission })] })) })] }));
266823
267933
  }
266824
267934
 
267935
+ function BenchmarkCombobox({ benchmarks, value, onChange, placeholder, searchPlaceholder, emptyMessage, disabled, }) {
267936
+ const [open, setOpen] = React__default.useState(false);
267937
+ const [search, setSearch] = React__default.useState('');
267938
+ const containerRef = React__default.useRef(null);
267939
+ const inputRef = React__default.useRef(null);
267940
+ React__default.useEffect(() => {
267941
+ if (!open)
267942
+ return;
267943
+ const handleOutside = (event) => {
267944
+ const target = event.target;
267945
+ if (containerRef.current && !containerRef.current.contains(target)) {
267946
+ setOpen(false);
267947
+ }
267948
+ };
267949
+ document.addEventListener('mousedown', handleOutside);
267950
+ return () => document.removeEventListener('mousedown', handleOutside);
267951
+ }, [open]);
267952
+ React__default.useEffect(() => {
267953
+ if (open) {
267954
+ setSearch('');
267955
+ const id = window.setTimeout(() => { var _a; return (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus(); }, 0);
267956
+ return () => window.clearTimeout(id);
267957
+ }
267958
+ return undefined;
267959
+ }, [open]);
267960
+ const filtered = React__default.useMemo(() => {
267961
+ const query = search.trim().toLowerCase();
267962
+ if (!query)
267963
+ return benchmarks;
267964
+ return benchmarks.filter((name) => name.toLowerCase().includes(query));
267965
+ }, [benchmarks, search]);
267966
+ return (jsxs("div", { ref: containerRef, className: "relative w-full sm:w-[280px]", children: [jsxs("button", { type: "button", role: "combobox", "data-testid": "benchmark-combobox", "aria-expanded": open, disabled: disabled, onClick: () => setOpen((prev) => !prev), className: "flex h-9 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50", children: [jsx("span", { className: cn('truncate font-normal', !value && 'text-muted-foreground'), children: value || placeholder }), jsx(ChevronsUpDown, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })] }), open && (jsxs("div", { "data-testid": "benchmark-combobox-dropdown", className: "absolute top-full left-0 z-50 mt-1 w-full overflow-hidden rounded-md border border-gray-200 bg-white shadow-md", children: [jsxs("div", { className: "flex items-center border-b border-gray-200 px-3", children: [jsx(Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }), jsx("input", { ref: inputRef, type: "text", value: search, onChange: (event) => setSearch(event.target.value), placeholder: searchPlaceholder, className: "flex h-9 w-full bg-transparent py-3 text-sm placeholder:text-muted-foreground focus:outline-none" })] }), jsx("div", { className: "max-h-60 overflow-y-auto py-1", children: filtered.length === 0 ? (jsx("p", { className: "py-6 text-center text-sm text-gray-500", children: emptyMessage })) : (filtered.map((name) => {
267967
+ const selected = name === value;
267968
+ return (jsxs("button", { type: "button", onClick: () => {
267969
+ onChange(name);
267970
+ setOpen(false);
267971
+ }, className: "relative flex w-full cursor-pointer items-center px-2 py-1.5 text-sm text-gray-800 hover:bg-blue-50", children: [jsx(Check, { className: cn('mr-2 h-4 w-4', selected ? 'opacity-100' : 'opacity-0') }), jsx("span", { className: "truncate", children: name })] }, name));
267972
+ })) })] }))] }));
267973
+ }
267974
+
267975
+ /**
267976
+ * Parse a created_at / updated_at string from the evaluations API.
267977
+ *
267978
+ * The API returns timestamps in two shapes:
267979
+ * - "2026-05-18 18:49:45.236918+00:00" (space separator, explicit offset)
267980
+ * - "2026-05-12 15:39:41.838000" (space separator, no offset → UTC)
267981
+ *
267982
+ * `new Date("YYYY-MM-DD HH:MM:SS")` is treated as **local time** in some
267983
+ * engines, which makes a freshly-started run look hours old on non-UTC
267984
+ * clients. Normalise to a strict ISO string before parsing.
267985
+ */
267986
+ function parseEvalDate(value) {
267987
+ if (!value)
267988
+ return null;
267989
+ let normalized = value.replace(' ', 'T');
267990
+ if (!/[zZ]|[+-]\d{2}:?\d{2}$/.test(normalized)) {
267991
+ normalized = `${normalized}Z`;
267992
+ }
267993
+ const date = new Date(normalized);
267994
+ return Number.isNaN(date.getTime()) ? null : date;
267995
+ }
267996
+
267997
+ function StartExperimentModal({ isOpen, onClose, tenantKey, username, mentorUniqueId, datasetName, onStarted, labels, }) {
267998
+ const [runName, setRunName] = React__default.useState('');
267999
+ const [startRun, { isLoading: isStarting }] = useStartEvalRunMutation();
268000
+ React__default.useEffect(() => {
268001
+ if (isOpen) {
268002
+ setRunName('');
268003
+ }
268004
+ }, [isOpen]);
268005
+ const handleClose = () => {
268006
+ if (isStarting)
268007
+ return;
268008
+ onClose();
268009
+ };
268010
+ const handleStart = async () => {
268011
+ var _a;
268012
+ try {
268013
+ const result = await startRun({
268014
+ org: tenantKey,
268015
+ userId: username,
268016
+ datasetName,
268017
+ body: {
268018
+ mentor_unique_id: mentorUniqueId,
268019
+ run_name: runName.trim() || undefined,
268020
+ },
268021
+ }).unwrap();
268022
+ toast.success(`${labels.successToast} (${result.name})`);
268023
+ onStarted === null || onStarted === void 0 ? void 0 : onStarted();
268024
+ onClose();
268025
+ }
268026
+ catch (error) {
268027
+ const detail = (_a = error === null || error === void 0 ? void 0 : error.data) === null || _a === void 0 ? void 0 : _a.detail;
268028
+ toast.error(detail || labels.errorToast);
268029
+ }
268030
+ };
268031
+ return (jsx(Dialog, { open: isOpen, onOpenChange: (open) => !open && handleClose(), children: jsxs(DialogContent, { "aria-label": "start-evaluation", className: "w-full max-w-md", children: [jsxs(DialogHeader, { children: [jsx(DialogTitle, { children: labels.title }), jsx(DialogDescription, { children: labels.description })] }), jsxs("div", { className: "grid gap-4 mt-3", children: [jsxs("div", { className: "grid gap-1.5", children: [jsx(Label$1, { children: labels.benchmarkLabel }), jsx("div", { className: "rounded-md border border-gray-200 bg-gray-50 px-3 py-2 text-sm font-medium text-gray-800", children: datasetName })] }), jsxs("div", { className: "grid gap-1.5", children: [jsx(Label$1, { htmlFor: "experiment-name", children: labels.experimentNameLabel }), jsx(Input, { id: "experiment-name", value: runName, onChange: (event) => setRunName(event.target.value), placeholder: labels.experimentNamePlaceholder, maxLength: 255, disabled: isStarting })] })] }), jsxs(DialogFooter, { className: "mt-4", children: [jsx(Button$1, { variant: "outline", onClick: handleClose, disabled: isStarting, children: labels.cancel }), jsxs(Button$1, { onClick: handleStart, disabled: isStarting, className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-white hover:opacity-90", children: [isStarting && jsx(LoaderCircle, { className: "h-4 w-4 mr-1 animate-spin" }), labels.start] })] })] }) }));
268032
+ }
268033
+
268034
+ function EvaluateLlmPicker({ tenantKey, username, mentorId, value, onChange, getLLMProviderDetails, placeholder, pickerTitle, pickerDescription, selectorAriaLabel, searchPlaceholder, emptyMessage, logoAlt, disabled, }) {
268035
+ var _a, _b;
268036
+ const [showProviders, setShowProviders] = React__default.useState(false);
268037
+ const [selectedProvider, setSelectedProvider] = React__default.useState(null);
268038
+ const [providerSearch, setProviderSearch] = React__default.useState('');
268039
+ const { data: llmProviders, isLoading } = useGetLlmsQuery({
268040
+ org: tenantKey,
268041
+ // @ts-ignore - userId not on generated signature
268042
+ userId: username,
268043
+ mentorId,
268044
+ }, { skip: !tenantKey || !username || !mentorId });
268045
+ const filteredProviders = React__default.useMemo(() => (llmProviders !== null && llmProviders !== void 0 ? llmProviders : []).filter((model) => model.name.toLowerCase().includes(providerSearch.toLowerCase())), [llmProviders, providerSearch]);
268046
+ const currentDetails = value ? getLLMProviderDetails(value.llm_provider, value.llm_name) : null;
268047
+ const handleProviderClick = (model) => {
268048
+ setSelectedProvider({
268049
+ id: model.id,
268050
+ name: model.name,
268051
+ logo: model.logo,
268052
+ description: model.description,
268053
+ chat_models: model.chat_models,
268054
+ // @ts-ignore - has_credentials not on LLMResponse type
268055
+ has_credentials: model === null || model === void 0 ? void 0 : model.has_credentials,
268056
+ // @ts-ignore - main_has_credentials not on LLMResponse type
268057
+ main_has_credentials: model === null || model === void 0 ? void 0 : model.main_has_credentials,
268058
+ // @ts-ignore - can_use_main_keys not on LLMResponse type
268059
+ can_use_main_keys: model === null || model === void 0 ? void 0 : model.can_use_main_keys,
268060
+ });
268061
+ };
268062
+ const handleSelect = async (llmProvider, llmName) => {
268063
+ onChange({ llm_provider: llmProvider, llm_name: llmName });
268064
+ setSelectedProvider(null);
268065
+ setShowProviders(false);
268066
+ };
268067
+ return (jsxs(Fragment$1, { children: [jsxs(Button$1, { type: "button", variant: "ghost", disabled: disabled, onClick: () => setShowProviders(true), "aria-label": selectorAriaLabel, className: "flex h-9 cursor-pointer items-center gap-2 px-2 text-sm font-medium text-[#646464] transition-colors hover:text-[#484848] disabled:opacity-50", children: [(currentDetails === null || currentDetails === void 0 ? void 0 : currentDetails.logo) ? (jsx(Image$4, { src: currentDetails.logo, alt: logoAlt.replace('{name}', currentDetails.name), width: 20, height: 20, className: "h-5 w-5 flex-shrink-0 object-contain", loading: "lazy" })) : (jsx(Bot, { className: "h-5 w-5 flex-shrink-0 text-gray-400" })), jsx("span", { className: "max-w-[220px] truncate", children: (value === null || value === void 0 ? void 0 : value.llm_name) || (currentDetails === null || currentDetails === void 0 ? void 0 : currentDetails.name) || placeholder }), jsx(ChevronDown, { className: "h-4 w-4 text-gray-500" })] }), jsx(Dialog, { open: showProviders, onOpenChange: (open) => !open && setShowProviders(false), children: jsxs(DialogContent, { "aria-label": "evaluate-llm-picker", className: "max-h-[90vh] w-full max-w-3xl overflow-y-auto", children: [jsxs(DialogHeader, { children: [jsx(DialogTitle, { children: pickerTitle }), jsx(DialogDescription, { children: pickerDescription })] }), jsxs("div", { className: "relative", children: [jsx(Search, { className: "absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2 text-gray-400" }), jsx(Input, { placeholder: searchPlaceholder, className: "pl-9", value: providerSearch, onChange: (event) => setProviderSearch(event.target.value) })] }), isLoading ? (jsx("div", { className: "flex items-center justify-center py-10", children: jsx(Spinner, {}) })) : (jsxs("div", { className: "grid grid-cols-2 gap-3 sm:grid-cols-3", children: [filteredProviders.map((model) => {
268068
+ const details = getLLMProviderDetails(model.name);
268069
+ const isCurrent = (value === null || value === void 0 ? void 0 : value.llm_provider) === model.name;
268070
+ return (jsxs("button", { type: "button", onClick: () => handleProviderClick(model), className: cn('flex cursor-pointer items-center gap-3 rounded-lg border border-gray-200 bg-white p-3 text-left shadow-sm transition-shadow hover:shadow-md', isCurrent && 'border-blue-500'), children: [jsx("div", { className: "h-8 w-8 flex-shrink-0", children: details.logo && (jsx(Image$4, { src: details.logo, alt: logoAlt.replace('{name}', details.name), className: "h-full w-full object-contain", width: 32, height: 32, loading: "lazy" })) }), jsx("span", { className: "truncate text-sm font-medium text-gray-900", children: details.name })] }, model.id));
268071
+ }), filteredProviders.length === 0 && (jsx("p", { className: "col-span-full py-6 text-center text-sm text-gray-500", children: emptyMessage }))] }))] }) }), selectedProvider && (jsx(LLMProviderModal, { isOpen: true, onClose: () => setSelectedProvider(null), onSelect: handleSelect, llmProvider: selectedProvider, isSelecting: false, mentorSettings: {
268072
+ llm_name: (_a = value === null || value === void 0 ? void 0 : value.llm_name) !== null && _a !== void 0 ? _a : '',
268073
+ llm_provider: (_b = value === null || value === void 0 ? void 0 : value.llm_provider) !== null && _b !== void 0 ? _b : '',
268074
+ }, llms: (llmProviders !== null && llmProviders !== void 0 ? llmProviders : []), getLLMProviderDetails: getLLMProviderDetails }))] }));
268075
+ }
268076
+
268077
+ function LlmJudgeModal({ isOpen, onClose, tenantKey, username, mentorId, datasetName, runName, labels, getLLMProviderDetails, }) {
268078
+ const [criteria, setCriteria] = React__default.useState('');
268079
+ const [scoreName, setScoreName] = React__default.useState('');
268080
+ const [llm, setLlm] = React__default.useState(null);
268081
+ const [maxConcurrency, setMaxConcurrency] = React__default.useState(4);
268082
+ const [evaluateRun, { isLoading: isSubmitting }] = useEvaluateEvalRunMutation();
268083
+ React__default.useEffect(() => {
268084
+ if (isOpen) {
268085
+ setCriteria('');
268086
+ setScoreName('');
268087
+ setLlm(null);
268088
+ setMaxConcurrency(4);
268089
+ }
268090
+ }, [isOpen]);
268091
+ const handleClose = () => {
268092
+ if (isSubmitting)
268093
+ return;
268094
+ onClose();
268095
+ };
268096
+ const handleSubmit = async () => {
268097
+ var _a;
268098
+ if (!criteria.trim() || !scoreName.trim() || !llm) {
268099
+ toast.error(labels.validationError);
268100
+ return;
268101
+ }
268102
+ try {
268103
+ await evaluateRun({
268104
+ org: tenantKey,
268105
+ userId: username,
268106
+ datasetName,
268107
+ runName,
268108
+ body: {
268109
+ criteria: criteria.trim(),
268110
+ score_name: scoreName.trim(),
268111
+ llm_provider: llm.llm_provider,
268112
+ llm_name: llm.llm_name,
268113
+ max_concurrency: maxConcurrency,
268114
+ },
268115
+ }).unwrap();
268116
+ toast.success(labels.successToast);
268117
+ onClose();
268118
+ }
268119
+ catch (error) {
268120
+ const detail = (_a = error === null || error === void 0 ? void 0 : error.data) === null || _a === void 0 ? void 0 : _a.detail;
268121
+ toast.error(detail || labels.errorToast);
268122
+ }
268123
+ };
268124
+ return (jsx(Dialog, { open: isOpen, onOpenChange: (open) => !open && handleClose(), children: jsxs(DialogContent, { "aria-label": "llm-judge", className: "w-full max-w-xl max-h-[90vh] overflow-y-auto", children: [jsxs(DialogHeader, { children: [jsx(DialogTitle, { children: labels.title }), jsx(DialogDescription, { children: labels.description })] }), jsxs("div", { className: "space-y-3 mt-3", children: [jsxs("div", { className: "space-y-1.5", children: [jsx(Label$1, { htmlFor: "judge-criteria", children: labels.criteriaLabel }), jsx(Textarea, { id: "judge-criteria", value: criteria, onChange: (event) => setCriteria(event.target.value), placeholder: labels.criteriaPlaceholder, rows: 6, disabled: isSubmitting, className: "mt-2" })] }), jsxs("div", { className: "grid grid-cols-2 gap-4", children: [jsxs("div", { className: "space-y-1.5", children: [jsx(Label$1, { htmlFor: "judge-score-name", children: labels.scoreNameLabel }), jsx(Input, { id: "judge-score-name", value: scoreName, onChange: (event) => setScoreName(event.target.value), placeholder: labels.scoreNamePlaceholder, maxLength: 255, disabled: isSubmitting, className: "mt-2" })] }), jsxs("div", { className: "space-y-1.5", children: [jsx(Label$1, { htmlFor: "judge-concurrency", children: labels.maxConcurrencyLabel }), jsx(Input, { id: "judge-concurrency", type: "number", min: 1, max: 20, value: maxConcurrency, onChange: (event) => {
268125
+ const parsed = Number(event.target.value);
268126
+ if (!Number.isNaN(parsed)) {
268127
+ setMaxConcurrency(Math.min(20, Math.max(1, parsed)));
268128
+ }
268129
+ }, disabled: isSubmitting, className: "mt-2" })] })] }), jsxs("div", { className: "flex items-center gap-2", children: [jsx(Label$1, { className: "m-0", children: labels.llmLabel }), jsx(EvaluateLlmPicker, { tenantKey: tenantKey, username: username, mentorId: mentorId, value: llm, onChange: setLlm, getLLMProviderDetails: getLLMProviderDetails, placeholder: labels.selectLlmPlaceholder, pickerTitle: labels.pickerTitle, pickerDescription: labels.pickerDescription, selectorAriaLabel: labels.pickerSelectorAriaLabel, searchPlaceholder: labels.pickerSearchPlaceholder, emptyMessage: labels.pickerEmpty, logoAlt: labels.pickerLogoAlt, disabled: isSubmitting })] })] }), jsxs(DialogFooter, { className: "mt-4", children: [jsx(Button$1, { variant: "outline", onClick: handleClose, disabled: isSubmitting, children: labels.cancel }), jsxs(Button$1, { onClick: handleSubmit, disabled: isSubmitting || !criteria.trim() || !scoreName.trim() || !llm, className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-white hover:opacity-90", children: [isSubmitting && jsx(LoaderCircle, { className: "h-4 w-4 mr-1 animate-spin" }), labels.submit] })] })] }) }));
268130
+ }
268131
+
268132
+ function renderItemText(value) {
268133
+ if (value == null)
268134
+ return '';
268135
+ if (typeof value === 'string')
268136
+ return value;
268137
+ return JSON.stringify(value, null, 2);
268138
+ }
268139
+ /**
268140
+ * Pull the human-readable text out of a LangChain-style message payload
268141
+ * (`{ messages: [{ content: "..." | [{ type: "text", text: "..." }] }] }`),
268142
+ * which is what the eval `actual_output` / `expected_output` fields carry.
268143
+ * Returns the concatenated text, or null when the value isn't a recognised
268144
+ * message shape (the caller then falls back to raw JSON).
268145
+ */
268146
+ function extractMessagesText(value) {
268147
+ if (value == null || typeof value !== 'object')
268148
+ return null;
268149
+ const messages = value.messages;
268150
+ if (!Array.isArray(messages))
268151
+ return null;
268152
+ const parts = [];
268153
+ for (const msg of messages) {
268154
+ const content = msg === null || msg === void 0 ? void 0 : msg.content;
268155
+ if (typeof content === 'string') {
268156
+ if (content.trim())
268157
+ parts.push(content);
268158
+ }
268159
+ else if (Array.isArray(content)) {
268160
+ for (const chunk of content) {
268161
+ const text = chunk === null || chunk === void 0 ? void 0 : chunk.text;
268162
+ if (typeof text === 'string' && text.trim())
268163
+ parts.push(text);
268164
+ }
268165
+ }
268166
+ }
268167
+ return parts.length ? parts.join('\n\n') : null;
268168
+ }
268169
+ /**
268170
+ * Resolve an eval output field to markdown text: a plain string is already
268171
+ * markdown; a message payload is unwrapped to its text. Returns null for any
268172
+ * other object shape so the caller renders raw JSON instead.
268173
+ */
268174
+ function extractOutputMarkdown(value) {
268175
+ if (typeof value === 'string')
268176
+ return value;
268177
+ return extractMessagesText(value);
268178
+ }
268179
+ /**
268180
+ * Renders an eval output (actual / expected) as formatted markdown when the
268181
+ * value is — or wraps — readable text, mirroring how AI chat bubbles display
268182
+ * responses. Falls back to a JSON `<pre>` for unrecognised object shapes.
268183
+ */
268184
+ function OutputBlock({ label, value, emptyHint, }) {
268185
+ const markdown = extractOutputMarkdown(value);
268186
+ return (jsxs("div", { className: "space-y-1", children: [jsx("p", { className: "text-xs font-medium text-gray-500", children: label }), markdown != null && markdown.trim() ? (jsx("div", { className: "rounded-md bg-gray-50 p-3 text-sm text-gray-800", children: jsx(Markdown, { children: markdown }) })) : (jsx("pre", { className: "whitespace-pre-wrap break-words rounded-md bg-gray-50 p-2 text-xs text-gray-800", children: renderItemText(value) || emptyHint }))] }));
268187
+ }
268188
+ function StatusBadge$1({ status }) {
268189
+ const upper = status === null || status === void 0 ? void 0 : status.toUpperCase();
268190
+ const color = upper === 'COMPLETED'
268191
+ ? 'bg-green-100 text-green-700'
268192
+ : upper === 'FAILED'
268193
+ ? 'bg-red-100 text-red-700'
268194
+ : upper
268195
+ ? 'bg-blue-100 text-blue-700'
268196
+ : 'bg-gray-100 text-gray-600';
268197
+ return (jsx("span", { className: cn('inline-flex rounded-full px-2 py-0.5 text-xs font-medium', color), children: upper !== null && upper !== void 0 ? upper : '—' }));
268198
+ }
268199
+ function FieldBlock({ label, value }) {
268200
+ return (jsxs("div", { className: "space-y-1", children: [jsx("p", { className: "text-xs font-medium text-gray-500", children: label }), jsx("pre", { className: "whitespace-pre-wrap break-words rounded-md bg-gray-50 p-2 text-xs text-gray-800", children: value })] }));
268201
+ }
268202
+ function ManualScoreRow({ tenantKey, username, datasetName, runName, traceId, runId, labels, }) {
268203
+ const [name, setName] = React__default.useState('');
268204
+ const [value, setValue] = React__default.useState('');
268205
+ const [comment, setComment] = React__default.useState('');
268206
+ const [createScore, { isLoading }] = useCreateEvalScoreMutation();
268207
+ const handleAdd = async () => {
268208
+ var _a;
268209
+ const numericValue = Number(value);
268210
+ if (!name.trim() || Number.isNaN(numericValue)) {
268211
+ toast.error(labels.scoreInputError);
268212
+ return;
268213
+ }
268214
+ if (numericValue < 0 || numericValue > 1) {
268215
+ toast.error(labels.scoreRangeError);
268216
+ return;
268217
+ }
268218
+ try {
268219
+ await createScore({
268220
+ org: tenantKey,
268221
+ userId: username,
268222
+ // Cache hints: the run-detail cache is patched in place so the new
268223
+ // score chip shows up immediately (the eval store ingests scores
268224
+ // asynchronously, so a refetch right now wouldn't include it).
268225
+ datasetName,
268226
+ runName,
268227
+ body: {
268228
+ trace_id: traceId,
268229
+ name: name.trim(),
268230
+ value: numericValue,
268231
+ comment: comment.trim() || undefined,
268232
+ dataset_run_id: runId,
268233
+ },
268234
+ }).unwrap();
268235
+ toast.success(labels.scoreAddedToast);
268236
+ setName('');
268237
+ setValue('');
268238
+ setComment('');
268239
+ }
268240
+ catch (error) {
268241
+ const detail = (_a = error === null || error === void 0 ? void 0 : error.data) === null || _a === void 0 ? void 0 : _a.detail;
268242
+ toast.error(detail || labels.scoreErrorToast);
268243
+ }
268244
+ };
268245
+ return (jsxs("div", { className: "grid gap-2 sm:grid-cols-[1fr_100px_1fr_auto] items-end p-2 bg-gray-50 rounded-md", children: [jsxs("div", { className: "grid gap-1", children: [jsx(Label$1, { htmlFor: "manual-score-name", className: "text-xs", children: labels.scoreNameLabel }), jsx(Input, { id: "manual-score-name", value: name, onChange: (event) => setName(event.target.value), placeholder: labels.scoreNamePlaceholder, disabled: isLoading, className: "h-8" })] }), jsxs("div", { className: "grid gap-1", children: [jsx(Label$1, { htmlFor: "manual-score-value", className: "text-xs", children: labels.scoreValueLabel }), jsx(Input, { id: "manual-score-value", type: "number", value: value, onChange: (event) => setValue(event.target.value), placeholder: labels.scoreValuePlaceholder, min: 0, max: 1, step: 0.1, disabled: isLoading, className: "h-8" })] }), jsxs("div", { className: "grid gap-1", children: [jsx(Label$1, { htmlFor: "manual-score-comment", className: "text-xs", children: labels.scoreCommentLabel }), jsx(Input, { id: "manual-score-comment", value: comment, onChange: (event) => setComment(event.target.value), placeholder: labels.scoreCommentPlaceholder, disabled: isLoading, className: "h-8" })] }), jsx(Button$1, { size: "sm", onClick: handleAdd, disabled: isLoading, className: "h-8 bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-white hover:opacity-90", children: isLoading ? jsx(LoaderCircle, { className: "h-3 w-3 animate-spin" }) : labels.addScore })] }));
268246
+ }
268247
+ /** Poll cadence while the run (or one of its reviews) is still producing data. */
268248
+ const ACTIVE_POLL_INTERVAL_MS = 10000;
268249
+ function ExperimentDetailModal({ isOpen, onClose, tenantKey, username, mentorId, datasetName, runName, labels, getLLMProviderDetails, }) {
268250
+ var _a;
268251
+ const [showJudge, setShowJudge] = React__default.useState(false);
268252
+ const [expandedTrace, setExpandedTrace] = React__default.useState(null);
268253
+ const [pollingInterval, setPollingInterval] = React__default.useState(0);
268254
+ const { data: run, isLoading: isRunLoading, isFetching: isRunFetching, refetch: refetchRun, } = useGetEvalRunQuery({
268255
+ org: tenantKey,
268256
+ userId: username,
268257
+ datasetName,
268258
+ runName,
268259
+ }, {
268260
+ refetchOnMountOrArgChange: true,
268261
+ pollingInterval,
268262
+ });
268263
+ const [deleteScore] = useDeleteEvalScoreMutation();
268264
+ // Reviews = LLM-as-Judge tasks recorded against this experiment.
268265
+ // The run detail embeds `pending_judges` for in-flight tasks only;
268266
+ // this query also surfaces COMPLETED and FAILED reviews so the user
268267
+ // sees the full history without leaving the modal.
268268
+ const { data: reviewsPage, isFetching: isReviewsFetching, refetch: refetchReviews, } = useListEvalRunJudgesQuery({
268269
+ org: tenantKey,
268270
+ userId: username,
268271
+ datasetName,
268272
+ runName,
268273
+ page: 1,
268274
+ limit: 50,
268275
+ }, { refetchOnMountOrArgChange: true, pollingInterval });
268276
+ const runItems = (_a = run === null || run === void 0 ? void 0 : run.dataset_run_items) !== null && _a !== void 0 ? _a : [];
268277
+ // The backend returns run items in nondeterministic order (the eval store
268278
+ // is eventually consistent), so the raw order can shift between refetches.
268279
+ // Always sort client-side — created_at (oldest first) with an id tiebreak
268280
+ // keeps the list stable even when two traces share a timestamp.
268281
+ const sortedRunItems = React__default.useMemo(() => {
268282
+ return [...runItems].sort((a, b) => {
268283
+ var _a, _b, _c, _d;
268284
+ const aTime = (_b = (_a = parseEvalDate(a.created_at)) === null || _a === void 0 ? void 0 : _a.getTime()) !== null && _b !== void 0 ? _b : 0;
268285
+ const bTime = (_d = (_c = parseEvalDate(b.created_at)) === null || _c === void 0 ? void 0 : _c.getTime()) !== null && _d !== void 0 ? _d : 0;
268286
+ return aTime - bTime || a.id.localeCompare(b.id);
268287
+ });
268288
+ }, [runItems]);
268289
+ // Merge: pending_judges from the run detail (the freshest in-flight
268290
+ // signal) + the persisted review list. Dedup by task_id so an
268291
+ // in-flight task that's also in the persisted list doesn't appear
268292
+ // twice.
268293
+ const allReviews = React__default.useMemo(() => {
268294
+ var _a, _b;
268295
+ const fromRun = (_a = run === null || run === void 0 ? void 0 : run.pending_judges) !== null && _a !== void 0 ? _a : [];
268296
+ const fromList = (_b = reviewsPage === null || reviewsPage === void 0 ? void 0 : reviewsPage.results) !== null && _b !== void 0 ? _b : [];
268297
+ const seen = new Set();
268298
+ const merged = [];
268299
+ for (const r of [...fromList, ...fromRun]) {
268300
+ const key = r.task_id || `${r.id}`;
268301
+ if (seen.has(key))
268302
+ continue;
268303
+ seen.add(key);
268304
+ merged.push(r);
268305
+ }
268306
+ // Newest first
268307
+ return merged.sort((a, b) => {
268308
+ var _a, _b, _c, _d;
268309
+ const aT = (_b = (_a = parseEvalDate(a.created_at)) === null || _a === void 0 ? void 0 : _a.getTime()) !== null && _b !== void 0 ? _b : 0;
268310
+ const bT = (_d = (_c = parseEvalDate(b.created_at)) === null || _c === void 0 ? void 0 : _c.getTime()) !== null && _d !== void 0 ? _d : 0;
268311
+ return bT - aT;
268312
+ });
268313
+ }, [run === null || run === void 0 ? void 0 : run.pending_judges, reviewsPage === null || reviewsPage === void 0 ? void 0 : reviewsPage.results]);
268314
+ const reviewCounts = React__default.useMemo(() => {
268315
+ var _a;
268316
+ let pending = 0;
268317
+ let completed = 0;
268318
+ let failed = 0;
268319
+ for (const r of allReviews) {
268320
+ const s = ((_a = r.status) !== null && _a !== void 0 ? _a : '').toLowerCase();
268321
+ if (s === 'completed')
268322
+ completed += 1;
268323
+ else if (s === 'failed')
268324
+ failed += 1;
268325
+ else
268326
+ pending += 1;
268327
+ }
268328
+ return { pending, completed, failed };
268329
+ }, [allReviews]);
268330
+ // Back the "This page auto-refreshes" hint with actual polling: while the
268331
+ // run is still producing traces, or any review (LLM-as-Judge task) is
268332
+ // queued/running, refetch both queries on an interval so new traces,
268333
+ // statuses, and judge scores show up without a manual Refresh. Polling
268334
+ // stops once everything has settled.
268335
+ React__default.useEffect(() => {
268336
+ var _a;
268337
+ const status = ((_a = run === null || run === void 0 ? void 0 : run.status) !== null && _a !== void 0 ? _a : '').toLowerCase();
268338
+ const runActive = !!run && status !== 'completed' && status !== 'failed';
268339
+ const reviewsActive = reviewCounts.pending > 0;
268340
+ setPollingInterval(runActive || reviewsActive ? ACTIVE_POLL_INTERVAL_MS : 0);
268341
+ }, [run, reviewCounts.pending]);
268342
+ const handleDeleteScore = async (scoreId) => {
268343
+ var _a;
268344
+ try {
268345
+ await deleteScore({
268346
+ org: tenantKey,
268347
+ userId: username,
268348
+ scoreId,
268349
+ // Cache hints — the chip is removed from the cached run in place.
268350
+ datasetName,
268351
+ runName,
268352
+ }).unwrap();
268353
+ toast.success(labels.detailModal.scoreRemovedToast);
268354
+ }
268355
+ catch (error) {
268356
+ const detail = (_a = error === null || error === void 0 ? void 0 : error.data) === null || _a === void 0 ? void 0 : _a.detail;
268357
+ toast.error(detail || labels.detailModal.scoreRemoveErrorToast);
268358
+ }
268359
+ };
268360
+ return (jsx(Dialog, { open: isOpen, onOpenChange: (open) => !open && onClose(), children: jsxs(DialogContent, { "aria-label": "evaluation-detail", className: "w-full max-w-4xl max-h-[90vh] overflow-y-auto", children: [jsxs(DialogHeader, { children: [jsxs(DialogTitle, { className: "flex items-center gap-2", children: [runName, jsx(StatusBadge$1, { status: run === null || run === void 0 ? void 0 : run.status })] }), jsxs(DialogDescription, { children: [labels.detailModal.benchmarkLabel, ": ", jsx("span", { className: "font-medium", children: datasetName }), (() => {
268361
+ const started = parseEvalDate(run === null || run === void 0 ? void 0 : run.created_at);
268362
+ return started ? (jsxs(Fragment$1, { children: [' ', "\u00B7 ", labels.detailModal.startedPrefix, ' ', formatDistanceToNow(started, { addSuffix: true })] })) : null;
268363
+ })()] })] }), jsxs("div", { className: "mb-4 space-y-2", children: [jsxs("div", { className: "flex items-center justify-between flex-wrap gap-2", children: [jsxs("p", { className: "text-sm text-gray-700", children: [runItems.length, ' ', runItems.length === 1
268364
+ ? labels.detailModal.tracesSuffixSingular
268365
+ : labels.detailModal.tracesSuffixPlural, reviewCounts.pending > 0 && (jsxs("span", { className: "ml-2 inline-flex items-center gap-1 text-xs text-blue-600", children: [jsx(LoaderCircle, { className: "h-3 w-3 animate-spin" }), reviewCounts.pending, " ", labels.detailModal.reviewsRunningLabel] })), reviewCounts.completed > 0 && (jsxs("span", { className: "ml-2 text-xs text-gray-500", children: ["\u00B7 ", reviewCounts.completed, " ", labels.detailModal.reviewsCompletedLabel] })), reviewCounts.failed > 0 && (jsxs("span", { className: "ml-2 text-xs text-red-500", children: ["\u00B7 ", reviewCounts.failed, " ", labels.detailModal.reviewsFailedLabel] }))] }), jsxs("div", { className: "flex items-center gap-2", children: [jsx(Button$1, { size: "sm", variant: "outline", onClick: () => {
268366
+ refetchRun();
268367
+ refetchReviews();
268368
+ }, disabled: isRunFetching || isReviewsFetching, "aria-label": labels.detailModal.refresh, title: labels.detailModal.refresh, children: jsx(RefreshCw, { className: isRunFetching || isReviewsFetching ? 'h-4 w-4 animate-spin' : 'h-4 w-4' }) }), jsxs(Button$1, { size: "sm", onClick: () => setShowJudge(true), disabled: runItems.length === 0, className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-white hover:opacity-90", children: [jsx(Sparkles, { className: "h-4 w-4 mr-1" }), labels.detailModal.newReview] })] })] }), jsx("p", { className: "text-xs text-gray-500", children: labels.detailModal.reviewsHint })] }), allReviews.length > 0 && (jsx(ReviewsList, { reviews: allReviews, runItems: runItems, labels: labels, getLLMProviderDetails: getLLMProviderDetails })), isRunLoading ? (jsx("div", { className: "flex justify-center items-center h-40", children: jsx(Spinner, {}) })) : (jsxs("div", { className: "space-y-3", children: [runItems.length === 0 && (jsx("div", { className: "rounded-md border border-gray-200 bg-gray-50 p-6 text-center text-sm text-gray-600", children: labels.detailModal.waitingHint })), sortedRunItems.map((item) => {
268369
+ var _a;
268370
+ // Sort scores by created_at so the order is stable across refetches.
268371
+ const scores = [...((_a = item.scores) !== null && _a !== void 0 ? _a : [])].sort((a, b) => {
268372
+ var _a, _b, _c, _d;
268373
+ const aTime = (_b = (_a = parseEvalDate(a.created_at)) === null || _a === void 0 ? void 0 : _a.getTime()) !== null && _b !== void 0 ? _b : 0;
268374
+ const bTime = (_d = (_c = parseEvalDate(b.created_at)) === null || _c === void 0 ? void 0 : _c.getTime()) !== null && _d !== void 0 ? _d : 0;
268375
+ return aTime - bTime;
268376
+ });
268377
+ const isExpanded = expandedTrace === item.trace_id;
268378
+ const questionText = renderItemText(item.input) || '—';
268379
+ return (jsxs("div", { className: "rounded-md border border-gray-200 bg-white shadow-sm", children: [jsxs("button", { type: "button", className: "w-full text-left px-4 py-3 flex items-center justify-between gap-3 hover:bg-gray-50", onClick: () => setExpandedTrace(isExpanded ? null : item.trace_id), children: [jsx("p", { className: "min-w-0 flex-1 truncate text-sm text-gray-800", children: questionText }), jsxs("span", { className: "flex-shrink-0 rounded-full bg-gray-100 px-2 py-0.5 text-xs text-gray-600", children: [scores.length, ' ', scores.length === 1
268380
+ ? labels.detailModal.scoresSuffixSingular
268381
+ : labels.detailModal.scoresSuffixPlural] })] }), isExpanded && (jsxs("div", { className: "border-t border-gray-200 p-4 space-y-4", children: [jsxs("div", { className: "grid gap-4 md:grid-cols-2", children: [jsx(FieldBlock, { label: labels.detailModal.inputLabel, value: questionText }), jsx(OutputBlock, { label: labels.detailModal.expectedOutputLabel, value: item.expected_output, emptyHint: "\u2014" })] }), jsx(OutputBlock, { label: labels.detailModal.actualOutputLabel, value: item.actual_output, emptyHint: labels.detailModal.noOutputHint }), item.error && (jsxs("div", { className: "space-y-1", children: [jsx("p", { className: "text-xs font-medium text-red-500", children: labels.detailModal.errorLabel }), jsx("pre", { className: "whitespace-pre-wrap break-words rounded-md bg-red-50 p-2 text-xs text-red-700", children: renderItemText(item.error) })] })), jsxs("div", { className: "space-y-2", children: [jsx("p", { className: "text-xs font-medium text-gray-500", children: labels.detailModal.scoresHeading }), scores.length > 0 ? (jsx("div", { className: "flex flex-wrap gap-2", children: scores.map((score) => {
268382
+ var _a, _b;
268383
+ return (jsxs("div", { className: "group inline-flex items-center gap-1.5 rounded-full border border-gray-200 bg-gray-50 px-2 py-1 text-xs", title: (_a = score.comment) !== null && _a !== void 0 ? _a : undefined, children: [jsx("span", { className: "font-medium text-gray-700", children: score.name }), jsx("span", { className: "text-gray-600", children: (_b = score.string_value) !== null && _b !== void 0 ? _b : score.value }), jsx("button", { type: "button", "aria-label": labels.detailModal.removeScoreAriaLabel, onClick: () => handleDeleteScore(score.id), className: "opacity-50 transition-opacity group-hover:opacity-100", children: jsx(Trash2, { className: "h-3 w-3 text-red-500" }) })] }, score.id));
268384
+ }) })) : (jsx("p", { className: "text-xs text-gray-500", children: labels.detailModal.noScoresHint }))] }), jsxs("div", { className: "space-y-1 pt-2 border-t border-gray-100", children: [jsx("p", { className: "text-xs font-medium text-gray-500", children: labels.detailModal.addScoreHeading }), jsx(ManualScoreRow, { tenantKey: tenantKey, username: username, datasetName: datasetName, runName: runName, traceId: item.trace_id, runId: (run === null || run === void 0 ? void 0 : run.id) || undefined, labels: labels.detailModal })] })] }))] }, item.id));
268385
+ })] })), showJudge && run && (jsx(LlmJudgeModal, { isOpen: showJudge, onClose: () => setShowJudge(false), tenantKey: tenantKey, username: username, mentorId: mentorId, datasetName: datasetName, runName: runName, labels: labels.evaluateModal, getLLMProviderDetails: getLLMProviderDetails }))] }) }));
268386
+ }
268387
+ /**
268388
+ * Reviews list — surfaces every LLM-as-Judge task recorded against this
268389
+ * experiment. Powered by `useListEvalRunJudgesQuery` so the user sees
268390
+ * both in-flight reviews and the persisted completed/failed history,
268391
+ * not just whatever the run detail's `pending_judges` array happens to
268392
+ * include at refresh time.
268393
+ *
268394
+ * Per row: status badge, the score this review is producing, the LLM
268395
+ * doing the judging, when it started, and (on failure) the error.
268396
+ */
268397
+ function ReviewsList({ reviews, runItems, labels, getLLMProviderDetails, }) {
268398
+ const [expandedReview, setExpandedReview] = React__default.useState(null);
268399
+ return (jsxs("div", { className: "mb-4 rounded-md border border-gray-200", children: [jsx("div", { className: "px-4 py-2 border-b border-gray-200 bg-gray-50", children: jsx("h4", { className: "text-xs font-semibold uppercase tracking-wide text-gray-600", children: labels.detailModal.reviewsHeading }) }), jsx("ul", { className: "divide-y divide-gray-100", children: reviews.map((review) => {
268400
+ var _a, _b, _c, _d, _e, _f, _g;
268401
+ const provider = (_a = review.request_metadata) === null || _a === void 0 ? void 0 : _a.llm_provider;
268402
+ const llmName = (_b = review.request_metadata) === null || _b === void 0 ? void 0 : _b.llm_name;
268403
+ const criteria = (_c = review.request_metadata) === null || _c === void 0 ? void 0 : _c.criteria;
268404
+ const providerDetails = provider ? getLLMProviderDetails(provider, llmName) : undefined;
268405
+ const started = parseEvalDate((_d = review.started_at) !== null && _d !== void 0 ? _d : review.created_at);
268406
+ const completed = parseEvalDate(review.completed_at);
268407
+ const rowKey = review.task_id || `${review.id}`;
268408
+ const isExpanded = expandedReview === rowKey;
268409
+ // Scores this review produced: every score across the run whose
268410
+ // name matches this review's score_name, tagged with the question
268411
+ // that generated it so the expanded view reads item-by-item.
268412
+ const producedScores = review.score_name
268413
+ ? runItems.flatMap((item) => {
268414
+ var _a;
268415
+ const questionText = renderItemText(item.input) || '—';
268416
+ return ((_a = item.scores) !== null && _a !== void 0 ? _a : [])
268417
+ .filter((s) => s.name === review.score_name)
268418
+ .map((score) => ({ score, questionText }));
268419
+ })
268420
+ : [];
268421
+ return (jsxs("li", { children: [jsxs("button", { type: "button", onClick: () => setExpandedReview(isExpanded ? null : rowKey), "aria-expanded": isExpanded, "aria-label": labels.detailModal.reviewDetailsAriaLabel, className: "w-full px-4 py-3 flex flex-col gap-2 text-left hover:bg-gray-50 sm:flex-row sm:items-start sm:justify-between", children: [jsxs("div", { className: "min-w-0 flex-1", children: [jsxs("div", { className: "flex items-center gap-2 flex-wrap", children: [jsx(ChevronDown, { className: cn('h-4 w-4 flex-shrink-0 text-gray-400 transition-transform', isExpanded && 'rotate-180') }), jsx(ReviewStatusBadge, { status: review.status, labels: labels.detailModal.reviewStatus }), jsx("span", { className: "text-sm font-medium text-gray-900 truncate", children: review.score_name || labels.detailModal.reviewUnnamedScore })] }), criteria && !isExpanded && (jsx("p", { className: "text-xs text-gray-600 mt-1 line-clamp-2", children: criteria })), review.error_message && !isExpanded && (jsx("p", { className: "text-xs text-red-600 mt-1 line-clamp-2", children: review.error_message }))] }), jsxs("div", { className: "flex flex-col items-end gap-1 text-xs text-gray-500 sm:min-w-[12rem]", children: [(providerDetails === null || providerDetails === void 0 ? void 0 : providerDetails.logo) ? (jsxs("span", { className: "inline-flex items-center gap-1", children: [jsx("img", { src: providerDetails.logo, alt: (_g = (_f = (_e = providerDetails.name) !== null && _e !== void 0 ? _e : llmName) !== null && _f !== void 0 ? _f : provider) !== null && _g !== void 0 ? _g : '', className: "h-3 w-3" }), llmName !== null && llmName !== void 0 ? llmName : provider] })) : llmName || provider ? (jsx("span", { children: llmName !== null && llmName !== void 0 ? llmName : provider })) : null, completed
268422
+ ? `${labels.detailModal.reviewFinishedPrefix} ${formatDistanceToNow(completed, { addSuffix: true })}`
268423
+ : started
268424
+ ? `${labels.detailModal.reviewStartedPrefix} ${formatDistanceToNow(started, { addSuffix: true })}`
268425
+ : null] })] }), isExpanded && (jsxs("div", { className: "border-t border-gray-100 bg-gray-50/60 px-4 py-3 space-y-3", children: [criteria && (jsxs("div", { className: "space-y-1", children: [jsx("p", { className: "text-xs font-medium text-gray-500", children: labels.detailModal.reviewCriteriaLabel }), jsx("pre", { className: "whitespace-pre-wrap break-words rounded-md bg-white p-2 text-xs text-gray-800 border border-gray-200", children: criteria })] })), review.error_message && (jsxs("div", { className: "space-y-1", children: [jsx("p", { className: "text-xs font-medium text-red-500", children: labels.detailModal.errorLabel }), jsx("pre", { className: "whitespace-pre-wrap break-words rounded-md bg-red-50 p-2 text-xs text-red-700 border border-red-100", children: renderItemText(review.error_message) })] })), jsxs("div", { className: "space-y-1", children: [jsxs("p", { className: "text-xs font-medium text-gray-500", children: [labels.detailModal.reviewScoresProducedLabel, " (", producedScores.length, ")"] }), producedScores.length > 0 ? (jsx("ul", { className: "space-y-1", children: producedScores.map(({ score, questionText }) => (jsxs("li", { className: "flex items-start justify-between gap-3 rounded-md bg-white p-2 text-xs border border-gray-200", children: [jsxs("span", { className: "min-w-0 flex-1 whitespace-normal break-words text-gray-700", children: [questionText, score.comment && (jsx("span", { className: "mt-0.5 block whitespace-normal break-words text-gray-400", children: score.comment }))] }), jsx("span", { className: "max-w-[10rem] flex-shrink-0 truncate rounded-full bg-gray-100 px-2 py-0.5 font-medium text-gray-700", title: formatScoreValue(score), children: formatScoreValue(score) })] }, score.id))) })) : (jsx("p", { className: "text-xs text-gray-500", children: labels.detailModal.reviewNoScoresYet }))] })] }))] }, rowKey));
268426
+ }) })] }));
268427
+ }
268428
+ function formatScoreValue(score) {
268429
+ if (score.string_value != null && score.string_value !== '')
268430
+ return score.string_value;
268431
+ return `${score.value}`;
268432
+ }
268433
+ function ReviewStatusBadge({ status, labels, }) {
268434
+ const normalized = (status !== null && status !== void 0 ? status : '').toLowerCase();
268435
+ const style = normalized === 'completed'
268436
+ ? 'bg-green-50 text-green-700 border-green-200'
268437
+ : normalized === 'failed'
268438
+ ? 'bg-red-50 text-red-700 border-red-200'
268439
+ : normalized === 'in_progress'
268440
+ ? 'bg-blue-50 text-blue-700 border-blue-200'
268441
+ : 'bg-gray-50 text-gray-700 border-gray-200';
268442
+ const text = normalized === 'completed'
268443
+ ? labels.completed
268444
+ : normalized === 'failed'
268445
+ ? labels.failed
268446
+ : normalized === 'in_progress'
268447
+ ? labels.running
268448
+ : labels.pending;
268449
+ return (jsxs("span", { className: cn('inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-[10px] font-medium uppercase tracking-wide', style), children: [normalized === 'in_progress' && jsx(LoaderCircle, { className: "h-2.5 w-2.5 animate-spin" }), text] }));
268450
+ }
268451
+
268452
+ function DeleteExperimentModal({ isOpen, onClose, tenantKey, username, datasetName, runName, labels, }) {
268453
+ const [deleteRun, { isLoading }] = useDeleteEvalRunMutation();
268454
+ const handleDelete = async () => {
268455
+ var _a;
268456
+ try {
268457
+ await deleteRun({
268458
+ org: tenantKey,
268459
+ userId: username,
268460
+ datasetName,
268461
+ runName,
268462
+ }).unwrap();
268463
+ toast.success(labels.successToast);
268464
+ onClose();
268465
+ }
268466
+ catch (error) {
268467
+ const detail = (_a = error === null || error === void 0 ? void 0 : error.data) === null || _a === void 0 ? void 0 : _a.detail;
268468
+ toast.error(detail || labels.errorToast);
268469
+ }
268470
+ };
268471
+ return (jsx(Dialog, { open: isOpen, onOpenChange: (open) => !open && !isLoading && onClose(), children: jsxs(DialogContent, { "aria-label": "delete-evaluation", className: "max-w-md mx-4 sm:mx-auto", children: [jsx(DialogHeader, { children: jsx(DialogTitle, { children: labels.title }) }), jsxs("p", { className: "text-sm text-muted-foreground", children: [labels.confirmation.replace('{runName}', runName), ' ', jsx("span", { className: "font-bold italic", children: runName })] }), jsxs(DialogFooter, { className: "gap-2 mt-4", children: [jsx(Button$1, { variant: "outline", onClick: onClose, disabled: isLoading, children: labels.cancel }), jsx(Button$1, { className: "ibl-button-primary", onClick: handleDelete, disabled: isLoading, children: isLoading ? labels.confirming : labels.confirm })] })] }) }));
268472
+ }
268473
+
268474
+ const AGENT_EVALUATION_TAB_LABELS = {
268475
+ header: {
268476
+ title: 'Evals',
268477
+ description: 'Run this agent against a benchmark and score the responses.',
268478
+ infoBox: 'Measure how well your agent performs. Run it against a benchmark — a set of test questions — and every response gets scored, so you can catch weak spots and track improvements as you refine the agent.',
268479
+ },
268480
+ benchmarkPicker: {
268481
+ placeholder: 'Select a benchmark',
268482
+ searchPlaceholder: 'Search benchmarks...',
268483
+ empty: 'No benchmarks found',
268484
+ },
268485
+ actions: {
268486
+ newExperiment: 'New Evaluation',
268487
+ manageBenchmarks: 'Manage benchmarks',
268488
+ viewResults: 'View results',
268489
+ evaluate: 'New review',
268490
+ exportCsv: 'Export CSV',
268491
+ exporting: 'Exporting...',
268492
+ checkStatus: 'Check status',
268493
+ checkingStatus: 'Checking...',
268494
+ notReadyHint: 'Available once the evaluation completes',
268495
+ delete: 'Delete',
268496
+ rowMenuAriaLabel: 'Actions for {name}',
268497
+ },
268498
+ checkStatusToast: {
268499
+ pending: 'Evaluation is still running',
268500
+ completed: 'Evaluation completed',
268501
+ failed: 'Evaluation failed',
268502
+ },
268503
+ table: {
268504
+ experimentColumn: 'EVALUATION',
268505
+ statusColumn: 'STATUS',
268506
+ initiatedByColumn: 'INITIATED BY',
268507
+ createdColumn: 'CREATED',
268508
+ actionsColumn: 'ACTIONS',
268509
+ emptyState: 'No evaluations yet for this agent on benchmark "{dataset}".',
268510
+ },
268511
+ emptyBenchmarks: 'No benchmarks yet. Use "Manage benchmarks" above to create one.',
268512
+ exportErrorToast: 'Failed to export evaluation',
268513
+ startExperimentModal: {
268514
+ title: 'New Evaluation',
268515
+ description: 'Run this agent against every item in the selected benchmark. Results show up here once the run completes in the background.',
268516
+ benchmarkLabel: 'Benchmark',
268517
+ experimentNameLabel: 'Evaluation name',
268518
+ experimentNamePlaceholder: 'Auto-generated if left blank',
268519
+ cancel: 'Cancel',
268520
+ start: 'Start Evaluation',
268521
+ successToast: 'Evaluation started',
268522
+ errorToast: 'Failed to start evaluation',
268523
+ },
268524
+ manageBenchmarksModal: {
268525
+ title: 'Manage benchmarks',
268526
+ description: 'Create and edit tenant-wide benchmarks without leaving the agent settings.',
268527
+ },
268528
+ detailModal: {
268529
+ benchmarkLabel: 'Benchmark',
268530
+ startedPrefix: 'started',
268531
+ tracesSuffixSingular: 'trace produced',
268532
+ tracesSuffixPlural: 'traces produced',
268533
+ scoresSuffixSingular: 'score',
268534
+ scoresSuffixPlural: 'scores',
268535
+ waitingHint: 'Waiting for the evaluation to produce traces. This page auto-refreshes.',
268536
+ noScoresHint: 'No scores yet',
268537
+ newReview: 'New review',
268538
+ scoreNameLabel: 'Score name',
268539
+ scoreNamePlaceholder: 'accuracy',
268540
+ scoreValueLabel: 'Value',
268541
+ scoreValuePlaceholder: '0.0',
268542
+ scoreCommentLabel: 'Comment',
268543
+ scoreCommentPlaceholder: 'Optional',
268544
+ addScore: 'Add',
268545
+ scoreInputError: 'Score name and numeric value are required',
268546
+ scoreRangeError: 'Score value must be between 0 and 1',
268547
+ scoreAddedToast: 'Score added',
268548
+ scoreErrorToast: 'Failed to add score',
268549
+ scoreRemovedToast: 'Score removed',
268550
+ scoreRemoveErrorToast: 'Failed to remove score',
268551
+ traceLabel: 'Trace',
268552
+ itemLabel: 'item',
268553
+ removeScoreAriaLabel: 'Remove score',
268554
+ inputLabel: 'Input',
268555
+ expectedOutputLabel: 'Expected output',
268556
+ actualOutputLabel: 'Actual output',
268557
+ errorLabel: 'Error',
268558
+ noOutputHint: 'No output yet',
268559
+ scoresHeading: 'Scores',
268560
+ addScoreHeading: 'Add a score',
268561
+ reviewsHeading: 'Reviews',
268562
+ reviewsHint: 'Reviews are LLM-as-Judge runs that score every trace in this experiment. Scores from completed reviews appear under each item below.',
268563
+ reviewsRunningLabel: 'running',
268564
+ reviewsCompletedLabel: 'complete',
268565
+ reviewsFailedLabel: 'failed',
268566
+ reviewUnnamedScore: 'Untitled score',
268567
+ reviewFinishedPrefix: 'finished',
268568
+ reviewStartedPrefix: 'started',
268569
+ reviewStatus: {
268570
+ pending: 'Queued',
268571
+ running: 'Running',
268572
+ completed: 'Complete',
268573
+ failed: 'Failed',
268574
+ },
268575
+ reviewDetailsAriaLabel: 'Toggle review details',
268576
+ reviewCriteriaLabel: 'Criteria',
268577
+ reviewScoresProducedLabel: 'Scores produced',
268578
+ reviewNoScoresYet: 'No scores recorded for this review yet.',
268579
+ refresh: 'Refresh',
268580
+ },
268581
+ evaluateModal: {
268582
+ title: 'Evaluate',
268583
+ description: 'Use an LLM to score every trace in this evaluation.',
268584
+ criteriaLabel: 'Criteria',
268585
+ criteriaPlaceholder: 'e.g. Evaluate the response on:\n1. Accuracy\n2. Completeness\n3. Clarity\nWeight accuracy most heavily.',
268586
+ scoreNameLabel: 'Score name',
268587
+ scoreNamePlaceholder: 'e.g. quality',
268588
+ maxConcurrencyLabel: 'Max concurrency',
268589
+ llmLabel: 'LLM',
268590
+ selectLlmPlaceholder: 'Select LLM',
268591
+ cancel: 'Cancel',
268592
+ submit: 'Evaluate',
268593
+ validationError: 'Criteria, score name and LLM are required',
268594
+ successToast: 'Evaluation started',
268595
+ errorToast: 'Failed to start evaluation',
268596
+ pickerTitle: 'Select LLM',
268597
+ pickerDescription: 'Pick a provider then a model.',
268598
+ pickerSelectorAriaLabel: 'LLM Model Selector',
268599
+ pickerSearchPlaceholder: 'Search providers...',
268600
+ pickerEmpty: 'No providers',
268601
+ pickerLogoAlt: '{name} logo',
268602
+ },
268603
+ deleteModal: {
268604
+ title: 'Delete Evaluation',
268605
+ confirmation: 'Are you sure you want to delete this evaluation? This action cannot be undone.',
268606
+ cancel: 'Cancel',
268607
+ confirm: 'Delete',
268608
+ confirming: 'Deleting...',
268609
+ successToast: 'Evaluation deleted',
268610
+ errorToast: 'Failed to delete evaluation',
268611
+ },
268612
+ };
268613
+ function buildEvaluationTabLabels(t) {
268614
+ return {
268615
+ header: {
268616
+ title: t('evaluationTabLabels.header.title'),
268617
+ description: t('evaluationTabLabels.header.description'),
268618
+ infoBox: t('evaluationTabLabels.header.infoBox'),
268619
+ },
268620
+ benchmarkPicker: {
268621
+ placeholder: t('evaluationTabLabels.benchmarkPicker.placeholder'),
268622
+ searchPlaceholder: t('evaluationTabLabels.benchmarkPicker.searchPlaceholder'),
268623
+ empty: t('evaluationTabLabels.benchmarkPicker.empty'),
268624
+ },
268625
+ actions: {
268626
+ newExperiment: t('evaluationTabLabels.actions.newExperiment'),
268627
+ manageBenchmarks: t('evaluationTabLabels.actions.manageBenchmarks'),
268628
+ viewResults: t('evaluationTabLabels.actions.viewResults'),
268629
+ evaluate: t('evaluationTabLabels.actions.evaluate'),
268630
+ exportCsv: t('evaluationTabLabels.actions.exportCsv'),
268631
+ exporting: t('evaluationTabLabels.actions.exporting'),
268632
+ checkStatus: t('evaluationTabLabels.actions.checkStatus'),
268633
+ checkingStatus: t('evaluationTabLabels.actions.checkingStatus'),
268634
+ notReadyHint: t('evaluationTabLabels.actions.notReadyHint'),
268635
+ delete: t('evaluationTabLabels.actions.delete'),
268636
+ rowMenuAriaLabel: t('evaluationTabLabels.actions.rowMenuAriaLabel'),
268637
+ },
268638
+ checkStatusToast: {
268639
+ pending: t('evaluationTabLabels.checkStatusToast.pending'),
268640
+ completed: t('evaluationTabLabels.checkStatusToast.completed'),
268641
+ failed: t('evaluationTabLabels.checkStatusToast.failed'),
268642
+ },
268643
+ table: {
268644
+ experimentColumn: t('evaluationTabLabels.table.experimentColumn'),
268645
+ statusColumn: t('evaluationTabLabels.table.statusColumn'),
268646
+ initiatedByColumn: t('evaluationTabLabels.table.initiatedByColumn'),
268647
+ createdColumn: t('evaluationTabLabels.table.createdColumn'),
268648
+ actionsColumn: t('evaluationTabLabels.table.actionsColumn'),
268649
+ // No values passed on purpose: the {dataset} placeholder must survive
268650
+ // so the call site can .replace() it with the active benchmark name.
268651
+ emptyState: t('evaluationTabLabels.table.emptyState'),
268652
+ },
268653
+ emptyBenchmarks: t('evaluationTabLabels.emptyBenchmarks'),
268654
+ exportErrorToast: t('evaluationTabLabels.exportErrorToast'),
268655
+ startExperimentModal: {
268656
+ title: t('evaluationTabLabels.startExperimentModal.title'),
268657
+ description: t('evaluationTabLabels.startExperimentModal.description'),
268658
+ benchmarkLabel: t('evaluationTabLabels.startExperimentModal.benchmarkLabel'),
268659
+ experimentNameLabel: t('evaluationTabLabels.startExperimentModal.experimentNameLabel'),
268660
+ experimentNamePlaceholder: t('evaluationTabLabels.startExperimentModal.experimentNamePlaceholder'),
268661
+ cancel: t('evaluationTabLabels.startExperimentModal.cancel'),
268662
+ start: t('evaluationTabLabels.startExperimentModal.start'),
268663
+ successToast: t('evaluationTabLabels.startExperimentModal.successToast'),
268664
+ errorToast: t('evaluationTabLabels.startExperimentModal.errorToast'),
268665
+ },
268666
+ manageBenchmarksModal: {
268667
+ title: t('evaluationTabLabels.manageBenchmarksModal.title'),
268668
+ description: t('evaluationTabLabels.manageBenchmarksModal.description'),
268669
+ },
268670
+ detailModal: {
268671
+ benchmarkLabel: t('evaluationTabLabels.detailModal.benchmarkLabel'),
268672
+ startedPrefix: t('evaluationTabLabels.detailModal.startedPrefix'),
268673
+ tracesSuffixSingular: t('evaluationTabLabels.detailModal.tracesSuffixSingular'),
268674
+ tracesSuffixPlural: t('evaluationTabLabels.detailModal.tracesSuffixPlural'),
268675
+ scoresSuffixSingular: t('evaluationTabLabels.detailModal.scoresSuffixSingular'),
268676
+ scoresSuffixPlural: t('evaluationTabLabels.detailModal.scoresSuffixPlural'),
268677
+ waitingHint: t('evaluationTabLabels.detailModal.waitingHint'),
268678
+ noScoresHint: t('evaluationTabLabels.detailModal.noScoresHint'),
268679
+ newReview: t('evaluationTabLabels.detailModal.newReview'),
268680
+ scoreNameLabel: t('evaluationTabLabels.detailModal.scoreNameLabel'),
268681
+ scoreNamePlaceholder: t('evaluationTabLabels.detailModal.scoreNamePlaceholder'),
268682
+ scoreValueLabel: t('evaluationTabLabels.detailModal.scoreValueLabel'),
268683
+ scoreValuePlaceholder: t('evaluationTabLabels.detailModal.scoreValuePlaceholder'),
268684
+ scoreCommentLabel: t('evaluationTabLabels.detailModal.scoreCommentLabel'),
268685
+ scoreCommentPlaceholder: t('evaluationTabLabels.detailModal.scoreCommentPlaceholder'),
268686
+ addScore: t('evaluationTabLabels.detailModal.addScore'),
268687
+ scoreInputError: t('evaluationTabLabels.detailModal.scoreInputError'),
268688
+ scoreRangeError: t('evaluationTabLabels.detailModal.scoreRangeError'),
268689
+ scoreAddedToast: t('evaluationTabLabels.detailModal.scoreAddedToast'),
268690
+ scoreErrorToast: t('evaluationTabLabels.detailModal.scoreErrorToast'),
268691
+ scoreRemovedToast: t('evaluationTabLabels.detailModal.scoreRemovedToast'),
268692
+ scoreRemoveErrorToast: t('evaluationTabLabels.detailModal.scoreRemoveErrorToast'),
268693
+ traceLabel: t('evaluationTabLabels.detailModal.traceLabel'),
268694
+ itemLabel: t('evaluationTabLabels.detailModal.itemLabel'),
268695
+ removeScoreAriaLabel: t('evaluationTabLabels.detailModal.removeScoreAriaLabel'),
268696
+ inputLabel: t('evaluationTabLabels.detailModal.inputLabel'),
268697
+ expectedOutputLabel: t('evaluationTabLabels.detailModal.expectedOutputLabel'),
268698
+ actualOutputLabel: t('evaluationTabLabels.detailModal.actualOutputLabel'),
268699
+ errorLabel: t('evaluationTabLabels.detailModal.errorLabel'),
268700
+ noOutputHint: t('evaluationTabLabels.detailModal.noOutputHint'),
268701
+ scoresHeading: t('evaluationTabLabels.detailModal.scoresHeading'),
268702
+ addScoreHeading: t('evaluationTabLabels.detailModal.addScoreHeading'),
268703
+ reviewsHeading: t('evaluationTabLabels.detailModal.reviewsHeading'),
268704
+ reviewsHint: t('evaluationTabLabels.detailModal.reviewsHint'),
268705
+ reviewsRunningLabel: t('evaluationTabLabels.detailModal.reviewsRunningLabel'),
268706
+ reviewsCompletedLabel: t('evaluationTabLabels.detailModal.reviewsCompletedLabel'),
268707
+ reviewsFailedLabel: t('evaluationTabLabels.detailModal.reviewsFailedLabel'),
268708
+ reviewUnnamedScore: t('evaluationTabLabels.detailModal.reviewUnnamedScore'),
268709
+ reviewFinishedPrefix: t('evaluationTabLabels.detailModal.reviewFinishedPrefix'),
268710
+ reviewStartedPrefix: t('evaluationTabLabels.detailModal.reviewStartedPrefix'),
268711
+ reviewStatus: {
268712
+ pending: t('evaluationTabLabels.detailModal.reviewStatus.pending'),
268713
+ running: t('evaluationTabLabels.detailModal.reviewStatus.running'),
268714
+ completed: t('evaluationTabLabels.detailModal.reviewStatus.completed'),
268715
+ failed: t('evaluationTabLabels.detailModal.reviewStatus.failed'),
268716
+ },
268717
+ reviewDetailsAriaLabel: t('evaluationTabLabels.detailModal.reviewDetailsAriaLabel'),
268718
+ reviewCriteriaLabel: t('evaluationTabLabels.detailModal.reviewCriteriaLabel'),
268719
+ reviewScoresProducedLabel: t('evaluationTabLabels.detailModal.reviewScoresProducedLabel'),
268720
+ reviewNoScoresYet: t('evaluationTabLabels.detailModal.reviewNoScoresYet'),
268721
+ refresh: t('evaluationTabLabels.detailModal.refresh'),
268722
+ },
268723
+ evaluateModal: {
268724
+ title: t('evaluationTabLabels.evaluateModal.title'),
268725
+ description: t('evaluationTabLabels.evaluateModal.description'),
268726
+ criteriaLabel: t('evaluationTabLabels.evaluateModal.criteriaLabel'),
268727
+ criteriaPlaceholder: t('evaluationTabLabels.evaluateModal.criteriaPlaceholder'),
268728
+ scoreNameLabel: t('evaluationTabLabels.evaluateModal.scoreNameLabel'),
268729
+ scoreNamePlaceholder: t('evaluationTabLabels.evaluateModal.scoreNamePlaceholder'),
268730
+ maxConcurrencyLabel: t('evaluationTabLabels.evaluateModal.maxConcurrencyLabel'),
268731
+ llmLabel: t('evaluationTabLabels.evaluateModal.llmLabel'),
268732
+ selectLlmPlaceholder: t('evaluationTabLabels.evaluateModal.selectLlmPlaceholder'),
268733
+ cancel: t('evaluationTabLabels.evaluateModal.cancel'),
268734
+ submit: t('evaluationTabLabels.evaluateModal.submit'),
268735
+ validationError: t('evaluationTabLabels.evaluateModal.validationError'),
268736
+ successToast: t('evaluationTabLabels.evaluateModal.successToast'),
268737
+ errorToast: t('evaluationTabLabels.evaluateModal.errorToast'),
268738
+ pickerTitle: t('evaluationTabLabels.evaluateModal.pickerTitle'),
268739
+ pickerDescription: t('evaluationTabLabels.evaluateModal.pickerDescription'),
268740
+ pickerSelectorAriaLabel: t('evaluationTabLabels.evaluateModal.pickerSelectorAriaLabel'),
268741
+ pickerSearchPlaceholder: t('evaluationTabLabels.evaluateModal.pickerSearchPlaceholder'),
268742
+ pickerEmpty: t('evaluationTabLabels.evaluateModal.pickerEmpty'),
268743
+ pickerLogoAlt: t('evaluationTabLabels.evaluateModal.pickerLogoAlt'),
268744
+ },
268745
+ deleteModal: {
268746
+ title: t('evaluationTabLabels.deleteModal.title'),
268747
+ confirmation: t('evaluationTabLabels.deleteModal.confirmation'),
268748
+ cancel: t('evaluationTabLabels.deleteModal.cancel'),
268749
+ confirm: t('evaluationTabLabels.deleteModal.confirm'),
268750
+ confirming: t('evaluationTabLabels.deleteModal.confirming'),
268751
+ successToast: t('evaluationTabLabels.deleteModal.successToast'),
268752
+ errorToast: t('evaluationTabLabels.deleteModal.errorToast'),
268753
+ },
268754
+ };
268755
+ }
268756
+ function resolveEvaluationTabLabels(override, t) {
268757
+ const base = t ? buildEvaluationTabLabels(t) : AGENT_EVALUATION_TAB_LABELS;
268758
+ if (!override)
268759
+ return base;
268760
+ return deepMerge(base, override);
268761
+ }
268762
+
268763
+ const PAGE_SIZE = 10;
268764
+ function StatusBadge({ status }) {
268765
+ const upper = status === null || status === void 0 ? void 0 : status.toUpperCase();
268766
+ const color = upper === 'COMPLETED'
268767
+ ? 'bg-green-100 text-green-700'
268768
+ : upper === 'FAILED'
268769
+ ? 'bg-red-100 text-red-700'
268770
+ : upper
268771
+ ? 'bg-blue-100 text-blue-700'
268772
+ : 'bg-gray-100 text-gray-600';
268773
+ return (jsx("span", { className: cn('inline-flex rounded-full px-2 py-0.5 text-xs font-medium', color), children: upper !== null && upper !== void 0 ? upper : '—' }));
268774
+ }
268775
+ function AgentEvaluationTab({ getLLMProviderDetails, labels: labelsOverride, PaginationComponent, }) {
268776
+ var _a, _b;
268777
+ const { tenantKey, mentorId, username } = useAgentSettings();
268778
+ const dispatch = useDispatch();
268779
+ const t = useT();
268780
+ const labels = React__default.useMemo(() => resolveEvaluationTabLabels(labelsOverride, t), [labelsOverride, t]);
268781
+ const [showStart, setShowStart] = React__default.useState(false);
268782
+ const [showManageBenchmarks, setShowManageBenchmarks] = React__default.useState(false);
268783
+ const [selectedRun, setSelectedRun] = React__default.useState(null);
268784
+ const [judgeRun, setJudgeRun] = React__default.useState(null);
268785
+ const [deleteRun, setDeleteRun] = React__default.useState(null);
268786
+ const [checkingRun, setCheckingRun] = React__default.useState(null);
268787
+ const [exportingRun, setExportingRun] = React__default.useState(null);
268788
+ const [selectedBenchmark, setSelectedBenchmark] = React__default.useState('');
268789
+ const [page, setPage] = React__default.useState(1);
268790
+ const [exportRun] = useExportEvalRunMutation();
268791
+ const { data: datasetsData, isLoading: isDatasetsLoading } = useListEvalDatasetsQuery({
268792
+ org: tenantKey,
268793
+ userId: username,
268794
+ page: 1,
268795
+ limit: 200,
268796
+ });
268797
+ const benchmarks = (_a = datasetsData === null || datasetsData === void 0 ? void 0 : datasetsData.results) !== null && _a !== void 0 ? _a : [];
268798
+ React__default.useEffect(() => {
268799
+ if (!selectedBenchmark && benchmarks.length > 0) {
268800
+ setSelectedBenchmark(benchmarks[0].name);
268801
+ }
268802
+ }, [benchmarks, selectedBenchmark]);
268803
+ const { data: runsData, isLoading: isRunsLoading } = useListEvalRunsQuery({
268804
+ org: tenantKey,
268805
+ userId: username,
268806
+ datasetName: selectedBenchmark,
268807
+ page,
268808
+ limit: PAGE_SIZE,
268809
+ }, { skip: !selectedBenchmark });
268810
+ // Runs are benchmark-scoped server-side, but a benchmark can be evaluated
268811
+ // against multiple agents. Filter client-side to the agent we're editing:
268812
+ // - completed runs carry `metadata.mentor_unique_id` → strict match
268813
+ // (backend field stays `mentor_unique_id` for now)
268814
+ // - pending runs may not have populated metadata yet → keep them if the
268815
+ // current user initiated them (their freshly-started experiment)
268816
+ const allRuns = (_b = runsData === null || runsData === void 0 ? void 0 : runsData.results) !== null && _b !== void 0 ? _b : [];
268817
+ const runs = React__default.useMemo(() => allRuns.filter((run) => {
268818
+ const meta = run.metadata;
268819
+ const runMentor = typeof (meta === null || meta === void 0 ? void 0 : meta.mentor_unique_id) === 'string' ? meta.mentor_unique_id : null;
268820
+ if (runMentor)
268821
+ return runMentor === mentorId;
268822
+ return !!username && run.username === username;
268823
+ }), [allRuns, mentorId, username]);
268824
+ const totalPages = evalTotalPages(runsData === null || runsData === void 0 ? void 0 : runsData.count, PAGE_SIZE);
268825
+ const [fetchRunDetail] = useLazyGetEvalRunQuery();
268826
+ const handleCheckStatus = async (runName) => {
268827
+ setCheckingRun(runName);
268828
+ try {
268829
+ const detail = await fetchRunDetail({
268830
+ org: tenantKey,
268831
+ userId: username,
268832
+ datasetName: selectedBenchmark,
268833
+ runName,
268834
+ }).unwrap();
268835
+ const status = detail === null || detail === void 0 ? void 0 : detail.status;
268836
+ // Push the fresh status into the runs-list cache so the table
268837
+ // re-renders without a separate round-trip.
268838
+ dispatch(evaluationsApiSlice.util.invalidateTags([
268839
+ { type: EVALUATIONS_TAGS.RUNS, id: selectedBenchmark },
268840
+ ]));
268841
+ if (status === 'completed') {
268842
+ toast.success(labels.checkStatusToast.completed);
268843
+ }
268844
+ else if (status === 'failed') {
268845
+ toast.error(labels.checkStatusToast.failed);
268846
+ }
268847
+ else {
268848
+ toast.info(labels.checkStatusToast.pending);
268849
+ }
268850
+ }
268851
+ catch (_a) {
268852
+ toast.error(labels.checkStatusToast.failed);
268853
+ }
268854
+ finally {
268855
+ setCheckingRun(null);
268856
+ }
268857
+ };
268858
+ const handleExport = async (runName) => {
268859
+ var _a;
268860
+ setExportingRun(runName);
268861
+ try {
268862
+ const csv = await exportRun({
268863
+ org: tenantKey,
268864
+ userId: username,
268865
+ datasetName: selectedBenchmark,
268866
+ runName,
268867
+ }).unwrap();
268868
+ const blob = new Blob([csv], { type: 'text/csv;charset=utf-8;' });
268869
+ const url = URL.createObjectURL(blob);
268870
+ const link = document.createElement('a');
268871
+ link.href = url;
268872
+ link.download = `${selectedBenchmark}_${runName}_results.csv`;
268873
+ document.body.appendChild(link);
268874
+ link.click();
268875
+ document.body.removeChild(link);
268876
+ URL.revokeObjectURL(url);
268877
+ }
268878
+ catch (error) {
268879
+ const detail = (_a = error === null || error === void 0 ? void 0 : error.data) === null || _a === void 0 ? void 0 : _a.detail;
268880
+ toast.error(detail || labels.exportErrorToast);
268881
+ }
268882
+ finally {
268883
+ setExportingRun(null);
268884
+ }
268885
+ };
268886
+ return (jsxs(Fragment$1, { children: [jsx("div", { className: "hidden lg:block flex-shrink-0 p-4 border-b border-gray-200 bg-white h-[73px] flex items-center", children: jsxs("div", { children: [jsx("h3", { className: "text-base font-medium text-gray-900 mb-1", children: labels.header.title }), jsx("p", { className: "text-gray-700 text-xs", children: labels.header.description })] }) }), jsxs("div", { className: "flex-1 p-3 lg:p-4 space-y-4", style: {
268887
+ overflowY: 'auto',
268888
+ overflowX: 'hidden',
268889
+ }, children: [jsx("div", { className: "rounded-md border border-gray-200 bg-gray-50 p-3 text-xs text-gray-600", "data-testid": "evaluation-info-box", children: labels.header.infoBox }), jsxs("div", { className: "flex flex-col items-start justify-between gap-4 sm:flex-row sm:items-center", children: [jsx(BenchmarkCombobox, { benchmarks: benchmarks.map((benchmark) => benchmark.name), value: selectedBenchmark, onChange: (next) => {
268890
+ setSelectedBenchmark(next);
268891
+ setPage(1);
268892
+ }, placeholder: labels.benchmarkPicker.placeholder, searchPlaceholder: labels.benchmarkPicker.searchPlaceholder, emptyMessage: labels.benchmarkPicker.empty, disabled: isDatasetsLoading || benchmarks.length === 0 }), jsxs("div", { className: "flex items-center gap-2", children: [jsx(Button$1, { variant: "outline", size: "sm", onClick: () => setShowManageBenchmarks(true), className: "cursor-pointer", children: labels.actions.manageBenchmarks }), jsxs(Button$1, { onClick: () => setShowStart(true), size: "sm", disabled: !selectedBenchmark, className: "cursor-pointer bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-white hover:opacity-90", children: [jsx(Plus, { className: "h-4 w-4 mr-1" }), labels.actions.newExperiment] })] })] }), benchmarks.length === 0 && !isDatasetsLoading && (jsx("div", { className: "rounded-md border border-gray-200 bg-gray-50 p-6 text-center text-sm text-gray-600", children: labels.emptyBenchmarks })), selectedBenchmark && (jsx("div", { className: "overflow-hidden rounded-md border", children: jsx("div", { className: "overflow-x-auto sm:mx-0", children: isRunsLoading ? (jsx("div", { className: "flex items-center justify-center w-full py-10", children: jsx(Spinner, {}) })) : (jsxs(Table$1, { className: "min-w-full", children: [jsx(TableHeader$1, { children: jsxs(TableRow$1, { className: "bg-muted/50 border-b", children: [jsx(TableHead, { className: "p-3 text-left text-sm whitespace-nowrap text-[#646464]", children: labels.table.experimentColumn }), jsx(TableHead, { className: "p-3 text-left text-sm whitespace-nowrap text-[#646464]", children: labels.table.statusColumn }), jsx(TableHead, { className: "p-3 text-left text-sm whitespace-nowrap text-[#646464]", children: labels.table.initiatedByColumn }), jsx(TableHead, { className: "p-3 text-left text-sm whitespace-nowrap text-[#646464]", children: labels.table.createdColumn }), jsx(TableHead, { className: "p-3 text-right text-sm whitespace-nowrap text-[#646464]", children: labels.table.actionsColumn })] }) }), jsxs(TableBody, { children: [runs.map((run) => {
268893
+ var _a, _b;
268894
+ const meta = run.metadata;
268895
+ const initiatedBy = run.user_email ||
268896
+ run.username ||
268897
+ (typeof (meta === null || meta === void 0 ? void 0 : meta.initiated_by) === 'string'
268898
+ ? meta.initiated_by
268899
+ : '—');
268900
+ const isCompleted = run.status === 'completed';
268901
+ const isChecking = checkingRun === run.name;
268902
+ return (jsxs(TableRow$1, { className: "text-sm hover:bg-blue-50", children: [jsx(TableCell$1, { className: "p-3 text-gray-700 whitespace-nowrap font-medium", children: run.name }), jsx(TableCell$1, { className: "p-3 whitespace-nowrap", children: jsx(StatusBadge, { status: run.status }) }), jsx(TableCell$1, { className: "p-3 text-gray-700 whitespace-nowrap", children: initiatedBy }), jsx(TableCell$1, { className: "p-3 text-gray-700 whitespace-nowrap", children: (() => {
268903
+ const created = parseEvalDate(run.created_at);
268904
+ return created
268905
+ ? formatDistanceToNow(created, { addSuffix: true })
268906
+ : '—';
268907
+ })() }), jsx(TableCell$1, { className: "p-3 text-right", children: jsxs(DropdownMenu, { children: [jsx(DropdownMenuTrigger, { asChild: true, children: jsx(Button$1, { variant: "ghost", size: "icon", className: "h-8 w-8", "aria-label": labels.actions.rowMenuAriaLabel.replace('{name}', run.name), children: jsx(Ellipsis, { className: "h-4 w-4" }) }) }), jsxs(DropdownMenuContent, { align: "end", children: [jsxs(DropdownMenuItem, { className: "cursor-pointer", disabled: !isCompleted, title: isCompleted ? undefined : labels.actions.notReadyHint, onClick: () => setSelectedRun({
268908
+ datasetName: selectedBenchmark,
268909
+ runName: run.name,
268910
+ }), children: [jsx(ChartColumn, { className: "mr-2 h-4 w-4" }), labels.actions.viewResults] }), jsxs(DropdownMenuItem, { className: "cursor-pointer", disabled: !isCompleted, title: isCompleted ? undefined : labels.actions.notReadyHint, onClick: () => setJudgeRun({
268911
+ datasetName: selectedBenchmark,
268912
+ runName: run.name,
268913
+ }), children: [jsx(Sparkles, { className: "mr-2 h-4 w-4" }), labels.actions.evaluate] }), jsxs(DropdownMenuItem, { className: "cursor-pointer", disabled: isChecking, onSelect: (event) => {
268914
+ event.preventDefault();
268915
+ handleCheckStatus(run.name);
268916
+ }, children: [isChecking ? (jsx(LoaderCircle, { className: "mr-2 h-4 w-4 animate-spin" })) : (jsx(Activity, { className: "mr-2 h-4 w-4" })), isChecking
268917
+ ? labels.actions.checkingStatus
268918
+ : labels.actions.checkStatus] }), jsxs(DropdownMenuItem, { className: "cursor-pointer", disabled: !isCompleted || exportingRun === run.name, title: isCompleted ? undefined : labels.actions.notReadyHint, onClick: () => handleExport(run.name), children: [jsx(Download, { className: "mr-2 h-4 w-4" }), exportingRun === run.name
268919
+ ? labels.actions.exporting
268920
+ : labels.actions.exportCsv] }), jsx(DropdownMenuSeparator, {}), jsxs(DropdownMenuItem, { className: "cursor-pointer text-red-500 focus:text-red-500", onClick: () => setDeleteRun({
268921
+ datasetName: selectedBenchmark,
268922
+ runName: run.name,
268923
+ }), children: [jsx(Trash2, { className: "mr-2 h-4 w-4" }), labels.actions.delete] })] })] }) })] }, (_b = (_a = run.task_record_id) !== null && _a !== void 0 ? _a : run.id) !== null && _b !== void 0 ? _b : run.name));
268924
+ }), runs.length === 0 && (jsx(TableRow$1, { children: jsx(TableCell$1, { colSpan: 5, className: "p-6 text-center text-sm text-gray-500", children: labels.table.emptyState.replace('{dataset}', selectedBenchmark) }) }))] })] })) }) })), selectedBenchmark &&
268925
+ totalPages > 1 &&
268926
+ (PaginationComponent ? (jsx(PaginationComponent, { currentPage: page, totalPages: totalPages, onPageChange: setPage, disabled: isRunsLoading })) : (jsx(AdvancedPagination, { currentPage: page, totalPages: totalPages, onPageChange: setPage }))), showManageBenchmarks && (jsx(Dialog, { open: showManageBenchmarks, onOpenChange: setShowManageBenchmarks, children: jsxs(DialogContent, { "aria-label": "manage-benchmarks", className: "max-w-4xl max-h-[85vh] overflow-y-auto", children: [jsxs(DialogHeader, { children: [jsx(DialogTitle, { children: labels.manageBenchmarksModal.title }), jsx(DialogDescription, { children: labels.manageBenchmarksModal.description })] }), jsx(BenchmarksTab, { tenantKey: tenantKey, username: username })] }) })), showStart && (jsx(StartExperimentModal, { isOpen: showStart, onClose: () => setShowStart(false), tenantKey: tenantKey, username: username, mentorUniqueId: mentorId, datasetName: selectedBenchmark, onStarted: () => setPage(1), labels: labels.startExperimentModal })), selectedRun && (jsx(ExperimentDetailModal, { isOpen: !!selectedRun, onClose: () => setSelectedRun(null), tenantKey: tenantKey, username: username, mentorId: mentorId, datasetName: selectedRun.datasetName, runName: selectedRun.runName, labels: labels, getLLMProviderDetails: getLLMProviderDetails })), judgeRun && (jsx(LlmJudgeModal, { isOpen: !!judgeRun, onClose: () => setJudgeRun(null), tenantKey: tenantKey, username: username, mentorId: mentorId, datasetName: judgeRun.datasetName, runName: judgeRun.runName, labels: labels.evaluateModal, getLLMProviderDetails: getLLMProviderDetails })), deleteRun && (jsx(DeleteExperimentModal, { isOpen: !!deleteRun, onClose: () => setDeleteRun(null), tenantKey: tenantKey, username: username, datasetName: deleteRun.datasetName, runName: deleteRun.runName, labels: labels.deleteModal }))] })] }));
268927
+ }
268928
+
266825
268929
  const CUSTOM_AGENTS_LIMIT = 6;
266826
268930
  const AgentSearchContext = React__default.createContext(null);
266827
268931
  function useAgentSearchContext() {
@@ -323226,5 +325330,5 @@ var index_es = /*#__PURE__*/Object.freeze({
323226
325330
  vectorsRatio: vectorsRatio
323227
325331
  });
323228
325332
 
323229
- export { AGENT_ACCESS_TAB_LABELS, AGENT_ANALYTICS_TAB_LABELS, AGENT_API_TAB_LABELS, AGENT_DATASETS_TAB_LABELS, AGENT_DISCLAIMERS_TAB_LABELS, AGENT_EMBED_TAB_LABELS, AGENT_HISTORY_TAB_LABELS, AGENT_LLM_TAB_LABELS, AGENT_LTI_TAB_LABELS, AGENT_MEMORY_TAB_LABELS, AGENT_PICKER_LABELS, AGENT_PRIVACY_TAB_LABELS, AGENT_PROMPTS_TAB_LABELS, AGENT_SAFETY_TAB_LABELS, AGENT_SCREENSHARE_TAB_LABELS, AGENT_SEARCH_LABELS, AGENT_SETTINGS_TAB_LABELS, AGENT_TASKS_TAB_LABELS, AGENT_TOOLS_TAB_LABELS, AGENT_VOICE_TAB_LABELS, Account, AgentAccessTab, AgentAnalyticsTab, AgentApiTab, AgentCard, AgentDatasetsTab, AgentDisclaimersTab, AgentEmbedTab, AgentEmptyState, AgentHistoryTab, AgentLLMTab, AgentLtiTab, AgentMemoryTab, AgentPrivacyTab, AgentPromptsTab, AgentSafetyTab, AgentScreenShareTab, AgentSearch, AgentSearchFilters, AgentSearchInput, AgentSettingsProvider, AgentSettingsTab, AgentTasksTab, AgentToolsTab, AgentVoiceTab, AppSidebar, CATALOGS, Chat, ClientErrorPage, ConversationStarters$1 as ConversationStarters, CopyButton, CopyMentorModal, CourseBox, CourseContentLayout, CourseContentTabPage, CreatePathwayModal, CredentialDetailModal, CredentialMiniBox, DEFAULT_ANALYTICS_HUB_TABS, DEFAULT_LOCALE, DeleteMentorModal, EMPTY_PROGRAM_SETTINGS_FORM, EdxIframe, ErrorPage, GreetingMethod, McpTab, MediaBox, MentorSelectionGrid, NavBar, OrganizationTab, PLATFORM_SIDEBAR_FLYOUT_ITEM_COLOR, PLATFORM_SIDEBAR_FLYOUT_TITLE_COLOR, PLATFORM_SIDEBAR_NAV_ACTIVE_BG_OPEN, PLATFORM_SIDEBAR_NAV_MUTED, PathwayDetailModal, PlatformAccountSheet, PlatformSidebar, PlatformSidebarCollapsedLabelFlyout, PlatformSidebarCollapsedNavFlyout, PlatformSidebarFooter, PlatformSidebarNavDivider, PlatformSidebarNavSection, PlatformSidebarSubNavItem, ProfileInfoCards, ProfileTabs, ProgramDetailModal, ProjectsSidebarDropdown, SUPPORTED_LOCALES, SidebarInset, SidebarProvider, SidebarTrigger, SsoLogin, StarButton, UserProfileDropdown, UserProfileModal, WebContainersI18nProvider, formatDateString, getCatalog, getLLMProviderDetails, initializeLocalStorageWithObject, isValidLocale, resolveAgentPickerLabels, resolveAgentSearchLabels, resolveSettingsTabLabels, useAgentSearch, useAgentSearchWithPagination, useAgentSettings, useAgentStar, useGetChatDetails, usePlatformSidebarFooterActions, usePlatformSidebarNavCallback, useSidebar, useT, useTimeTracker, useWebContainersI18n, useWebContainersLocale };
325333
+ export { AGENT_ACCESS_TAB_LABELS, AGENT_ANALYTICS_TAB_LABELS, AGENT_API_TAB_LABELS, AGENT_DATASETS_TAB_LABELS, AGENT_DISCLAIMERS_TAB_LABELS, AGENT_EMBED_TAB_LABELS, AGENT_EVALUATION_TAB_LABELS, AGENT_HISTORY_TAB_LABELS, AGENT_LLM_TAB_LABELS, AGENT_LTI_TAB_LABELS, AGENT_MEMORY_TAB_LABELS, AGENT_PICKER_LABELS, AGENT_PRIVACY_TAB_LABELS, AGENT_PROMPTS_TAB_LABELS, AGENT_SAFETY_TAB_LABELS, AGENT_SCREENSHARE_TAB_LABELS, AGENT_SEARCH_LABELS, AGENT_SETTINGS_TAB_LABELS, AGENT_TASKS_TAB_LABELS, AGENT_TOOLS_TAB_LABELS, AGENT_VOICE_TAB_LABELS, Account, AgentAccessTab, AgentAnalyticsTab, AgentApiTab, AgentCard, AgentDatasetsTab, AgentDisclaimersTab, AgentEmbedTab, AgentEmptyState, AgentEvaluationTab, AgentHistoryTab, AgentLLMTab, AgentLtiTab, AgentMemoryTab, AgentPrivacyTab, AgentPromptsTab, AgentSafetyTab, AgentScreenShareTab, AgentSearch, AgentSearchFilters, AgentSearchInput, AgentSettingsProvider, AgentSettingsTab, AgentTasksTab, AgentToolsTab, AgentVoiceTab, AppSidebar, CATALOGS, Chat, ClientErrorPage, ConversationStarters$1 as ConversationStarters, CopyButton, CopyMentorModal, CourseBox, CourseContentLayout, CourseContentTabPage, CreatePathwayModal, CredentialDetailModal, CredentialMiniBox, DEFAULT_ANALYTICS_HUB_TABS, DEFAULT_LOCALE, DeleteMentorModal, EMPTY_PROGRAM_SETTINGS_FORM, EdxIframe, ErrorPage, GreetingMethod, McpTab, MediaBox, MentorSelectionGrid, NavBar, OrganizationTab, PLATFORM_SIDEBAR_FLYOUT_ITEM_COLOR, PLATFORM_SIDEBAR_FLYOUT_TITLE_COLOR, PLATFORM_SIDEBAR_NAV_ACTIVE_BG_OPEN, PLATFORM_SIDEBAR_NAV_MUTED, PathwayDetailModal, PlatformAccountSheet, PlatformSidebar, PlatformSidebarCollapsedLabelFlyout, PlatformSidebarCollapsedNavFlyout, PlatformSidebarFooter, PlatformSidebarNavDivider, PlatformSidebarNavSection, PlatformSidebarSubNavItem, ProfileInfoCards, ProfileTabs, ProgramDetailModal, ProjectsSidebarDropdown, SUPPORTED_LOCALES, SidebarInset, SidebarProvider, SidebarTrigger, SsoLogin, StarButton, UserProfileDropdown, UserProfileModal, WebContainersI18nProvider, formatDateString, getCatalog, getLLMProviderDetails, initializeLocalStorageWithObject, isValidLocale, resolveAgentPickerLabels, resolveAgentSearchLabels, resolveSettingsTabLabels, useAgentSearch, useAgentSearchWithPagination, useAgentSettings, useAgentStar, useGetChatDetails, usePlatformSidebarFooterActions, usePlatformSidebarNavCallback, useSidebar, useT, useTimeTracker, useWebContainersI18n, useWebContainersLocale };
323230
325334
  //# sourceMappingURL=index.esm.js.map