@iblai/iblai-js 2.3.11 → 2.3.13
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/agent-skills-helpers.d.ts +166 -0
- package/dist/data-layer/playwright/claw-sandbox-helpers.d.ts +0 -80
- package/dist/data-layer/playwright/index.d.ts +4 -2
- package/dist/playwright/index.cjs +413 -150
- package/dist/playwright/index.cjs.map +1 -1
- package/dist/playwright/index.d.ts +127 -41
- package/dist/playwright/index.esm.js +400 -151
- package/dist/playwright/index.esm.js.map +1 -1
- package/dist/playwright/playwright/agent-skills-helpers.d.ts +166 -0
- package/dist/playwright/playwright/claw-sandbox-helpers.d.ts +0 -80
- package/dist/playwright/playwright/index.d.ts +4 -2
- package/dist/security/playwright/agent-skills-helpers.d.ts +166 -0
- package/dist/security/playwright/claw-sandbox-helpers.d.ts +0 -80
- package/dist/security/playwright/index.d.ts +4 -2
- package/dist/web-containers/playwright/agent-skills-helpers.d.ts +166 -0
- package/dist/web-containers/playwright/claw-sandbox-helpers.d.ts +0 -80
- package/dist/web-containers/playwright/index.d.ts +4 -2
- package/dist/web-containers/source/index.esm.js +158 -79
- package/dist/web-containers/source/next/index.esm.js +163 -80
- package/dist/web-utils/playwright/agent-skills-helpers.d.ts +166 -0
- package/dist/web-utils/playwright/claw-sandbox-helpers.d.ts +0 -80
- package/dist/web-utils/playwright/index.d.ts +4 -2
- package/package.json +4 -4
|
@@ -3,7 +3,7 @@ import React__default, { useRef, useEffect, useState, useCallback, useLayoutEffe
|
|
|
3
3
|
import { useDispatch, useSelector } from 'react-redux';
|
|
4
4
|
import { selectSessionId, selectActiveChatMessages, useCachedSessionId, chatActions, LOCAL_STORAGE_KEYS, TimeTracker, getInitials, useTenantMetadata, useCurrentTenant, selectRbacPermissions, isPureWatcher, WithPermissions, canWriteField, useStripeUpgrade, openExternalUrl, CHAT_AREA_SIZE, isAlphaNumeric32, checkRbacPermission, getTimeAgo, REQUIRED_ACTIONS_FOR_GROUPS, getVisibleAnalyticsTabs, formatRelativeTime as formatRelativeTime$2, ANONYMOUS_USERNAME, combineCSVData, WATCHER_HIDDEN_REPORTS, redirectToAuthSpaJoinTenant, redirectToAuthSpa, getAuthSpaJoinUrl, useOS, selectNumberOfActiveChatMessages, useUsername, selectStreaming, isLoggedIn, TOOLS, hasRemoteAiConfig, isSafariBrowser, useShowAttachment, useShowVoiceCall, useShowVoiceRecorder, useMentorSettings, selectShowingSharedChat, useShowFreeTrialDialog, useEmbedMode, chatInputSliceSelectors, useResponsive, useAccessingPublicRoute, useVisitingTenant, useModelFileUploadCapabilities, useChatFileUpload, useVoiceChat, selectAttachedFiles, MENTOR_CHAT_DOCUMENTS_EXTENSIONS, chatInputSliceActions, removeFile, WithFormPermissions, MENTOR_VISIBILITY } from '@iblai/web-utils';
|
|
5
5
|
import * as dataLayer from '@iblai/data-layer';
|
|
6
|
-
import { useCreateSessionIdMutation, useTimeTrackingMutation, useGetUserMetadataQuery, useGetUserMetadataEdxQuery, useUpdateUserMetadataMutation, useUpdateUserMetadataEdxMutation, useUploadProfileImageMutation, useResetPasswordMutation, useSelfRetireMutation, useCreateUserInstitutionMutation, useGetUserInstitutionsQuery, useCreateUserEducationMutation, useUpdateUserEducationMutation, useDeleteUserEducationMutation, useGetUserEducationQuery, useCreateUserCompanyMutation, useGetUserCompaniesQuery, useCreateUserExperienceMutation, useUpdateUserExperienceMutation, useDeleteUserExperienceMutation, useGetUserExperienceQuery, useGetUserResumeQuery, useCreateUserResumeMutation, useGetMySubscriptionsQuery, useGetItemSubscriptionQuery, useCancelSubscriptionMutation, useGetLearnerDetailsQuery, useGetUserEnrolledCoursesQuery, useGetUserEnrolledProgramsQuery, useGetUserCatalogPathwaysQuery, useGetUsersAsAssertionsQuery, useGetUserEarnedSkillsQuery, useGetUserReportedSkillsQuery, useGetUserDesiredSkillsQuery, useCreateGlobalMemoryMutation, useGetMemsearchStatusQuery, useGetUserMemorySettingsQuery, useUpdateUserMemorySettingsMutation, useGetGlobalMemoriesQuery, useGetAllMentorMemoriesQuery, useDeleteGlobalMemoryMutation, useInviteUserMutation, usePlatformInvitationsQuery, useCreateCatalogInvitationCourseBulkMutation, useGetCatalogInvitationsCourseQuery, useLazyPlatformUsersQuery, useLazyPlatformUserGroupsQuery, useGetPersonnalizedSearchQuery, useCreateCatalogInvitationProgramBulkMutation, useGetCatalogInvitationsProgramQuery, useUpdateUserRoleMutation, useUpdateUserStatusMutation, useUpdatePlatformUserRoleWithPoliciesMutation, usePlatformUsersQuery, useGetAccessibleUsersQuery, isPoliciesResponse, platformApiSlice, featureTags, useLazyGetRbacTeamsAccessListQuery, useCreateRbacTeamsAccessMutation, useGetRbacGroupsQuery, usePlatformUserGroupsQuery, useCreateRbacGroupMutation, useUpdateRbacGroupMutation, useDeleteRbacGroupMutation, useCreatePlatformUserGroupMutation, useUpdatePlatformUserGroupMutation, useDeletePlatformUserGroupMutation, useGetRbacGroupDetailsQuery, useGetPlatformUserGroupDetailsQuery, useGetRbacPermissionsMutation, useGetRbacRolesQuery, useCreateRbacRoleMutation, useUpdateRbacRoleMutation, useDeleteRbacRoleMutation, useGetRbacRoleDetailsQuery, useGetRbacActionsDefinitionQuery, useGetRbacResourceDiscoveryQuery, useGetRbacResourceListQuery, useGetRbacPoliciesQuery, useCreateRbacPolicyMutation, useUpdateRbacPolicyMutation, useDeleteRbacPolicyMutation, useGetRbacPolicyDetailsQuery, useGetWatchedGroupsQuery, useCreateWatchedGroupMutation, useUpdateWatchedGroupMutation, useDeleteWatchedGroupMutation, useAddWatchedUserMutation, useRemoveWatchedUserMutation, useAddWatcherMutation, useUpdateWatcherMutation, useDeleteWatcherMutation, useGetWatchedUsersQuery, useGetWatchersQuery, WATCHER_NOTIFICATION_EVENTS, WATCHER_NOTIFICATION_EVENT_LABELS, useGetApplicationFormsQuery, useGetApplicationFormDetailQuery, useCreateApplicationFormMutation, useUpdateApplicationFormMutation, useGetApplicationAdminDetailQuery, useInviteApplicationCandidateMutation, useLazyGetApplicationAttachmentFileQuery, useCreateApplicationWaiverMutation, useDeleteApplicationWaiverMutation, useSubmitApplicationOverrideMutation, useUpdateApplicationPlacementMutation, useDeleteApplicationCourseAssignmentMutation, useCreateApplicationNoteMutation, useUpdateApplicationNoteMutation, useDeleteApplicationNoteMutation, useTransitionApplicationMutation, useLinkApplicationCandidateMutation, useCreateApplicationPlacementsMutation, useGetCustomMentorsQuery, useCreateApplicationCourseAssignmentsMutation, useGetApplicationBlocksQuery, useDeleteApplicationBlockMutation, useGetApplicationsPipelineStatsQuery, useGetApplicationsPipelineQuery, useDeleteApiKeyMutation, useGetApiKeyQuery, useGetApiKeyFieldPermissionsQuery, useUpdateApiKeyMutation, useGetApiKeysQuery, unwrapApiTokenList, useCreateApiKeyMutation, useCreateLLMCredentialMutation, useGetCredentialsSchemaQuery, useGetMaskedLLMCredentialsQuery, useGetLlmsQuery, useDeleteIntegrationCredentialMutation, useDeleteCredentialMutation, useCreateIntegrationCredentialMutation, useGetIntegrationCredentialsSchemaQuery, useGetMaskedIntegrationCredentialsQuery, useGetAccountBillingInfoQuery, useUpdateAutoRechargeInfoMutation, useTriggerAutoRechargeMutation, useCreateStripeCustomerPortalMutation, useSetPlatformConfigurationsMutation, useGetPlatformConfigurationsQuery, useUpdatePlatformMembershipMutation, useGetPlatformMembershipQuery, useGetCustomDomainsQuery, useCreateCustomDomainMutation, useDeleteCustomDomainMutation, useGetStudentMentorCreationStatusQuery, useSetStudentMentorCreationStatusMutation, coreApiSlice, recommendationPromptTypeEnum, useGetRecommendedPromptsListQuery, useCreateRecommendedPromptMutation, useUpdateRecommendedPromptMutation, useDeleteRecommendedPromptMutation, useLazyGetPublicPlatformImageAssetFileUrlQuery, useUpdateTenantMetadataMutation, useCreatePlatformImageAssetMutation, useGetProviderConfigQuery, useCreateProviderConfigMutation, useDeleteProviderConfigMutation, useGetExternalMappingQuery, useGetCredentialsListQuery, useCreateExternalMappingMutation, useDeleteExternalMappingMutation, useGetMemsearchConfigQuery, useUpdateMemsearchConfigMutation, useGetStripeConnectStatusQuery, useStartStripeConnectOnboardingMutation, useLazyGetStripeConnectDashboardQuery, useGetAiSearchMentorsQuery, useListPaywallsQuery, useListPricesQuery, useCreatePriceMutation, useUpdatePriceMutation, useDeletePriceMutation, useGetPaywallConfigQuery, useEnablePaywallMutation, useUpdatePaywallMutation, useGetNotificationsCountQuery, useLazyGetNotificationsQuery, useMarkAllAsReadMutation, useCreateNotificationPreviewMutation, useSendNotificationMutation, useGetMentorsQuery, useUpdateTemplateMutation, useGetTemplateDetailsQuery, useGetTemplatesQuery, useLazyGetTemplateDetailsQuery, useToggleTemplateMutation, useGetTopicsStatsQuery, useGetUsersStatsQuery, useGetSessionStatsQuery, useGetTopicsDetailsStatsQuery, useGetAccessTimeHeatmapQuery, useGetUserDetailsStatsQuery, useGetTranscriptsConversationHeadlineQuery, useGetAverageRatingQuery, useGetFinancialStatsQuery, useGetDetailedFinancialStatsQuery, useGetTranscriptsMessagesDetailsQuery, useGetTranscriptsMessagesQuery, useGetReportDetailQuery, useLazyGetDownloadReportFromURLQuery, useGetMentorPublicSettingsQuery, useGetReportsQuery, useCreateReportMutation, useGetContentAnalyticsQuery, useGetContentAnalyticsDetailsQuery, useGetRevenueQuery, useListSubscribersQuery, useGetAuditLogsQuery, useGetMentorMemoriesListQuery, useGetMentorMemoriesQuery, useGetMemoryCategoriesAdminQuery, useLazyGetCourseMetaDataQuery, useLazyGetCourseCompletionOutlinesQuery, useLazyGetCourseEligibilityQuery, useLazyGetUserEnrolledCoursesQuery, useLazyGetUserAssignedCoursesQuery, useLazyGetUserCredentialsQuery, useLazyGetOverTimeActivityQuery, useLazyGetCatalogSearchQuery, useCreateOrUpdateUserReportedSkillMutation, useCreateOrUpdateUserDesiredSkillMutation, useLazyGetPathwayListQuery, useLazyGetUserAssignedPathwaysQuery, useLazyGetUserEnrolledPathwaysQuery, useLazyGetPathwayCompletionQuery, useLazyGetProgramListQuery, useLazyGetProgramCompletionQuery, useLazyGetUserEnrolledProgramsQuery, useLazyGetAssignedProgramsQuery, useLazyGetUserSkillsPointsQuery, useLazyGetUserReportedSkillsQuery, useLazyGetUserDesiredSkillsQuery, useLazyGetUserCatalogPathwaysQuery, useLazyGetPerLearnerInfoQuery, useLazyGetEdxSSOTokenQuery, useCreateCourseEnrollmentMutation, useCreateStripeCheckoutSessionMutation, useLazyGetCourseProgressQuery, useLazyGetCourseCompletionQuery, useLazyGetPersonnalizedSearchQuery, useUpdateExamAttemptMutation, useStartExamMutation, useLazyGetExamInfoQuery, useGetClawMentorConfigQuery, useGetClawInstancesQuery, useGetAgentConfigQuery, useUpdateClawMentorConfigMutation, useCreateClawMentorConfigMutation, useDeleteClawMentorConfigMutation, usePushClawConfigMutation, useCreateClawInstanceMutation, useDeleteClawInstanceMutation, useUpdateAgentConfigMutation, useHealthCheckClawInstanceMutation, useTestConnectivityClawInstanceMutation, useUpdateClawInstanceMutation, useGetAgentSkillResourcesQuery, useCreateAgentSkillResourceMutation, useUpdateAgentSkillResourceMutation, useUploadAgentSkillResourceAssetMutation, useDeleteAgentSkillResourceMutation, useGetAgentSkillsQuery, useGetMentorSkillAssignmentsQuery, useCreateMentorSkillAssignmentMutation, useUpdateMentorSkillAssignmentMutation, useDeleteMentorSkillAssignmentMutation, useCreateAgentSkillMutation, useUpdateAgentSkillMutation, useDeleteAgentSkillMutation, resolveEffectiveAgentSkills, filterSlashSkills, useCreateCheckoutMutation, useGetUserProjectsQuery, useUpdateUserProjectMutation, useGetTrainingDocumentsQuery, useGetVectorDocumentsQuery, useDeleteMentorMemoryMutation, useUpdateMentorMemoryMutation, useCreateMentorMemoryMutation, useLazyGetConnectedServiceAuthUrlQuery, useCreateUserProjectMutation, useDeleteUserProjectMutation, useGetUserProjectDetailsQuery, useEditTrainingDocumentMutation, useAddTrainingDocumentMutation, useLazyGetCredentialsQuery, useGetMentorSettingsQuery, useEditMentorMutation, useGetMentorCategoriesQuery, useCreateMentorMutation, useUpdateUserPlatformMetadataMutation, useGetApplicationStatusQuery, useListOwnApplicationsQuery, useGetApplicationFormQuery, useWithdrawApplicationMutation, useRenewApplicationMutation, useCreateApplicationDraftMutation, useSubmitApplicationMutation, useUpdateApplicationMutation, useUploadApplicationAttachmentMutation, useDeleteApplicationAttachmentMutation, useGetPromptCategoriesQuery, useCreatePromptMutation, useDeletePromptMutation, useGetPromptsSearchQuery, useUpdatePromptMutation, useDeleteTrainingDocumentMutation, useGetTrainingDocumentRetrainScheduleQuery, useCreateTrainingDocumentRetrainScheduleMutation } from '@iblai/data-layer';
|
|
6
|
+
import { useCreateSessionIdMutation, useTimeTrackingMutation, useGetUserMetadataQuery, useGetUserMetadataEdxQuery, useUpdateUserMetadataMutation, useUpdateUserMetadataEdxMutation, useUploadProfileImageMutation, useResetPasswordMutation, useSelfRetireMutation, useCreateUserInstitutionMutation, useGetUserInstitutionsQuery, useCreateUserEducationMutation, useUpdateUserEducationMutation, useDeleteUserEducationMutation, useGetUserEducationQuery, useCreateUserCompanyMutation, useGetUserCompaniesQuery, useCreateUserExperienceMutation, useUpdateUserExperienceMutation, useDeleteUserExperienceMutation, useGetUserExperienceQuery, useGetUserResumeQuery, useCreateUserResumeMutation, useGetMySubscriptionsQuery, useGetItemSubscriptionQuery, useCancelSubscriptionMutation, useGetLearnerDetailsQuery, useGetUserEnrolledCoursesQuery, useGetUserEnrolledProgramsQuery, useGetUserCatalogPathwaysQuery, useGetUsersAsAssertionsQuery, useGetUserEarnedSkillsQuery, useGetUserReportedSkillsQuery, useGetUserDesiredSkillsQuery, useCreateGlobalMemoryMutation, useGetMemsearchStatusQuery, useGetUserMemorySettingsQuery, useUpdateUserMemorySettingsMutation, useGetGlobalMemoriesQuery, useGetAllMentorMemoriesQuery, useDeleteGlobalMemoryMutation, useInviteUserMutation, usePlatformInvitationsQuery, useCreateCatalogInvitationCourseBulkMutation, useGetCatalogInvitationsCourseQuery, useLazyPlatformUsersQuery, useLazyPlatformUserGroupsQuery, useGetPersonnalizedSearchQuery, useCreateCatalogInvitationProgramBulkMutation, useGetCatalogInvitationsProgramQuery, useUpdateUserRoleMutation, useUpdateUserStatusMutation, useUpdatePlatformUserRoleWithPoliciesMutation, usePlatformUsersQuery, useGetAccessibleUsersQuery, isPoliciesResponse, platformApiSlice, featureTags, useLazyGetRbacTeamsAccessListQuery, useCreateRbacTeamsAccessMutation, useGetRbacGroupsQuery, usePlatformUserGroupsQuery, useCreateRbacGroupMutation, useUpdateRbacGroupMutation, useDeleteRbacGroupMutation, useCreatePlatformUserGroupMutation, useUpdatePlatformUserGroupMutation, useDeletePlatformUserGroupMutation, useGetRbacGroupDetailsQuery, useGetPlatformUserGroupDetailsQuery, useGetRbacPermissionsMutation, useGetRbacRolesQuery, useCreateRbacRoleMutation, useUpdateRbacRoleMutation, useDeleteRbacRoleMutation, useGetRbacRoleDetailsQuery, useGetRbacActionsDefinitionQuery, useGetRbacResourceDiscoveryQuery, useGetRbacResourceListQuery, useGetRbacPoliciesQuery, useCreateRbacPolicyMutation, useUpdateRbacPolicyMutation, useDeleteRbacPolicyMutation, useGetRbacPolicyDetailsQuery, useGetWatchedGroupsQuery, useCreateWatchedGroupMutation, useUpdateWatchedGroupMutation, useDeleteWatchedGroupMutation, useAddWatchedUserMutation, useRemoveWatchedUserMutation, useAddWatcherMutation, useUpdateWatcherMutation, useDeleteWatcherMutation, useGetWatchedUsersQuery, useGetWatchersQuery, WATCHER_NOTIFICATION_EVENTS, WATCHER_NOTIFICATION_EVENT_LABELS, useGetApplicationFormsQuery, useGetApplicationFormDetailQuery, useCreateApplicationFormMutation, useUpdateApplicationFormMutation, useGetApplicationAdminDetailQuery, useInviteApplicationCandidateMutation, useLazyGetApplicationAttachmentFileQuery, useCreateApplicationWaiverMutation, useDeleteApplicationWaiverMutation, useSubmitApplicationOverrideMutation, useUpdateApplicationPlacementMutation, useDeleteApplicationCourseAssignmentMutation, useCreateApplicationNoteMutation, useUpdateApplicationNoteMutation, useDeleteApplicationNoteMutation, useTransitionApplicationMutation, useLinkApplicationCandidateMutation, useCreateApplicationPlacementsMutation, useGetCustomMentorsQuery, useCreateApplicationCourseAssignmentsMutation, useGetApplicationBlocksQuery, useDeleteApplicationBlockMutation, useGetApplicationsPipelineStatsQuery, useGetApplicationsPipelineQuery, useDeleteApiKeyMutation, useGetApiKeyQuery, useGetApiKeyFieldPermissionsQuery, useUpdateApiKeyMutation, useGetApiKeysQuery, unwrapApiTokenList, useCreateApiKeyMutation, useCreateLLMCredentialMutation, useGetCredentialsSchemaQuery, useGetMaskedLLMCredentialsQuery, useGetLlmsQuery, useDeleteIntegrationCredentialMutation, useDeleteCredentialMutation, useCreateIntegrationCredentialMutation, useGetIntegrationCredentialsSchemaQuery, useGetMaskedIntegrationCredentialsQuery, useGetAccountBillingInfoQuery, useUpdateAutoRechargeInfoMutation, useTriggerAutoRechargeMutation, useCreateStripeCustomerPortalMutation, useSetPlatformConfigurationsMutation, useGetPlatformConfigurationsQuery, useUpdatePlatformMembershipMutation, useGetPlatformMembershipQuery, useGetCustomDomainsQuery, useCreateCustomDomainMutation, useDeleteCustomDomainMutation, useGetStudentMentorCreationStatusQuery, useSetStudentMentorCreationStatusMutation, coreApiSlice, recommendationPromptTypeEnum, useGetRecommendedPromptsListQuery, useCreateRecommendedPromptMutation, useUpdateRecommendedPromptMutation, useDeleteRecommendedPromptMutation, useLazyGetPublicPlatformImageAssetFileUrlQuery, useUpdateTenantMetadataMutation, useCreatePlatformImageAssetMutation, useGetProviderConfigQuery, useCreateProviderConfigMutation, useDeleteProviderConfigMutation, useGetExternalMappingQuery, useGetCredentialsListQuery, useCreateExternalMappingMutation, useDeleteExternalMappingMutation, useGetMemsearchConfigQuery, useUpdateMemsearchConfigMutation, useGetStripeConnectStatusQuery, useStartStripeConnectOnboardingMutation, useLazyGetStripeConnectDashboardQuery, useGetAiSearchMentorsQuery, useListPaywallsQuery, useListPricesQuery, useCreatePriceMutation, useUpdatePriceMutation, useDeletePriceMutation, useGetPaywallConfigQuery, useEnablePaywallMutation, useUpdatePaywallMutation, useGetNotificationsCountQuery, useLazyGetNotificationsQuery, useMarkAllAsReadMutation, useCreateNotificationPreviewMutation, useSendNotificationMutation, useGetMentorsQuery, useUpdateTemplateMutation, useGetTemplateDetailsQuery, useGetTemplatesQuery, useLazyGetTemplateDetailsQuery, useToggleTemplateMutation, useGetTopicsStatsQuery, useGetUsersStatsQuery, useGetSessionStatsQuery, useGetTopicsDetailsStatsQuery, useGetAccessTimeHeatmapQuery, useGetUserDetailsStatsQuery, useGetTranscriptsConversationHeadlineQuery, useGetAverageRatingQuery, useGetFinancialStatsQuery, useGetDetailedFinancialStatsQuery, useGetTranscriptsMessagesDetailsQuery, useGetTranscriptsMessagesQuery, useGetReportDetailQuery, useLazyGetDownloadReportFromURLQuery, useGetMentorPublicSettingsQuery, useGetReportsQuery, useCreateReportMutation, useGetContentAnalyticsQuery, useGetContentAnalyticsDetailsQuery, useGetRevenueQuery, useListSubscribersQuery, useGetAuditLogsQuery, useGetMentorMemoriesListQuery, useGetMentorMemoriesQuery, useGetMemoryCategoriesAdminQuery, useLazyGetCourseMetaDataQuery, useLazyGetCourseCompletionOutlinesQuery, useLazyGetCourseEligibilityQuery, useLazyGetUserEnrolledCoursesQuery, useLazyGetUserAssignedCoursesQuery, useLazyGetUserCredentialsQuery, useLazyGetOverTimeActivityQuery, useLazyGetCatalogSearchQuery, useCreateOrUpdateUserReportedSkillMutation, useCreateOrUpdateUserDesiredSkillMutation, useLazyGetPathwayListQuery, useLazyGetUserAssignedPathwaysQuery, useLazyGetUserEnrolledPathwaysQuery, useLazyGetPathwayCompletionQuery, useLazyGetProgramListQuery, useLazyGetProgramCompletionQuery, useLazyGetUserEnrolledProgramsQuery, useLazyGetAssignedProgramsQuery, useLazyGetUserSkillsPointsQuery, useLazyGetUserReportedSkillsQuery, useLazyGetUserDesiredSkillsQuery, useLazyGetUserCatalogPathwaysQuery, useLazyGetPerLearnerInfoQuery, useLazyGetEdxSSOTokenQuery, useCreateCourseEnrollmentMutation, useCreateStripeCheckoutSessionMutation, useLazyGetCourseProgressQuery, useLazyGetCourseCompletionQuery, useLazyGetPersonnalizedSearchQuery, useUpdateExamAttemptMutation, useStartExamMutation, useLazyGetExamInfoQuery, useGetClawMentorConfigQuery, useGetClawInstancesQuery, useGetAgentConfigQuery, useUpdateClawMentorConfigMutation, useCreateClawMentorConfigMutation, useDeleteClawMentorConfigMutation, usePushClawConfigMutation, useCreateClawInstanceMutation, useDeleteClawInstanceMutation, useUpdateAgentConfigMutation, useHealthCheckClawInstanceMutation, useTestConnectivityClawInstanceMutation, useUpdateClawInstanceMutation, useGetAgentSkillResourcesQuery, useCreateAgentSkillResourceMutation, useUpdateAgentSkillResourceMutation, useUploadAgentSkillResourceAssetMutation, useDeleteAgentSkillResourceMutation, useGetAgentSkillsQuery, useGetMentorSkillAssignmentsQuery, useCreateMentorSkillAssignmentMutation, useUpdateMentorSkillAssignmentMutation, useDeleteMentorSkillAssignmentMutation, useCreateAgentSkillMutation, useUpdateAgentSkillMutation, useDeleteAgentSkillMutation, resolveEffectiveAgentSkills, filterSlashSkills, useGetMentorSkillAssignmentsInfiniteQuery, MENTOR_SKILL_ASSIGNMENTS_PAGE_SIZE, useCreateCheckoutMutation, useGetUserProjectsQuery, useUpdateUserProjectMutation, useGetTrainingDocumentsQuery, useGetVectorDocumentsQuery, useDeleteMentorMemoryMutation, useUpdateMentorMemoryMutation, useCreateMentorMemoryMutation, useLazyGetConnectedServiceAuthUrlQuery, useCreateUserProjectMutation, useDeleteUserProjectMutation, useGetUserProjectDetailsQuery, useEditTrainingDocumentMutation, useAddTrainingDocumentMutation, useLazyGetCredentialsQuery, useGetMentorSettingsQuery, useEditMentorMutation, useGetMentorCategoriesQuery, useCreateMentorMutation, useUpdateUserPlatformMetadataMutation, useGetApplicationStatusQuery, useListOwnApplicationsQuery, useGetApplicationFormQuery, useWithdrawApplicationMutation, useRenewApplicationMutation, useCreateApplicationDraftMutation, useSubmitApplicationMutation, useUpdateApplicationMutation, useUploadApplicationAttachmentMutation, useDeleteApplicationAttachmentMutation, useGetPromptCategoriesQuery, useCreatePromptMutation, useDeletePromptMutation, useGetPromptsSearchQuery, useUpdatePromptMutation, useDeleteTrainingDocumentMutation, useGetTrainingDocumentRetrainScheduleQuery, useCreateTrainingDocumentRetrainScheduleMutation } from '@iblai/data-layer';
|
|
7
7
|
import { toast } from 'sonner';
|
|
8
8
|
import { jsx, Fragment as Fragment$1, jsxs } from 'react/jsx-runtime';
|
|
9
9
|
import * as ReactDOM from 'react-dom';
|
|
@@ -60597,7 +60597,6 @@ var analyticsAnalyticsAuditLogStats$3 = {
|
|
|
60597
60597
|
};
|
|
60598
60598
|
var analyticsAnalyticsCourseDetail$3 = {
|
|
60599
60599
|
goBackAriaLabel: "Go back to courses list",
|
|
60600
|
-
backToCourses: "Back to Courses",
|
|
60601
60600
|
activeEnrollments: "Active Enrollments",
|
|
60602
60601
|
completedEnrollments: "Completed Enrollments",
|
|
60603
60602
|
timeSpent: "Time Spent",
|
|
@@ -60760,7 +60759,6 @@ var analyticsAnalyticsOverview$3 = {
|
|
|
60760
60759
|
};
|
|
60761
60760
|
var analyticsAnalyticsProgramDetail$3 = {
|
|
60762
60761
|
backAriaLabel: "Go back to programs list",
|
|
60763
|
-
backButton: "Back to Programs",
|
|
60764
60762
|
statActiveUsers: "Active Users",
|
|
60765
60763
|
statEnrollments: "Enrollments",
|
|
60766
60764
|
statTimeSpent: "Time Spent",
|
|
@@ -61591,20 +61589,18 @@ var clawSandboxAgentSkills$3 = {
|
|
|
61591
61589
|
fieldDescriptionPlaceholder: "e.g. Search the web for information",
|
|
61592
61590
|
fieldInstruction: "Instruction",
|
|
61593
61591
|
sessionNote: "Skills added or removed here apply to new chat sessions only. Edits to a skill's instructions apply immediately, including in conversations already in progress.",
|
|
61594
|
-
|
|
61595
|
-
catalogHeading: "Available skills",
|
|
61596
|
-
noEffectiveSkills: "No skills enabled for this agent yet. Add one from the available skills below.",
|
|
61592
|
+
noEffectiveSkills: "No skills enabled for this agent yet. Add one from the Available Skills tab.",
|
|
61597
61593
|
addToAgent: "Add",
|
|
61598
61594
|
addToAgentLabel: "Add {name} to this agent",
|
|
61599
|
-
removeFromAgent: "Remove from
|
|
61595
|
+
removeFromAgent: "Remove from Agent",
|
|
61600
61596
|
skillAdded: "{name} added",
|
|
61601
61597
|
skillRemoved: "{name} removed",
|
|
61602
61598
|
featuredBadge: "Featured",
|
|
61603
61599
|
nativeBadge: "Native",
|
|
61604
|
-
privateBadge: "Only
|
|
61600
|
+
privateBadge: "Only This Agent",
|
|
61605
61601
|
fieldCategory: "Category",
|
|
61606
61602
|
fieldCategoryPlaceholder: "e.g. web, code, data",
|
|
61607
|
-
privateToAgent: "Only
|
|
61603
|
+
privateToAgent: "Only This Agent",
|
|
61608
61604
|
privateToAgentHint: "Private skills are available to this agent only and take precedence over platform skills with the same slug.",
|
|
61609
61605
|
instructionHint: "The playbook the agent follows when the skill is used. Edits apply immediately, including in conversations already in progress.",
|
|
61610
61606
|
filesHint: "Optional resources the agent can use with this skill. References and scripts are text files; assets are uploaded files.",
|
|
@@ -61615,11 +61611,11 @@ var clawSandboxAgentSkills$3 = {
|
|
|
61615
61611
|
fileTypeReference: "Reference",
|
|
61616
61612
|
fileTypeScript: "Script",
|
|
61617
61613
|
fileTypeAsset: "Asset",
|
|
61618
|
-
fileNameLabel: "File
|
|
61614
|
+
fileNameLabel: "File Name",
|
|
61619
61615
|
fileNamePlaceholder: "e.g. rubric.md",
|
|
61620
61616
|
fileContentLabel: "Content",
|
|
61621
61617
|
fileContentPlaceholder: "The file's text content",
|
|
61622
|
-
addFileButton: "Add
|
|
61618
|
+
addFileButton: "Add Resource",
|
|
61623
61619
|
adding: "Adding...",
|
|
61624
61620
|
uploading: "Uploading...",
|
|
61625
61621
|
fileAdded: "Resource added",
|
|
@@ -61636,10 +61632,13 @@ var clawSandboxAgentSkills$3 = {
|
|
|
61636
61632
|
editFileDialogTitle: "Edit Resource",
|
|
61637
61633
|
deleteFileDialogTitle: "Delete Resource",
|
|
61638
61634
|
deleteFileConfirmation: "Are you sure you want to delete {name}? This action cannot be undone.",
|
|
61639
|
-
chooseFile: "Choose
|
|
61635
|
+
chooseFile: "Choose File",
|
|
61640
61636
|
upload: "Upload",
|
|
61641
61637
|
download: "Download",
|
|
61642
|
-
|
|
61638
|
+
tabsAriaLabel: "Skills",
|
|
61639
|
+
tabAgentSkills: "Agent Skills",
|
|
61640
|
+
tabAvailableSkills: "Available Skills",
|
|
61641
|
+
addedBadge: "Added"
|
|
61643
61642
|
};
|
|
61644
61643
|
var clawSandboxHelpers$3 = {
|
|
61645
61644
|
unknown: "Unknown",
|
|
@@ -65550,7 +65549,7 @@ var platformNavbar$3 = {
|
|
|
65550
65549
|
placementExamFallback: "Placement exam"
|
|
65551
65550
|
};
|
|
65552
65551
|
var slashSkillPicker$3 = {
|
|
65553
|
-
listLabel: "Agent
|
|
65552
|
+
listLabel: "Agent Skills",
|
|
65554
65553
|
resultsAnnouncement: "{count} skills available. Use arrow keys to browse and Enter to select.",
|
|
65555
65554
|
loading: "Loading..."
|
|
65556
65555
|
};
|
|
@@ -66917,7 +66916,6 @@ var analyticsAnalyticsAuditLogStats$2 = {
|
|
|
66917
66916
|
};
|
|
66918
66917
|
var analyticsAnalyticsCourseDetail$2 = {
|
|
66919
66918
|
goBackAriaLabel: "Retour à la liste des cours",
|
|
66920
|
-
backToCourses: "Retour aux cours",
|
|
66921
66919
|
activeEnrollments: "Inscriptions actives",
|
|
66922
66920
|
completedEnrollments: "Inscriptions terminées",
|
|
66923
66921
|
timeSpent: "Temps passé",
|
|
@@ -67080,7 +67078,6 @@ var analyticsAnalyticsOverview$2 = {
|
|
|
67080
67078
|
};
|
|
67081
67079
|
var analyticsAnalyticsProgramDetail$2 = {
|
|
67082
67080
|
backAriaLabel: "Retour à la liste des programmes",
|
|
67083
|
-
backButton: "Retour aux programmes",
|
|
67084
67081
|
statActiveUsers: "Utilisateurs actifs",
|
|
67085
67082
|
statEnrollments: "Inscriptions",
|
|
67086
67083
|
statTimeSpent: "Temps passé",
|
|
@@ -68077,9 +68074,7 @@ var clawSandboxAgentSkills$2 = {
|
|
|
68077
68074
|
fieldDescriptionPlaceholder: "ex. Rechercher des informations sur le web",
|
|
68078
68075
|
fieldInstruction: "Instruction",
|
|
68079
68076
|
sessionNote: "Les compétences ajoutées ou supprimées ici ne s'appliquent qu'aux nouvelles sessions de chat. Les modifications des instructions d'une compétence s'appliquent immédiatement, y compris dans les conversations en cours.",
|
|
68080
|
-
|
|
68081
|
-
catalogHeading: "Compétences disponibles",
|
|
68082
|
-
noEffectiveSkills: "Cet agent n'a pas encore de compétences activées. Ajoutez-en une depuis les compétences disponibles.",
|
|
68077
|
+
noEffectiveSkills: "Cet agent n'a pas encore de compétences activées. Ajoutez-en une depuis l'onglet Compétences disponibles.",
|
|
68083
68078
|
addToAgent: "Ajouter",
|
|
68084
68079
|
addToAgentLabel: "Ajouter {name} à cet agent",
|
|
68085
68080
|
removeFromAgent: "Retirer de l'agent",
|
|
@@ -68125,7 +68120,10 @@ var clawSandboxAgentSkills$2 = {
|
|
|
68125
68120
|
chooseFile: "Choisir un fichier",
|
|
68126
68121
|
upload: "Téléverser",
|
|
68127
68122
|
download: "Télécharger",
|
|
68128
|
-
|
|
68123
|
+
tabsAriaLabel: "Compétences",
|
|
68124
|
+
tabAgentSkills: "Compétences de l'agent",
|
|
68125
|
+
tabAvailableSkills: "Compétences disponibles",
|
|
68126
|
+
addedBadge: "Ajoutée"
|
|
68129
68127
|
};
|
|
68130
68128
|
var clawSandboxHelpers$2 = {
|
|
68131
68129
|
unknown: "Inconnu",
|
|
@@ -73237,7 +73235,6 @@ var analyticsAnalyticsAuditLogStats$1 = {
|
|
|
73237
73235
|
};
|
|
73238
73236
|
var analyticsAnalyticsCourseDetail$1 = {
|
|
73239
73237
|
goBackAriaLabel: "Volver a la lista de cursos",
|
|
73240
|
-
backToCourses: "Volver a los cursos",
|
|
73241
73238
|
activeEnrollments: "Inscripciones activas",
|
|
73242
73239
|
completedEnrollments: "Inscripciones completadas",
|
|
73243
73240
|
timeSpent: "Tiempo invertido",
|
|
@@ -73400,7 +73397,6 @@ var analyticsAnalyticsOverview$1 = {
|
|
|
73400
73397
|
};
|
|
73401
73398
|
var analyticsAnalyticsProgramDetail$1 = {
|
|
73402
73399
|
backAriaLabel: "Volver a la lista de programas",
|
|
73403
|
-
backButton: "Volver a programas",
|
|
73404
73400
|
statActiveUsers: "Usuarios activos",
|
|
73405
73401
|
statEnrollments: "Inscripciones",
|
|
73406
73402
|
statTimeSpent: "Tiempo empleado",
|
|
@@ -74397,9 +74393,7 @@ var clawSandboxAgentSkills$1 = {
|
|
|
74397
74393
|
fieldDescriptionPlaceholder: "ej. Buscar información en la web",
|
|
74398
74394
|
fieldInstruction: "Instrucción",
|
|
74399
74395
|
sessionNote: "Las habilidades añadidas o eliminadas aquí solo se aplican a las nuevas sesiones de chat. Los cambios en las instrucciones de una habilidad se aplican de inmediato, incluso en conversaciones en curso.",
|
|
74400
|
-
|
|
74401
|
-
catalogHeading: "Habilidades disponibles",
|
|
74402
|
-
noEffectiveSkills: "Este agente aún no tiene habilidades habilitadas. Añade una desde las habilidades disponibles.",
|
|
74396
|
+
noEffectiveSkills: "Este agente aún no tiene habilidades habilitadas. Añade una desde la pestaña Habilidades disponibles.",
|
|
74403
74397
|
addToAgent: "Añadir",
|
|
74404
74398
|
addToAgentLabel: "Añadir {name} a este agente",
|
|
74405
74399
|
removeFromAgent: "Quitar del agente",
|
|
@@ -74445,7 +74439,10 @@ var clawSandboxAgentSkills$1 = {
|
|
|
74445
74439
|
chooseFile: "Elegir archivo",
|
|
74446
74440
|
upload: "Subir",
|
|
74447
74441
|
download: "Descargar",
|
|
74448
|
-
|
|
74442
|
+
tabsAriaLabel: "Habilidades",
|
|
74443
|
+
tabAgentSkills: "Habilidades del agente",
|
|
74444
|
+
tabAvailableSkills: "Habilidades disponibles",
|
|
74445
|
+
addedBadge: "Añadida"
|
|
74449
74446
|
};
|
|
74450
74447
|
var clawSandboxHelpers$1 = {
|
|
74451
74448
|
unknown: "Desconocido",
|
|
@@ -79557,7 +79554,6 @@ var analyticsAnalyticsAuditLogStats = {
|
|
|
79557
79554
|
};
|
|
79558
79555
|
var analyticsAnalyticsCourseDetail = {
|
|
79559
79556
|
goBackAriaLabel: "返回课程列表",
|
|
79560
|
-
backToCourses: "返回课程",
|
|
79561
79557
|
activeEnrollments: "活跃注册",
|
|
79562
79558
|
completedEnrollments: "已完成注册",
|
|
79563
79559
|
timeSpent: "学习时长",
|
|
@@ -79720,7 +79716,6 @@ var analyticsAnalyticsOverview = {
|
|
|
79720
79716
|
};
|
|
79721
79717
|
var analyticsAnalyticsProgramDetail = {
|
|
79722
79718
|
backAriaLabel: "返回项目列表",
|
|
79723
|
-
backButton: "返回项目",
|
|
79724
79719
|
statActiveUsers: "活跃用户",
|
|
79725
79720
|
statEnrollments: "注册人数",
|
|
79726
79721
|
statTimeSpent: "花费时间",
|
|
@@ -80717,9 +80712,7 @@ var clawSandboxAgentSkills = {
|
|
|
80717
80712
|
fieldDescriptionPlaceholder: "例如:在网络上搜索信息",
|
|
80718
80713
|
fieldInstruction: "指令",
|
|
80719
80714
|
sessionNote: "在此添加或移除的技能仅对新的聊天会话生效。技能指令的修改会立即生效,包括正在进行的对话。",
|
|
80720
|
-
|
|
80721
|
-
catalogHeading: "可用技能",
|
|
80722
|
-
noEffectiveSkills: "此智能体尚未启用任何技能。请从下方的可用技能中添加。",
|
|
80715
|
+
noEffectiveSkills: "此智能体尚未启用任何技能。请从“可用技能”标签页添加。",
|
|
80723
80716
|
addToAgent: "添加",
|
|
80724
80717
|
addToAgentLabel: "将 {name} 添加到此智能体",
|
|
80725
80718
|
removeFromAgent: "从智能体中移除",
|
|
@@ -80765,7 +80758,10 @@ var clawSandboxAgentSkills = {
|
|
|
80765
80758
|
chooseFile: "选择文件",
|
|
80766
80759
|
upload: "上传",
|
|
80767
80760
|
download: "下载",
|
|
80768
|
-
|
|
80761
|
+
tabsAriaLabel: "技能",
|
|
80762
|
+
tabAgentSkills: "智能体技能",
|
|
80763
|
+
tabAvailableSkills: "可用技能",
|
|
80764
|
+
addedBadge: "已添加"
|
|
80769
80765
|
};
|
|
80770
80766
|
var clawSandboxHelpers = {
|
|
80771
80767
|
unknown: "未知",
|
|
@@ -114561,7 +114557,7 @@ function SubscriptionDetail({ subscription: initialSubscription, platformKey, on
|
|
|
114561
114557
|
}
|
|
114562
114558
|
return (jsxs("div", { className: "space-y-4", children: [jsxs("div", { className: "flex items-center gap-3", children: [jsxs(Button$1, { variant: "ghost", size: "sm", onClick: onBack, className: "cursor-pointer", children: [jsx(ChevronLeft, { className: "h-4 w-4 mr-1" }), t('purchasesPurchasesTab.back')] }), jsxs("div", { children: [jsx("h4", { className: "text-base font-semibold text-gray-900 dark:text-gray-100", children: subscription.item_name || subscription.item_id }), jsx("span", { className: "text-xs text-gray-400 capitalize", children: subscription.item_type })] })] }), jsx(Card, { className: "shadow-sm border", style: { borderColor: 'oklch(.922 0 0)' }, children: jsxs(CardContent, { className: "p-6 space-y-5", children: [jsxs("div", { className: "flex items-center justify-between", children: [jsx("span", { className: "text-sm font-medium text-gray-700 dark:text-gray-300", children: t('purchasesPurchasesTab.labelStatus') }), jsx(Badge, { className: statusBadgeStyle$1(subscription.status), children: subscription.status })] }), jsxs("div", { className: "flex items-center justify-between border-t pt-3", children: [jsx("span", { className: "text-sm font-medium text-gray-700 dark:text-gray-300", children: t('purchasesPurchasesTab.labelPlan') }), jsxs("div", { className: "text-right", children: [jsx("span", { className: "text-sm font-semibold text-gray-900 dark:text-gray-100", children: (_b = subscription.price) === null || _b === void 0 ? void 0 : _b.name }), jsxs("span", { className: "text-sm text-gray-500 ml-2", children: [formatCurrency((_c = subscription.price) === null || _c === void 0 ? void 0 : _c.amount, (_d = subscription.price) === null || _d === void 0 ? void 0 : _d.currency), formatInterval((_e = subscription.price) === null || _e === void 0 ? void 0 : _e.interval)] })] })] }), jsxs("div", { className: "flex items-center justify-between border-t pt-3", children: [jsx("span", { className: "text-sm font-medium text-gray-700 dark:text-gray-300", children: t('purchasesPurchasesTab.labelType') }), jsx(Badge, { variant: "secondary", className: "capitalize", children: subscription.item_type })] }), subscription.current_period_end && (jsxs("div", { className: "flex items-center justify-between border-t pt-3", children: [jsx("span", { className: "text-sm font-medium text-gray-700 dark:text-gray-300", children: subscription.cancel_at_period_end
|
|
114563
114559
|
? t('purchasesPurchasesTab.labelAccessUntil')
|
|
114564
|
-
: t('purchasesPurchasesTab.labelRenewsOn') }), jsxs("span", { className: "text-sm text-gray-600 dark:text-gray-400 flex items-center gap-1.5", children: [jsx(Calendar$1, { className: "h-3.5 w-3.5" }), new Date(subscription.current_period_end).toLocaleDateString()] })] })), subscription.created_at && (jsxs("div", { className: "flex items-center justify-between border-t pt-3", children: [jsx("span", { className: "text-sm font-medium text-gray-700 dark:text-gray-300", children: t('purchasesPurchasesTab.labelSubscribedSince') }), jsxs("span", { className: "text-sm text-gray-600 dark:text-gray-400 flex items-center gap-1.5", children: [jsx(Clock, { className: "h-3.5 w-3.5" }), new Date(subscription.created_at).toLocaleDateString()] })] })), subscription.is_grandfathered && (jsxs("div", { className: "flex items-center justify-between border-t pt-3", children: [jsx("span", { className: "text-sm font-medium text-gray-700 dark:text-gray-300", children: t('purchasesPurchasesTab.labelLegacyAccess') }), jsxs(Badge, { className: "bg-amber-100 text-amber-700 border-amber-200 text-xs", children: [jsx(Shield, { className: "h-3 w-3 mr-1" }), t('purchasesPurchasesTab.badgeGrandfathered')] })] })), subscription.cancel_at_period_end && (jsxs("div", { className: "flex items-center gap-2 border-t pt-3 text-yellow-600", children: [jsx(TriangleAlert, { className: "h-4 w-4 flex-shrink-0" }), jsx("span", { className: "text-sm", children: t('purchasesPurchasesTab.warningWillNotRenew') })] }))] }) }), canCancel && !cancelResult && (jsx(Card, { className: "shadow-sm border border-blue-100", style: { borderColor: 'oklch(.922 0 0)' }, children: jsxs(CardContent, { className: "p-5 space-y-3", children: [jsx("h4", { className: "text-sm font-medium text-gray-700 dark:text-gray-300", children: t('purchasesPurchasesTab.cancelSectionHeading') }), jsx("p", { className: "text-xs text-gray-500", children: t('purchasesPurchasesTab.cancelSectionDescription') }), jsxs("div", { className: "flex gap-2 items-end", children: [jsxs("div", { className: "flex-1", children: [jsxs("label", { className: "text-xs text-gray-500 mb-1 block", children: [t('purchasesPurchasesTab.cancelConfirmLabelPrefix'), ' ', jsx("span", { className: "font-mono font-bold", children: "cancel" }), ' ', t('purchasesPurchasesTab.cancelConfirmLabelSuffix')] }), jsx(Input, { value: confirmText, onChange: (e) => setConfirmText(e.target.value), placeholder: t('purchasesPurchasesTab.cancelConfirmPlaceholder') })] }), jsxs(Button$1, { onClick: handleCancel, disabled: confirmText !== 'cancel' || isCanceling, className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] hover:opacity-90 text-white cursor-pointer", children: [isCanceling ? (jsx(LoaderCircle, { className: "h-4 w-4 mr-2 animate-spin" })) : (jsx(CircleX, { className: "h-4 w-4 mr-2" })), t('purchasesPurchasesTab.cancelButton')] })] })] }) })), (cancelResult === null || cancelResult === void 0 ? void 0 : cancelResult.canceled) && (jsx(Card, { className: "shadow-sm border border-green-200", style: { borderColor: 'oklch(.922 0 0)' }, children: jsxs(CardContent, { className: "p-5 text-center", children: [jsx(CircleX, { className: "h-8 w-8 text-gray-400 mx-auto mb-2" }), jsx("h4", { className: "text-sm font-semibold text-gray-900 dark:text-gray-100 mb-1", children: t('purchasesPurchasesTab.canceledHeading') }), jsx("p", { className: "text-xs text-gray-500", children: t('purchasesPurchasesTab.canceledDescription') }), jsx(Button$1, { variant: "outline", onClick: onBack, className: "mt-3 cursor-pointer", children:
|
|
114560
|
+
: t('purchasesPurchasesTab.labelRenewsOn') }), jsxs("span", { className: "text-sm text-gray-600 dark:text-gray-400 flex items-center gap-1.5", children: [jsx(Calendar$1, { className: "h-3.5 w-3.5" }), new Date(subscription.current_period_end).toLocaleDateString()] })] })), subscription.created_at && (jsxs("div", { className: "flex items-center justify-between border-t pt-3", children: [jsx("span", { className: "text-sm font-medium text-gray-700 dark:text-gray-300", children: t('purchasesPurchasesTab.labelSubscribedSince') }), jsxs("span", { className: "text-sm text-gray-600 dark:text-gray-400 flex items-center gap-1.5", children: [jsx(Clock, { className: "h-3.5 w-3.5" }), new Date(subscription.created_at).toLocaleDateString()] })] })), subscription.is_grandfathered && (jsxs("div", { className: "flex items-center justify-between border-t pt-3", children: [jsx("span", { className: "text-sm font-medium text-gray-700 dark:text-gray-300", children: t('purchasesPurchasesTab.labelLegacyAccess') }), jsxs(Badge, { className: "bg-amber-100 text-amber-700 border-amber-200 text-xs", children: [jsx(Shield, { className: "h-3 w-3 mr-1" }), t('purchasesPurchasesTab.badgeGrandfathered')] })] })), subscription.cancel_at_period_end && (jsxs("div", { className: "flex items-center gap-2 border-t pt-3 text-yellow-600", children: [jsx(TriangleAlert, { className: "h-4 w-4 flex-shrink-0" }), jsx("span", { className: "text-sm", children: t('purchasesPurchasesTab.warningWillNotRenew') })] }))] }) }), canCancel && !cancelResult && (jsx(Card, { className: "shadow-sm border border-blue-100", style: { borderColor: 'oklch(.922 0 0)' }, children: jsxs(CardContent, { className: "p-5 space-y-3", children: [jsx("h4", { className: "text-sm font-medium text-gray-700 dark:text-gray-300", children: t('purchasesPurchasesTab.cancelSectionHeading') }), jsx("p", { className: "text-xs text-gray-500", children: t('purchasesPurchasesTab.cancelSectionDescription') }), jsxs("div", { className: "flex gap-2 items-end", children: [jsxs("div", { className: "flex-1", children: [jsxs("label", { className: "text-xs text-gray-500 mb-1 block", children: [t('purchasesPurchasesTab.cancelConfirmLabelPrefix'), ' ', jsx("span", { className: "font-mono font-bold", children: "cancel" }), ' ', t('purchasesPurchasesTab.cancelConfirmLabelSuffix')] }), jsx(Input, { value: confirmText, onChange: (e) => setConfirmText(e.target.value), placeholder: t('purchasesPurchasesTab.cancelConfirmPlaceholder') })] }), jsxs(Button$1, { onClick: handleCancel, disabled: confirmText !== 'cancel' || isCanceling, className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] hover:opacity-90 text-white cursor-pointer", children: [isCanceling ? (jsx(LoaderCircle, { className: "h-4 w-4 mr-2 animate-spin" })) : (jsx(CircleX, { className: "h-4 w-4 mr-2" })), t('purchasesPurchasesTab.cancelButton')] })] })] }) })), (cancelResult === null || cancelResult === void 0 ? void 0 : cancelResult.canceled) && (jsx(Card, { className: "shadow-sm border border-green-200", style: { borderColor: 'oklch(.922 0 0)' }, children: jsxs(CardContent, { className: "p-5 text-center", children: [jsx(CircleX, { className: "h-8 w-8 text-gray-400 mx-auto mb-2" }), jsx("h4", { className: "text-sm font-semibold text-gray-900 dark:text-gray-100 mb-1", children: t('purchasesPurchasesTab.canceledHeading') }), jsx("p", { className: "text-xs text-gray-500", children: t('purchasesPurchasesTab.canceledDescription') }), jsx(Button$1, { variant: "outline", size: "icon", onClick: onBack, "aria-label": t('purchasesPurchasesTab.backToPurchases'), className: "mt-3 h-8 w-8 cursor-pointer rounded-full border-0 bg-gray-100 text-gray-700 hover:bg-gray-200 hover:text-gray-900 dark:bg-gray-800 dark:text-gray-200 dark:hover:bg-gray-700 dark:hover:text-white", children: jsx(ArrowLeft, { className: "h-4 w-4" }) })] }) })), (cancelResult === null || cancelResult === void 0 ? void 0 : cancelResult.portalUrl) && (jsx(Card, { className: "shadow-sm border border-blue-200", style: { borderColor: 'oklch(.922 0 0)' }, children: jsxs(CardContent, { className: "p-5 text-center", children: [jsx(ExternalLink, { className: "h-8 w-8 text-blue-400 mx-auto mb-2" }), jsx("h4", { className: "text-sm font-semibold text-gray-900 dark:text-gray-100 mb-1", children: t('purchasesPurchasesTab.stripePortalHeading') }), jsx("p", { className: "text-xs text-gray-500 mb-3", children: t('purchasesPurchasesTab.stripePortalDescription') }), jsxs(Button$1, { onClick: () => window.open(cancelResult.portalUrl, '_blank'), className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] hover:opacity-90 text-white cursor-pointer", children: [jsx(ExternalLink, { className: "h-4 w-4 mr-2" }), t('purchasesPurchasesTab.openStripePortal')] })] }) }))] }));
|
|
114565
114561
|
}
|
|
114566
114562
|
// ── Subscription Card (List Item) ──
|
|
114567
114563
|
function SubscriptionCard({ sub, onClick }) {
|
|
@@ -146684,7 +146680,7 @@ function QuestionsEditor({ platformKey, onBack, initialFormId = null, startNew =
|
|
|
146684
146680
|
}
|
|
146685
146681
|
function BackButton$1({ onBack }) {
|
|
146686
146682
|
const t = useT();
|
|
146687
|
-
return (
|
|
146683
|
+
return (jsx("button", { type: "button", onClick: onBack, "aria-label": t('profileApplicationsQuestionsEditor.backToApplications'), className: "inline-flex h-8 w-8 items-center justify-center rounded-full bg-gray-100 text-gray-700 ring-offset-background transition-colors hover:bg-gray-200 hover:text-gray-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 dark:bg-gray-800 dark:text-gray-200 dark:hover:bg-gray-700 dark:hover:text-white", children: jsx(ArrowLeft, { className: "h-4 w-4" }) }));
|
|
146688
146684
|
}
|
|
146689
146685
|
function SectionCard({ section, expanded, autoFocusTitle = false, onToggle, onChange, onRemove, onMove, onMakeCandidate, onEditField, onAddField, }) {
|
|
146690
146686
|
var _a;
|
|
@@ -147002,7 +146998,7 @@ function SubmissionDetail({ platformKey, submissionId, onBack, }) {
|
|
|
147002
146998
|
}
|
|
147003
146999
|
function BackButton({ onBack }) {
|
|
147004
147000
|
const t = useT();
|
|
147005
|
-
return (
|
|
147001
|
+
return (jsx("button", { type: "button", onClick: onBack, "aria-label": t('profileApplicationsTab.backToSubmissions'), className: "inline-flex h-8 w-8 items-center justify-center rounded-full bg-gray-100 text-gray-700 ring-offset-background transition-colors hover:bg-gray-200 hover:text-gray-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 dark:bg-gray-800 dark:text-gray-200 dark:hover:bg-gray-700 dark:hover:text-white", children: jsx(ArrowLeft, { className: "h-4 w-4" }) }));
|
|
147006
147002
|
}
|
|
147007
147003
|
function MaskedNotice({ title }) {
|
|
147008
147004
|
const t = useT();
|
|
@@ -147503,7 +147499,7 @@ function BlocksView({ platformKey, onBack, }) {
|
|
|
147503
147499
|
toast.error(t('profileApplicationsTab.actionFailed'));
|
|
147504
147500
|
}
|
|
147505
147501
|
};
|
|
147506
|
-
return (jsxs("div", { className: "space-y-5 pt-4", children: [
|
|
147502
|
+
return (jsxs("div", { className: "space-y-5 pt-4", children: [jsx("button", { type: "button", onClick: onBack, "aria-label": t('profileApplicationsTab.backToForms'), className: "inline-flex h-8 w-8 items-center justify-center rounded-full bg-gray-100 text-gray-700 ring-offset-background transition-colors hover:bg-gray-200 hover:text-gray-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 dark:bg-gray-800 dark:text-gray-200 dark:hover:bg-gray-700 dark:hover:text-white", children: jsx(ArrowLeft, { className: "h-4 w-4" }) }), jsxs("div", { className: "flex items-start gap-3", children: [jsx("div", { className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-md bg-blue-100 text-blue-600 dark:bg-blue-900/30 dark:text-blue-400", children: jsx(Ban, { className: "h-4 w-4" }) }), jsxs("div", { children: [jsx("h4", { className: "text-sm font-semibold text-gray-900 dark:text-gray-100", children: t('profileApplicationsTab.blockedUsers') }), jsx("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: t('profileApplicationsTab.blockedUsersDescription') })] })] }), jsx("div", { className: "overflow-x-auto rounded-xl border border-gray-200 bg-white shadow-sm dark:border-gray-700 dark:bg-gray-900", children: jsxs("table", { className: "w-full text-sm", children: [jsx("thead", { children: jsxs("tr", { className: "border-b border-gray-200 bg-gray-50 text-left text-xs uppercase tracking-wide text-gray-500 dark:border-gray-700 dark:bg-gray-800/50", children: [jsx("th", { className: "px-4 py-2.5 font-medium", children: t('profileApplicationsTab.colUser') }), jsx("th", { className: "px-4 py-2.5 font-medium", children: t('profileApplicationsTab.colReason') }), jsx("th", { className: "px-4 py-2.5 font-medium", children: t('profileApplicationsTab.colBlockedBy') }), jsx("th", { className: "px-4 py-2.5 text-right font-medium", children: t('profileApplicationsTab.colActions') })] }) }), jsx("tbody", { className: "divide-y divide-gray-100 dark:divide-gray-800", children: isLoading ? ([0, 1].map((i) => (jsx("tr", { children: [0, 1, 2, 3].map((j) => (jsx("td", { className: "px-4 py-3", children: jsx(Skeleton, { className: "h-4 w-full max-w-32" }) }, j))) }, i)))) : error ? (jsx("tr", { children: jsx("td", { colSpan: 4, className: "px-4 py-10 text-center text-red-600", children: t('profileApplicationsTab.loadError') }) })) : blocks.length === 0 ? (jsx("tr", { children: jsx("td", { colSpan: 4, className: "px-4 py-10 text-center text-gray-400", children: t('profileApplicationsTab.noBlockedUsers') }) })) : (blocks.map((block) => {
|
|
147507
147503
|
var _a, _b;
|
|
147508
147504
|
return (jsxs("tr", { className: "hover:bg-blue-50/40 dark:hover:bg-gray-800/40", children: [jsx("td", { className: "whitespace-nowrap px-4 py-3 font-medium text-gray-900 dark:text-gray-100", children: ((_a = block.user) === null || _a === void 0 ? void 0 : _a.username) || ((_b = block.user) === null || _b === void 0 ? void 0 : _b.email) || '—' }), jsx("td", { className: "px-4 py-3 text-gray-500", children: block.reason || '—' }), jsx("td", { className: "whitespace-nowrap px-4 py-3 text-gray-500", children: block.created_by || '—' }), jsx("td", { className: "whitespace-nowrap px-4 py-3 text-right", children: jsx(Button$1, { variant: "outline", className: "h-8 px-3 text-xs", disabled: deleting, onClick: () => handleUnblock(block.id), children: t('profileApplicationsTab.unblock') }) })] }, block.id));
|
|
147509
147505
|
})) })] }) })] }));
|
|
@@ -147670,7 +147666,7 @@ function SubmissionsPipeline({ platformKey, form, onBack, onOpen, }) {
|
|
|
147670
147666
|
const date = new Date(raw);
|
|
147671
147667
|
return Number.isNaN(date.getTime()) ? '—' : date.toLocaleDateString();
|
|
147672
147668
|
};
|
|
147673
|
-
return (jsxs("div", { className: "space-y-5 pt-4", children: [jsxs("div", { className: "flex flex-wrap items-center justify-between gap-3", children: [
|
|
147669
|
+
return (jsxs("div", { className: "space-y-5 pt-4", children: [jsxs("div", { className: "flex flex-wrap items-center justify-between gap-3", children: [jsx("button", { type: "button", onClick: onBack, "aria-label": t('profileApplicationsTab.backToForms'), className: "inline-flex h-8 w-8 items-center justify-center rounded-full bg-gray-100 text-gray-700 ring-offset-background transition-colors hover:bg-gray-200 hover:text-gray-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 dark:bg-gray-800 dark:text-gray-200 dark:hover:bg-gray-700 dark:hover:text-white", children: jsx(ArrowLeft, { className: "h-4 w-4" }) }), jsx("h4", { className: "text-sm font-semibold text-gray-900 dark:text-gray-100", children: form
|
|
147674
147670
|
? t('profileApplicationsTab.submissionsFor', {
|
|
147675
147671
|
form: ((_a = form.schema) === null || _a === void 0 ? void 0 : _a.title) || form.name || t('profileApplicationsTab.untitledForm'),
|
|
147676
147672
|
})
|
|
@@ -156229,7 +156225,7 @@ function PaywallDetail({ platformKey, authURL, itemType, itemId, itemName, isCus
|
|
|
156229
156225
|
if (!isCustom && isLoading) {
|
|
156230
156226
|
return (jsxs("div", { className: "space-y-4", children: [jsx(Skeleton, { className: "h-8 w-48" }), jsx(Skeleton, { className: "h-64 w-full" })] }));
|
|
156231
156227
|
}
|
|
156232
|
-
return (jsxs("div", { className: "space-y-4", children: [jsxs("div", { className: "flex items-center gap-3", children: [
|
|
156228
|
+
return (jsxs("div", { className: "space-y-4", children: [jsxs("div", { className: "flex items-center gap-3", children: [jsx(Button$1, { variant: "ghost", size: "icon", onClick: onBack, "aria-label": t('monetizationPaywallDetail.back'), className: "h-8 w-8 cursor-pointer rounded-full bg-gray-100 text-gray-700 hover:bg-gray-200 hover:text-gray-900 dark:bg-gray-800 dark:text-gray-200 dark:hover:bg-gray-700 dark:hover:text-white", children: jsx(ArrowLeft, { className: "h-4 w-4" }) }), jsxs("div", { children: [jsxs("div", { className: "flex items-center gap-2", children: [jsx("h4", { className: "text-base font-semibold text-gray-900 dark:text-gray-100", children: displayName }), paywallUniqueId && (jsx("button", { type: "button", onClick: handleCopyUrl, className: "p-1 rounded hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors cursor-pointer", title: t('monetizationPaywallDetail.copyPaywallUrl'), children: copied ? (jsx(Check, { className: "h-4 w-4 text-green-500" })) : (jsx(Copy, { className: "h-4 w-4 text-gray-400" })) }))] }), !isCustom && (jsx("span", { className: "text-xs text-gray-400 capitalize", children: displayItemType(itemType) }))] })] }), jsx(WizardStepIndicator, { steps: wizardSteps, currentStep: currentStep, onStepClick: !isCustom
|
|
156233
156229
|
? setCurrentStep
|
|
156234
156230
|
: (step) => {
|
|
156235
156231
|
// During creation, only allow navigating back to already-completed steps
|
|
@@ -224067,7 +224063,7 @@ function AnalyticsCourseDetail({ tenantKey, mentorId, selectedMentorId, courseId
|
|
|
224067
224063
|
const [selectedEnrollment, setSelectedEnrollment] = useState(null);
|
|
224068
224064
|
const resolvedCourseName = courseName || (courseInfo === null || courseInfo === void 0 ? void 0 : courseInfo.name);
|
|
224069
224065
|
const showTitle = showCourseTitle && !!resolvedCourseName;
|
|
224070
|
-
return (jsxs("div", { className: "space-y-8", children: [(onBack || showTitle) && (jsxs("div", { className: "mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:gap-4", children: [jsx("div", { className: "flex flex-1 justify-start", children: onBack && (
|
|
224066
|
+
return (jsxs("div", { className: "space-y-8", children: [(onBack || showTitle) && (jsxs("div", { className: "mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:gap-4", children: [jsx("div", { className: "flex flex-1 justify-start", children: onBack && (jsx(Button$1, { variant: "ghost", size: "icon", onClick: onBack, "aria-label": t('analyticsAnalyticsCourseDetail.goBackAriaLabel'), className: "h-8 w-8 rounded-full bg-gray-100 text-gray-700 hover:bg-gray-200 hover:text-gray-900 dark:bg-gray-800 dark:text-gray-200 dark:hover:bg-gray-700 dark:hover:text-white", children: jsx(ArrowLeft, { className: "h-4 w-4" }) })) }), showTitle && (jsx("h2", { className: "flex-1 text-left text-2xl font-medium text-gray-700 sm:text-center", children: resolvedCourseName })), jsx("div", { className: "hidden flex-1 sm:block" })] })), jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4 mb-6", children: [jsx(StatCard, { loading: isLoading, title: t('analyticsAnalyticsCourseDetail.activeEnrollments'), value: courseDetailStats.active_enrollments, percentage: courseDetailStats.active_enrollments_percentage }), jsx(StatCard, { loading: isLoading, title: t('analyticsAnalyticsCourseDetail.completedEnrollments'), value: courseDetailStats.completed_enrollments, percentage: courseDetailStats.completed_enrollments_percentage })] }), jsx("div", { className: "grid grid-cols-1 gap-6", children: jsx(Card, { className: "w-full bg-white shadow-xs", style: { borderColor: 'oklch(.922 0 0)' }, children: jsxs(CardContent, { className: "p-4", "aria-label": t('analyticsAnalyticsCourseDetail.courseEnrollmentsTableAriaLabel'), children: [jsx("h3", { className: "text-base font-medium text-gray-700 mb-4", children: t('analyticsAnalyticsCourseDetail.enrolledUsers') }), jsxs("div", { className: "space-y-4", children: [jsxs("div", { className: "relative flex-1 w-full", children: [jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }), jsx(Input, { id: "search-enrolled-user", type: "text", placeholder: t('analyticsAnalyticsCourseDetail.searchPlaceholder'), value: courseEnrollmentsSearch, onChange: handleCourseEnrollmentsSearchInputChange, className: "pl-9 border-gray-300 focus:bg-transparent focus:color-transparent h-11", "aria-label": t('analyticsAnalyticsCourseDetail.searchAriaLabel') })] }), isLoading ? (jsx("div", { className: "flex items-center justify-center py-8", children: jsx("div", { className: "text-sm text-gray-500", children: t('analyticsAnalyticsCourseDetail.loadingLabel') }) })) : ((_a = courseEnrollments === null || courseEnrollments === void 0 ? void 0 : courseEnrollments.enrollments) === null || _a === void 0 ? void 0 : _a.length) &&
|
|
224071
224067
|
courseEnrollments.enrollments.length > 0 ? (jsxs(Fragment$1, { children: [jsx("div", { className: "rounded-md overflow-x-auto", style: { borderColor: 'oklch(.922 0 0)', borderWidth: '1px' }, children: jsxs(Table, { children: [jsx(TableHeader, { children: jsxs(TableRow, { className: "h-[48px]", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx(TableHead, { className: "text-left", children: t('analyticsAnalyticsCourseDetail.columnName') }), jsx(TableHead, { className: "text-left", children: t('analyticsAnalyticsCourseDetail.columnEmail') }), jsx(TableHead, { className: "text-right", children: t('analyticsAnalyticsCourseDetail.columnEnrollmentDate') }), jsx(TableHead, { className: "text-right", children: t('analyticsAnalyticsCourseDetail.columnLastActiveOn') })] }) }), jsx(TableBody, { children: courseEnrollments.enrollments.map((enrollment, index) => (jsxs(TableRow, { className: `cursor-pointer hover:bg-muted/50 h-[48px] ${index % 2 === 0 ? 'bg-gray-50' : ''}`, onClick: () => setSelectedEnrollment(enrollment), role: "button", tabIndex: 0, onKeyDown: (e) => {
|
|
224072
224068
|
if (e.key === 'Enter' || e.key === ' ') {
|
|
224073
224069
|
e.preventDefault();
|
|
@@ -224423,7 +224419,7 @@ function AnalyticsProgramDetail({ tenantKey, mentorId, selectedMentorId, program
|
|
|
224423
224419
|
});
|
|
224424
224420
|
const [selectedEnrollment, setSelectedEnrollment] = useState(null);
|
|
224425
224421
|
const resolvedProgramName = programName || (programInfo === null || programInfo === void 0 ? void 0 : programInfo.name);
|
|
224426
|
-
return (jsxs("div", { className: "space-y-8", children: [(onBack || resolvedProgramName) && (jsxs("div", { className: "mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:gap-4", children: [jsx("div", { className: "flex flex-1 justify-start", children: onBack && (
|
|
224422
|
+
return (jsxs("div", { className: "space-y-8", children: [(onBack || resolvedProgramName) && (jsxs("div", { className: "mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:gap-4", children: [jsx("div", { className: "flex flex-1 justify-start", children: onBack && (jsx(Button$1, { variant: "ghost", size: "icon", onClick: onBack, "aria-label": t('analyticsAnalyticsProgramDetail.backAriaLabel'), className: "h-8 w-8 rounded-full bg-gray-100 text-gray-700 hover:bg-gray-200 hover:text-gray-900 dark:bg-gray-800 dark:text-gray-200 dark:hover:bg-gray-700 dark:hover:text-white", children: jsx(ArrowLeft, { className: "h-4 w-4" }) })) }), resolvedProgramName && (jsx("h2", { className: "flex-1 truncate text-left text-2xl font-medium text-gray-700 sm:text-center", children: resolvedProgramName })), jsx("div", { className: "hidden flex-1 sm:block" })] })), jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-4 mb-6", children: [jsx(StatCard, { loading: isLoading, title: t('analyticsAnalyticsProgramDetail.statTotalEnrollments'), value: programDetailStats.enrollments, percentage: programDetailStats.enrollments_percentage }), jsx(StatCard, { loading: isLoading, title: t('analyticsAnalyticsProgramDetail.statActiveEnrollments'), value: programDetailStats.active_enrollments, percentage: programDetailStats.active_enrollments_percentage }), jsx(StatCard, { loading: isLoading, title: t('analyticsAnalyticsProgramDetail.statCompletedEnrollments'), value: programDetailStats.completed_enrollments, percentage: programDetailStats.completed_enrollments_percentage })] }), jsx("div", { className: "grid grid-cols-1 gap-6", children: jsx(Card, { className: "w-full bg-white shadow-xs", style: { borderColor: 'oklch(.922 0 0)' }, children: jsxs(CardContent, { className: "p-4", "aria-label": t('analyticsAnalyticsProgramDetail.tableAriaLabel'), children: [jsx("h3", { className: "text-base font-medium text-gray-700 mb-4", children: t('analyticsAnalyticsProgramDetail.enrolledUsersHeading') }), jsxs("div", { className: "space-y-4", children: [jsxs("div", { className: "relative flex-1 w-full", children: [jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }), jsx(Input, { id: "search-enrolled-user", type: "text", placeholder: t('analyticsAnalyticsProgramDetail.searchPlaceholder'), value: programEnrollmentsSearch, onChange: handleProgramEnrollmentsSearchInputChange, className: "pl-9 border-gray-300 focus:bg-transparent focus:color-transparent h-11", "aria-label": t('analyticsAnalyticsProgramDetail.searchAriaLabel') })] }), isLoading ? (jsx("div", { className: "flex items-center justify-center py-8", children: jsx("div", { className: "text-sm text-gray-500", children: t('analyticsAnalyticsProgramDetail.loadingLabel') }) })) : ((_a = programEnrollments === null || programEnrollments === void 0 ? void 0 : programEnrollments.enrollments) === null || _a === void 0 ? void 0 : _a.length) &&
|
|
224427
224423
|
programEnrollments.enrollments.length > 0 ? (jsxs(Fragment$1, { children: [jsx("div", { className: "rounded-md overflow-x-auto", style: { borderColor: 'oklch(.922 0 0)', borderWidth: '1px' }, children: jsxs(Table, { children: [jsx(TableHeader, { children: jsxs(TableRow, { className: "h-[48px]", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx(TableHead, { className: "text-left", children: t('analyticsAnalyticsProgramDetail.colName') }), jsx(TableHead, { className: "text-left", children: t('analyticsAnalyticsProgramDetail.colEmail') }), jsx(TableHead, { className: "text-right", children: t('analyticsAnalyticsProgramDetail.colEnrollmentDate') }), jsx(TableHead, { className: "text-right", children: t('analyticsAnalyticsProgramDetail.colLastActiveOn') })] }) }), jsx(TableBody, { children: programEnrollments.enrollments.map((enrollment, index) => (jsxs(TableRow, { className: `cursor-pointer hover:bg-muted/50 h-[48px] ${index % 2 === 0 ? 'bg-gray-50' : ''}`, onClick: () => setSelectedEnrollment(enrollment), role: "button", tabIndex: 0, onKeyDown: (e) => {
|
|
224428
224424
|
if (e.key === 'Enter' || e.key === ' ') {
|
|
224429
224425
|
e.preventDefault();
|
|
@@ -229216,9 +229212,9 @@ function SkillResourcesSection({ platformKey, skillId }) {
|
|
|
229216
229212
|
}
|
|
229217
229213
|
return isCreating ? t('clawSandboxAgentSkills.adding') : t('clawSandboxAgentSkills.addFileButton');
|
|
229218
229214
|
};
|
|
229219
|
-
return (jsxs("div", { className: "space-y-4", "data-testid": "skill-resources-section", children: [jsxs("div", { className: "flex items-start justify-between gap-4", children: [jsx("p", { className: "text-xs text-gray-500", children: t('clawSandboxAgentSkills.filesHint') }), jsxs(Button$1, { onClick: openNewFileDialog, size: "sm", className: "shrink-0 cursor-pointer bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-white hover:opacity-90", children: [jsx(Plus, { className: "h-4 w-4" }), t('clawSandboxAgentSkills.newFile')] })] }), isLoading ? (jsxs("div", { className: "flex items-center gap-2 p-4", role: "status", children: [jsx(LoaderCircle, { className: "h-4 w-4 animate-spin text-blue-500" }), jsx("span", { className: "text-sm text-gray-500", children: t('clawSandboxAgentSkills.loadingFiles') })] })) : resources.length === 0 ? (jsx("div", { className: "flex items-center justify-center rounded-lg border p-6", children: jsx("p", { className: "text-sm text-gray-500", children: t('clawSandboxAgentSkills.noFiles') }) })) : (jsxs("div", { className: "space-y-3", children: [resources.map((resource) => (jsxs("div", { className: "flex items-center justify-between gap-4 rounded-lg border p-4", children: [jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [jsx(Paperclip, { className: "h-4 w-4 shrink-0 text-gray-400" }), jsx("span", { className: "truncate text-sm font-medium text-gray-700", children: resource.filename }), jsx("span", { className: "rounded-full bg-gray-100 px-2 py-0.5 text-[0.625rem] text-gray-500", children: typeLabel(resource.file_type) })] }), jsx(FloatingPortalContainerContext.Provider, { value: null, children: jsxs(DropdownMenu, { children: [jsx(DropdownMenuTrigger, { asChild: true, children: jsx(Button$1, { variant: "ghost", size: "sm", "aria-label": t('clawSandboxAgentSkills.skillActions', {
|
|
229215
|
+
return (jsxs("div", { className: "space-y-4", "data-testid": "skill-resources-section", children: [jsxs("div", { className: "flex items-start justify-between gap-4", children: [jsx("p", { className: "text-xs text-gray-500", children: t('clawSandboxAgentSkills.filesHint') }), jsxs(Button$1, { onClick: openNewFileDialog, size: "sm", className: "shrink-0 cursor-pointer bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-white hover:opacity-90", children: [jsx(Plus, { className: "h-4 w-4" }), t('clawSandboxAgentSkills.newFile')] })] }), isLoading ? (jsxs("div", { className: "flex items-center gap-2 p-4", role: "status", children: [jsx(LoaderCircle, { className: "h-4 w-4 animate-spin text-blue-500" }), jsx("span", { className: "text-sm text-gray-500", children: t('clawSandboxAgentSkills.loadingFiles') })] })) : resources.length === 0 ? (jsx("div", { className: "flex items-center justify-center rounded-lg border p-6", children: jsx("p", { className: "text-sm text-gray-500", children: t('clawSandboxAgentSkills.noFiles') }) })) : (jsxs("div", { className: "space-y-3", children: [resources.map((resource) => (jsxs("div", { className: "flex items-center justify-between gap-4 rounded-lg border p-4", "data-testid": "skill-resource-row", children: [jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [jsx(Paperclip, { className: "h-4 w-4 shrink-0 text-gray-400" }), jsx("span", { className: "truncate text-sm font-medium text-gray-700", children: resource.filename }), jsx("span", { className: "rounded-full bg-gray-100 px-2 py-0.5 text-[0.625rem] text-gray-500", children: typeLabel(resource.file_type) })] }), jsx(FloatingPortalContainerContext.Provider, { value: null, children: jsxs(DropdownMenu, { children: [jsx(DropdownMenuTrigger, { asChild: true, children: jsx(Button$1, { variant: "ghost", size: "sm", "aria-label": t('clawSandboxAgentSkills.skillActions', {
|
|
229220
229216
|
name: resource.filename,
|
|
229221
|
-
}), children: jsx(Ellipsis, { className: "h-4 w-4" }) }) }), jsxs(DropdownMenuContent, { align: "end", className: "z-[110]", children: [resource.file_type === 'asset' && resource.file && (jsx(DropdownMenuItem, { asChild: true, className: "cursor-pointer", children: jsxs("a", { href: resource.file, target: "_blank", rel: "noreferrer", download: true, children: [jsx(Download, { className: "mr-2 h-4 w-4" }), t('clawSandboxAgentSkills.download')] }) })), resource.file_type !== 'asset' && (jsxs(DropdownMenuItem, { className: "cursor-pointer", onClick: () => openEditFileDialog(resource), children: [jsx(Pen, { className: "mr-2 h-4 w-4" }), t('clawSandboxAgentSkills.edit')] })), jsxs(DropdownMenuItem, { variant: "destructive", className: "cursor-pointer", onClick: () => setDeletingResource(resource), children: [jsx(Trash2, { className: "mr-2 h-4 w-4" }), t('clawSandboxAgentSkills.delete')] })] })] }) })] }, resource.id))), jsx(
|
|
229217
|
+
}), children: jsx(Ellipsis, { className: "h-4 w-4" }) }) }), jsxs(DropdownMenuContent, { align: "end", className: "z-[110]", children: [resource.file_type === 'asset' && resource.file && (jsx(DropdownMenuItem, { asChild: true, className: "cursor-pointer", children: jsxs("a", { href: resource.file, target: "_blank", rel: "noreferrer", download: true, children: [jsx(Download, { className: "mr-2 h-4 w-4" }), t('clawSandboxAgentSkills.download')] }) })), resource.file_type !== 'asset' && (jsxs(DropdownMenuItem, { className: "cursor-pointer", onClick: () => openEditFileDialog(resource), children: [jsx(Pen, { className: "mr-2 h-4 w-4" }), t('clawSandboxAgentSkills.edit')] })), jsxs(DropdownMenuItem, { variant: "destructive", className: "cursor-pointer", onClick: () => setDeletingResource(resource), children: [jsx(Trash2, { className: "mr-2 h-4 w-4" }), t('clawSandboxAgentSkills.delete')] })] })] }) })] }, resource.id))), jsx(IblPagination, { currentPage: page, totalPages: totalPages, onPageChange: setPage, disabled: isSaving || isDeleting })] })), jsxs(OverlayModal, { open: showFileDialog, onClose: closeFileDialog, title: t(editingResource
|
|
229222
229218
|
? 'clawSandboxAgentSkills.editFileDialogTitle'
|
|
229223
229219
|
: 'clawSandboxAgentSkills.newFileDialogTitle'), className: "max-w-lg", children: [jsxs("div", { className: "mt-4 grid gap-4", children: [!editingResource && (jsxs("div", { className: "space-y-2", children: [jsx(Label$2, { htmlFor: "resource-type", className: "text-sm font-medium text-[#646464]", children: t('clawSandboxAgentSkills.fileTypeLabel') }), jsxs(Select$1, { value: form.file_type, onValueChange: (value) => setForm({ ...form, file_type: value }), children: [jsx(SelectTrigger, { id: "resource-type", className: "w-full", children: jsx(SelectValue, {}) }), jsxs(SelectContent, { children: [jsx(SelectItem, { value: "reference", children: t('clawSandboxAgentSkills.fileTypeReference') }), jsx(SelectItem, { value: "script", children: t('clawSandboxAgentSkills.fileTypeScript') }), jsx(SelectItem, { value: "asset", children: t('clawSandboxAgentSkills.fileTypeAsset') })] })] })] })), isAssetForm ? (jsxs("div", { className: "space-y-2", children: [jsx(Label$2, { htmlFor: "resource-file", className: "text-sm font-medium text-[#646464]", children: t('clawSandboxAgentSkills.fileNameLabel') }), jsx("input", { ref: fileInputRef, id: "resource-file", type: "file", className: "hidden", onChange: (e) => { var _a, _b; return setAssetFile((_b = (_a = e.target.files) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : null); }, "data-testid": "resource-file-input" }), jsxs("div", { className: "flex items-center gap-2", children: [jsxs(Button$1, { variant: "outline", size: "sm", onClick: () => { var _a; return (_a = fileInputRef.current) === null || _a === void 0 ? void 0 : _a.click(); }, children: [jsx(Paperclip, { className: "h-4 w-4" }), t('clawSandboxAgentSkills.chooseFile')] }), assetFile && (jsx("span", { className: "truncate text-sm text-gray-600", children: assetFile.name }))] })] })) : (jsxs(Fragment$1, { children: [jsxs("div", { className: "space-y-2", children: [jsx(Label$2, { htmlFor: "resource-filename", className: "text-sm font-medium text-[#646464]", children: t('clawSandboxAgentSkills.fileNameLabel') }), jsx(Input, { id: "resource-filename", name: "resource-filename", value: form.filename, onChange: (e) => setForm({ ...form, filename: e.target.value }), placeholder: t('clawSandboxAgentSkills.fileNamePlaceholder'), className: "py-6" })] }), jsxs("div", { className: "space-y-2", children: [jsx(Label$2, { htmlFor: "resource-content", className: "text-sm font-medium text-[#646464]", children: t('clawSandboxAgentSkills.fileContentLabel') }), jsx(Textarea, { id: "resource-content", name: "resource-content", value: form.content, onChange: (e) => setForm({ ...form, content: e.target.value }), placeholder: t('clawSandboxAgentSkills.fileContentPlaceholder'), rows: 6 })] })] }))] }), jsxs("div", { className: "flex justify-end gap-2 pt-2", children: [jsx(Button$1, { variant: "outline", onClick: closeFileDialog, children: t('clawSandboxAgentSkills.cancel') }), jsx(Button$1, { onClick: handleSubmitFile, disabled: isSaving || !canSubmitFile, className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-white hover:opacity-90", children: submitLabel() })] })] }), jsxs(OverlayModal, { open: !!deletingResource, onClose: () => setDeletingResource(null), title: t('clawSandboxAgentSkills.deleteFileDialogTitle'), className: "max-w-md", children: [jsx("p", { className: "mt-2 text-sm text-gray-600", children: t('clawSandboxAgentSkills.deleteFileConfirmation', {
|
|
229224
229220
|
name: (_c = deletingResource === null || deletingResource === void 0 ? void 0 : deletingResource.filename) !== null && _c !== void 0 ? _c : '',
|
|
@@ -229236,20 +229232,19 @@ const EMPTY_SKILL_FORM = {
|
|
|
229236
229232
|
instruction: '',
|
|
229237
229233
|
privateToAgent: false,
|
|
229238
229234
|
};
|
|
229239
|
-
|
|
229240
|
-
|
|
229241
|
-
// the
|
|
229242
|
-
//
|
|
229235
|
+
/** Page size for both skill lists. */
|
|
229236
|
+
const SKILLS_PAGE_SIZE = 10;
|
|
229237
|
+
// Resolving the agent's own set (assignment metadata + its private skills)
|
|
229238
|
+
// needs a catalog lookup that the API cannot scope server-side yet (there is
|
|
229239
|
+
// no `mentor=` filter), so one bounded background fetch covers the join.
|
|
229243
229240
|
const FULL_LIST_LIMIT = 1000;
|
|
229244
229241
|
function AgentSkills({ platformKey, mentorUniqueId }) {
|
|
229245
|
-
var _a;
|
|
229242
|
+
var _a, _b, _c, _d;
|
|
229246
229243
|
const t = useT();
|
|
229247
229244
|
// Skills are managed independently of the sandbox connection — org-level
|
|
229248
229245
|
// skills and the mentor's assignments both resolve without a wired Claw
|
|
229249
229246
|
// instance, so we always fetch and let admins add/assign skills freely.
|
|
229250
|
-
|
|
229251
|
-
// the write affordances (a partial permissions map must not blank the UI).
|
|
229252
|
-
const { data: availableSkills, isLoading: isLoadingSkills } = useGetAgentSkillsQuery({
|
|
229247
|
+
const { data: joinCatalog, isLoading: isLoadingSkills } = useGetAgentSkillsQuery({
|
|
229253
229248
|
org: platformKey,
|
|
229254
229249
|
limit: FULL_LIST_LIMIT,
|
|
229255
229250
|
offset: 0,
|
|
@@ -229260,6 +229255,21 @@ function AgentSkills({ platformKey, mentorUniqueId }) {
|
|
|
229260
229255
|
limit: FULL_LIST_LIMIT,
|
|
229261
229256
|
offset: 0,
|
|
229262
229257
|
});
|
|
229258
|
+
// The "Available skills" tab pages the catalog server-side.
|
|
229259
|
+
const [catalogPage, setCatalogPage] = useState(1);
|
|
229260
|
+
const { data: catalogSkillsPage, isLoading: isLoadingCatalog } = useGetAgentSkillsQuery({
|
|
229261
|
+
org: platformKey,
|
|
229262
|
+
enabled: true,
|
|
229263
|
+
limit: SKILLS_PAGE_SIZE,
|
|
229264
|
+
offset: (catalogPage - 1) * SKILLS_PAGE_SIZE,
|
|
229265
|
+
});
|
|
229266
|
+
const catalogSkills = (_a = catalogSkillsPage === null || catalogSkillsPage === void 0 ? void 0 : catalogSkillsPage.results) !== null && _a !== void 0 ? _a : [];
|
|
229267
|
+
const catalogTotalCount = (_b = catalogSkillsPage === null || catalogSkillsPage === void 0 ? void 0 : catalogSkillsPage.count) !== null && _b !== void 0 ? _b : 0;
|
|
229268
|
+
const catalogTotalPages = Math.max(1, Math.ceil(catalogTotalCount / SKILLS_PAGE_SIZE));
|
|
229269
|
+
useEffect(() => {
|
|
229270
|
+
if (catalogPage > catalogTotalPages)
|
|
229271
|
+
setCatalogPage(catalogTotalPages);
|
|
229272
|
+
}, [catalogPage, catalogTotalPages]);
|
|
229263
229273
|
// Assignment mutations (attach/detach/toggle on the agent)
|
|
229264
229274
|
const [createAssignment, { isLoading: isCreatingAssignment }] = useCreateMentorSkillAssignmentMutation();
|
|
229265
229275
|
const [updateAssignment, { isLoading: isUpdatingAssignment }] = useUpdateMentorSkillAssignmentMutation();
|
|
@@ -229274,18 +229284,24 @@ function AgentSkills({ platformKey, mentorUniqueId }) {
|
|
|
229274
229284
|
const [form, setForm] = useState(EMPTY_SKILL_FORM);
|
|
229275
229285
|
const isLoading = isLoadingSkills || isLoadingAssignments;
|
|
229276
229286
|
const isMutatingAgentSkill = isCreatingAssignment || isUpdatingAssignment || isDeletingAssignment || isUpdatingSkill;
|
|
229277
|
-
const allSkills =
|
|
229287
|
+
const allSkills = (_c = joinCatalog === null || joinCatalog === void 0 ? void 0 : joinCatalog.results) !== null && _c !== void 0 ? _c : [];
|
|
229278
229288
|
const effectiveSkills = resolveEffectiveAgentSkills(allSkills, assignments !== null && assignments !== void 0 ? assignments : [], mentorUniqueId);
|
|
229279
229289
|
const effectiveUniqueIds = new Set(effectiveSkills.map((s) => s.unique_id));
|
|
229280
229290
|
const effectiveSlugs = new Set(effectiveSkills.map((s) => s.slug));
|
|
229281
|
-
//
|
|
229282
|
-
|
|
229283
|
-
|
|
229284
|
-
|
|
229285
|
-
|
|
229286
|
-
|
|
229287
|
-
|
|
229288
|
-
|
|
229291
|
+
// The "Agent skills" tab pages the (small, per-agent) effective set locally.
|
|
229292
|
+
const [agentPage, setAgentPage] = useState(1);
|
|
229293
|
+
const agentTotalPages = Math.max(1, Math.ceil(effectiveSkills.length / SKILLS_PAGE_SIZE));
|
|
229294
|
+
useEffect(() => {
|
|
229295
|
+
if (agentPage > agentTotalPages)
|
|
229296
|
+
setAgentPage(agentTotalPages);
|
|
229297
|
+
}, [agentPage, agentTotalPages]);
|
|
229298
|
+
const pagedEffectiveSkills = effectiveSkills.slice((agentPage - 1) * SKILLS_PAGE_SIZE, agentPage * SKILLS_PAGE_SIZE);
|
|
229299
|
+
// Catalog rows already covered by the agent's set (attached, or shadowed by
|
|
229300
|
+
// a same-slug private skill) show an "Added" chip instead of an Add button
|
|
229301
|
+
// — hiding them would make server pages uneven. Another agent's private
|
|
229302
|
+
// skills are not attachable at all.
|
|
229303
|
+
const isCoveredByAgent = (skill) => effectiveUniqueIds.has(skill.unique_id) || effectiveSlugs.has(skill.slug);
|
|
229304
|
+
const isOtherAgentsPrivate = (skill) => !!skill.mentor && skill.mentor !== mentorUniqueId;
|
|
229289
229305
|
// Featured skills from the `main` platform are read-only for tenants — the
|
|
229290
229306
|
// API 404s writes against them, so hide the edit/delete affordances.
|
|
229291
229307
|
const isSkillEditable = (skill) => {
|
|
@@ -229411,6 +229427,7 @@ function AgentSkills({ platformKey, mentorUniqueId }) {
|
|
|
229411
229427
|
version: form.version,
|
|
229412
229428
|
category: form.category,
|
|
229413
229429
|
instruction: form.instruction,
|
|
229430
|
+
mentor: form.privateToAgent ? mentorUniqueId : null,
|
|
229414
229431
|
}).unwrap();
|
|
229415
229432
|
toast.success(t('clawSandboxAgentSkills.skillUpdated'));
|
|
229416
229433
|
closeAllDialogs();
|
|
@@ -229452,23 +229469,25 @@ function AgentSkills({ platformKey, mentorUniqueId }) {
|
|
|
229452
229469
|
if (isLoading) {
|
|
229453
229470
|
return (jsxs("div", { className: "flex items-center gap-2 p-4", children: [jsx(LoaderCircle, { className: "h-4 w-4 animate-spin text-blue-500" }), jsx("span", { className: "text-sm text-gray-500", children: t('clawSandboxAgentSkills.loadingSkills') })] }));
|
|
229454
229471
|
}
|
|
229455
|
-
return (jsxs("div", { className: "space-y-4", "data-testid": "agent-skills-content", children: [jsxs("div", { className: "flex items-start justify-between gap-4", children: [jsxs("p", { className: "flex items-start gap-2 text-xs text-gray-500", children: [jsx(Info$3, { className: "mt-0.5 h-4 w-4 shrink-0 text-gray-400" }), jsx("span", { children: t('clawSandboxAgentSkills.sessionNote') })] }), jsxs(Button$1, { onClick: openNewSkillDialog, size: "sm", className: "shrink-0 cursor-pointer bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-white hover:opacity-90", children: [jsx(Plus, { className: "h-4 w-4" }), t('clawSandboxAgentSkills.newSkill')] })] }), jsxs("
|
|
229456
|
-
|
|
229457
|
-
|
|
229458
|
-
|
|
229459
|
-
|
|
229460
|
-
|
|
229472
|
+
return (jsxs("div", { className: "space-y-4", "data-testid": "agent-skills-content", children: [jsxs("div", { className: "flex items-start justify-between gap-4", children: [jsxs("p", { className: "flex items-start gap-2 text-xs text-gray-500", children: [jsx(Info$3, { className: "mt-0.5 h-4 w-4 shrink-0 text-gray-400" }), jsx("span", { children: t('clawSandboxAgentSkills.sessionNote') })] }), jsxs(Button$1, { onClick: openNewSkillDialog, size: "sm", className: "shrink-0 cursor-pointer bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-white hover:opacity-90", children: [jsx(Plus, { className: "h-4 w-4" }), t('clawSandboxAgentSkills.newSkill')] })] }), jsxs(Tabs, { defaultValue: "agent", className: "w-full", children: [jsxs(TabsList, { "aria-label": t('clawSandboxAgentSkills.tabsAriaLabel'), "data-testid": "agent-skills-tabs", children: [jsx(TabsTrigger, { value: "agent", "data-testid": "agent-skills-tab-agent", children: t('clawSandboxAgentSkills.tabAgentSkills') }), jsx(TabsTrigger, { value: "available", "data-testid": "agent-skills-tab-available", children: t('clawSandboxAgentSkills.tabAvailableSkills') })] }), jsx(TabsContent, { value: "agent", className: "space-y-3", children: effectiveSkills.length === 0 ? (jsx("div", { className: "flex items-center justify-center rounded-lg border p-6", children: jsx("p", { className: "text-sm text-gray-500", children: t('clawSandboxAgentSkills.noEffectiveSkills') }) })) : (jsxs(Fragment$1, { children: [pagedEffectiveSkills.map((effective) => {
|
|
229473
|
+
var _a;
|
|
229474
|
+
return (jsxs("div", { className: "flex items-center justify-between gap-4 rounded-lg border p-4", "data-testid": "agent-skill-row", children: [jsxs("div", { className: "min-w-0 space-y-1", children: [jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [jsx("span", { className: "text-sm font-medium text-gray-700", children: effective.name }), ((_a = effective.skill) === null || _a === void 0 ? void 0 : _a.version) && (jsxs("span", { className: "hidden text-xs text-gray-400 sm:inline", children: ["v", effective.skill.version] })), renderBadges(effective.skill, effective)] }), effective.description && (jsx("p", { className: "line-clamp-2 text-xs text-gray-500", children: effective.description }))] }), jsxs("div", { className: "flex shrink-0 items-center gap-2", children: [jsx(Switch, { checked: effective.enabled, onCheckedChange: (checked) => handleToggleEffective(effective, checked), disabled: isMutatingAgentSkill, className: "cursor-pointer data-[state=checked]:bg-blue-500", "aria-label": t(effective.enabled
|
|
229475
|
+
? 'clawSandboxAgentSkills.skillEnabledLabel'
|
|
229476
|
+
: 'clawSandboxAgentSkills.skillDisabledLabel', { name: effective.name }) }), renderSkillMenu(effective.skill, effective)] })] }, effective.unique_id));
|
|
229477
|
+
}), jsx(IblPagination, { currentPage: agentPage, totalPages: agentTotalPages, onPageChange: setAgentPage, disabled: isMutatingAgentSkill })] })) }), jsx(TabsContent, { value: "available", className: "space-y-3", children: isLoadingCatalog ? (jsxs("div", { className: "flex items-center gap-2 p-4", role: "status", children: [jsx(LoaderCircle, { className: "h-4 w-4 animate-spin text-blue-500" }), jsx("span", { className: "text-sm text-gray-500", children: t('clawSandboxAgentSkills.loadingSkills') })] })) : catalogTotalCount === 0 ? (jsx("div", { className: "flex items-center justify-center rounded-lg border p-6", children: jsx("p", { className: "text-sm text-gray-500", children: t('clawSandboxAgentSkills.noSkillsAvailable') }) })) : (jsxs(Fragment$1, { children: [catalogSkills.map((skill) => (jsxs("div", { className: "flex items-center justify-between gap-4 rounded-lg border p-4", "data-testid": "available-skill-row", children: [jsxs("div", { className: "min-w-0 space-y-1", children: [jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [jsx("span", { className: "text-sm font-medium text-gray-700", children: skill.name }), jsxs("span", { className: "hidden text-xs text-gray-400 sm:inline", children: ["v", skill.version] }), renderBadges(skill)] }), skill.description && (jsx("p", { className: "line-clamp-2 text-xs text-gray-500", children: skill.description }))] }), jsxs("div", { className: "flex shrink-0 items-center gap-2", children: [isCoveredByAgent(skill) ? (jsx("span", { className: "rounded-full bg-green-50 px-2 py-0.5 text-xs text-green-700", children: t('clawSandboxAgentSkills.addedBadge') })) : (!isOtherAgentsPrivate(skill) && (jsxs(Button$1, { variant: "outline", size: "sm", className: "cursor-pointer", disabled: isMutatingAgentSkill, onClick: () => handleAttach(skill), "aria-label": t('clawSandboxAgentSkills.addToAgentLabel', {
|
|
229478
|
+
name: skill.name,
|
|
229479
|
+
}), children: [jsx(Plus, { className: "h-4 w-4" }), t('clawSandboxAgentSkills.addToAgent')] }))), renderSkillMenu(skill)] })] }, skill.id))), jsx(IblPagination, { currentPage: catalogPage, totalPages: catalogTotalPages, onPageChange: setCatalogPage, disabled: isMutatingAgentSkill })] })) })] }), jsx(OverlayModal, { open: showNewDialog, onClose: closeAllDialogs, title: t('clawSandboxAgentSkills.newSkillDialogTitle'), className: "max-w-2xl", children: jsxs("div", { className: "flex h-[min(75dvh,46rem)] flex-col", children: [jsxs("div", { className: "flex-1 space-y-4 overflow-y-auto pb-4 pr-1", children: [jsx(SkillForm, { form: form, onChange: setForm }), jsx("p", { className: "text-xs text-gray-500", children: t('clawSandboxAgentSkills.filesAfterCreateHint') })] }), jsxs("div", { className: "flex justify-end gap-2 border-t pt-4", children: [jsx(Button$1, { variant: "outline", onClick: closeAllDialogs, children: t('clawSandboxAgentSkills.cancel') }), jsx(Button$1, { onClick: handleCreateSkill, disabled: isCreatingSkill || !form.name || !form.slug, className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-white hover:opacity-90", children: isCreatingSkill
|
|
229461
229480
|
? t('clawSandboxAgentSkills.creating')
|
|
229462
229481
|
: t('clawSandboxAgentSkills.create') })] })] }) }), jsx(OverlayModal, { open: !!editingSkill, onClose: closeAllDialogs, title: t('clawSandboxAgentSkills.editSkillDialogTitle'), className: "max-w-2xl", children: jsxs(Tabs, { defaultValue: "details", className: "w-full", children: [jsxs(TabsList, { "aria-label": t('clawSandboxAgentSkills.editSkillDialogTitle'), "data-testid": "skill-dialog-tabs", children: [jsx(TabsTrigger, { value: "details", "data-testid": "skill-dialog-tab-details", children: t('clawSandboxAgentSkills.detailsTab') }), jsx(TabsTrigger, { value: "files", "data-testid": "skill-dialog-tab-files", children: t('clawSandboxAgentSkills.filesTab') })] }), jsx(TabsContent, { value: "details", children: jsxs("div", { className: "flex h-[min(75dvh,46rem)] flex-col", children: [jsx("div", { className: "flex-1 space-y-4 overflow-y-auto pb-4 pr-1", children: jsx(SkillForm, { form: form, onChange: setForm }) }), jsxs("div", { className: "flex justify-end gap-2 border-t pt-4", children: [jsx(Button$1, { variant: "outline", onClick: closeAllDialogs, children: t('clawSandboxAgentSkills.cancel') }), jsx(Button$1, { onClick: handleUpdateSkill, disabled: isUpdatingSkill || !form.name || !form.slug, className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-white hover:opacity-90", children: isUpdatingSkill
|
|
229463
229482
|
? t('clawSandboxAgentSkills.saving')
|
|
229464
|
-
: t('clawSandboxAgentSkills.save') })] })] }) }), jsx(TabsContent, { value: "files", children: jsx("div", { className: "flex h-[min(75dvh,46rem)] flex-col", children: jsx("div", { className: "flex-1 space-y-4 overflow-y-auto pb-4 pr-1", children: editingSkill && (jsx(SkillResourcesSection, { platformKey: platformKey, skillId: editingSkill.id })) }) }) })] }) }), jsxs(OverlayModal, { open: !!deletingSkill, onClose: () => setDeletingSkill(null), title: t('clawSandboxAgentSkills.deleteSkillDialogTitle'), className: "max-w-md", children: [jsx("p", { className: "mt-2 text-sm text-gray-600", children: t('clawSandboxAgentSkills.deleteConfirmation', { name: (
|
|
229483
|
+
: t('clawSandboxAgentSkills.save') })] })] }) }), jsx(TabsContent, { value: "files", children: jsx("div", { className: "flex h-[min(75dvh,46rem)] flex-col", children: jsx("div", { className: "flex-1 space-y-4 overflow-y-auto pb-4 pr-1", children: editingSkill && (jsx(SkillResourcesSection, { platformKey: platformKey, skillId: editingSkill.id })) }) }) })] }) }), jsxs(OverlayModal, { open: !!deletingSkill, onClose: () => setDeletingSkill(null), title: t('clawSandboxAgentSkills.deleteSkillDialogTitle'), className: "max-w-md", children: [jsx("p", { className: "mt-2 text-sm text-gray-600", children: t('clawSandboxAgentSkills.deleteConfirmation', { name: (_d = deletingSkill === null || deletingSkill === void 0 ? void 0 : deletingSkill.name) !== null && _d !== void 0 ? _d : '' }) }), jsxs("div", { className: "flex justify-end gap-2 pt-2", children: [jsx(Button$1, { variant: "outline", onClick: () => setDeletingSkill(null), children: t('clawSandboxAgentSkills.cancel') }), jsx(Button$1, { onClick: handleDeleteSkill, disabled: isDeletingSkill, className: "bg-red-600 text-white hover:bg-red-700", children: isDeletingSkill
|
|
229465
229484
|
? t('clawSandboxAgentSkills.deleting')
|
|
229466
229485
|
: t('clawSandboxAgentSkills.delete') })] })] })] }));
|
|
229467
229486
|
}
|
|
229468
229487
|
// ── Shared Skill Form ────────────────────────────────────────────────────────
|
|
229469
|
-
function SkillForm({ form, onChange,
|
|
229488
|
+
function SkillForm({ form, onChange, }) {
|
|
229470
229489
|
const t = useT();
|
|
229471
|
-
return (jsxs("div", { className: "mt-4 grid gap-4", children: [jsxs("div", { className: "space-y-
|
|
229490
|
+
return (jsxs("div", { className: "mt-4 grid gap-4", children: [jsxs("div", { className: "flex items-center justify-between rounded-lg border p-4", children: [jsxs("div", { className: "space-y-1", children: [jsx(Label$2, { htmlFor: "skill-private", className: "text-sm font-medium text-[#646464]", children: t('clawSandboxAgentSkills.privateToAgent') }), jsx("p", { className: "text-xs text-gray-500", children: t('clawSandboxAgentSkills.privateToAgentHint') })] }), jsx(Switch, { id: "skill-private", checked: form.privateToAgent, onCheckedChange: (checked) => onChange({ ...form, privateToAgent: checked }), className: "cursor-pointer data-[state=checked]:bg-blue-500" })] }), jsxs("div", { className: "space-y-2", children: [jsx(Label$2, { htmlFor: "skill-name", className: "text-sm font-medium text-[#646464]", children: t('clawSandboxAgentSkills.fieldName') }), jsx(Input, { id: "skill-name", name: "skill-name", value: form.name, onChange: (e) => onChange({ ...form, name: e.target.value }), placeholder: t('clawSandboxAgentSkills.fieldNamePlaceholder'), className: "py-6" })] }), jsxs("div", { className: "space-y-2", children: [jsx(Label$2, { htmlFor: "skill-slug", className: "text-sm font-medium text-[#646464]", children: t('clawSandboxAgentSkills.fieldSlug') }), jsx(Input, { id: "skill-slug", name: "skill-slug", value: form.slug, onChange: (e) => onChange({ ...form, slug: e.target.value }), placeholder: t('clawSandboxAgentSkills.fieldSlugPlaceholder'), className: "py-6" })] }), jsxs("div", { className: "space-y-2", children: [jsx(Label$2, { htmlFor: "skill-version", className: "text-sm font-medium text-[#646464]", children: t('clawSandboxAgentSkills.fieldVersion') }), jsx(Input, { id: "skill-version", name: "skill-version", value: form.version, onChange: (e) => onChange({ ...form, version: e.target.value }), placeholder: t('clawSandboxAgentSkills.fieldVersionPlaceholder'), className: "py-6" })] }), jsxs("div", { className: "space-y-2", children: [jsx(Label$2, { htmlFor: "skill-category", className: "text-sm font-medium text-[#646464]", children: t('clawSandboxAgentSkills.fieldCategory') }), jsx(Input, { id: "skill-category", name: "skill-category", value: form.category, onChange: (e) => onChange({ ...form, category: e.target.value }), placeholder: t('clawSandboxAgentSkills.fieldCategoryPlaceholder'), className: "py-6" })] }), jsxs("div", { className: "space-y-2", children: [jsx(Label$2, { htmlFor: "skill-description", className: "text-sm font-medium text-[#646464]", children: t('clawSandboxAgentSkills.fieldDescription') }), jsx(Textarea, { id: "skill-description", name: "skill-description", value: form.description, onChange: (e) => onChange({ ...form, description: e.target.value }), placeholder: t('clawSandboxAgentSkills.fieldDescriptionPlaceholder'), rows: 3 })] }), jsxs("div", { className: "space-y-2 overflow-hidden", children: [jsx(Label$2, { htmlFor: "skill-instruction", className: "text-sm font-medium text-[#646464]", children: t('clawSandboxAgentSkills.fieldInstruction') }), jsx("p", { className: "text-xs text-gray-500", children: t('clawSandboxAgentSkills.instructionHint') }), jsx(RichTextEditor, { value: form.instruction, onChange: (value) => onChange({ ...form, instruction: value }) })] })] }));
|
|
229472
229491
|
}
|
|
229473
229492
|
|
|
229474
229493
|
/** Distance (px) from the list bottom at which the next page is requested. */
|
|
@@ -229500,12 +229519,12 @@ function SlashSkillPicker({ skills, activeIndex, listboxId, onSelect, onActiveIn
|
|
|
229500
229519
|
};
|
|
229501
229520
|
return (jsxs("div", { className: "absolute right-0 bottom-full left-0 z-50 mb-2", children: [jsx("div", { "aria-live": "polite", className: "sr-only", children: isLoading
|
|
229502
229521
|
? t('slashSkillPicker.loading')
|
|
229503
|
-
: t('slashSkillPicker.resultsAnnouncement', { count: skills.length }) }), isLoading ? (jsxs("div", { role: "status", className: "flex items-center gap-2 rounded-xl border border-gray-200 bg-white px-3 py-3 shadow-lg", "data-testid": "slash-skill-picker-loading", children: [jsx(LoaderCircle, { className: "h-4 w-4 animate-spin text-blue-500" }), jsx("span", { className: "text-sm text-gray-500", children: t('slashSkillPicker.loading') })] })) : (jsxs("ul", { ref: listRef, id: listboxId, role: "listbox", "aria-label": t('slashSkillPicker.listLabel'), onScroll: handleScroll, className: "max-h-64 overflow-y-auto rounded-xl border border-gray-200 bg-white p-1 shadow-lg", "data-testid": "slash-skill-picker", children: [skills.map((skill, index) => (
|
|
229522
|
+
: t('slashSkillPicker.resultsAnnouncement', { count: skills.length }) }), isLoading ? (jsxs("div", { role: "status", className: "flex items-center gap-2 rounded-xl border border-gray-200 bg-white px-3 py-3 shadow-lg", "data-testid": "slash-skill-picker-loading", children: [jsx(LoaderCircle, { className: "h-4 w-4 animate-spin text-blue-500" }), jsx("span", { className: "text-sm text-gray-500", children: t('slashSkillPicker.loading') })] })) : (jsxs("ul", { ref: listRef, id: listboxId, role: "listbox", "aria-label": t('slashSkillPicker.listLabel'), onScroll: handleScroll, className: "max-h-64 overflow-y-auto rounded-xl border border-gray-200 bg-white p-1 shadow-lg", "data-testid": "slash-skill-picker", children: [skills.map((skill, index) => (jsx("li", { id: `${listboxId}-option-${index}`, role: "option", "aria-selected": index === activeIndex, className: cn('flex cursor-pointer flex-col gap-0.5 rounded-lg px-3 py-2', index === activeIndex ? 'bg-blue-50' : 'hover:bg-gray-50'), onMouseEnter: () => onActiveIndexChange(index),
|
|
229504
229523
|
// onMouseDown so selection wins over the textarea losing focus.
|
|
229505
229524
|
onMouseDown: (e) => {
|
|
229506
229525
|
e.preventDefault();
|
|
229507
229526
|
onSelect(skill);
|
|
229508
|
-
}, children:
|
|
229527
|
+
}, children: jsxs("span", { className: "flex items-baseline gap-2", children: [jsx("span", { className: "text-sm font-medium text-gray-800", children: skill.name }), jsxs("span", { className: "text-xs text-gray-400", children: ["/", skill.slug] }), skill.category && (jsx("span", { className: "ml-auto rounded-full bg-gray-100 px-2 py-0.5 text-[0.625rem] text-gray-500", children: skill.category }))] }) }, skill.unique_id))), isFetchingMore && (jsxs("li", { role: "presentation", className: "flex items-center gap-2 px-3 py-2", "data-testid": "slash-skill-picker-loading-more", children: [jsx(LoaderCircle, { className: "h-4 w-4 animate-spin text-blue-500" }), jsx("span", { className: "text-xs text-gray-500", children: t('slashSkillPicker.loading') })] }))] }))] }));
|
|
229509
229528
|
}
|
|
229510
229529
|
|
|
229511
229530
|
/** Matches a composer value that is a single `/`-prefixed token (no whitespace). */
|
|
@@ -229596,6 +229615,55 @@ function useSlashSkillPicker({ inputValue, setInputValue, skills, isLoading = fa
|
|
|
229596
229615
|
};
|
|
229597
229616
|
}
|
|
229598
229617
|
|
|
229618
|
+
/** Assignment rows carry everything the picker shows (name + slug + enabled). */
|
|
229619
|
+
const toSlashSkill = (assignment) => {
|
|
229620
|
+
var _a;
|
|
229621
|
+
return ({
|
|
229622
|
+
unique_id: assignment.skill,
|
|
229623
|
+
name: assignment.skill_name,
|
|
229624
|
+
slug: (_a = assignment.skill_slug) !== null && _a !== void 0 ? _a : assignment.skill_name,
|
|
229625
|
+
enabled: assignment.enabled,
|
|
229626
|
+
origin: 'assignment',
|
|
229627
|
+
assignmentId: assignment.id,
|
|
229628
|
+
});
|
|
229629
|
+
};
|
|
229630
|
+
/**
|
|
229631
|
+
* Lazy, paged fetch of the agent's skills for the chat `/` picker, straight
|
|
229632
|
+
* from the per-agent skills endpoint (`/agents/{uuid}/skills/`) — the
|
|
229633
|
+
* org-wide agent-skills catalog is not involved. Fetching is deferred until
|
|
229634
|
+
* the user first types `/` (then kept warm), and errors degrade to an empty
|
|
229635
|
+
* list so the picker simply stays closed.
|
|
229636
|
+
*/
|
|
229637
|
+
function useSlashSkills({ org, mentorUniqueId, enabled, active, pageSize = MENTOR_SKILL_ASSIGNMENTS_PAGE_SIZE, }) {
|
|
229638
|
+
const [offset, setOffset] = useState(0);
|
|
229639
|
+
// Sticky: once the user opens the picker, keep results cached for the session.
|
|
229640
|
+
const [activated, setActivated] = useState(false);
|
|
229641
|
+
useEffect(() => {
|
|
229642
|
+
if (active && !activated)
|
|
229643
|
+
setActivated(true);
|
|
229644
|
+
}, [active, activated]);
|
|
229645
|
+
// A different agent gets its own cache entry — restart from the first page.
|
|
229646
|
+
useEffect(() => {
|
|
229647
|
+
setOffset(0);
|
|
229648
|
+
}, [org, mentorUniqueId]);
|
|
229649
|
+
const { data, isLoading, isFetching } = useGetMentorSkillAssignmentsInfiniteQuery({ org, mentorUniqueId: mentorUniqueId !== null && mentorUniqueId !== void 0 ? mentorUniqueId : '', limit: pageSize, offset }, { skip: !enabled || !mentorUniqueId || !org || !activated });
|
|
229650
|
+
const rows = data === null || data === void 0 ? void 0 : data.results;
|
|
229651
|
+
const skills = useMemo(() => (rows !== null && rows !== void 0 ? rows : []).map(toSlashSkill), [rows]);
|
|
229652
|
+
const loadedCount = skills.length;
|
|
229653
|
+
const hasMore = !!(data === null || data === void 0 ? void 0 : data.next);
|
|
229654
|
+
const loadMore = useCallback(() => {
|
|
229655
|
+
if (hasMore && !isFetching)
|
|
229656
|
+
setOffset(loadedCount);
|
|
229657
|
+
}, [hasMore, isFetching, loadedCount]);
|
|
229658
|
+
return {
|
|
229659
|
+
skills,
|
|
229660
|
+
isLoading: (isLoading || isFetching) && loadedCount === 0,
|
|
229661
|
+
isFetchingMore: isFetching && loadedCount > 0,
|
|
229662
|
+
hasMore,
|
|
229663
|
+
loadMore,
|
|
229664
|
+
};
|
|
229665
|
+
}
|
|
229666
|
+
|
|
229599
229667
|
/**
|
|
229600
229668
|
* Three-column category layout on `sm+`, single-section accordion on
|
|
229601
229669
|
* mobile. Designed to live inside `<DropdownMenuContent>` — the parent
|
|
@@ -232015,8 +232083,8 @@ function SubmitMessageButton({ isPreviewMode, allowAnonymousAccess, isUploading,
|
|
|
232015
232083
|
const PromptGalleryModal$1 = dynamic(() => Promise.resolve().then(function () { return promptGalleryModal; }).then((mod) => mod.PromptGalleryModal), {
|
|
232016
232084
|
ssr: false,
|
|
232017
232085
|
});
|
|
232018
|
-
function ChatInputForm({ onSubmit, onScreenSharingClick, isScreenSharingModalOpen, onPhoneCallClick, sessionId, stopGenerating, mentorId, tenantKey, isPublicRoute, userIsStudent, username, isPreviewMode, enableWebBrowsing, isStreaming, updateSessionTools, setSessionTools, activeTools, screenSharing, deepResearch, studyMode, imageGeneration, codeInterpreter, promptsIsEnabled, googleSlidesIsEnabled, googleDocumentIsEnabled, artifactsEnabled, compactMode = false, chatAreaMaxWidth, isConnecting = false, stopStreamingButtonRef, slashSkills, slashSkillsLoading = false, }) {
|
|
232019
|
-
var _a, _b, _c, _d, _e;
|
|
232086
|
+
function ChatInputForm({ onSubmit, onScreenSharingClick, isScreenSharingModalOpen, onPhoneCallClick, sessionId, stopGenerating, mentorId, tenantKey, isPublicRoute, userIsStudent, username, isPreviewMode, enableWebBrowsing, isStreaming, updateSessionTools, setSessionTools, activeTools, screenSharing, deepResearch, studyMode, imageGeneration, codeInterpreter, promptsIsEnabled, googleSlidesIsEnabled, googleDocumentIsEnabled, artifactsEnabled, compactMode = false, chatAreaMaxWidth, isConnecting = false, stopStreamingButtonRef, slashSkillsEnabled = false, slashSkills, slashSkillsLoading = false, }) {
|
|
232087
|
+
var _a, _b, _c, _d, _e, _f;
|
|
232020
232088
|
const t = useT();
|
|
232021
232089
|
const dispatch = useDispatch();
|
|
232022
232090
|
const mentorSettings = useMentorSettings({
|
|
@@ -232069,14 +232137,25 @@ function ChatInputForm({ onSubmit, onScreenSharingClick, isScreenSharingModalOpe
|
|
|
232069
232137
|
const setInputValue = (input) => {
|
|
232070
232138
|
dispatch(chatInputSliceActions.setTextareaInput(input));
|
|
232071
232139
|
};
|
|
232072
|
-
// `/` skill picker —
|
|
232073
|
-
//
|
|
232074
|
-
|
|
232140
|
+
// `/` skill picker — fetches the agent's skills lazily from the per-agent
|
|
232141
|
+
// skills endpoint on the first `/` keystroke (the popup shows a loading row
|
|
232142
|
+
// meanwhile; scrolling loads more). A host-supplied `slashSkills` list
|
|
232143
|
+
// bypasses fetching entirely.
|
|
232144
|
+
const mentorUniqueId = (_c = mentorSettings === null || mentorSettings === void 0 ? void 0 : mentorSettings.data) === null || _c === void 0 ? void 0 : _c.mentorUniqueId;
|
|
232145
|
+
const slashTokenActive = slashSkillsEnabled && isSlashCommandToken(inputValue);
|
|
232146
|
+
const fetchedSlashSkills = useSlashSkills({
|
|
232147
|
+
org: tenantKey,
|
|
232148
|
+
mentorUniqueId,
|
|
232149
|
+
enabled: slashSkillsEnabled && !slashSkills,
|
|
232150
|
+
active: slashTokenActive,
|
|
232151
|
+
});
|
|
232152
|
+
const effectiveSlashSkills = slashSkills !== null && slashSkills !== void 0 ? slashSkills : (slashSkillsEnabled ? fetchedSlashSkills.skills : []);
|
|
232153
|
+
const pickerLoading = slashSkills ? slashSkillsLoading : fetchedSlashSkills.isLoading;
|
|
232075
232154
|
const slashPicker = useSlashSkillPicker({
|
|
232076
232155
|
inputValue,
|
|
232077
232156
|
setInputValue,
|
|
232078
232157
|
skills: effectiveSlashSkills,
|
|
232079
|
-
isLoading:
|
|
232158
|
+
isLoading: pickerLoading,
|
|
232080
232159
|
});
|
|
232081
232160
|
const handleSelectPrompt = (promptText) => {
|
|
232082
232161
|
setInputValue(promptText);
|
|
@@ -232142,9 +232221,9 @@ function ChatInputForm({ onSubmit, onScreenSharingClick, isScreenSharingModalOpe
|
|
|
232142
232221
|
}
|
|
232143
232222
|
return persistentChatInputLabel ? '' : t('chatInputForm.askAnything');
|
|
232144
232223
|
};
|
|
232145
|
-
return (jsxs(Fragment$1, { children: [isTabletOrMobile && !isPreviewMode && !embedMode && !compactMode && (jsx("div", { className: "mx-auto flex w-full justify-end pt-4 pl-4", style: chatAreaMaxWidth ? { maxWidth: `${chatAreaMaxWidth}px` } : undefined, children: jsx(RetrievedDocumentsButton, { sessionId: sessionId }) })), ((
|
|
232224
|
+
return (jsxs(Fragment$1, { children: [isTabletOrMobile && !isPreviewMode && !embedMode && !compactMode && (jsx("div", { className: "mx-auto flex w-full justify-end pt-4 pl-4", style: chatAreaMaxWidth ? { maxWidth: `${chatAreaMaxWidth}px` } : undefined, children: jsx(RetrievedDocumentsButton, { sessionId: sessionId }) })), ((_d = mentorSettings === null || mentorSettings === void 0 ? void 0 : mentorSettings.data) === null || _d === void 0 ? void 0 : _d.disclaimer) && !compactMode && (jsx("div", { className: "mx-auto mt-1 w-full pb-1", style: chatAreaMaxWidth ? { maxWidth: `${chatAreaMaxWidth}px` } : undefined, children: jsx("p", { id: "chat-input-disclaimer", className: "text-center text-[0.625rem] text-gray-500 italic", children: (_e = mentorSettings === null || mentorSettings === void 0 ? void 0 : mentorSettings.data) === null || _e === void 0 ? void 0 : _e.disclaimer }) })), jsxs("form", { ref: containerRef, onSubmit: handleSubmit, className: cn('relative mx-auto mt-4 w-full pb-2', CSS_CLASS_NAMES.CHAT.TEXTAREA), style: chatAreaMaxWidth ? { maxWidth: `${chatAreaMaxWidth}px` } : undefined, children: [slashPicker.open && (jsx(SlashSkillPicker, { skills: slashPicker.filteredSkills, activeIndex: slashPicker.activeIndex, listboxId: slashPicker.listboxId, onSelect: slashPicker.selectSkill, onActiveIndexChange: slashPicker.setActiveIndex, isLoading: pickerLoading, isFetchingMore: !slashSkills && fetchedSlashSkills.isFetchingMore, hasMore: !slashSkills && fetchedSlashSkills.hasMore, onLoadMore: fetchedSlashSkills.loadMore })), jsxs("div", { className: "relative overflow-hidden rounded-2xl border border-gray-200 bg-[#fbfbfb] pb-3 shadow-xs", children: [jsx(FileAttachmentsList, { attachedFiles: attachedFiles, onRemoveFile: handleRemoveFile, onRetryFile: retryUpload }), fileAddedNotification && (jsxs("div", { className: "animate-in slide-in-from-bottom-5 absolute top-0 right-0 left-0 -mt-10 flex items-center gap-2 rounded-md bg-blue-50 p-2 text-xs text-blue-600 duration-300", children: [jsx(FileText, { className: "h-3 w-3" }), jsx("span", { className: "truncate", children: fileAddedNotification })] })), jsxs("div", { className: "grid", children: [jsx("label", { id: "chat-input-label", htmlFor: "chat-input-textarea", className: cn(persistentChatInputLabel
|
|
232146
232225
|
? 'block px-[18.5px] pt-3 text-xs font-medium text-gray-600'
|
|
232147
|
-
: 'sr-only'), children: t('chatInputForm.askAnything') }), jsx(AutoResizeTextarea, { id: "chat-input-textarea", "aria-labelledby": "chat-input-label", "aria-describedby": ((
|
|
232226
|
+
: 'sr-only'), children: t('chatInputForm.askAnything') }), jsx(AutoResizeTextarea, { id: "chat-input-textarea", "aria-labelledby": "chat-input-label", "aria-describedby": ((_f = mentorSettings === null || mentorSettings === void 0 ? void 0 : mentorSettings.data) === null || _f === void 0 ? void 0 : _f.disclaimer) ? 'chat-input-disclaimer' : undefined, ...((effectiveSlashSkills.length > 0 || slashPicker.open) && {
|
|
232148
232227
|
role: 'combobox',
|
|
232149
232228
|
'aria-expanded': slashPicker.open,
|
|
232150
232229
|
'aria-haspopup': 'listbox',
|
|
@@ -236189,5 +236268,5 @@ var trainOrDeleteModal = /*#__PURE__*/Object.freeze({
|
|
|
236189
236268
|
TrainOrDeleteModal: TrainOrDeleteModal
|
|
236190
236269
|
});
|
|
236191
236270
|
|
|
236192
|
-
export { ACCESS_COURSE_LABEL, ALL_CATEGORIES, AccessTimeHeatmap, AccessiblePaginate, AddMentorToProjectModal, AddSkillDialog, Admin, AdvancedTab, AgentConfigPrompts, AgentSkills, AlertsTab, AnalyticsAuditLogStats, AnalyticsCourseDetail, AnalyticsCourses, AnalyticsFinancialStats, AnalyticsLayout, AnalyticsMemoryStats, AnalyticsMonetizationStats, AnalyticsOverview, AnalyticsProgramDetail, AnalyticsPrograms, AnalyticsReportDownload, AnalyticsReports, AnalyticsSettingsProvider, AnalyticsTopicsStats, AnalyticsTranscriptsStats, AnalyticsUsersStats, AppleRestrictionModal, ApplyWizard, BUY_NOW_LABEL, BillingTab, CATALOGS, CREATE_AGENT_LABELS, CUA_DRIVER_REPO_URL, CUA_DRIVER_TAURI_COMMANDS, CUA_DRIVER_TAURI_EVENTS, CategorizedDropdownMenu, ChartCardWrapper, ChartFiltersProvider, ChartLoading, ChatContext, ChatPrivacyToggle, ChatProvider, CompanyDialog, ConnectorManagementDialog, CopyButtonIcon, CourseAccessGuard, CourseCardSkeleton, CourseContentLoading, CourseOutline, CourseOutlineContext, CourseOutlineDrawer, CreateAgentForm, CreateAgentModal, CreateProjectModal, CreateWorkflowModal, CredentialBox, CredentialMiniBoxSkeleton, CredentialsList, CreditBalance, CustomDateRangePicker, CustomTooltip, DEFAULT_COWORK_REQUIRED_SIZE_GB, DEFAULT_LOCALE, DefaultEmptyBox, DeleteProjectModal, DeleteWorkflowModal, DiscoverContentCard, DiscoverFacetsFilter, DiscoverFilterDrawer, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ENROLL_NOW_COURSE_STARTING_SOON_LABEL, ENROLL_NOW_LABEL, EditAlertDialog, EducationBox, EducationDialog, EducationTab, EdxIframeContext, EmptyStats, ExperienceBox, ExperienceDialog, ExperienceTab, FacetFilterContext, Footer, GradebookTab, GroupsFilterDropdown, INVITATION_ONLY_LABEL, InstitutionDialog, IntegrationsTab, InviteUserContent, InviteUserDialog, InvitedUsersDialog, LOCAL_MODELS, Loader, LocalLLMTab, LocalModelsContent, LoginButton, MACOS_PERMISSIONS_COMMANDS, MEMORY_PAGE_SIZE, Markdown, MinimumMentorAlert, MonetizationTab, NotificationDisplay, NotificationDropdown, ONBOARDING_SECTORS, OnboardingShell, OnboardingWizard, PaywallModal, PlacementExam, PlacementExamsDropdown, PlatformNavbar, PlatformNavbarSearch, Profile, ProfileTimeChart, ProgressDots, ProjectActionButtons, ProjectFilesModal, ProjectInstructionsModal, ProjectLandingPage, ProjectMentorsList, ProjectsPage, REQUEST_ACCESS_COURSE_STARTING_SOON_LABEL, REQUEST_ACCESS_LABEL, RenameProjectModal, ResumeBox, ResumeTab, RichTextEditor, SUPPORTED_LOCALES, SandboxConfig, SearchableMultiSelect, SendNotificationDialog, SignupButton, SkeletonActivityStatBox, SkeletonAddSkillsLoading, SkeletonCreatePathwaySearchList, SkeletonDiscoverFilterBox, SkeletonEducationBox, SkeletonMultiplier, SkeletonPathwayBox, SkeletonProfileInfoCard, SkeletonSkillBox, SkillBox, SkillDetailModal, SkillLeaderboardChart, SkillsBox, SkillsList, SlashSkillPicker, Spinner, StatCard, StepHeader, TAURI_COMMANDS, TAURI_EVENTS, TenantSwitcher, TimeFilter, TimeTrackingProvider, TimedExam, ToolDialogs, TopBanner, UpgradePackageModal, UserAvatar, Version, WebContainersI18nProvider, WorkflowSidebar, addBookmarksTab, availablePlacementExams, findLastResumeBlock, findSequentialParent, flattenVerticalBlocks, getCatalog, getFirstAvailableUnit, getLocalLLMModel, getLocalLLMToolSupport, getNextUnitIframe, getOrg, getParentBlockById, getParentsInfosFromSublessonId, getPreviousUnitIframe, getRandomCourseImage, getSectorById, getTenant, getUnitToIframe, getUserId, getUserName, inBrowserPrint, inIframe, initialCuaDriverInstallState, initialModelDownloadState, isCoworkEnabled, isLocalLLMEnabled, isPlatformNavbarCreditBalanceVisible, isSlashCommandToken, isTauriApp, isValidLocale, components as markdownComponents, modelSupportsCowork, onboardingPrimaryButtonClass, onboardingSecondaryButtonClass, resolveCreateAgentLabels, sanitizeCss, setCoworkEnabled, setLocalLLMEnabled, setLocalLLMModel, setLocalLLMToolSupport, smallestCoworkModel, useAnalyticsSettings, useAuditLog, useCatalogSearch, useChartFilters, useChatPrivacy, useChatState, useCourseDetail, useCourseMetadata, useCourses, useCuaDriver, useDiscover, useEdxIframe, useFinancial, useIframeMessageHandler, useLocalStorage, useMemory, useModelDownload, useMonetization, useOverview, useProfileActivityStats, useProfileCredentials, useProfilePathways, useProfilePrograms, useProfileSkills, useProfileTimeSpent, usePrograms, useReports, useSlashSkillPicker, useT, useTauri, useTimeTracking, useTopics, useTranscripts, useUserCourses, useUserMetadata, useUsers, useWebContainersI18n, useWebContainersLocale };
|
|
236271
|
+
export { ACCESS_COURSE_LABEL, ALL_CATEGORIES, AccessTimeHeatmap, AccessiblePaginate, AddMentorToProjectModal, AddSkillDialog, Admin, AdvancedTab, AgentConfigPrompts, AgentSkills, AlertsTab, AnalyticsAuditLogStats, AnalyticsCourseDetail, AnalyticsCourses, AnalyticsFinancialStats, AnalyticsLayout, AnalyticsMemoryStats, AnalyticsMonetizationStats, AnalyticsOverview, AnalyticsProgramDetail, AnalyticsPrograms, AnalyticsReportDownload, AnalyticsReports, AnalyticsSettingsProvider, AnalyticsTopicsStats, AnalyticsTranscriptsStats, AnalyticsUsersStats, AppleRestrictionModal, ApplyWizard, BUY_NOW_LABEL, BillingTab, CATALOGS, CREATE_AGENT_LABELS, CUA_DRIVER_REPO_URL, CUA_DRIVER_TAURI_COMMANDS, CUA_DRIVER_TAURI_EVENTS, CategorizedDropdownMenu, ChartCardWrapper, ChartFiltersProvider, ChartLoading, ChatContext, ChatPrivacyToggle, ChatProvider, CompanyDialog, ConnectorManagementDialog, CopyButtonIcon, CourseAccessGuard, CourseCardSkeleton, CourseContentLoading, CourseOutline, CourseOutlineContext, CourseOutlineDrawer, CreateAgentForm, CreateAgentModal, CreateProjectModal, CreateWorkflowModal, CredentialBox, CredentialMiniBoxSkeleton, CredentialsList, CreditBalance, CustomDateRangePicker, CustomTooltip, DEFAULT_COWORK_REQUIRED_SIZE_GB, DEFAULT_LOCALE, DefaultEmptyBox, DeleteProjectModal, DeleteWorkflowModal, DiscoverContentCard, DiscoverFacetsFilter, DiscoverFilterDrawer, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ENROLL_NOW_COURSE_STARTING_SOON_LABEL, ENROLL_NOW_LABEL, EditAlertDialog, EducationBox, EducationDialog, EducationTab, EdxIframeContext, EmptyStats, ExperienceBox, ExperienceDialog, ExperienceTab, FacetFilterContext, Footer, GradebookTab, GroupsFilterDropdown, INVITATION_ONLY_LABEL, InstitutionDialog, IntegrationsTab, InviteUserContent, InviteUserDialog, InvitedUsersDialog, LOCAL_MODELS, Loader, LocalLLMTab, LocalModelsContent, LoginButton, MACOS_PERMISSIONS_COMMANDS, MEMORY_PAGE_SIZE, Markdown, MinimumMentorAlert, MonetizationTab, NotificationDisplay, NotificationDropdown, ONBOARDING_SECTORS, OnboardingShell, OnboardingWizard, PaywallModal, PlacementExam, PlacementExamsDropdown, PlatformNavbar, PlatformNavbarSearch, Profile, ProfileTimeChart, ProgressDots, ProjectActionButtons, ProjectFilesModal, ProjectInstructionsModal, ProjectLandingPage, ProjectMentorsList, ProjectsPage, REQUEST_ACCESS_COURSE_STARTING_SOON_LABEL, REQUEST_ACCESS_LABEL, RenameProjectModal, ResumeBox, ResumeTab, RichTextEditor, SUPPORTED_LOCALES, SandboxConfig, SearchableMultiSelect, SendNotificationDialog, SignupButton, SkeletonActivityStatBox, SkeletonAddSkillsLoading, SkeletonCreatePathwaySearchList, SkeletonDiscoverFilterBox, SkeletonEducationBox, SkeletonMultiplier, SkeletonPathwayBox, SkeletonProfileInfoCard, SkeletonSkillBox, SkillBox, SkillDetailModal, SkillLeaderboardChart, SkillsBox, SkillsList, SlashSkillPicker, Spinner, StatCard, StepHeader, TAURI_COMMANDS, TAURI_EVENTS, TenantSwitcher, TimeFilter, TimeTrackingProvider, TimedExam, ToolDialogs, TopBanner, UpgradePackageModal, UserAvatar, Version, WebContainersI18nProvider, WorkflowSidebar, addBookmarksTab, availablePlacementExams, findLastResumeBlock, findSequentialParent, flattenVerticalBlocks, getCatalog, getFirstAvailableUnit, getLocalLLMModel, getLocalLLMToolSupport, getNextUnitIframe, getOrg, getParentBlockById, getParentsInfosFromSublessonId, getPreviousUnitIframe, getRandomCourseImage, getSectorById, getTenant, getUnitToIframe, getUserId, getUserName, inBrowserPrint, inIframe, initialCuaDriverInstallState, initialModelDownloadState, isCoworkEnabled, isLocalLLMEnabled, isPlatformNavbarCreditBalanceVisible, isSlashCommandToken, isTauriApp, isValidLocale, components as markdownComponents, modelSupportsCowork, onboardingPrimaryButtonClass, onboardingSecondaryButtonClass, resolveCreateAgentLabels, sanitizeCss, setCoworkEnabled, setLocalLLMEnabled, setLocalLLMModel, setLocalLLMToolSupport, smallestCoworkModel, useAnalyticsSettings, useAuditLog, useCatalogSearch, useChartFilters, useChatPrivacy, useChatState, useCourseDetail, useCourseMetadata, useCourses, useCuaDriver, useDiscover, useEdxIframe, useFinancial, useIframeMessageHandler, useLocalStorage, useMemory, useModelDownload, useMonetization, useOverview, useProfileActivityStats, useProfileCredentials, useProfilePathways, useProfilePrograms, useProfileSkills, useProfileTimeSpent, usePrograms, useReports, useSlashSkillPicker, useSlashSkills, useT, useTauri, useTimeTracking, useTopics, useTranscripts, useUserCourses, useUserMetadata, useUsers, useWebContainersI18n, useWebContainersLocale };
|
|
236193
236272
|
//# sourceMappingURL=index.esm.js.map
|