@iblai/iblai-js 2.2.6 → 2.2.8
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.
- package/dist/data-layer/playwright/grader-tab-helpers.d.ts +138 -0
- package/dist/data-layer/playwright/index.d.ts +2 -0
- package/dist/playwright/index.cjs +326 -0
- package/dist/playwright/index.cjs.map +1 -1
- package/dist/playwright/index.d.ts +140 -2
- package/dist/playwright/index.esm.js +313 -1
- package/dist/playwright/index.esm.js.map +1 -1
- package/dist/playwright/playwright/grader-tab-helpers.d.ts +138 -0
- package/dist/playwright/playwright/index.d.ts +2 -0
- package/dist/security/playwright/grader-tab-helpers.d.ts +138 -0
- package/dist/security/playwright/index.d.ts +2 -0
- package/dist/web-containers/playwright/grader-tab-helpers.d.ts +138 -0
- package/dist/web-containers/playwright/index.d.ts +2 -0
- package/dist/web-containers/source/index.esm.js +452 -0
- package/dist/web-containers/source/next/index.esm.js +995 -2
- package/dist/web-utils/playwright/grader-tab-helpers.d.ts +138 -0
- package/dist/web-utils/playwright/index.d.ts +2 -0
- package/package.json +5 -5
|
@@ -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, useGetRbacResourceDiscoveryQuery, useGetRbacResourceListQuery, useGetRbacPoliciesQuery, useCreateRbacPolicyMutation, useUpdateRbacPolicyMutation, useDeleteRbacPolicyMutation, useGetRbacPolicyDetailsQuery, useGetWatchedGroupsQuery, useCreateWatchedGroupMutation, useUpdateWatchedGroupMutation, useDeleteWatchedGroupMutation, useAddWatchedUserMutation, useRemoveWatchedUserMutation, useAddWatcherMutation, useUpdateWatcherMutation, useDeleteWatcherMutation, useGetWatchedUsersQuery, useGetWatchersQuery, WATCHER_NOTIFICATION_EVENTS, WATCHER_NOTIFICATION_EVENT_LABELS, useGetApplicationFormsQuery, useGetApplicationFormDetailQuery, useCreateApplicationFormMutation, useUpdateApplicationFormMutation, useGetApplicationAdminDetailQuery, useInviteApplicationCandidateMutation, useLazyGetApplicationAttachmentFileQuery, useCreateApplicationWaiverMutation, useDeleteApplicationWaiverMutation, useSubmitApplicationOverrideMutation, useUpdateApplicationPlacementMutation, useDeleteApplicationCourseAssignmentMutation, useCreateApplicationNoteMutation, useUpdateApplicationNoteMutation, useDeleteApplicationNoteMutation, useTransitionApplicationMutation, useLinkApplicationCandidateMutation, useCreateApplicationPlacementsMutation, useGetCustomMentorsQuery, useCreateApplicationCourseAssignmentsMutation, useGetApplicationBlocksQuery, useDeleteApplicationBlockMutation, useGetApplicationsPipelineStatsQuery, useGetApplicationsPipelineQuery, useDeleteApiKeyMutation, 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, 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, useGetTenantChatPrivacyConfigQuery as useGetTenantChatPrivacyConfigQuery$1, useGetCallConfigurationsQuery, useCreateCallConfigurationMutation, useUpdateCallConfigurationMutation, chatPrivacyApiSlice, useDeleteMentorMutation, useForkMentorMutation, useGetToolsQuery, useLazyGetMCPServersQuery, useOauthFindMutation, useLazyStartOAuthFlowQuery, useCreateMCPServerMutation, usePartialUpdateMCPServerMutation, useCreateMCPServerConnectionMutation, usePatchMCPServerConnectionMutation, useGetConnectedServicesQuery, useGetMCPServersQuery, useGetMCPServerConnectionsQuery, useUpdateMCPServerMutation, useDeleteMCPServerMutation, useEditMentorJsonMutation, useDisconnectServiceMutation, useGetPromptCategoriesQuery, PRIVACY_ACTIONS, PRIVACY_ENTITY_TYPES, useGetVoicesQuery, useGetVoiceQuery, useGetMentorPublicSettingsQuery, useGetChatHistoryFilterQuery, useGetChatHistoryQuery, useGetMentorSummariesQuery, useGetConversationMemoriesQuery, useGetSupportTicketsQuery, useGetSupportTicketMessagesQuery, useCreateSupportTicketMessageMutation, usePatchSupportTicketMutation, useCloseSupportTicketMutation, useCreateLtiMentorMutation, useUpdateLtiMentorMutation, useGetLtiMentorsQuery, useCreateLtiKeyMutation, useUpdateLtiKeyMutation, useDeleteLtiKeyMutation, useGetLtiKeysQuery, useCreateLtiToolMutation, useUpdateLtiToolMutation, useGetLtiToolsQuery, useGetPlatformInfoQuery, useCreatePromptMutation, useGetPromptsSearchQuery, useUpdatePromptMutation, useCreateRedirectTokenMutation, useGetShareableLinkQuery, useCreateShareableLinkMutation, useUpdateShareableLinkMutation, useCreateDisclaimerMutation, useUpdateDisclaimerMutation, useGetDisclaimersQuery, useUpdateRbacMentorAccessMutation, useGetRbacMentorAccessListQuery, useStartEvalRunMutation, useEvaluateEvalRunMutation, useGetEvalRunQuery, useDeleteEvalScoreMutation, useListEvalRunJudgesQuery, useCreateEvalScoreMutation, useDeleteEvalRunMutation, useExportEvalRunMutation, useListEvalRunsQuery, useLazyGetEvalRunQuery, evaluationsApiSlice, EVALUATIONS_TAGS, useGetPersonnalizedMentorsQuery, useCreateCallCredentialsMutation, useGetGuidedPromptsQuery, useUpdateChatSessionSharedMutation, useUpdateMessageFeedbackMutation, useLazyGetPromptsSearchQuery, useLazyGetGuidedPromptsQuery, useGetPublicMentorsQuery, useGetPeriodicAgentsQuery, useGetPeriodicAgentLogsListQuery, useCreatePeriodicAgentMutation, useDeletePeriodicAgentMutation, useDeletePromptMutation, useDeleteTrainingDocumentMutation, useGetTrainingDocumentRetrainScheduleQuery, useCreateTrainingDocumentRetrainScheduleMutation, useCreateMemoryCategoryMutation, useUpdateMemoryCategoryMutation, useDeleteMemoryCategoryMutation, useUpdateArtifactMutation, useLazyGetArtifactVersionQuery, useLazyListArtifactVersionsQuery, useSetCurrentVersionMutation, useListArtifactVersionsQuery, useLazyGetArtifactQuery, useLazyListArtifactsQuery, useEditSessionMutation } from '@iblai/data-layer';
|
|
5
|
+
import { useGetUserMetadataQuery, useGetUserMetadataEdxQuery, useUpdateUserMetadataMutation, useUpdateUserMetadataEdxMutation, useUploadProfileImageMutation, useResetPasswordMutation, useSelfRetireMutation, useCreateUserInstitutionMutation, useGetUserInstitutionsQuery, useCreateUserEducationMutation, useUpdateUserEducationMutation, useDeleteUserEducationMutation, useGetUserEducationQuery, useCreateUserCompanyMutation, useGetUserCompaniesQuery, useCreateUserExperienceMutation, useUpdateUserExperienceMutation, useDeleteUserExperienceMutation, useGetUserExperienceQuery, useGetUserResumeQuery, useCreateUserResumeMutation, useGetMySubscriptionsQuery, useGetItemSubscriptionQuery, useCancelSubscriptionMutation, useGetLearnerDetailsQuery, useGetUserEnrolledCoursesQuery, useGetUserEnrolledProgramsQuery, useGetUserCatalogPathwaysQuery, useGetUsersAsAssertionsQuery, useGetUserEarnedSkillsQuery, useGetUserReportedSkillsQuery, useGetUserDesiredSkillsQuery, useCreateGlobalMemoryMutation, useGetMemsearchStatusQuery, useGetUserMemorySettingsQuery, useUpdateUserMemorySettingsMutation, useGetGlobalMemoriesQuery, useDeleteGlobalMemoryMutation, useInviteUserMutation, usePlatformInvitationsQuery, useCreateCatalogInvitationCourseBulkMutation, useGetCatalogInvitationsCourseQuery, useLazyPlatformUsersQuery, useLazyPlatformUserGroupsQuery, useGetPersonnalizedSearchQuery, useCreateCatalogInvitationProgramBulkMutation, useGetCatalogInvitationsProgramQuery, useUpdateUserRoleMutation, useUpdateUserStatusMutation, useUpdatePlatformUserRoleWithPoliciesMutation, usePlatformUsersQuery, isPoliciesResponse, platformApiSlice, featureTags, useLazyGetRbacTeamsAccessListQuery, useCreateRbacTeamsAccessMutation, useGetRbacGroupsQuery, usePlatformUserGroupsQuery, useCreateRbacGroupMutation, useUpdateRbacGroupMutation, useDeleteRbacGroupMutation, useCreatePlatformUserGroupMutation, useUpdatePlatformUserGroupMutation, useDeletePlatformUserGroupMutation, useGetRbacGroupDetailsQuery, useGetPlatformUserGroupDetailsQuery, useGetRbacPermissionsMutation, useGetRbacRolesQuery, useCreateRbacRoleMutation, useUpdateRbacRoleMutation, useDeleteRbacRoleMutation, useGetRbacRoleDetailsQuery, useGetRbacActionsDefinitionQuery, useGetRbacResourceDiscoveryQuery, useGetRbacResourceListQuery, useGetRbacPoliciesQuery, useCreateRbacPolicyMutation, useUpdateRbacPolicyMutation, useDeleteRbacPolicyMutation, useGetRbacPolicyDetailsQuery, useGetWatchedGroupsQuery, useCreateWatchedGroupMutation, useUpdateWatchedGroupMutation, useDeleteWatchedGroupMutation, useAddWatchedUserMutation, useRemoveWatchedUserMutation, useAddWatcherMutation, useUpdateWatcherMutation, useDeleteWatcherMutation, useGetWatchedUsersQuery, useGetWatchersQuery, WATCHER_NOTIFICATION_EVENTS, WATCHER_NOTIFICATION_EVENT_LABELS, useGetApplicationFormsQuery, useGetApplicationFormDetailQuery, useCreateApplicationFormMutation, useUpdateApplicationFormMutation, useGetApplicationAdminDetailQuery, useInviteApplicationCandidateMutation, useLazyGetApplicationAttachmentFileQuery, useCreateApplicationWaiverMutation, useDeleteApplicationWaiverMutation, useSubmitApplicationOverrideMutation, useUpdateApplicationPlacementMutation, useDeleteApplicationCourseAssignmentMutation, useCreateApplicationNoteMutation, useUpdateApplicationNoteMutation, useDeleteApplicationNoteMutation, useTransitionApplicationMutation, useLinkApplicationCandidateMutation, useCreateApplicationPlacementsMutation, useGetCustomMentorsQuery, useCreateApplicationCourseAssignmentsMutation, useGetApplicationBlocksQuery, useDeleteApplicationBlockMutation, useGetApplicationsPipelineStatsQuery, useGetApplicationsPipelineQuery, useDeleteApiKeyMutation, 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, 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, useGetTenantChatPrivacyConfigQuery as useGetTenantChatPrivacyConfigQuery$1, useGetCallConfigurationsQuery, useCreateCallConfigurationMutation, useUpdateCallConfigurationMutation, chatPrivacyApiSlice, useDeleteMentorMutation, useForkMentorMutation, useGetToolsQuery, useLazyGetMCPServersQuery, useOauthFindMutation, useLazyStartOAuthFlowQuery, useCreateMCPServerMutation, usePartialUpdateMCPServerMutation, useCreateMCPServerConnectionMutation, usePatchMCPServerConnectionMutation, useGetConnectedServicesQuery, useGetMCPServersQuery, useGetMCPServerConnectionsQuery, useUpdateMCPServerMutation, useDeleteMCPServerMutation, useEditMentorJsonMutation, useDisconnectServiceMutation, useGetPromptCategoriesQuery, PRIVACY_ACTIONS, PRIVACY_ENTITY_TYPES, useGetVoicesQuery, useGetVoiceQuery, useGetMentorGraderConfigurationQuery, useListGraderCriteriaQuery, useCreateMentorGraderConfigurationMutation, useUpdateMentorGraderConfigurationMutation, useCreateGraderCriterionMutation, useUpdateGraderCriterionMutation, useDeleteGraderCriterionMutation, useGetMentorPublicSettingsQuery, useGetChatHistoryFilterQuery, useGetChatHistoryQuery, useGetMentorSummariesQuery, useGetConversationMemoriesQuery, useGetSupportTicketsQuery, useGetSupportTicketMessagesQuery, useCreateSupportTicketMessageMutation, usePatchSupportTicketMutation, useCloseSupportTicketMutation, useCreateLtiMentorMutation, useUpdateLtiMentorMutation, useGetLtiMentorsQuery, useCreateLtiKeyMutation, useUpdateLtiKeyMutation, useDeleteLtiKeyMutation, useGetLtiKeysQuery, useCreateLtiToolMutation, useUpdateLtiToolMutation, useGetLtiToolsQuery, useGetPlatformInfoQuery, useCreatePromptMutation, useGetPromptsSearchQuery, useUpdatePromptMutation, useCreateRedirectTokenMutation, useGetShareableLinkQuery, useCreateShareableLinkMutation, useUpdateShareableLinkMutation, useCreateDisclaimerMutation, useUpdateDisclaimerMutation, useGetDisclaimersQuery, useUpdateRbacMentorAccessMutation, useGetRbacMentorAccessListQuery, useStartEvalRunMutation, useEvaluateEvalRunMutation, useGetEvalRunQuery, useDeleteEvalScoreMutation, useListEvalRunJudgesQuery, useCreateEvalScoreMutation, useDeleteEvalRunMutation, useExportEvalRunMutation, useListEvalRunsQuery, useLazyGetEvalRunQuery, evaluationsApiSlice, EVALUATIONS_TAGS, useGetPersonnalizedMentorsQuery, useCreateCallCredentialsMutation, useGetGuidedPromptsQuery, useUpdateChatSessionSharedMutation, useUpdateMessageFeedbackMutation, useLazyGetPromptsSearchQuery, useLazyGetGuidedPromptsQuery, useGetPublicMentorsQuery, useGetPeriodicAgentsQuery, useGetPeriodicAgentLogsListQuery, useCreatePeriodicAgentMutation, useDeletePeriodicAgentMutation, useDeletePromptMutation, useDeleteTrainingDocumentMutation, useGetTrainingDocumentRetrainScheduleQuery, useCreateTrainingDocumentRetrainScheduleMutation, useCreateMemoryCategoryMutation, useUpdateMemoryCategoryMutation, useDeleteMemoryCategoryMutation, useUpdateArtifactMutation, useLazyGetArtifactVersionQuery, useLazyListArtifactVersionsQuery, useSetCurrentVersionMutation, useListArtifactVersionsQuery, useLazyGetArtifactQuery, useLazyListArtifactsQuery, useEditSessionMutation } from '@iblai/data-layer';
|
|
6
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, pickWritableFields, ANONYMOUS_USERNAME as ANONYMOUS_USERNAME$3, redirectToAuthSpaJoinTenant, selectActiveTab, useAxdToken, useWelcomeMessage, markdownToPlainText, useCachedSessionId, use402ErrorCheck, selectTokenEnabled, selectToken, useServiceWorker, useUserAgreement, useAdvancedChat, sendMessageToParentWebsite, useMentorTools, useFileDragDrop, eventBus, RemoteEvents, selectEnableChatActionsPopup, advancedTabs, isInIframe, getAuthSpaJoinUrl, addMessage, clearFiles, MENTOR_VISIBILITY } from '@iblai/web-utils';
|
|
7
7
|
import { useDispatch, useSelector } from 'react-redux';
|
|
8
8
|
import { toast } from 'sonner';
|
|
@@ -98069,6 +98069,118 @@ var gradebookGradebookTab$3 = {
|
|
|
98069
98069
|
previousPage: "Previous",
|
|
98070
98070
|
nextPage: "Next"
|
|
98071
98071
|
};
|
|
98072
|
+
var graderTabLabels$3 = {
|
|
98073
|
+
header: {
|
|
98074
|
+
title: "Grader",
|
|
98075
|
+
description: "Set up how your agent grades work against a rubric you define."
|
|
98076
|
+
},
|
|
98077
|
+
capability: {
|
|
98078
|
+
title: "Grading",
|
|
98079
|
+
description: "Let your agent grade work. When this is on, the agent scores what people submit against the rubric you set up below and shares the result as feedback — great for essays, projects, and practice exercises.",
|
|
98080
|
+
offHint: "Turn it on to write grading instructions and build your rubric. Anything you set up here is kept safe if you later turn it off."
|
|
98081
|
+
},
|
|
98082
|
+
subTabs: {
|
|
98083
|
+
setup: "Grading setup",
|
|
98084
|
+
rubric: "Rubric"
|
|
98085
|
+
},
|
|
98086
|
+
denied: {
|
|
98087
|
+
title: "No access to grading settings",
|
|
98088
|
+
description: "You don't have permission to view this agent's grading setup. Ask an administrator for access."
|
|
98089
|
+
},
|
|
98090
|
+
warnings: {
|
|
98091
|
+
noConfig: "Grading is on but not set up yet — the agent will fail when asked to grade. Save your grading instructions in Grading setup to finish.",
|
|
98092
|
+
noCriteria: "Grading is on but the rubric is empty — the agent will fail when asked to grade. Add at least one criterion in the Rubric tab."
|
|
98093
|
+
},
|
|
98094
|
+
config: {
|
|
98095
|
+
sectionTitle: "Grading setup",
|
|
98096
|
+
gradingMode: {
|
|
98097
|
+
label: "What gets graded",
|
|
98098
|
+
options: {
|
|
98099
|
+
submission: "A submission",
|
|
98100
|
+
conversation: "The conversation"
|
|
98101
|
+
},
|
|
98102
|
+
help: {
|
|
98103
|
+
submission: "The agent grades a piece of work the person hands in, like an essay or answer.",
|
|
98104
|
+
conversation: "The agent grades how the whole conversation went."
|
|
98105
|
+
}
|
|
98106
|
+
},
|
|
98107
|
+
feedbackMode: {
|
|
98108
|
+
label: "Feedback shared with the person",
|
|
98109
|
+
options: {
|
|
98110
|
+
overall: "Overall feedback only",
|
|
98111
|
+
perCriteria: "Feedback per criterion",
|
|
98112
|
+
both: "Overall + per criterion"
|
|
98113
|
+
},
|
|
98114
|
+
help: "The overall score is always calculated — this only controls how much detail is shared back."
|
|
98115
|
+
},
|
|
98116
|
+
instructions: {
|
|
98117
|
+
label: "Grading instructions",
|
|
98118
|
+
placeholder: "Describe what's being graded and anything the grader should know beyond the rubric. E.g. 'You are grading a 500-word persuasive essay on climate policy written by a high-school student. Be encouraging but honest.'",
|
|
98119
|
+
help: "Required. This is the context the agent uses every time it grades."
|
|
98120
|
+
},
|
|
98121
|
+
saveButton: "Save",
|
|
98122
|
+
savingButton: "Saving…"
|
|
98123
|
+
},
|
|
98124
|
+
criteria: {
|
|
98125
|
+
sectionTitle: "Rubric",
|
|
98126
|
+
description: "Each row is one thing the agent looks for and how many points it is worth. The overall score is points earned out of the total.",
|
|
98127
|
+
needsConfigHint: "Save your grading setup first, then add rubric criteria here.",
|
|
98128
|
+
emptyState: "No criteria yet. Add your first one — for example \"Clarity\", 10 points.",
|
|
98129
|
+
addButton: "Add criterion",
|
|
98130
|
+
columns: {
|
|
98131
|
+
name: "Name",
|
|
98132
|
+
criteria: "Criteria",
|
|
98133
|
+
points: "Points"
|
|
98134
|
+
},
|
|
98135
|
+
actionsAria: "Actions for {name}",
|
|
98136
|
+
edit: "Edit",
|
|
98137
|
+
"delete": "Delete",
|
|
98138
|
+
totalPoints: "Total possible points: {total}",
|
|
98139
|
+
scoreHint: "Overall score = points earned ÷ {total}.",
|
|
98140
|
+
lastCriterionHint: "A rubric needs at least one criterion — add another before removing this one.",
|
|
98141
|
+
modal: {
|
|
98142
|
+
addTitle: "Add criterion",
|
|
98143
|
+
editTitle: "Edit criterion",
|
|
98144
|
+
name: {
|
|
98145
|
+
label: "Name",
|
|
98146
|
+
placeholder: "e.g. Clarity",
|
|
98147
|
+
required: "Name is required"
|
|
98148
|
+
},
|
|
98149
|
+
criteria: {
|
|
98150
|
+
label: "Criteria",
|
|
98151
|
+
placeholder: "e.g. The argument is easy to follow and each paragraph makes one clear point.",
|
|
98152
|
+
required: "Criteria is required"
|
|
98153
|
+
},
|
|
98154
|
+
points: {
|
|
98155
|
+
label: "Points",
|
|
98156
|
+
placeholder: "10",
|
|
98157
|
+
positive: "Points must be a positive number"
|
|
98158
|
+
},
|
|
98159
|
+
save: "Save",
|
|
98160
|
+
saving: "Saving…",
|
|
98161
|
+
cancel: "Cancel"
|
|
98162
|
+
},
|
|
98163
|
+
deleteModal: {
|
|
98164
|
+
title: "Delete criterion",
|
|
98165
|
+
confirmationPrefix: "Are you sure you want to remove",
|
|
98166
|
+
confirmationSuffix: " from the rubric?",
|
|
98167
|
+
cancel: "Cancel",
|
|
98168
|
+
"delete": "Delete",
|
|
98169
|
+
deleting: "Deleting…"
|
|
98170
|
+
}
|
|
98171
|
+
},
|
|
98172
|
+
toasts: {
|
|
98173
|
+
toggleOn: "Grading turned on",
|
|
98174
|
+
toggleOff: "Grading turned off — your rubric is kept for next time",
|
|
98175
|
+
toggleError: "Couldn't update grading",
|
|
98176
|
+
configSaved: "Grading setup saved",
|
|
98177
|
+
configError: "Couldn't save grading setup",
|
|
98178
|
+
criterionAdded: "Criterion added",
|
|
98179
|
+
criterionUpdated: "Criterion updated",
|
|
98180
|
+
criterionDeleted: "Criterion deleted",
|
|
98181
|
+
criterionError: "Couldn't update the rubric"
|
|
98182
|
+
}
|
|
98183
|
+
};
|
|
98072
98184
|
var careerExperienceDialog$3 = {
|
|
98073
98185
|
pleaseSelectACompany: "Please select a company",
|
|
98074
98186
|
endDateCannotBeBeforeStartDate: "End date cannot be before start date",
|
|
@@ -102633,6 +102745,7 @@ var en = {
|
|
|
102633
102745
|
careerEducationDialog: careerEducationDialog$3,
|
|
102634
102746
|
careerEducationTab: careerEducationTab$3,
|
|
102635
102747
|
gradebookGradebookTab: gradebookGradebookTab$3,
|
|
102748
|
+
graderTabLabels: graderTabLabels$3,
|
|
102636
102749
|
careerExperienceDialog: careerExperienceDialog$3,
|
|
102637
102750
|
careerExperienceTab: careerExperienceTab$3,
|
|
102638
102751
|
careerInstitutionDialog: careerInstitutionDialog$3,
|
|
@@ -104074,6 +104187,118 @@ var gradebookGradebookTab$2 = {
|
|
|
104074
104187
|
previousPage: "Précédent",
|
|
104075
104188
|
nextPage: "Suivant"
|
|
104076
104189
|
};
|
|
104190
|
+
var graderTabLabels$2 = {
|
|
104191
|
+
header: {
|
|
104192
|
+
title: "Évaluateur",
|
|
104193
|
+
description: "Configurez la façon dont votre agent note le travail selon une grille que vous définissez."
|
|
104194
|
+
},
|
|
104195
|
+
capability: {
|
|
104196
|
+
title: "Notation",
|
|
104197
|
+
description: "Laissez votre agent noter le travail. Lorsque cette option est activée, l'agent évalue ce que les personnes soumettent selon la grille que vous configurez ci-dessous et partage le résultat sous forme de retour — idéal pour les dissertations, projets et exercices d'entraînement.",
|
|
104198
|
+
offHint: "Activez-la pour rédiger des consignes de notation et construire votre grille. Tout ce que vous configurez ici est conservé si vous la désactivez plus tard."
|
|
104199
|
+
},
|
|
104200
|
+
subTabs: {
|
|
104201
|
+
setup: "Configuration de la notation",
|
|
104202
|
+
rubric: "Grille d'évaluation"
|
|
104203
|
+
},
|
|
104204
|
+
denied: {
|
|
104205
|
+
title: "Pas d'accès aux paramètres de notation",
|
|
104206
|
+
description: "Vous n'avez pas la permission de voir la configuration de notation de cet agent. Demandez l'accès à un administrateur."
|
|
104207
|
+
},
|
|
104208
|
+
warnings: {
|
|
104209
|
+
noConfig: "La notation est activée mais pas encore configurée — l'agent échouera lorsqu'on lui demandera de noter. Enregistrez vos consignes dans Configuration de la notation pour terminer.",
|
|
104210
|
+
noCriteria: "La notation est activée mais la grille est vide — l'agent échouera lorsqu'on lui demandera de noter. Ajoutez au moins un critère dans l'onglet Grille d'évaluation."
|
|
104211
|
+
},
|
|
104212
|
+
config: {
|
|
104213
|
+
sectionTitle: "Configuration de la notation",
|
|
104214
|
+
gradingMode: {
|
|
104215
|
+
label: "Ce qui est noté",
|
|
104216
|
+
options: {
|
|
104217
|
+
submission: "Un travail remis",
|
|
104218
|
+
conversation: "La conversation"
|
|
104219
|
+
},
|
|
104220
|
+
help: {
|
|
104221
|
+
submission: "L'agent note un travail remis par la personne, comme une dissertation ou une réponse.",
|
|
104222
|
+
conversation: "L'agent note le déroulement de toute la conversation."
|
|
104223
|
+
}
|
|
104224
|
+
},
|
|
104225
|
+
feedbackMode: {
|
|
104226
|
+
label: "Retour partagé avec la personne",
|
|
104227
|
+
options: {
|
|
104228
|
+
overall: "Retour global uniquement",
|
|
104229
|
+
perCriteria: "Retour par critère",
|
|
104230
|
+
both: "Global + par critère"
|
|
104231
|
+
},
|
|
104232
|
+
help: "La note globale est toujours calculée — ceci contrôle seulement le niveau de détail partagé."
|
|
104233
|
+
},
|
|
104234
|
+
instructions: {
|
|
104235
|
+
label: "Consignes de notation",
|
|
104236
|
+
placeholder: "Décrivez ce qui est noté et tout ce que l'évaluateur doit savoir au-delà de la grille. Par ex. 'Vous notez une dissertation persuasive de 500 mots sur la politique climatique écrite par un lycéen. Soyez encourageant mais honnête.'",
|
|
104237
|
+
help: "Obligatoire. C'est le contexte que l'agent utilise à chaque notation."
|
|
104238
|
+
},
|
|
104239
|
+
saveButton: "Enregistrer",
|
|
104240
|
+
savingButton: "Enregistrement…"
|
|
104241
|
+
},
|
|
104242
|
+
criteria: {
|
|
104243
|
+
sectionTitle: "Grille d'évaluation",
|
|
104244
|
+
description: "Chaque ligne est un élément que l'agent recherche et le nombre de points qu'il vaut. La note globale correspond aux points obtenus sur le total.",
|
|
104245
|
+
needsConfigHint: "Enregistrez d'abord votre configuration de notation, puis ajoutez des critères ici.",
|
|
104246
|
+
emptyState: "Aucun critère pour l'instant. Ajoutez le premier — par exemple \"Clarté\", 10 points.",
|
|
104247
|
+
addButton: "Ajouter un critère",
|
|
104248
|
+
columns: {
|
|
104249
|
+
name: "Nom",
|
|
104250
|
+
criteria: "Critères",
|
|
104251
|
+
points: "Points"
|
|
104252
|
+
},
|
|
104253
|
+
actionsAria: "Actions pour {name}",
|
|
104254
|
+
edit: "Modifier",
|
|
104255
|
+
"delete": "Supprimer",
|
|
104256
|
+
totalPoints: "Total de points possibles : {total}",
|
|
104257
|
+
scoreHint: "Note globale = points obtenus ÷ {total}.",
|
|
104258
|
+
lastCriterionHint: "Une grille doit contenir au moins un critère — ajoutez-en un autre avant de supprimer celui-ci.",
|
|
104259
|
+
modal: {
|
|
104260
|
+
addTitle: "Ajouter un critère",
|
|
104261
|
+
editTitle: "Modifier le critère",
|
|
104262
|
+
name: {
|
|
104263
|
+
label: "Nom",
|
|
104264
|
+
placeholder: "par ex. Clarté",
|
|
104265
|
+
required: "Le nom est obligatoire"
|
|
104266
|
+
},
|
|
104267
|
+
criteria: {
|
|
104268
|
+
label: "Critères",
|
|
104269
|
+
placeholder: "par ex. L'argumentation est facile à suivre et chaque paragraphe avance une idée claire.",
|
|
104270
|
+
required: "Les critères sont obligatoires"
|
|
104271
|
+
},
|
|
104272
|
+
points: {
|
|
104273
|
+
label: "Points",
|
|
104274
|
+
placeholder: "10",
|
|
104275
|
+
positive: "Les points doivent être un nombre positif"
|
|
104276
|
+
},
|
|
104277
|
+
save: "Enregistrer",
|
|
104278
|
+
saving: "Enregistrement…",
|
|
104279
|
+
cancel: "Annuler"
|
|
104280
|
+
},
|
|
104281
|
+
deleteModal: {
|
|
104282
|
+
title: "Supprimer le critère",
|
|
104283
|
+
confirmationPrefix: "Voulez-vous vraiment supprimer",
|
|
104284
|
+
confirmationSuffix: " de la grille ?",
|
|
104285
|
+
cancel: "Annuler",
|
|
104286
|
+
"delete": "Supprimer",
|
|
104287
|
+
deleting: "Suppression…"
|
|
104288
|
+
}
|
|
104289
|
+
},
|
|
104290
|
+
toasts: {
|
|
104291
|
+
toggleOn: "Notation activée",
|
|
104292
|
+
toggleOff: "Notation désactivée — votre grille est conservée pour la prochaine fois",
|
|
104293
|
+
toggleError: "Impossible de mettre à jour la notation",
|
|
104294
|
+
configSaved: "Configuration de notation enregistrée",
|
|
104295
|
+
configError: "Impossible d'enregistrer la configuration de notation",
|
|
104296
|
+
criterionAdded: "Critère ajouté",
|
|
104297
|
+
criterionUpdated: "Critère mis à jour",
|
|
104298
|
+
criterionDeleted: "Critère supprimé",
|
|
104299
|
+
criterionError: "Impossible de mettre à jour la grille"
|
|
104300
|
+
}
|
|
104301
|
+
};
|
|
104077
104302
|
var careerExperienceDialog$2 = {
|
|
104078
104303
|
pleaseSelectACompany: "Veuillez sélectionner une entreprise",
|
|
104079
104304
|
endDateCannotBeBeforeStartDate: "La date de fin ne peut pas être antérieure à la date de début",
|
|
@@ -108638,6 +108863,7 @@ var fr = {
|
|
|
108638
108863
|
careerEducationDialog: careerEducationDialog$2,
|
|
108639
108864
|
careerEducationTab: careerEducationTab$2,
|
|
108640
108865
|
gradebookGradebookTab: gradebookGradebookTab$2,
|
|
108866
|
+
graderTabLabels: graderTabLabels$2,
|
|
108641
108867
|
careerExperienceDialog: careerExperienceDialog$2,
|
|
108642
108868
|
careerExperienceTab: careerExperienceTab$2,
|
|
108643
108869
|
careerInstitutionDialog: careerInstitutionDialog$2,
|
|
@@ -110079,6 +110305,118 @@ var gradebookGradebookTab$1 = {
|
|
|
110079
110305
|
previousPage: "Anterior",
|
|
110080
110306
|
nextPage: "Siguiente"
|
|
110081
110307
|
};
|
|
110308
|
+
var graderTabLabels$1 = {
|
|
110309
|
+
header: {
|
|
110310
|
+
title: "Calificador",
|
|
110311
|
+
description: "Configura cómo tu agente califica el trabajo según una rúbrica que tú defines."
|
|
110312
|
+
},
|
|
110313
|
+
capability: {
|
|
110314
|
+
title: "Calificación",
|
|
110315
|
+
description: "Permite que tu agente califique trabajos. Cuando está activado, el agente puntúa lo que las personas envían según la rúbrica que configures abajo y comparte el resultado como retroalimentación — ideal para ensayos, proyectos y ejercicios de práctica.",
|
|
110316
|
+
offHint: "Actívalo para escribir instrucciones de calificación y crear tu rúbrica. Todo lo que configures aquí se conserva si luego lo desactivas."
|
|
110317
|
+
},
|
|
110318
|
+
subTabs: {
|
|
110319
|
+
setup: "Configuración de calificación",
|
|
110320
|
+
rubric: "Rúbrica"
|
|
110321
|
+
},
|
|
110322
|
+
denied: {
|
|
110323
|
+
title: "Sin acceso a la configuración de calificación",
|
|
110324
|
+
description: "No tienes permiso para ver la configuración de calificación de este agente. Pide acceso a un administrador."
|
|
110325
|
+
},
|
|
110326
|
+
warnings: {
|
|
110327
|
+
noConfig: "La calificación está activada pero aún no está configurada — el agente fallará cuando se le pida calificar. Guarda tus instrucciones en Configuración de calificación para terminar.",
|
|
110328
|
+
noCriteria: "La calificación está activada pero la rúbrica está vacía — el agente fallará cuando se le pida calificar. Agrega al menos un criterio en la pestaña Rúbrica."
|
|
110329
|
+
},
|
|
110330
|
+
config: {
|
|
110331
|
+
sectionTitle: "Configuración de calificación",
|
|
110332
|
+
gradingMode: {
|
|
110333
|
+
label: "Qué se califica",
|
|
110334
|
+
options: {
|
|
110335
|
+
submission: "Una entrega",
|
|
110336
|
+
conversation: "La conversación"
|
|
110337
|
+
},
|
|
110338
|
+
help: {
|
|
110339
|
+
submission: "El agente califica un trabajo que la persona entrega, como un ensayo o una respuesta.",
|
|
110340
|
+
conversation: "El agente califica cómo fue toda la conversación."
|
|
110341
|
+
}
|
|
110342
|
+
},
|
|
110343
|
+
feedbackMode: {
|
|
110344
|
+
label: "Retroalimentación compartida con la persona",
|
|
110345
|
+
options: {
|
|
110346
|
+
overall: "Solo retroalimentación general",
|
|
110347
|
+
perCriteria: "Retroalimentación por criterio",
|
|
110348
|
+
both: "General + por criterio"
|
|
110349
|
+
},
|
|
110350
|
+
help: "La puntuación general siempre se calcula — esto solo controla cuánto detalle se comparte."
|
|
110351
|
+
},
|
|
110352
|
+
instructions: {
|
|
110353
|
+
label: "Instrucciones de calificación",
|
|
110354
|
+
placeholder: "Describe qué se está calificando y todo lo que el calificador deba saber más allá de la rúbrica. P. ej. 'Estás calificando un ensayo persuasivo de 500 palabras sobre política climática escrito por un estudiante de secundaria. Sé alentador pero honesto.'",
|
|
110355
|
+
help: "Obligatorio. Este es el contexto que el agente usa cada vez que califica."
|
|
110356
|
+
},
|
|
110357
|
+
saveButton: "Guardar",
|
|
110358
|
+
savingButton: "Guardando…"
|
|
110359
|
+
},
|
|
110360
|
+
criteria: {
|
|
110361
|
+
sectionTitle: "Rúbrica",
|
|
110362
|
+
description: "Cada fila es algo que el agente evalúa y cuántos puntos vale. La puntuación general son los puntos obtenidos sobre el total.",
|
|
110363
|
+
needsConfigHint: "Primero guarda tu configuración de calificación y luego agrega criterios aquí.",
|
|
110364
|
+
emptyState: "Aún no hay criterios. Agrega el primero — por ejemplo \"Claridad\", 10 puntos.",
|
|
110365
|
+
addButton: "Agregar criterio",
|
|
110366
|
+
columns: {
|
|
110367
|
+
name: "Nombre",
|
|
110368
|
+
criteria: "Criterios",
|
|
110369
|
+
points: "Puntos"
|
|
110370
|
+
},
|
|
110371
|
+
actionsAria: "Acciones para {name}",
|
|
110372
|
+
edit: "Editar",
|
|
110373
|
+
"delete": "Eliminar",
|
|
110374
|
+
totalPoints: "Total de puntos posibles: {total}",
|
|
110375
|
+
scoreHint: "Puntuación general = puntos obtenidos ÷ {total}.",
|
|
110376
|
+
lastCriterionHint: "Una rúbrica necesita al menos un criterio — agrega otro antes de eliminar este.",
|
|
110377
|
+
modal: {
|
|
110378
|
+
addTitle: "Agregar criterio",
|
|
110379
|
+
editTitle: "Editar criterio",
|
|
110380
|
+
name: {
|
|
110381
|
+
label: "Nombre",
|
|
110382
|
+
placeholder: "p. ej. Claridad",
|
|
110383
|
+
required: "El nombre es obligatorio"
|
|
110384
|
+
},
|
|
110385
|
+
criteria: {
|
|
110386
|
+
label: "Criterios",
|
|
110387
|
+
placeholder: "p. ej. El argumento es fácil de seguir y cada párrafo plantea una idea clara.",
|
|
110388
|
+
required: "Los criterios son obligatorios"
|
|
110389
|
+
},
|
|
110390
|
+
points: {
|
|
110391
|
+
label: "Puntos",
|
|
110392
|
+
placeholder: "10",
|
|
110393
|
+
positive: "Los puntos deben ser un número positivo"
|
|
110394
|
+
},
|
|
110395
|
+
save: "Guardar",
|
|
110396
|
+
saving: "Guardando…",
|
|
110397
|
+
cancel: "Cancelar"
|
|
110398
|
+
},
|
|
110399
|
+
deleteModal: {
|
|
110400
|
+
title: "Eliminar criterio",
|
|
110401
|
+
confirmationPrefix: "¿Seguro que quieres eliminar",
|
|
110402
|
+
confirmationSuffix: " de la rúbrica?",
|
|
110403
|
+
cancel: "Cancelar",
|
|
110404
|
+
"delete": "Eliminar",
|
|
110405
|
+
deleting: "Eliminando…"
|
|
110406
|
+
}
|
|
110407
|
+
},
|
|
110408
|
+
toasts: {
|
|
110409
|
+
toggleOn: "Calificación activada",
|
|
110410
|
+
toggleOff: "Calificación desactivada — tu rúbrica se conserva para la próxima vez",
|
|
110411
|
+
toggleError: "No se pudo actualizar la calificación",
|
|
110412
|
+
configSaved: "Configuración de calificación guardada",
|
|
110413
|
+
configError: "No se pudo guardar la configuración de calificación",
|
|
110414
|
+
criterionAdded: "Criterio agregado",
|
|
110415
|
+
criterionUpdated: "Criterio actualizado",
|
|
110416
|
+
criterionDeleted: "Criterio eliminado",
|
|
110417
|
+
criterionError: "No se pudo actualizar la rúbrica"
|
|
110418
|
+
}
|
|
110419
|
+
};
|
|
110082
110420
|
var careerExperienceDialog$1 = {
|
|
110083
110421
|
pleaseSelectACompany: "Por favor, selecciona una empresa",
|
|
110084
110422
|
endDateCannotBeBeforeStartDate: "La fecha de fin no puede ser anterior a la fecha de inicio",
|
|
@@ -114643,6 +114981,7 @@ var es = {
|
|
|
114643
114981
|
careerEducationDialog: careerEducationDialog$1,
|
|
114644
114982
|
careerEducationTab: careerEducationTab$1,
|
|
114645
114983
|
gradebookGradebookTab: gradebookGradebookTab$1,
|
|
114984
|
+
graderTabLabels: graderTabLabels$1,
|
|
114646
114985
|
careerExperienceDialog: careerExperienceDialog$1,
|
|
114647
114986
|
careerExperienceTab: careerExperienceTab$1,
|
|
114648
114987
|
careerInstitutionDialog: careerInstitutionDialog$1,
|
|
@@ -116084,6 +116423,118 @@ var gradebookGradebookTab = {
|
|
|
116084
116423
|
previousPage: "上一页",
|
|
116085
116424
|
nextPage: "下一页"
|
|
116086
116425
|
};
|
|
116426
|
+
var graderTabLabels = {
|
|
116427
|
+
header: {
|
|
116428
|
+
title: "评分器",
|
|
116429
|
+
description: "设置您的智能体如何按照您定义的评分标准来评分。"
|
|
116430
|
+
},
|
|
116431
|
+
capability: {
|
|
116432
|
+
title: "评分",
|
|
116433
|
+
description: "让您的智能体为作业评分。开启后,智能体会根据您在下方设置的评分标准为提交的内容打分,并以反馈的形式分享结果 — 非常适合作文、项目和练习。",
|
|
116434
|
+
offHint: "开启后即可编写评分说明并创建评分标准。即使之后关闭,您在此设置的内容也会被保留。"
|
|
116435
|
+
},
|
|
116436
|
+
subTabs: {
|
|
116437
|
+
setup: "评分设置",
|
|
116438
|
+
rubric: "评分标准"
|
|
116439
|
+
},
|
|
116440
|
+
denied: {
|
|
116441
|
+
title: "无权访问评分设置",
|
|
116442
|
+
description: "您没有权限查看此智能体的评分设置。请向管理员申请访问权限。"
|
|
116443
|
+
},
|
|
116444
|
+
warnings: {
|
|
116445
|
+
noConfig: "评分已开启但尚未设置 — 智能体在被要求评分时会失败。请在评分设置中保存评分说明以完成设置。",
|
|
116446
|
+
noCriteria: "评分已开启但评分标准为空 — 智能体在被要求评分时会失败。请在评分标准页签中添加至少一条标准。"
|
|
116447
|
+
},
|
|
116448
|
+
config: {
|
|
116449
|
+
sectionTitle: "评分设置",
|
|
116450
|
+
gradingMode: {
|
|
116451
|
+
label: "评分对象",
|
|
116452
|
+
options: {
|
|
116453
|
+
submission: "一次提交",
|
|
116454
|
+
conversation: "整个对话"
|
|
116455
|
+
},
|
|
116456
|
+
help: {
|
|
116457
|
+
submission: "智能体为提交的作业评分,例如一篇作文或一个答案。",
|
|
116458
|
+
conversation: "智能体为整个对话的表现评分。"
|
|
116459
|
+
}
|
|
116460
|
+
},
|
|
116461
|
+
feedbackMode: {
|
|
116462
|
+
label: "与用户分享的反馈",
|
|
116463
|
+
options: {
|
|
116464
|
+
overall: "仅总体反馈",
|
|
116465
|
+
perCriteria: "按标准逐项反馈",
|
|
116466
|
+
both: "总体 + 逐项"
|
|
116467
|
+
},
|
|
116468
|
+
help: "总分始终会被计算 — 此设置仅控制分享反馈的详细程度。"
|
|
116469
|
+
},
|
|
116470
|
+
instructions: {
|
|
116471
|
+
label: "评分说明",
|
|
116472
|
+
placeholder: "描述评分的内容以及评分标准之外评分者需要了解的信息。例如:'你正在为一名高中生撰写的 500 字气候政策议论文评分。要鼓励但诚实。'",
|
|
116473
|
+
help: "必填。这是智能体每次评分时使用的上下文。"
|
|
116474
|
+
},
|
|
116475
|
+
saveButton: "保存",
|
|
116476
|
+
savingButton: "保存中…"
|
|
116477
|
+
},
|
|
116478
|
+
criteria: {
|
|
116479
|
+
sectionTitle: "评分标准",
|
|
116480
|
+
description: "每一行是智能体考察的一个方面及其分值。总分为获得的分数除以总分值。",
|
|
116481
|
+
needsConfigHint: "请先保存评分设置,然后在此添加评分标准。",
|
|
116482
|
+
emptyState: "还没有标准。请添加第一条 — 例如\"清晰度\",10 分。",
|
|
116483
|
+
addButton: "添加标准",
|
|
116484
|
+
columns: {
|
|
116485
|
+
name: "名称",
|
|
116486
|
+
criteria: "标准",
|
|
116487
|
+
points: "分数"
|
|
116488
|
+
},
|
|
116489
|
+
actionsAria: "{name} 的操作",
|
|
116490
|
+
edit: "编辑",
|
|
116491
|
+
"delete": "删除",
|
|
116492
|
+
totalPoints: "总分值:{total}",
|
|
116493
|
+
scoreHint: "总分 = 获得的分数 ÷ {total}。",
|
|
116494
|
+
lastCriterionHint: "评分标准至少需要一条 — 请先添加另一条再删除这一条。",
|
|
116495
|
+
modal: {
|
|
116496
|
+
addTitle: "添加标准",
|
|
116497
|
+
editTitle: "编辑标准",
|
|
116498
|
+
name: {
|
|
116499
|
+
label: "名称",
|
|
116500
|
+
placeholder: "例如:清晰度",
|
|
116501
|
+
required: "名称为必填项"
|
|
116502
|
+
},
|
|
116503
|
+
criteria: {
|
|
116504
|
+
label: "标准",
|
|
116505
|
+
placeholder: "例如:论点易于理解,每段都有一个明确的观点。",
|
|
116506
|
+
required: "标准为必填项"
|
|
116507
|
+
},
|
|
116508
|
+
points: {
|
|
116509
|
+
label: "分数",
|
|
116510
|
+
placeholder: "10",
|
|
116511
|
+
positive: "分数必须为正数"
|
|
116512
|
+
},
|
|
116513
|
+
save: "保存",
|
|
116514
|
+
saving: "保存中…",
|
|
116515
|
+
cancel: "取消"
|
|
116516
|
+
},
|
|
116517
|
+
deleteModal: {
|
|
116518
|
+
title: "删除标准",
|
|
116519
|
+
confirmationPrefix: "确定要从评分标准中删除",
|
|
116520
|
+
confirmationSuffix: " 吗?",
|
|
116521
|
+
cancel: "取消",
|
|
116522
|
+
"delete": "删除",
|
|
116523
|
+
deleting: "删除中…"
|
|
116524
|
+
}
|
|
116525
|
+
},
|
|
116526
|
+
toasts: {
|
|
116527
|
+
toggleOn: "评分已开启",
|
|
116528
|
+
toggleOff: "评分已关闭 — 您的评分标准已保留,下次可继续使用",
|
|
116529
|
+
toggleError: "无法更新评分",
|
|
116530
|
+
configSaved: "评分设置已保存",
|
|
116531
|
+
configError: "无法保存评分设置",
|
|
116532
|
+
criterionAdded: "标准已添加",
|
|
116533
|
+
criterionUpdated: "标准已更新",
|
|
116534
|
+
criterionDeleted: "标准已删除",
|
|
116535
|
+
criterionError: "无法更新评分标准"
|
|
116536
|
+
}
|
|
116537
|
+
};
|
|
116087
116538
|
var careerExperienceDialog = {
|
|
116088
116539
|
pleaseSelectACompany: "请选择一家公司",
|
|
116089
116540
|
endDateCannotBeBeforeStartDate: "结束日期不能早于开始日期",
|
|
@@ -120648,6 +121099,7 @@ var zh = {
|
|
|
120648
121099
|
careerEducationDialog: careerEducationDialog,
|
|
120649
121100
|
careerEducationTab: careerEducationTab,
|
|
120650
121101
|
gradebookGradebookTab: gradebookGradebookTab,
|
|
121102
|
+
graderTabLabels: graderTabLabels,
|
|
120651
121103
|
careerExperienceDialog: careerExperienceDialog,
|
|
120652
121104
|
careerExperienceTab: careerExperienceTab,
|
|
120653
121105
|
careerInstitutionDialog: careerInstitutionDialog,
|
|
@@ -266956,6 +267408,547 @@ function AgentScreenShareTab({ labels: labelsOverride, renderPromptContent, tena
|
|
|
266956
267408
|
} }) }))] })) })] }));
|
|
266957
267409
|
}
|
|
266958
267410
|
|
|
267411
|
+
const AGENT_GRADER_TAB_LABELS = {
|
|
267412
|
+
header: {
|
|
267413
|
+
title: 'Grader',
|
|
267414
|
+
description: 'Set up how your agent grades work against a rubric you define.',
|
|
267415
|
+
},
|
|
267416
|
+
capability: {
|
|
267417
|
+
title: 'Grading',
|
|
267418
|
+
description: 'Let your agent grade work. When this is on, the agent scores what people submit against the rubric you set up below and shares the result as feedback — great for essays, projects, and practice exercises.',
|
|
267419
|
+
offHint: 'Turn it on to write grading instructions and build your rubric. Anything you set up here is kept safe if you later turn it off.',
|
|
267420
|
+
},
|
|
267421
|
+
subTabs: {
|
|
267422
|
+
setup: 'Grading setup',
|
|
267423
|
+
rubric: 'Rubric',
|
|
267424
|
+
},
|
|
267425
|
+
denied: {
|
|
267426
|
+
title: 'No access to grading settings',
|
|
267427
|
+
description: "You don't have permission to view this agent's grading setup. Ask an administrator for access.",
|
|
267428
|
+
},
|
|
267429
|
+
warnings: {
|
|
267430
|
+
noConfig: 'Grading is on but not set up yet — the agent will fail when asked to grade. Save your grading instructions in Grading setup to finish.',
|
|
267431
|
+
noCriteria: 'Grading is on but the rubric is empty — the agent will fail when asked to grade. Add at least one criterion in the Rubric tab.',
|
|
267432
|
+
},
|
|
267433
|
+
config: {
|
|
267434
|
+
sectionTitle: 'Grading setup',
|
|
267435
|
+
gradingMode: {
|
|
267436
|
+
label: 'What gets graded',
|
|
267437
|
+
options: {
|
|
267438
|
+
submission: 'A submission',
|
|
267439
|
+
conversation: 'The conversation',
|
|
267440
|
+
},
|
|
267441
|
+
help: {
|
|
267442
|
+
submission: 'The agent grades a piece of work the person hands in, like an essay or answer.',
|
|
267443
|
+
conversation: 'The agent grades how the whole conversation went.',
|
|
267444
|
+
},
|
|
267445
|
+
},
|
|
267446
|
+
feedbackMode: {
|
|
267447
|
+
label: 'Feedback shared with the person',
|
|
267448
|
+
options: {
|
|
267449
|
+
overall: 'Overall feedback only',
|
|
267450
|
+
perCriteria: 'Feedback per criterion',
|
|
267451
|
+
both: 'Overall + per criterion',
|
|
267452
|
+
},
|
|
267453
|
+
help: 'The overall score is always calculated — this only controls how much detail is shared back.',
|
|
267454
|
+
},
|
|
267455
|
+
instructions: {
|
|
267456
|
+
label: 'Grading instructions',
|
|
267457
|
+
placeholder: "Describe what's being graded and anything the grader should know beyond the rubric. E.g. 'You are grading a 500-word persuasive essay on climate policy written by a high-school student. Be encouraging but honest.'",
|
|
267458
|
+
help: 'Required. This is the context the agent uses every time it grades.',
|
|
267459
|
+
},
|
|
267460
|
+
saveButton: 'Save',
|
|
267461
|
+
savingButton: 'Saving…',
|
|
267462
|
+
},
|
|
267463
|
+
criteria: {
|
|
267464
|
+
sectionTitle: 'Rubric',
|
|
267465
|
+
description: 'Each row is one thing the agent looks for and how many points it is worth. The overall score is points earned out of the total.',
|
|
267466
|
+
needsConfigHint: 'Save your grading setup first, then add rubric criteria here.',
|
|
267467
|
+
emptyState: 'No criteria yet. Add your first one — for example "Clarity", 10 points.',
|
|
267468
|
+
addButton: 'Add criterion',
|
|
267469
|
+
columns: {
|
|
267470
|
+
name: 'Name',
|
|
267471
|
+
criteria: 'Criteria',
|
|
267472
|
+
points: 'Points',
|
|
267473
|
+
},
|
|
267474
|
+
actionsAria: (name) => `Actions for ${name}`,
|
|
267475
|
+
edit: 'Edit',
|
|
267476
|
+
delete: 'Delete',
|
|
267477
|
+
totalPoints: 'Total possible points: {total}',
|
|
267478
|
+
scoreHint: 'Overall score = points earned ÷ {total}.',
|
|
267479
|
+
lastCriterionHint: 'A rubric needs at least one criterion — add another before removing this one.',
|
|
267480
|
+
modal: {
|
|
267481
|
+
addTitle: 'Add criterion',
|
|
267482
|
+
editTitle: 'Edit criterion',
|
|
267483
|
+
name: {
|
|
267484
|
+
label: 'Name',
|
|
267485
|
+
placeholder: 'e.g. Clarity',
|
|
267486
|
+
required: 'Name is required',
|
|
267487
|
+
},
|
|
267488
|
+
criteria: {
|
|
267489
|
+
// Required — describes what earns the points.
|
|
267490
|
+
label: 'Criteria',
|
|
267491
|
+
placeholder: 'e.g. The argument is easy to follow and each paragraph makes one clear point.',
|
|
267492
|
+
required: 'Criteria is required',
|
|
267493
|
+
},
|
|
267494
|
+
points: {
|
|
267495
|
+
label: 'Points',
|
|
267496
|
+
placeholder: '10',
|
|
267497
|
+
positive: 'Points must be a positive number',
|
|
267498
|
+
},
|
|
267499
|
+
save: 'Save',
|
|
267500
|
+
saving: 'Saving…',
|
|
267501
|
+
cancel: 'Cancel',
|
|
267502
|
+
},
|
|
267503
|
+
deleteModal: {
|
|
267504
|
+
title: 'Delete criterion',
|
|
267505
|
+
confirmationPrefix: 'Are you sure you want to remove',
|
|
267506
|
+
confirmationSuffix: ' from the rubric?',
|
|
267507
|
+
cancel: 'Cancel',
|
|
267508
|
+
delete: 'Delete',
|
|
267509
|
+
deleting: 'Deleting…',
|
|
267510
|
+
},
|
|
267511
|
+
},
|
|
267512
|
+
toasts: {
|
|
267513
|
+
toggleOn: 'Grading turned on',
|
|
267514
|
+
toggleOff: 'Grading turned off — your rubric is kept for next time',
|
|
267515
|
+
toggleError: "Couldn't update grading",
|
|
267516
|
+
configSaved: 'Grading setup saved',
|
|
267517
|
+
configError: "Couldn't save grading setup",
|
|
267518
|
+
criterionAdded: 'Criterion added',
|
|
267519
|
+
criterionUpdated: 'Criterion updated',
|
|
267520
|
+
criterionDeleted: 'Criterion deleted',
|
|
267521
|
+
criterionError: "Couldn't update the rubric",
|
|
267522
|
+
},
|
|
267523
|
+
};
|
|
267524
|
+
function buildGraderTabLabels(t) {
|
|
267525
|
+
return {
|
|
267526
|
+
header: {
|
|
267527
|
+
title: t('graderTabLabels.header.title'),
|
|
267528
|
+
description: t('graderTabLabels.header.description'),
|
|
267529
|
+
},
|
|
267530
|
+
capability: {
|
|
267531
|
+
title: t('graderTabLabels.capability.title'),
|
|
267532
|
+
description: t('graderTabLabels.capability.description'),
|
|
267533
|
+
offHint: t('graderTabLabels.capability.offHint'),
|
|
267534
|
+
},
|
|
267535
|
+
subTabs: {
|
|
267536
|
+
setup: t('graderTabLabels.subTabs.setup'),
|
|
267537
|
+
rubric: t('graderTabLabels.subTabs.rubric'),
|
|
267538
|
+
},
|
|
267539
|
+
denied: {
|
|
267540
|
+
title: t('graderTabLabels.denied.title'),
|
|
267541
|
+
description: t('graderTabLabels.denied.description'),
|
|
267542
|
+
},
|
|
267543
|
+
warnings: {
|
|
267544
|
+
noConfig: t('graderTabLabels.warnings.noConfig'),
|
|
267545
|
+
noCriteria: t('graderTabLabels.warnings.noCriteria'),
|
|
267546
|
+
},
|
|
267547
|
+
config: {
|
|
267548
|
+
sectionTitle: t('graderTabLabels.config.sectionTitle'),
|
|
267549
|
+
gradingMode: {
|
|
267550
|
+
label: t('graderTabLabels.config.gradingMode.label'),
|
|
267551
|
+
options: {
|
|
267552
|
+
submission: t('graderTabLabels.config.gradingMode.options.submission'),
|
|
267553
|
+
conversation: t('graderTabLabels.config.gradingMode.options.conversation'),
|
|
267554
|
+
},
|
|
267555
|
+
help: {
|
|
267556
|
+
submission: t('graderTabLabels.config.gradingMode.help.submission'),
|
|
267557
|
+
conversation: t('graderTabLabels.config.gradingMode.help.conversation'),
|
|
267558
|
+
},
|
|
267559
|
+
},
|
|
267560
|
+
feedbackMode: {
|
|
267561
|
+
label: t('graderTabLabels.config.feedbackMode.label'),
|
|
267562
|
+
options: {
|
|
267563
|
+
overall: t('graderTabLabels.config.feedbackMode.options.overall'),
|
|
267564
|
+
perCriteria: t('graderTabLabels.config.feedbackMode.options.perCriteria'),
|
|
267565
|
+
both: t('graderTabLabels.config.feedbackMode.options.both'),
|
|
267566
|
+
},
|
|
267567
|
+
help: t('graderTabLabels.config.feedbackMode.help'),
|
|
267568
|
+
},
|
|
267569
|
+
instructions: {
|
|
267570
|
+
label: t('graderTabLabels.config.instructions.label'),
|
|
267571
|
+
placeholder: t('graderTabLabels.config.instructions.placeholder'),
|
|
267572
|
+
help: t('graderTabLabels.config.instructions.help'),
|
|
267573
|
+
},
|
|
267574
|
+
saveButton: t('graderTabLabels.config.saveButton'),
|
|
267575
|
+
savingButton: t('graderTabLabels.config.savingButton'),
|
|
267576
|
+
},
|
|
267577
|
+
criteria: {
|
|
267578
|
+
sectionTitle: t('graderTabLabels.criteria.sectionTitle'),
|
|
267579
|
+
description: t('graderTabLabels.criteria.description'),
|
|
267580
|
+
needsConfigHint: t('graderTabLabels.criteria.needsConfigHint'),
|
|
267581
|
+
emptyState: t('graderTabLabels.criteria.emptyState'),
|
|
267582
|
+
addButton: t('graderTabLabels.criteria.addButton'),
|
|
267583
|
+
columns: {
|
|
267584
|
+
name: t('graderTabLabels.criteria.columns.name'),
|
|
267585
|
+
criteria: t('graderTabLabels.criteria.columns.criteria'),
|
|
267586
|
+
points: t('graderTabLabels.criteria.columns.points'),
|
|
267587
|
+
},
|
|
267588
|
+
actionsAria: (name) => t('graderTabLabels.criteria.actionsAria', { name }),
|
|
267589
|
+
edit: t('graderTabLabels.criteria.edit'),
|
|
267590
|
+
delete: t('graderTabLabels.criteria.delete'),
|
|
267591
|
+
totalPoints: t('graderTabLabels.criteria.totalPoints'),
|
|
267592
|
+
scoreHint: t('graderTabLabels.criteria.scoreHint'),
|
|
267593
|
+
lastCriterionHint: t('graderTabLabels.criteria.lastCriterionHint'),
|
|
267594
|
+
modal: {
|
|
267595
|
+
addTitle: t('graderTabLabels.criteria.modal.addTitle'),
|
|
267596
|
+
editTitle: t('graderTabLabels.criteria.modal.editTitle'),
|
|
267597
|
+
name: {
|
|
267598
|
+
label: t('graderTabLabels.criteria.modal.name.label'),
|
|
267599
|
+
placeholder: t('graderTabLabels.criteria.modal.name.placeholder'),
|
|
267600
|
+
required: t('graderTabLabels.criteria.modal.name.required'),
|
|
267601
|
+
},
|
|
267602
|
+
criteria: {
|
|
267603
|
+
label: t('graderTabLabels.criteria.modal.criteria.label'),
|
|
267604
|
+
placeholder: t('graderTabLabels.criteria.modal.criteria.placeholder'),
|
|
267605
|
+
required: t('graderTabLabels.criteria.modal.criteria.required'),
|
|
267606
|
+
},
|
|
267607
|
+
points: {
|
|
267608
|
+
label: t('graderTabLabels.criteria.modal.points.label'),
|
|
267609
|
+
placeholder: t('graderTabLabels.criteria.modal.points.placeholder'),
|
|
267610
|
+
positive: t('graderTabLabels.criteria.modal.points.positive'),
|
|
267611
|
+
},
|
|
267612
|
+
save: t('graderTabLabels.criteria.modal.save'),
|
|
267613
|
+
saving: t('graderTabLabels.criteria.modal.saving'),
|
|
267614
|
+
cancel: t('graderTabLabels.criteria.modal.cancel'),
|
|
267615
|
+
},
|
|
267616
|
+
deleteModal: {
|
|
267617
|
+
title: t('graderTabLabels.criteria.deleteModal.title'),
|
|
267618
|
+
confirmationPrefix: t('graderTabLabels.criteria.deleteModal.confirmationPrefix'),
|
|
267619
|
+
confirmationSuffix: t('graderTabLabels.criteria.deleteModal.confirmationSuffix'),
|
|
267620
|
+
cancel: t('graderTabLabels.criteria.deleteModal.cancel'),
|
|
267621
|
+
delete: t('graderTabLabels.criteria.deleteModal.delete'),
|
|
267622
|
+
deleting: t('graderTabLabels.criteria.deleteModal.deleting'),
|
|
267623
|
+
},
|
|
267624
|
+
},
|
|
267625
|
+
toasts: {
|
|
267626
|
+
toggleOn: t('graderTabLabels.toasts.toggleOn'),
|
|
267627
|
+
toggleOff: t('graderTabLabels.toasts.toggleOff'),
|
|
267628
|
+
toggleError: t('graderTabLabels.toasts.toggleError'),
|
|
267629
|
+
configSaved: t('graderTabLabels.toasts.configSaved'),
|
|
267630
|
+
configError: t('graderTabLabels.toasts.configError'),
|
|
267631
|
+
criterionAdded: t('graderTabLabels.toasts.criterionAdded'),
|
|
267632
|
+
criterionUpdated: t('graderTabLabels.toasts.criterionUpdated'),
|
|
267633
|
+
criterionDeleted: t('graderTabLabels.toasts.criterionDeleted'),
|
|
267634
|
+
criterionError: t('graderTabLabels.toasts.criterionError'),
|
|
267635
|
+
},
|
|
267636
|
+
};
|
|
267637
|
+
}
|
|
267638
|
+
function resolveGraderTabLabels(override, t) {
|
|
267639
|
+
const base = t ? buildGraderTabLabels(t) : AGENT_GRADER_TAB_LABELS;
|
|
267640
|
+
if (!override)
|
|
267641
|
+
return base;
|
|
267642
|
+
return deepMerge(base, override);
|
|
267643
|
+
}
|
|
267644
|
+
|
|
267645
|
+
function CriterionDeleteModal({ isOpen, onClose, criterion, labels, isDeleting, onConfirm, }) {
|
|
267646
|
+
const handleDelete = async () => {
|
|
267647
|
+
if (!criterion)
|
|
267648
|
+
return;
|
|
267649
|
+
const deleted = await onConfirm(criterion.id);
|
|
267650
|
+
if (deleted)
|
|
267651
|
+
onClose();
|
|
267652
|
+
};
|
|
267653
|
+
return (jsx(Dialog, { open: isOpen, onOpenChange: onClose, children: jsxs(DialogContent, { "aria-describedby": "grader-criterion-delete-description", "data-testid": "grader-criterion-delete-modal", children: [jsx(DialogHeader, { children: jsx(DialogTitle, { className: "ibl-dialog-title", children: labels.title }) }), jsx("div", { className: "my-5", id: "grader-criterion-delete-description", children: jsxs("p", { className: "text-sm text-[#646464]", children: [labels.confirmationPrefix, " ", jsx("span", { className: "font-bold italic", children: criterion === null || criterion === void 0 ? void 0 : criterion.name }), labels.confirmationSuffix] }) }), jsxs(DialogFooter, { className: "gap-3", children: [jsx(Button$1, { variant: "outline", onClick: onClose, children: labels.cancel }), jsx(Button$1, { className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-white hover:opacity-90", onClick: handleDelete, disabled: isDeleting, "data-testid": "grader-criterion-delete-confirm", children: isDeleting ? labels.deleting : labels.delete })] })] }) }));
|
|
267654
|
+
}
|
|
267655
|
+
|
|
267656
|
+
function parsePoints(raw) {
|
|
267657
|
+
const parsed = Number.parseFloat(raw);
|
|
267658
|
+
return Number.isFinite(parsed) && parsed > 0 ? parsed : 0;
|
|
267659
|
+
}
|
|
267660
|
+
function CriterionModal({ isOpen, onClose, criterion, labels, isSaving, onSave }) {
|
|
267661
|
+
const isEditing = Boolean(criterion);
|
|
267662
|
+
const [draft, setDraft] = React__default.useState({ name: '', criteria: '', points: '' });
|
|
267663
|
+
const [showErrors, setShowErrors] = React__default.useState(false);
|
|
267664
|
+
// Reset the form each time the modal opens (create) or targets a new
|
|
267665
|
+
// criterion (edit).
|
|
267666
|
+
React__default.useEffect(() => {
|
|
267667
|
+
if (!isOpen)
|
|
267668
|
+
return;
|
|
267669
|
+
setShowErrors(false);
|
|
267670
|
+
setDraft(criterion
|
|
267671
|
+
? { name: criterion.name, criteria: criterion.criteria, points: String(criterion.points) }
|
|
267672
|
+
: { name: '', criteria: '', points: '' });
|
|
267673
|
+
}, [isOpen, criterion]);
|
|
267674
|
+
const errors = {
|
|
267675
|
+
name: draft.name.trim() ? '' : labels.name.required,
|
|
267676
|
+
criteria: draft.criteria.trim() ? '' : labels.criteria.required,
|
|
267677
|
+
points: parsePoints(draft.points) > 0 ? '' : labels.points.positive,
|
|
267678
|
+
};
|
|
267679
|
+
const isValid = !errors.name && !errors.criteria && !errors.points;
|
|
267680
|
+
const handleSubmit = async () => {
|
|
267681
|
+
if (!isValid) {
|
|
267682
|
+
setShowErrors(true);
|
|
267683
|
+
return;
|
|
267684
|
+
}
|
|
267685
|
+
const saved = await onSave({
|
|
267686
|
+
name: draft.name.trim(),
|
|
267687
|
+
criteria: draft.criteria.trim(),
|
|
267688
|
+
points: parsePoints(draft.points),
|
|
267689
|
+
});
|
|
267690
|
+
if (saved)
|
|
267691
|
+
onClose();
|
|
267692
|
+
};
|
|
267693
|
+
return (jsx(Dialog, { open: isOpen, onOpenChange: onClose, children: jsxs(DialogContent, { "aria-describedby": "grader-criterion-modal-description", "data-testid": "grader-criterion-modal", children: [jsx(DialogHeader, { children: jsx(DialogTitle, { className: "ibl-dialog-title", children: isEditing ? labels.editTitle : labels.addTitle }) }), jsxs("div", { className: "space-y-4", id: "grader-criterion-modal-description", children: [jsxs("div", { className: "space-y-1.5", children: [jsx(Label$1, { htmlFor: "grader-criterion-name", children: labels.name.label }), jsx(Input, { id: "grader-criterion-name", value: draft.name, placeholder: labels.name.placeholder, onChange: (e) => setDraft((prev) => ({ ...prev, name: e.target.value })) }), showErrors && errors.name && jsx("p", { className: "text-xs text-red-500", children: errors.name })] }), jsxs("div", { className: "space-y-1.5", children: [jsx(Label$1, { htmlFor: "grader-criterion-criteria", children: labels.criteria.label }), jsx(Textarea, { id: "grader-criterion-criteria", value: draft.criteria, placeholder: labels.criteria.placeholder, rows: 3, onChange: (e) => setDraft((prev) => ({ ...prev, criteria: e.target.value })) }), showErrors && errors.criteria && (jsx("p", { className: "text-xs text-red-500", children: errors.criteria }))] }), jsxs("div", { className: "space-y-1.5", children: [jsx(Label$1, { htmlFor: "grader-criterion-points", children: labels.points.label }), jsx(Input, { id: "grader-criterion-points", type: "number", min: 0, step: "any", value: draft.points, placeholder: labels.points.placeholder, className: "w-28", onChange: (e) => setDraft((prev) => ({ ...prev, points: e.target.value })) }), showErrors && errors.points && jsx("p", { className: "text-xs text-red-500", children: errors.points })] })] }), jsxs(DialogFooter, { className: "gap-3", children: [jsx(Button$1, { variant: "outline", onClick: onClose, children: labels.cancel }), jsx(Button$1, { className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-white hover:opacity-90", onClick: handleSubmit, disabled: isSaving, "data-testid": "grader-criterion-modal-save", children: isSaving ? labels.saving : labels.save })] })] }) }));
|
|
267694
|
+
}
|
|
267695
|
+
|
|
267696
|
+
function RubricSection({ labels, criteria, hasConfig, isLoading, isMutating, totalPoints, onAdd, onEdit, onDelete, }) {
|
|
267697
|
+
const [showCreate, setShowCreate] = React__default.useState(false);
|
|
267698
|
+
const [criterionToEdit, setCriterionToEdit] = React__default.useState(null);
|
|
267699
|
+
const [criterionToDelete, setCriterionToDelete] = React__default.useState(null);
|
|
267700
|
+
const isLastCriterion = criteria.length === 1;
|
|
267701
|
+
return (jsxs("div", { className: "space-y-3", "data-testid": "grader-criteria-section", children: [jsxs("div", { className: "flex items-start justify-between gap-4", children: [jsxs("div", { children: [jsx("h4", { className: "text-sm font-medium text-gray-900", children: labels.sectionTitle }), jsx("p", { className: "text-xs text-gray-600", children: labels.description })] }), jsxs(Button$1, { className: "ibl-button-primary flex-shrink-0", onClick: () => setShowCreate(true), disabled: !hasConfig || isMutating, "data-testid": "grader-add-criterion-button", children: [jsx(Plus, { className: "mr-1 h-4 w-4" }), labels.addButton] })] }), jsx("div", { className: "overflow-hidden rounded-md border", children: jsx("div", { className: "overflow-x-auto sm:mx-0", children: jsx("div", { className: "inline-block min-w-full align-middle", children: isLoading ? (jsx("div", { className: "flex w-full items-center justify-center 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.columns.name }), jsx(TableHead, { className: "p-3 text-left text-sm whitespace-nowrap text-[#646464]", children: labels.columns.criteria }), jsx(TableHead, { className: "p-3 text-right text-sm whitespace-nowrap text-[#646464]", children: labels.columns.points }), jsx(TableHead, { className: "w-10 p-3" })] }) }), jsx(TableBody, { children: criteria.length === 0 ? (jsx(TableRow$1, { children: jsx(TableCell$1, { colSpan: 4, className: "p-4 text-center text-[#646464]", children: hasConfig ? labels.emptyState : labels.needsConfigHint }) })) : (criteria.map((criterion) => (jsxs(TableRow$1, { className: "border-b last:border-0", "data-testid": `grader-criterion-row-${criterion.id}`, children: [jsx(TableCell$1, { className: "max-w-[160px] truncate p-3 font-medium whitespace-nowrap text-[#646464]", children: criterion.name }), jsx(TableCell$1, { className: "max-w-[280px] truncate p-3 text-[#646464]", title: criterion.criteria, children: criterion.criteria }), jsx(TableCell$1, { className: "p-3 text-right whitespace-nowrap text-[#646464]", children: criterion.points }), jsx(TableCell$1, { className: "p-3 text-right", children: jsxs(DropdownMenu, { children: [jsx(DropdownMenuTrigger, { asChild: true, children: jsx(Button$1, { type: "button", variant: "ghost", size: "icon", "aria-label": labels.actionsAria(criterion.name), children: jsx(Ellipsis, { className: "h-4 w-4" }) }) }), jsxs(DropdownMenuContent, { align: "end", children: [jsxs(DropdownMenuItem, { onClick: () => setCriterionToEdit(criterion), children: [jsx(Pencil, { className: "mr-2 h-4 w-4" }), labels.edit] }), jsxs(DropdownMenuItem, { className: "text-red-600 focus:text-red-700", disabled: isLastCriterion, onClick: () => {
|
|
267702
|
+
// Radix marks the item disabled but a raw click can
|
|
267703
|
+
// still land — the backend refuses to delete the
|
|
267704
|
+
// last criterion, so hard-guard here too.
|
|
267705
|
+
if (isLastCriterion)
|
|
267706
|
+
return;
|
|
267707
|
+
setCriterionToDelete(criterion);
|
|
267708
|
+
}, children: [jsx(Trash2, { className: "mr-2 h-4 w-4" }), labels.delete] })] })] }) })] }, criterion.id)))) })] })) }) }) }), criteria.length > 0 && !isLoading && (jsxs(Fragment$1, { children: [jsxs("div", { className: "flex items-center justify-between pt-1 text-xs", children: [jsx("span", { className: "font-medium text-gray-900", children: labels.totalPoints.replace('{total}', String(totalPoints)) }), jsx("span", { className: "text-gray-500", children: labels.scoreHint.replace('{total}', String(totalPoints)) })] }), isLastCriterion && (
|
|
267709
|
+
// The backend refuses to delete the last criterion — explain why
|
|
267710
|
+
// its Delete menu action is disabled.
|
|
267711
|
+
jsx("p", { className: "text-xs text-gray-500", "data-testid": "grader-last-criterion-hint", children: labels.lastCriterionHint }))] })), jsx(CriterionModal, { isOpen: showCreate, onClose: () => setShowCreate(false), criterion: null, labels: labels.modal, isSaving: isMutating, onSave: onAdd }), jsx(CriterionModal, { isOpen: criterionToEdit !== null, onClose: () => setCriterionToEdit(null), criterion: criterionToEdit, labels: labels.modal, isSaving: isMutating, onSave: (values) => onEdit(criterionToEdit.id, values) }), jsx(CriterionDeleteModal, { isOpen: criterionToDelete !== null, onClose: () => setCriterionToDelete(null), criterion: criterionToDelete, labels: labels.deleteModal, isDeleting: isMutating, onConfirm: onDelete })] }));
|
|
267712
|
+
}
|
|
267713
|
+
|
|
267714
|
+
function SetupSection({ labels, config, isSaving, onSave }) {
|
|
267715
|
+
const [gradingMode, setGradingMode] = React__default.useState('submission');
|
|
267716
|
+
const [feedbackMode, setFeedbackMode] = React__default.useState('both');
|
|
267717
|
+
const [instructions, setInstructions] = React__default.useState('');
|
|
267718
|
+
// Rehydrate the form whenever the server copy changes.
|
|
267719
|
+
React__default.useEffect(() => {
|
|
267720
|
+
var _a, _b, _c;
|
|
267721
|
+
setGradingMode((_a = config === null || config === void 0 ? void 0 : config.grading_mode) !== null && _a !== void 0 ? _a : 'submission');
|
|
267722
|
+
setFeedbackMode((_b = config === null || config === void 0 ? void 0 : config.feedback_mode) !== null && _b !== void 0 ? _b : 'both');
|
|
267723
|
+
setInstructions((_c = config === null || config === void 0 ? void 0 : config.grader_instructions) !== null && _c !== void 0 ? _c : '');
|
|
267724
|
+
}, [config === null || config === void 0 ? void 0 : config.id, config === null || config === void 0 ? void 0 : config.updated_at]); // eslint-disable-line react-hooks/exhaustive-deps
|
|
267725
|
+
const isDirty = config
|
|
267726
|
+
? gradingMode !== config.grading_mode ||
|
|
267727
|
+
feedbackMode !== config.feedback_mode ||
|
|
267728
|
+
instructions !== config.grader_instructions
|
|
267729
|
+
: instructions.trim().length > 0;
|
|
267730
|
+
const canSave = instructions.trim().length > 0 && isDirty && !isSaving;
|
|
267731
|
+
return (jsxs("div", { className: "space-y-4", "data-testid": "grader-setup-section", children: [jsxs("div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children: [jsxs("div", { className: "space-y-1.5", children: [jsx(Label$1, { className: "text-xs font-medium text-gray-700", children: labels.gradingMode.label }), jsxs(Select$1, { value: gradingMode, onValueChange: (value) => setGradingMode(value), children: [jsx(SelectTrigger, { className: "h-9", "data-testid": "grader-grading-mode-select", children: jsx(SelectValue, {}) }), jsxs(SelectContent, { children: [jsx(SelectItem, { value: "submission", children: labels.gradingMode.options.submission }), jsx(SelectItem, { value: "conversation", children: labels.gradingMode.options.conversation })] })] }), jsx("p", { className: "text-xs text-gray-500", children: gradingMode === 'submission'
|
|
267732
|
+
? labels.gradingMode.help.submission
|
|
267733
|
+
: labels.gradingMode.help.conversation })] }), jsxs("div", { className: "space-y-1.5", children: [jsx(Label$1, { className: "text-xs font-medium text-gray-700", children: labels.feedbackMode.label }), jsxs(Select$1, { value: feedbackMode, onValueChange: (value) => setFeedbackMode(value), children: [jsx(SelectTrigger, { className: "h-9", "data-testid": "grader-feedback-mode-select", children: jsx(SelectValue, {}) }), jsxs(SelectContent, { children: [jsx(SelectItem, { value: "overall", children: labels.feedbackMode.options.overall }), jsx(SelectItem, { value: "per_criteria", children: labels.feedbackMode.options.perCriteria }), jsx(SelectItem, { value: "both", children: labels.feedbackMode.options.both })] })] }), jsx("p", { className: "text-xs text-gray-500", children: labels.feedbackMode.help })] })] }), jsxs("div", { className: "space-y-1.5", children: [jsx(Label$1, { className: "text-xs font-medium text-gray-700", children: labels.instructions.label }), jsx(Textarea, { value: instructions, onChange: (e) => setInstructions(e.target.value), placeholder: labels.instructions.placeholder, rows: 4, "data-testid": "grader-instructions-textarea" }), jsx("p", { className: "text-xs text-gray-500", children: labels.instructions.help })] }), jsx("div", { className: "flex items-center justify-end", children: jsx("button", { type: "button", onClick: () => onSave({
|
|
267734
|
+
grading_mode: gradingMode,
|
|
267735
|
+
feedback_mode: feedbackMode,
|
|
267736
|
+
grader_instructions: instructions,
|
|
267737
|
+
}), disabled: !canSave, "data-testid": "grader-save-button", className: "inline-flex items-center gap-2 rounded-md bg-gradient-to-r from-[#2563EB] to-[#93C5FD] px-4 py-2 text-sm font-medium text-white hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50", children: isSaving ? labels.savingButton : labels.saveButton }) })] }));
|
|
267738
|
+
}
|
|
267739
|
+
|
|
267740
|
+
/**
|
|
267741
|
+
* Grading activation is owned entirely by the Grading tool's attachment to
|
|
267742
|
+
* the agent. The backend matches on `Tool.name` — `slug` defaults to a UUID
|
|
267743
|
+
* and is not stable across environments, so detection MUST use the name.
|
|
267744
|
+
*/
|
|
267745
|
+
const GRADING_TOOL_NAME = 'Grading';
|
|
267746
|
+
function errorStatus(error) {
|
|
267747
|
+
return error === null || error === void 0 ? void 0 : error.status;
|
|
267748
|
+
}
|
|
267749
|
+
function errorDetail(error) {
|
|
267750
|
+
var _a;
|
|
267751
|
+
const detail = (_a = error === null || error === void 0 ? void 0 : error.data) === null || _a === void 0 ? void 0 : _a.detail;
|
|
267752
|
+
return typeof detail === 'string' ? detail : '';
|
|
267753
|
+
}
|
|
267754
|
+
function useGrader({ tenantKey, mentorId, username, labels }) {
|
|
267755
|
+
var _a;
|
|
267756
|
+
const identityReady = Boolean(tenantKey && mentorId && username);
|
|
267757
|
+
const { data: mentorSettings, isLoading: isSettingsLoading } = useGetMentorSettingsQuery({
|
|
267758
|
+
mentor: mentorId,
|
|
267759
|
+
org: tenantKey,
|
|
267760
|
+
// @ts-expect-error userId is not in the typed args but the API accepts it
|
|
267761
|
+
userId: username,
|
|
267762
|
+
}, { skip: !identityReady });
|
|
267763
|
+
const { data: tools } = useGetToolsQuery({
|
|
267764
|
+
mentor: mentorId,
|
|
267765
|
+
org: tenantKey,
|
|
267766
|
+
// @ts-expect-error userId is not in the typed args but the API accepts it
|
|
267767
|
+
userId: username,
|
|
267768
|
+
}, { skip: !identityReady });
|
|
267769
|
+
const mentorTools = (_a = mentorSettings === null || mentorSettings === void 0 ? void 0 : mentorSettings.mentor_tools) !== null && _a !== void 0 ? _a : [];
|
|
267770
|
+
const gradingEnabled = (mentorSettings === null || mentorSettings === void 0 ? void 0 : mentorSettings.can_use_tools) === true &&
|
|
267771
|
+
mentorTools.some((tool) => (tool === null || tool === void 0 ? void 0 : tool.name) === GRADING_TOOL_NAME);
|
|
267772
|
+
// Optimistic local mirror of the tool attachment so the switch responds
|
|
267773
|
+
// instantly; rolled back if the settings PATCH fails.
|
|
267774
|
+
const [enabled, setEnabled] = React__default.useState(gradingEnabled);
|
|
267775
|
+
React__default.useEffect(() => {
|
|
267776
|
+
setEnabled(gradingEnabled);
|
|
267777
|
+
}, [gradingEnabled]);
|
|
267778
|
+
const [editMentor, { isLoading: isToggling }] = useEditMentorMutation();
|
|
267779
|
+
const { data: config, error: configError, isLoading: isConfigLoading, refetch: refetchConfig, } = useGetMentorGraderConfigurationQuery({ org: tenantKey, mentorId }, { skip: !identityReady });
|
|
267780
|
+
const { data: criteria = [], error: criteriaError, isLoading: isCriteriaLoading, refetch: refetchCriteria, } = useListGraderCriteriaQuery({ org: tenantKey, mentorId }, { skip: !identityReady });
|
|
267781
|
+
const [createConfig, { isLoading: isCreatingConfig }] = useCreateMentorGraderConfigurationMutation();
|
|
267782
|
+
const [updateConfig, { isLoading: isUpdatingConfig }] = useUpdateMentorGraderConfigurationMutation();
|
|
267783
|
+
const [createCriterion, { isLoading: isCreatingCriterion }] = useCreateGraderCriterionMutation();
|
|
267784
|
+
const [updateCriterion, { isLoading: isUpdatingCriterion }] = useUpdateGraderCriterionMutation();
|
|
267785
|
+
const [deleteCriterion, { isLoading: isDeletingCriterion }] = useDeleteGraderCriterionMutation();
|
|
267786
|
+
// 404 is the documented first-run state ("Grader config not found"), not an
|
|
267787
|
+
// error — the config row may simply not exist yet.
|
|
267788
|
+
const configNotFound = errorStatus(configError) === 404;
|
|
267789
|
+
const hasConfig = Boolean(config);
|
|
267790
|
+
const isForbidden = errorStatus(configError) === 403 || errorStatus(criteriaError) === 403;
|
|
267791
|
+
const totalPoints = criteria.reduce((sum, criterion) => sum + (Number(criterion.points) || 0), 0);
|
|
267792
|
+
const toggleGrading = async (checked) => {
|
|
267793
|
+
var _a, _b, _c;
|
|
267794
|
+
const gradingSlug = (_b = (_a = mentorTools.find((tool) => (tool === null || tool === void 0 ? void 0 : tool.name) === GRADING_TOOL_NAME)) === null || _a === void 0 ? void 0 : _a.slug) !== null && _b !== void 0 ? _b : (_c = (tools !== null && tools !== void 0 ? tools : []).find((tool) => (tool === null || tool === void 0 ? void 0 : tool.name) === GRADING_TOOL_NAME)) === null || _c === void 0 ? void 0 : _c.slug;
|
|
267795
|
+
if (checked && !gradingSlug) {
|
|
267796
|
+
// The Grading tool isn't in this tenant's catalogue — nothing to attach.
|
|
267797
|
+
toast.error(labels.toasts.toggleError);
|
|
267798
|
+
return;
|
|
267799
|
+
}
|
|
267800
|
+
const currentSlugs = mentorTools
|
|
267801
|
+
.map((tool) => tool === null || tool === void 0 ? void 0 : tool.slug)
|
|
267802
|
+
.filter((slug) => Boolean(slug));
|
|
267803
|
+
const newSlugs = checked
|
|
267804
|
+
? Array.from(new Set([...currentSlugs, gradingSlug]))
|
|
267805
|
+
: currentSlugs.filter((slug) => slug !== gradingSlug);
|
|
267806
|
+
setEnabled(checked); // optimistic
|
|
267807
|
+
try {
|
|
267808
|
+
// Detaching the tool deliberately leaves the grader config untouched —
|
|
267809
|
+
// there is no DELETE for it, so rubric work survives disable/re-enable.
|
|
267810
|
+
await editMentor({
|
|
267811
|
+
mentor: mentorId,
|
|
267812
|
+
org: tenantKey,
|
|
267813
|
+
formData: {
|
|
267814
|
+
tool_slugs: newSlugs,
|
|
267815
|
+
can_use_tools: newSlugs.length > 0,
|
|
267816
|
+
},
|
|
267817
|
+
// @ts-expect-error userId is not in the typed args but the API accepts it
|
|
267818
|
+
userId: username,
|
|
267819
|
+
}).unwrap();
|
|
267820
|
+
toast.success(checked ? labels.toasts.toggleOn : labels.toasts.toggleOff);
|
|
267821
|
+
if (checked) {
|
|
267822
|
+
// The backend auto-provisions the config row when the tool is
|
|
267823
|
+
// attached through settings — pick it up without a page reload.
|
|
267824
|
+
refetchConfig();
|
|
267825
|
+
refetchCriteria();
|
|
267826
|
+
}
|
|
267827
|
+
}
|
|
267828
|
+
catch (error) {
|
|
267829
|
+
setEnabled(!checked); // roll back
|
|
267830
|
+
console.error('[AgentGraderTab] toggle grading error', error);
|
|
267831
|
+
toast.error(labels.toasts.toggleError);
|
|
267832
|
+
}
|
|
267833
|
+
};
|
|
267834
|
+
// Create vs update is decided from the already-fetched config state
|
|
267835
|
+
// (GET 200 → PATCH, documented 404 first-run → POST), mirroring the
|
|
267836
|
+
// screenshare tab. No reactive fallback: with iblFetchBaseQuery retrying
|
|
267837
|
+
// failed requests, a POST that 400s would burn through its retries before
|
|
267838
|
+
// any fallback ran.
|
|
267839
|
+
const saveConfig = async (formData) => {
|
|
267840
|
+
try {
|
|
267841
|
+
if (hasConfig) {
|
|
267842
|
+
await updateConfig({ org: tenantKey, mentorId, formData }).unwrap();
|
|
267843
|
+
}
|
|
267844
|
+
else {
|
|
267845
|
+
await createConfig({ org: tenantKey, mentorId, formData }).unwrap();
|
|
267846
|
+
}
|
|
267847
|
+
toast.success(labels.toasts.configSaved);
|
|
267848
|
+
return true;
|
|
267849
|
+
}
|
|
267850
|
+
catch (error) {
|
|
267851
|
+
console.error('[AgentGraderTab] save config error', error);
|
|
267852
|
+
toast.error(errorDetail(error) || labels.toasts.configError);
|
|
267853
|
+
if (!hasConfig) {
|
|
267854
|
+
// If the POST hit "already exists" (config created out of band, e.g.
|
|
267855
|
+
// auto-provisioned on tool attach), re-sync so the next save PATCHes.
|
|
267856
|
+
refetchConfig();
|
|
267857
|
+
}
|
|
267858
|
+
return false;
|
|
267859
|
+
}
|
|
267860
|
+
};
|
|
267861
|
+
const addCriterion = async (formData) => {
|
|
267862
|
+
try {
|
|
267863
|
+
await createCriterion({ org: tenantKey, mentorId, formData }).unwrap();
|
|
267864
|
+
toast.success(labels.toasts.criterionAdded);
|
|
267865
|
+
return true;
|
|
267866
|
+
}
|
|
267867
|
+
catch (error) {
|
|
267868
|
+
console.error('[AgentGraderTab] add criterion error', error);
|
|
267869
|
+
toast.error(errorDetail(error) || labels.toasts.criterionError);
|
|
267870
|
+
return false;
|
|
267871
|
+
}
|
|
267872
|
+
};
|
|
267873
|
+
const editCriterion = async (criterionId, formData) => {
|
|
267874
|
+
try {
|
|
267875
|
+
await updateCriterion({ org: tenantKey, mentorId, criterionId, formData }).unwrap();
|
|
267876
|
+
toast.success(labels.toasts.criterionUpdated);
|
|
267877
|
+
return true;
|
|
267878
|
+
}
|
|
267879
|
+
catch (error) {
|
|
267880
|
+
console.error('[AgentGraderTab] update criterion error', error);
|
|
267881
|
+
toast.error(errorDetail(error) || labels.toasts.criterionError);
|
|
267882
|
+
return false;
|
|
267883
|
+
}
|
|
267884
|
+
};
|
|
267885
|
+
const removeCriterion = async (criterionId) => {
|
|
267886
|
+
try {
|
|
267887
|
+
await deleteCriterion({ org: tenantKey, mentorId, criterionId }).unwrap();
|
|
267888
|
+
toast.success(labels.toasts.criterionDeleted);
|
|
267889
|
+
return true;
|
|
267890
|
+
}
|
|
267891
|
+
catch (error) {
|
|
267892
|
+
console.error('[AgentGraderTab] delete criterion error', error);
|
|
267893
|
+
toast.error(errorDetail(error) || labels.toasts.criterionError);
|
|
267894
|
+
return false;
|
|
267895
|
+
}
|
|
267896
|
+
};
|
|
267897
|
+
return {
|
|
267898
|
+
isLoading: isSettingsLoading || isConfigLoading,
|
|
267899
|
+
isForbidden,
|
|
267900
|
+
enabled,
|
|
267901
|
+
isToggling,
|
|
267902
|
+
toggleGrading,
|
|
267903
|
+
config,
|
|
267904
|
+
hasConfig,
|
|
267905
|
+
configNotFound,
|
|
267906
|
+
isSavingConfig: isCreatingConfig || isUpdatingConfig,
|
|
267907
|
+
saveConfig,
|
|
267908
|
+
criteria,
|
|
267909
|
+
isCriteriaLoading,
|
|
267910
|
+
totalPoints,
|
|
267911
|
+
addCriterion,
|
|
267912
|
+
editCriterion,
|
|
267913
|
+
removeCriterion,
|
|
267914
|
+
isMutatingCriteria: isCreatingCriterion || isUpdatingCriterion || isDeletingCriterion,
|
|
267915
|
+
};
|
|
267916
|
+
}
|
|
267917
|
+
|
|
267918
|
+
const GRADER_SUB_TABS = {
|
|
267919
|
+
setup: 'setup',
|
|
267920
|
+
rubric: 'rubric',
|
|
267921
|
+
};
|
|
267922
|
+
/**
|
|
267923
|
+
* Standalone top-level tab for the agent's grading setup: the in-tab toggle
|
|
267924
|
+
* attaches/detaches the "Grading" tool on the agent (the sole activation
|
|
267925
|
+
* switch on the backend), and the gated content splits into two sub-tabs —
|
|
267926
|
+
* Grading setup (configuration form) and Rubric (criteria table with
|
|
267927
|
+
* modal-based add/edit/delete).
|
|
267928
|
+
*
|
|
267929
|
+
* Grading only runs when the tool is attached AND a config exists AND the
|
|
267930
|
+
* rubric has at least one criterion — the tab surfaces a warning whenever
|
|
267931
|
+
* the tool is on but either of the other two is missing.
|
|
267932
|
+
*/
|
|
267933
|
+
function AgentGraderTab({ labels: labelsOverride, tenantKey: tenantKeyProp, mentorId: mentorIdProp, username: usernameProp, }) {
|
|
267934
|
+
var _a, _b, _c;
|
|
267935
|
+
const ctx = useAgentSettingsOptional();
|
|
267936
|
+
const tenantKey = (_a = tenantKeyProp !== null && tenantKeyProp !== void 0 ? tenantKeyProp : ctx === null || ctx === void 0 ? void 0 : ctx.tenantKey) !== null && _a !== void 0 ? _a : '';
|
|
267937
|
+
const mentorId = (_b = mentorIdProp !== null && mentorIdProp !== void 0 ? mentorIdProp : ctx === null || ctx === void 0 ? void 0 : ctx.mentorId) !== null && _b !== void 0 ? _b : '';
|
|
267938
|
+
const username = (_c = usernameProp !== null && usernameProp !== void 0 ? usernameProp : ctx === null || ctx === void 0 ? void 0 : ctx.username) !== null && _c !== void 0 ? _c : '';
|
|
267939
|
+
const t = useT();
|
|
267940
|
+
const labels = React__default.useMemo(() => resolveGraderTabLabels(labelsOverride, t), [labelsOverride, t]);
|
|
267941
|
+
const { isLoading, isForbidden, enabled, isToggling, toggleGrading, config, hasConfig, isSavingConfig, saveConfig, criteria, isCriteriaLoading, totalPoints, addCriterion, editCriterion, removeCriterion, isMutatingCriteria, } = useGrader({ tenantKey, mentorId, username, labels });
|
|
267942
|
+
const showNoCriteriaWarning = enabled && hasConfig && !isCriteriaLoading && criteria.length === 0;
|
|
267943
|
+
const showNoConfigWarning = enabled && !isLoading && !hasConfig && !isForbidden;
|
|
267944
|
+
const warningMessage = showNoConfigWarning
|
|
267945
|
+
? labels.warnings.noConfig
|
|
267946
|
+
: showNoCriteriaWarning
|
|
267947
|
+
? labels.warnings.noCriteria
|
|
267948
|
+
: null;
|
|
267949
|
+
return (jsxs(Fragment$1, { children: [jsx("div", { className: "flex h-[73px] flex-shrink-0 items-center border-b border-gray-200 bg-white p-4 lg:block", children: jsxs("div", { children: [jsx("h3", { className: "mb-1 text-base font-medium text-gray-900", children: labels.header.title }), jsx("p", { className: "text-xs text-gray-600", children: labels.header.description })] }) }), jsx("div", { className: "flex-1 space-y-4 p-3 lg:p-4", style: { overflowY: 'auto', overflowX: 'hidden' }, "data-testid": "grader-tab-body", children: isLoading ? (jsx("div", { className: "flex items-center justify-center py-12", "data-testid": "grader-tab-loading", children: jsx(Spinner, {}) })) : isForbidden ? (jsxs("div", { className: "flex flex-col items-center gap-2 rounded-lg border border-gray-200 bg-gray-50 px-4 py-10 text-center", "data-testid": "grader-tab-denied", children: [jsx(ShieldAlert, { className: "h-6 w-6 text-gray-400" }), jsx("p", { className: "text-sm font-medium text-gray-900", children: labels.denied.title }), jsx("p", { className: "max-w-sm text-xs text-gray-600", children: labels.denied.description })] })) : (jsxs(CapabilityGate, { title: labels.capability.title, description: labels.capability.description, offHint: labels.capability.offHint, enabled: enabled, onToggle: toggleGrading, disabled: isToggling, ariaLabel: labels.capability.title, toggleTestId: "grader-capability-toggle", children: [warningMessage && (jsxs("div", { className: "mb-4 flex items-start gap-2 rounded-lg border border-amber-200 bg-amber-50 p-3", "data-testid": "grader-misconfigured-warning", children: [jsx(TriangleAlert, { className: "mt-0.5 h-4 w-4 flex-shrink-0 text-amber-600" }), jsx("p", { className: "text-xs leading-relaxed text-amber-800", children: warningMessage })] })), jsxs(Tabs, { defaultValue: GRADER_SUB_TABS.setup, className: "w-full", children: [jsxs(TabsList, { "aria-label": labels.header.title, "data-testid": "grader-sub-tabs", children: [jsx(TabsTrigger, { value: GRADER_SUB_TABS.setup, "data-testid": "grader-sub-tab-setup", children: labels.subTabs.setup }), jsx(TabsTrigger, { value: GRADER_SUB_TABS.rubric, "data-testid": "grader-sub-tab-rubric", children: labels.subTabs.rubric })] }), jsx(TabsContent, { value: GRADER_SUB_TABS.setup, className: "space-y-4", children: jsx(SetupSection, { labels: labels.config, config: config, isSaving: isSavingConfig, onSave: saveConfig }) }), jsx(TabsContent, { value: GRADER_SUB_TABS.rubric, className: "space-y-4", children: jsx(RubricSection, { labels: labels.criteria, criteria: criteria, hasConfig: hasConfig, isLoading: isCriteriaLoading, isMutating: isMutatingCriteria, totalPoints: totalPoints, onAdd: addCriterion, onEdit: editCriterion, onDelete: removeCriterion }) })] })] })) })] }));
|
|
267950
|
+
}
|
|
267951
|
+
|
|
266959
267952
|
function ApiKeyModal({ isOpen, onClose, apiKey, labels }) {
|
|
266960
267953
|
const { copy, status } = useCopyToClipboard(800);
|
|
266961
267954
|
const Icon = status === 'success' ? Check : Copy;
|
|
@@ -328941,5 +329934,5 @@ var index_es = /*#__PURE__*/Object.freeze({
|
|
|
328941
329934
|
vectorsRatio: vectorsRatio
|
|
328942
329935
|
});
|
|
328943
329936
|
|
|
328944
|
-
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_HUMAN_SUPPORT_TAB_LABELS, AGENT_LLM_TAB_LABELS, AGENT_LTI_TAB_LABELS, AGENT_MEMORY_TAB_LABELS, AGENT_PICKER_LABELS, AGENT_PRIVACY_TAB_LABELS, AGENT_PROMPTS_TAB_LABELS, AGENT_SAFETY_TAB_LABELS, AGENT_SCREENSHARE_TAB_LABELS, AGENT_SEARCH_LABELS, AGENT_SETTINGS_TAB_LABELS, AGENT_TASKS_TAB_LABELS, AGENT_TOOLS_TAB_LABELS, AGENT_VOICE_TAB_LABELS, Account, AgentAccessTab, AgentAnalyticsTab, AgentApiTab, AgentCard, AgentDatasetsTab, AgentDisclaimersTab, AgentEmbedTab, AgentEmptyState, AgentEvaluationTab, AgentHistoryTab, AgentHumanSupportTab, 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 };
|
|
329937
|
+
export { AGENT_ACCESS_TAB_LABELS, AGENT_ANALYTICS_TAB_LABELS, AGENT_API_TAB_LABELS, AGENT_DATASETS_TAB_LABELS, AGENT_DISCLAIMERS_TAB_LABELS, AGENT_EMBED_TAB_LABELS, AGENT_EVALUATION_TAB_LABELS, AGENT_GRADER_TAB_LABELS, AGENT_HISTORY_TAB_LABELS, AGENT_HUMAN_SUPPORT_TAB_LABELS, AGENT_LLM_TAB_LABELS, AGENT_LTI_TAB_LABELS, AGENT_MEMORY_TAB_LABELS, AGENT_PICKER_LABELS, AGENT_PRIVACY_TAB_LABELS, AGENT_PROMPTS_TAB_LABELS, AGENT_SAFETY_TAB_LABELS, AGENT_SCREENSHARE_TAB_LABELS, AGENT_SEARCH_LABELS, AGENT_SETTINGS_TAB_LABELS, AGENT_TASKS_TAB_LABELS, AGENT_TOOLS_TAB_LABELS, AGENT_VOICE_TAB_LABELS, Account, AgentAccessTab, AgentAnalyticsTab, AgentApiTab, AgentCard, AgentDatasetsTab, AgentDisclaimersTab, AgentEmbedTab, AgentEmptyState, AgentEvaluationTab, AgentGraderTab, AgentHistoryTab, AgentHumanSupportTab, AgentLLMTab, AgentLtiTab, AgentMemoryTab, AgentPrivacyTab, AgentPromptsTab, AgentSafetyTab, AgentScreenShareTab, AgentSearch, AgentSearchFilters, AgentSearchInput, AgentSettingsProvider, AgentSettingsTab, AgentTasksTab, AgentToolsTab, AgentVoiceTab, AppSidebar, CATALOGS, Chat, ClientErrorPage, ConversationStarters$1 as ConversationStarters, CopyButton, CopyMentorModal, CourseBox, CourseContentLayout, CourseContentTabPage, CreatePathwayModal, CredentialDetailModal, CredentialMiniBox, DEFAULT_ANALYTICS_HUB_TABS, DEFAULT_LOCALE, DeleteMentorModal, EMPTY_PROGRAM_SETTINGS_FORM, EdxIframe, ErrorPage, GRADING_TOOL_NAME, GreetingMethod, 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 };
|
|
328945
329938
|
//# sourceMappingURL=index.esm.js.map
|