@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.
@@ -2,7 +2,7 @@ import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
2
2
  import * as React from 'react';
3
3
  import React__default, { useState, useEffect, forwardRef, createElement as createElement$3, useLayoutEffect, createContext, useContext, useMemo, useReducer, useRef, useImperativeHandle, useCallback, isValidElement, Children, PureComponent, cloneElement, Component as Component$1, useId as useId$2, useDebugValue, lazy, Suspense } from 'react';
4
4
  import * as dataLayer from '@iblai/data-layer';
5
- import { useGetUserMetadataQuery, useGetUserMetadataEdxQuery, useUpdateUserMetadataMutation, useUpdateUserMetadataEdxMutation, useUploadProfileImageMutation, useResetPasswordMutation, useSelfRetireMutation, useCreateUserInstitutionMutation, useGetUserInstitutionsQuery, useCreateUserEducationMutation, useUpdateUserEducationMutation, useDeleteUserEducationMutation, useGetUserEducationQuery, useCreateUserCompanyMutation, useGetUserCompaniesQuery, useCreateUserExperienceMutation, useUpdateUserExperienceMutation, useDeleteUserExperienceMutation, useGetUserExperienceQuery, useGetUserResumeQuery, useCreateUserResumeMutation, useGetMySubscriptionsQuery, useGetItemSubscriptionQuery, useCancelSubscriptionMutation, useGetLearnerDetailsQuery, useGetUserEnrolledCoursesQuery, useGetUserEnrolledProgramsQuery, useGetUserCatalogPathwaysQuery, useGetUsersAsAssertionsQuery, useGetUserEarnedSkillsQuery, useGetUserReportedSkillsQuery, useGetUserDesiredSkillsQuery, useCreateGlobalMemoryMutation, useGetMemsearchStatusQuery, useGetUserMemorySettingsQuery, useUpdateUserMemorySettingsMutation, useGetGlobalMemoriesQuery, useGetAllMentorMemoriesQuery, useDeleteGlobalMemoryMutation, useInviteUserMutation, usePlatformInvitationsQuery, useCreateCatalogInvitationCourseBulkMutation, useGetCatalogInvitationsCourseQuery, useLazyPlatformUsersQuery, useLazyPlatformUserGroupsQuery, useGetPersonnalizedSearchQuery, useCreateCatalogInvitationProgramBulkMutation, useGetCatalogInvitationsProgramQuery, useUpdateUserRoleMutation, useUpdateUserStatusMutation, useUpdatePlatformUserRoleWithPoliciesMutation, usePlatformUsersQuery, useGetAccessibleUsersQuery, isPoliciesResponse, platformApiSlice, featureTags, useLazyGetRbacTeamsAccessListQuery, useCreateRbacTeamsAccessMutation, useGetRbacGroupsQuery, usePlatformUserGroupsQuery, useCreateRbacGroupMutation, useUpdateRbacGroupMutation, useDeleteRbacGroupMutation, useCreatePlatformUserGroupMutation, useUpdatePlatformUserGroupMutation, useDeletePlatformUserGroupMutation, useGetRbacGroupDetailsQuery, useGetPlatformUserGroupDetailsQuery, useGetRbacPermissionsMutation, useGetRbacRolesQuery, useCreateRbacRoleMutation, useUpdateRbacRoleMutation, useDeleteRbacRoleMutation, useGetRbacRoleDetailsQuery, useGetRbacActionsDefinitionQuery, useGetRbacResourceDiscoveryQuery, useGetRbacResourceListQuery, useGetRbacPoliciesQuery, useCreateRbacPolicyMutation, useUpdateRbacPolicyMutation, useDeleteRbacPolicyMutation, useGetRbacPolicyDetailsQuery, useGetWatchedGroupsQuery, useCreateWatchedGroupMutation, useUpdateWatchedGroupMutation, useDeleteWatchedGroupMutation, useAddWatchedUserMutation, useRemoveWatchedUserMutation, useAddWatcherMutation, useUpdateWatcherMutation, useDeleteWatcherMutation, useGetWatchedUsersQuery, useGetWatchersQuery, WATCHER_NOTIFICATION_EVENTS, WATCHER_NOTIFICATION_EVENT_LABELS, useGetApplicationFormsQuery, useGetApplicationFormDetailQuery, useCreateApplicationFormMutation, useUpdateApplicationFormMutation, useGetApplicationAdminDetailQuery, useInviteApplicationCandidateMutation, useLazyGetApplicationAttachmentFileQuery, useCreateApplicationWaiverMutation, useDeleteApplicationWaiverMutation, useSubmitApplicationOverrideMutation, useUpdateApplicationPlacementMutation, useDeleteApplicationCourseAssignmentMutation, useCreateApplicationNoteMutation, useUpdateApplicationNoteMutation, useDeleteApplicationNoteMutation, useTransitionApplicationMutation, useLinkApplicationCandidateMutation, useCreateApplicationPlacementsMutation, useGetCustomMentorsQuery, useCreateApplicationCourseAssignmentsMutation, useGetApplicationBlocksQuery, useDeleteApplicationBlockMutation, useGetApplicationsPipelineStatsQuery, useGetApplicationsPipelineQuery, useDeleteApiKeyMutation, useGetApiKeyQuery, useGetApiKeyFieldPermissionsQuery, useUpdateApiKeyMutation, useGetApiKeysQuery, unwrapApiTokenList, useCreateApiKeyMutation, useCreateLLMCredentialMutation, useGetCredentialsSchemaQuery, useGetMaskedLLMCredentialsQuery, useGetLlmsQuery, useDeleteIntegrationCredentialMutation, useDeleteCredentialMutation, useCreateIntegrationCredentialMutation, useGetIntegrationCredentialsSchemaQuery, useGetMaskedIntegrationCredentialsQuery, useGetAccountBillingInfoQuery, useUpdateAutoRechargeInfoMutation, useTriggerAutoRechargeMutation, useCreateStripeCustomerPortalMutation, useSetPlatformConfigurationsMutation, useGetPlatformConfigurationsQuery, useUpdatePlatformMembershipMutation, useGetPlatformMembershipQuery, useGetCustomDomainsQuery, useCreateCustomDomainMutation, useDeleteCustomDomainMutation, useGetStudentMentorCreationStatusQuery, useSetStudentMentorCreationStatusMutation, coreApiSlice, recommendationPromptTypeEnum, useGetRecommendedPromptsListQuery, useCreateRecommendedPromptMutation, useUpdateRecommendedPromptMutation, useDeleteRecommendedPromptMutation, useLazyGetPublicPlatformImageAssetFileUrlQuery, useUpdateTenantMetadataMutation, useCreatePlatformImageAssetMutation, useGetProviderConfigQuery, useCreateProviderConfigMutation, useDeleteProviderConfigMutation, useGetExternalMappingQuery, useGetCredentialsListQuery, useCreateExternalMappingMutation, useDeleteExternalMappingMutation, useGetMemsearchConfigQuery, useUpdateMemsearchConfigMutation, useGetStripeConnectStatusQuery, useStartStripeConnectOnboardingMutation, useLazyGetStripeConnectDashboardQuery, useGetAiSearchMentorsQuery, useListPaywallsQuery, useListPricesQuery, useCreatePriceMutation, useUpdatePriceMutation, useDeletePriceMutation, useGetPaywallConfigQuery, useEnablePaywallMutation, useUpdatePaywallMutation, useStarMentorMutation, useUnstarMentorMutation, useLazyGetCourseMetaDataQuery, useLazyGetCourseCompletionOutlinesQuery, useLazyGetCourseEligibilityQuery, useLazyGetEdxSSOTokenQuery, useCreateCourseEnrollmentMutation, useCreateStripeCheckoutSessionMutation, useLazyGetCourseProgressQuery, useLazyGetCourseCompletionQuery, useUpdateExamAttemptMutation, useStartExamMutation, useLazyGetExamInfoQuery, useGetAgentSkillResourcesQuery, useCreateAgentSkillResourceMutation, useUpdateAgentSkillResourceMutation, useUploadAgentSkillResourceAssetMutation, useDeleteAgentSkillResourceMutation, useGetAgentSkillsQuery, useGetMentorSkillAssignmentsQuery, useCreateMentorSkillAssignmentMutation, useUpdateMentorSkillAssignmentMutation, useDeleteMentorSkillAssignmentMutation, useCreateAgentSkillMutation, useUpdateAgentSkillMutation, useDeleteAgentSkillMutation, resolveEffectiveAgentSkills, filterSlashSkills, useUpdateUserProjectMutation, useGetTrainingDocumentsQuery, useGetVectorDocumentsQuery, useGetMentorMemoriesListQuery, useGetMemoryCategoriesAdminQuery, useDeleteMentorMemoryMutation, useUpdateMentorMemoryMutation, useCreateMentorMemoryMutation, useLazyGetConnectedServiceAuthUrlQuery, useCreateUserProjectMutation, useDeleteUserProjectMutation, useGetUserProjectDetailsQuery, useEditTrainingDocumentMutation, useAddTrainingDocumentMutation, useLazyGetCredentialsQuery, useGetMentorSettingsQuery, useEditMentorMutation, useUploadLightLogoMutation, useUploadDarkLogoMutation, useUpdatePlatformInfoMutation, LOGO_ENDPOINTS, useCreateEvalDatasetMutation, useAddEvalDatasetItemsMutation, useUploadEvalDatasetCsvMutation, useDeleteEvalDatasetItemMutation, useListEvalDatasetItemsQuery, evalTotalPages, useListEvalDatasetsQuery, useGetUserProjectsQuery, useCreateSessionIdMutation, useGetMentorCategoriesQuery, useGetTenantChatPrivacyConfigQuery as useGetTenantChatPrivacyConfigQuery$1, useGetCallConfigurationsQuery, useCreateCallConfigurationMutation, useUpdateCallConfigurationMutation, chatPrivacyApiSlice, useDeleteMentorMutation, useForkMentorMutation, useGetToolsQuery, useLazyGetMCPServersQuery, useOauthFindMutation, useLazyStartOAuthFlowQuery, useCreateMCPServerMutation, usePartialUpdateMCPServerMutation, useCreateMCPServerConnectionMutation, usePatchMCPServerConnectionMutation, useGetConnectedServicesQuery, useGetMCPServersQuery, useGetMCPServerConnectionsQuery, useUpdateMCPServerMutation, useDeleteMCPServerMutation, useEditMentorJsonMutation, useDisconnectServiceMutation, useGetPromptCategoriesQuery, PRIVACY_ACTIONS, PRIVACY_ENTITY_TYPES, useGetVoicesQuery, useGetVoiceQuery, isBaseAgentMentor, useGetGradeResultQuery, useOverrideGradeResultMutation, useGetChatHistoryFilterQuery, useListGradeResultsQuery, useGetMentorGraderConfigurationQuery, useListGraderCriteriaQuery, useCreateMentorGraderConfigurationMutation, useUpdateMentorGraderConfigurationMutation, useCreateGraderCriterionMutation, useUpdateGraderCriterionMutation, useDeleteGraderCriterionMutation, useGetMentorPublicSettingsQuery, useGetChatHistoryQuery, useGetMentorSummariesQuery, useGetConversationMemoriesQuery, useGetSupportTicketsQuery, useGetSupportTicketMessagesQuery, useCreateSupportTicketMessageMutation, usePatchSupportTicketMutation, useCloseSupportTicketMutation, useCreateLtiMentorMutation, useUpdateLtiMentorMutation, useGetLtiMentorsQuery, useCreateLtiKeyMutation, useUpdateLtiKeyMutation, useDeleteLtiKeyMutation, useGetLtiKeysQuery, useCreateLtiToolMutation, useUpdateLtiToolMutation, useGetLtiToolsQuery, useGetPlatformInfoQuery, useCreatePromptMutation, useGetPromptsSearchQuery, useUpdatePromptMutation, useCreateRedirectTokenMutation, useGetShareableLinkQuery, useCreateShareableLinkMutation, useUpdateShareableLinkMutation, useCreateDisclaimerMutation, useUpdateDisclaimerMutation, useGetDisclaimersQuery, useUpdateRbacMentorAccessMutation, useGetRbacMentorAccessListQuery, useStartEvalRunMutation, useEvaluateEvalRunMutation, useGetEvalRunQuery, useDeleteEvalScoreMutation, useListEvalRunJudgesQuery, useCreateEvalScoreMutation, useDeleteEvalRunMutation, useExportEvalRunMutation, useListEvalRunsQuery, useLazyGetEvalRunQuery, evaluationsApiSlice, EVALUATIONS_TAGS, useGetPersonnalizedMentorsQuery, useCreateCallCredentialsMutation, useGetGuidedPromptsQuery, useUpdateChatSessionSharedMutation, useUpdateMessageFeedbackMutation, useLazyGetPromptsSearchQuery, useLazyGetGuidedPromptsQuery, useGetPublicMentorsQuery, useGetPeriodicAgentsQuery, useGetPeriodicAgentLogsListQuery, useCreatePeriodicAgentMutation, useDeletePeriodicAgentMutation, useDeletePromptMutation, useDeleteTrainingDocumentMutation, useGetTrainingDocumentRetrainScheduleQuery, useCreateTrainingDocumentRetrainScheduleMutation, useCreateMemoryCategoryMutation, useUpdateMemoryCategoryMutation, useDeleteMemoryCategoryMutation, useUpdateArtifactMutation, useLazyGetArtifactVersionQuery, useLazyListArtifactVersionsQuery, useSetCurrentVersionMutation, useListArtifactVersionsQuery, useLazyGetArtifactQuery, useLazyListArtifactsQuery, useEditSessionMutation } from '@iblai/data-layer';
5
+ import { useGetUserMetadataQuery, useGetUserMetadataEdxQuery, useUpdateUserMetadataMutation, useUpdateUserMetadataEdxMutation, useUploadProfileImageMutation, useResetPasswordMutation, useSelfRetireMutation, useCreateUserInstitutionMutation, useGetUserInstitutionsQuery, useCreateUserEducationMutation, useUpdateUserEducationMutation, useDeleteUserEducationMutation, useGetUserEducationQuery, useCreateUserCompanyMutation, useGetUserCompaniesQuery, useCreateUserExperienceMutation, useUpdateUserExperienceMutation, useDeleteUserExperienceMutation, useGetUserExperienceQuery, useGetUserResumeQuery, useCreateUserResumeMutation, useGetMySubscriptionsQuery, useGetItemSubscriptionQuery, useCancelSubscriptionMutation, useGetLearnerDetailsQuery, useGetUserEnrolledCoursesQuery, useGetUserEnrolledProgramsQuery, useGetUserCatalogPathwaysQuery, useGetUsersAsAssertionsQuery, useGetUserEarnedSkillsQuery, useGetUserReportedSkillsQuery, useGetUserDesiredSkillsQuery, useCreateGlobalMemoryMutation, useGetMemsearchStatusQuery, useGetUserMemorySettingsQuery, useUpdateUserMemorySettingsMutation, useGetGlobalMemoriesQuery, useGetAllMentorMemoriesQuery, useDeleteGlobalMemoryMutation, useInviteUserMutation, usePlatformInvitationsQuery, useCreateCatalogInvitationCourseBulkMutation, useGetCatalogInvitationsCourseQuery, useLazyPlatformUsersQuery, useLazyPlatformUserGroupsQuery, useGetPersonnalizedSearchQuery, useCreateCatalogInvitationProgramBulkMutation, useGetCatalogInvitationsProgramQuery, useUpdateUserRoleMutation, useUpdateUserStatusMutation, useUpdatePlatformUserRoleWithPoliciesMutation, usePlatformUsersQuery, useGetAccessibleUsersQuery, isPoliciesResponse, platformApiSlice, featureTags, useLazyGetRbacTeamsAccessListQuery, useCreateRbacTeamsAccessMutation, useGetRbacGroupsQuery, usePlatformUserGroupsQuery, useCreateRbacGroupMutation, useUpdateRbacGroupMutation, useDeleteRbacGroupMutation, useCreatePlatformUserGroupMutation, useUpdatePlatformUserGroupMutation, useDeletePlatformUserGroupMutation, useGetRbacGroupDetailsQuery, useGetPlatformUserGroupDetailsQuery, useGetRbacPermissionsMutation, useGetRbacRolesQuery, useCreateRbacRoleMutation, useUpdateRbacRoleMutation, useDeleteRbacRoleMutation, useGetRbacRoleDetailsQuery, useGetRbacActionsDefinitionQuery, useGetRbacResourceDiscoveryQuery, useGetRbacResourceListQuery, useGetRbacPoliciesQuery, useCreateRbacPolicyMutation, useUpdateRbacPolicyMutation, useDeleteRbacPolicyMutation, useGetRbacPolicyDetailsQuery, useGetWatchedGroupsQuery, useCreateWatchedGroupMutation, useUpdateWatchedGroupMutation, useDeleteWatchedGroupMutation, useAddWatchedUserMutation, useRemoveWatchedUserMutation, useAddWatcherMutation, useUpdateWatcherMutation, useDeleteWatcherMutation, useGetWatchedUsersQuery, useGetWatchersQuery, WATCHER_NOTIFICATION_EVENTS, WATCHER_NOTIFICATION_EVENT_LABELS, useGetApplicationFormsQuery, useGetApplicationFormDetailQuery, useCreateApplicationFormMutation, useUpdateApplicationFormMutation, useGetApplicationAdminDetailQuery, useInviteApplicationCandidateMutation, useLazyGetApplicationAttachmentFileQuery, useCreateApplicationWaiverMutation, useDeleteApplicationWaiverMutation, useSubmitApplicationOverrideMutation, useUpdateApplicationPlacementMutation, useDeleteApplicationCourseAssignmentMutation, useCreateApplicationNoteMutation, useUpdateApplicationNoteMutation, useDeleteApplicationNoteMutation, useTransitionApplicationMutation, useLinkApplicationCandidateMutation, useCreateApplicationPlacementsMutation, useGetCustomMentorsQuery, useCreateApplicationCourseAssignmentsMutation, useGetApplicationBlocksQuery, useDeleteApplicationBlockMutation, useGetApplicationsPipelineStatsQuery, useGetApplicationsPipelineQuery, useDeleteApiKeyMutation, useGetApiKeyQuery, useGetApiKeyFieldPermissionsQuery, useUpdateApiKeyMutation, useGetApiKeysQuery, unwrapApiTokenList, useCreateApiKeyMutation, useCreateLLMCredentialMutation, useGetCredentialsSchemaQuery, useGetMaskedLLMCredentialsQuery, useGetLlmsQuery, useDeleteIntegrationCredentialMutation, useDeleteCredentialMutation, useCreateIntegrationCredentialMutation, useGetIntegrationCredentialsSchemaQuery, useGetMaskedIntegrationCredentialsQuery, useGetAccountBillingInfoQuery, useUpdateAutoRechargeInfoMutation, useTriggerAutoRechargeMutation, useCreateStripeCustomerPortalMutation, useSetPlatformConfigurationsMutation, useGetPlatformConfigurationsQuery, useUpdatePlatformMembershipMutation, useGetPlatformMembershipQuery, useGetCustomDomainsQuery, useCreateCustomDomainMutation, useDeleteCustomDomainMutation, useGetStudentMentorCreationStatusQuery, useSetStudentMentorCreationStatusMutation, coreApiSlice, recommendationPromptTypeEnum, useGetRecommendedPromptsListQuery, useCreateRecommendedPromptMutation, useUpdateRecommendedPromptMutation, useDeleteRecommendedPromptMutation, useLazyGetPublicPlatformImageAssetFileUrlQuery, useUpdateTenantMetadataMutation, useCreatePlatformImageAssetMutation, useGetProviderConfigQuery, useCreateProviderConfigMutation, useDeleteProviderConfigMutation, useGetExternalMappingQuery, useGetCredentialsListQuery, useCreateExternalMappingMutation, useDeleteExternalMappingMutation, useGetMemsearchConfigQuery, useUpdateMemsearchConfigMutation, useGetStripeConnectStatusQuery, useStartStripeConnectOnboardingMutation, useLazyGetStripeConnectDashboardQuery, useGetAiSearchMentorsQuery, useListPaywallsQuery, useListPricesQuery, useCreatePriceMutation, useUpdatePriceMutation, useDeletePriceMutation, useGetPaywallConfigQuery, useEnablePaywallMutation, useUpdatePaywallMutation, useStarMentorMutation, useUnstarMentorMutation, useLazyGetCourseMetaDataQuery, useLazyGetCourseCompletionOutlinesQuery, useLazyGetCourseEligibilityQuery, useLazyGetEdxSSOTokenQuery, useCreateCourseEnrollmentMutation, useCreateStripeCheckoutSessionMutation, useLazyGetCourseProgressQuery, useLazyGetCourseCompletionQuery, useUpdateExamAttemptMutation, useStartExamMutation, useLazyGetExamInfoQuery, useGetAgentSkillResourcesQuery, useCreateAgentSkillResourceMutation, useUpdateAgentSkillResourceMutation, useUploadAgentSkillResourceAssetMutation, useDeleteAgentSkillResourceMutation, useGetAgentSkillsQuery, useGetMentorSkillAssignmentsQuery, useCreateMentorSkillAssignmentMutation, useUpdateMentorSkillAssignmentMutation, useDeleteMentorSkillAssignmentMutation, useCreateAgentSkillMutation, useUpdateAgentSkillMutation, useDeleteAgentSkillMutation, resolveEffectiveAgentSkills, filterSlashSkills, useGetMentorSkillAssignmentsInfiniteQuery, MENTOR_SKILL_ASSIGNMENTS_PAGE_SIZE, useUpdateUserProjectMutation, useGetTrainingDocumentsQuery, useGetVectorDocumentsQuery, useGetMentorMemoriesListQuery, useGetMemoryCategoriesAdminQuery, useDeleteMentorMemoryMutation, useUpdateMentorMemoryMutation, useCreateMentorMemoryMutation, useLazyGetConnectedServiceAuthUrlQuery, useCreateUserProjectMutation, useDeleteUserProjectMutation, useGetUserProjectDetailsQuery, useEditTrainingDocumentMutation, useAddTrainingDocumentMutation, useLazyGetCredentialsQuery, useGetMentorSettingsQuery, useEditMentorMutation, useUploadLightLogoMutation, useUploadDarkLogoMutation, useUpdatePlatformInfoMutation, LOGO_ENDPOINTS, useCreateEvalDatasetMutation, useAddEvalDatasetItemsMutation, useUploadEvalDatasetCsvMutation, useDeleteEvalDatasetItemMutation, useListEvalDatasetItemsQuery, evalTotalPages, useListEvalDatasetsQuery, useGetUserProjectsQuery, useCreateSessionIdMutation, useGetMentorCategoriesQuery, useGetTenantChatPrivacyConfigQuery as useGetTenantChatPrivacyConfigQuery$1, useGetCallConfigurationsQuery, useCreateCallConfigurationMutation, useUpdateCallConfigurationMutation, chatPrivacyApiSlice, useDeleteMentorMutation, useForkMentorMutation, useGetToolsQuery, useLazyGetMCPServersQuery, useOauthFindMutation, useLazyStartOAuthFlowQuery, useCreateMCPServerMutation, usePartialUpdateMCPServerMutation, useCreateMCPServerConnectionMutation, usePatchMCPServerConnectionMutation, useGetConnectedServicesQuery, useGetMCPServersQuery, useGetMCPServerConnectionsQuery, useUpdateMCPServerMutation, useDeleteMCPServerMutation, useEditMentorJsonMutation, useDisconnectServiceMutation, useGetPromptCategoriesQuery, PRIVACY_ACTIONS, PRIVACY_ENTITY_TYPES, useGetVoicesQuery, useGetVoiceQuery, isBaseAgentMentor, useGetGradeResultQuery, useOverrideGradeResultMutation, useGetChatHistoryFilterQuery, useListGradeResultsQuery, useGetMentorGraderConfigurationQuery, useListGraderCriteriaQuery, useCreateMentorGraderConfigurationMutation, useUpdateMentorGraderConfigurationMutation, useCreateGraderCriterionMutation, useUpdateGraderCriterionMutation, useDeleteGraderCriterionMutation, useGetMentorPublicSettingsQuery, useGetChatHistoryQuery, useGetMentorSummariesQuery, useGetConversationMemoriesQuery, useGetSupportTicketsQuery, useGetSupportTicketMessagesQuery, useCreateSupportTicketMessageMutation, usePatchSupportTicketMutation, useCloseSupportTicketMutation, useCreateLtiMentorMutation, useUpdateLtiMentorMutation, useGetLtiMentorsQuery, useCreateLtiKeyMutation, useUpdateLtiKeyMutation, useDeleteLtiKeyMutation, useGetLtiKeysQuery, useCreateLtiToolMutation, useUpdateLtiToolMutation, useGetLtiToolsQuery, useGetPlatformInfoQuery, useCreatePromptMutation, useGetPromptsSearchQuery, useUpdatePromptMutation, useCreateRedirectTokenMutation, useGetShareableLinkQuery, useCreateShareableLinkMutation, useUpdateShareableLinkMutation, useCreateDisclaimerMutation, useUpdateDisclaimerMutation, useGetDisclaimersQuery, useUpdateRbacMentorAccessMutation, useGetRbacMentorAccessListQuery, useStartEvalRunMutation, useEvaluateEvalRunMutation, useGetEvalRunQuery, useDeleteEvalScoreMutation, useListEvalRunJudgesQuery, useCreateEvalScoreMutation, useDeleteEvalRunMutation, useExportEvalRunMutation, useListEvalRunsQuery, useLazyGetEvalRunQuery, evaluationsApiSlice, EVALUATIONS_TAGS, useGetPersonnalizedMentorsQuery, useCreateCallCredentialsMutation, useGetGuidedPromptsQuery, useUpdateChatSessionSharedMutation, useUpdateMessageFeedbackMutation, useLazyGetPromptsSearchQuery, useLazyGetGuidedPromptsQuery, useGetPublicMentorsQuery, useGetPeriodicAgentsQuery, useGetPeriodicAgentLogsListQuery, useCreatePeriodicAgentMutation, useDeletePeriodicAgentMutation, useDeletePromptMutation, useDeleteTrainingDocumentMutation, useGetTrainingDocumentRetrainScheduleQuery, useCreateTrainingDocumentRetrainScheduleMutation, useCreateMemoryCategoryMutation, useUpdateMemoryCategoryMutation, useDeleteMemoryCategoryMutation, useUpdateArtifactMutation, useLazyGetArtifactVersionQuery, useLazyListArtifactVersionsQuery, useSetCurrentVersionMutation, useListArtifactVersionsQuery, useLazyGetArtifactQuery, useLazyListArtifactsQuery, useEditSessionMutation } from '@iblai/data-layer';
6
6
  import { getInitials, useTenantMetadata, useCurrentTenant, selectRbacPermissions, isPureWatcher, WithPermissions, canWriteField, useStripeUpgrade, openExternalUrl, CHAT_AREA_SIZE, isAlphaNumeric32, checkRbacPermission, selectNumberOfActiveChatMessages, useUsername, selectStreaming, isLoggedIn, TOOLS, hasRemoteAiConfig, isSafariBrowser, useShowAttachment, useShowVoiceCall, useShowVoiceRecorder, useMentorSettings, selectShowingSharedChat, useShowFreeTrialDialog, useEmbedMode, chatInputSliceSelectors, useResponsive, useAccessingPublicRoute, useVisitingTenant, useModelFileUploadCapabilities, useChatFileUpload, useVoiceChat, selectAttachedFiles, MENTOR_CHAT_DOCUMENTS_EXTENSIONS, removeFile, chatInputSliceActions, chatActions, WithFormPermissions, useTenantContext, TimeTracker, advancedTabsProperties, defaultSessionIds, pickWritableFields, ANONYMOUS_USERNAME as ANONYMOUS_USERNAME$3, redirectToAuthSpaJoinTenant, selectActiveTab, useAxdToken, useWelcomeMessage, markdownToPlainText, useCachedSessionId, use402ErrorCheck, selectTokenEnabled, selectToken, useServiceWorker, useUserAgreement, useAdvancedChat, sendMessageToParentWebsite, useMentorTools, useFileDragDrop, eventBus, RemoteEvents, selectEnableChatActionsPopup, advancedTabs, isInIframe, getAuthSpaJoinUrl, addMessage, clearFiles, MENTOR_VISIBILITY } from '@iblai/web-utils';
7
7
  import { useDispatch, useSelector } from 'react-redux';
8
8
  import { toast } from 'sonner';
@@ -97460,7 +97460,6 @@ var analyticsAnalyticsAuditLogStats$3 = {
97460
97460
  };
97461
97461
  var analyticsAnalyticsCourseDetail$3 = {
97462
97462
  goBackAriaLabel: "Go back to courses list",
97463
- backToCourses: "Back to Courses",
97464
97463
  activeEnrollments: "Active Enrollments",
97465
97464
  completedEnrollments: "Completed Enrollments",
97466
97465
  timeSpent: "Time Spent",
@@ -97623,7 +97622,6 @@ var analyticsAnalyticsOverview$3 = {
97623
97622
  };
97624
97623
  var analyticsAnalyticsProgramDetail$3 = {
97625
97624
  backAriaLabel: "Go back to programs list",
97626
- backButton: "Back to Programs",
97627
97625
  statActiveUsers: "Active Users",
97628
97626
  statEnrollments: "Enrollments",
97629
97627
  statTimeSpent: "Time Spent",
@@ -98454,20 +98452,18 @@ var clawSandboxAgentSkills$3 = {
98454
98452
  fieldDescriptionPlaceholder: "e.g. Search the web for information",
98455
98453
  fieldInstruction: "Instruction",
98456
98454
  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.",
98457
- effectiveHeading: "This agent's skills",
98458
- catalogHeading: "Available skills",
98459
- noEffectiveSkills: "No skills enabled for this agent yet. Add one from the available skills below.",
98455
+ noEffectiveSkills: "No skills enabled for this agent yet. Add one from the Available Skills tab.",
98460
98456
  addToAgent: "Add",
98461
98457
  addToAgentLabel: "Add {name} to this agent",
98462
- removeFromAgent: "Remove from agent",
98458
+ removeFromAgent: "Remove from Agent",
98463
98459
  skillAdded: "{name} added",
98464
98460
  skillRemoved: "{name} removed",
98465
98461
  featuredBadge: "Featured",
98466
98462
  nativeBadge: "Native",
98467
- privateBadge: "Only this agent",
98463
+ privateBadge: "Only This Agent",
98468
98464
  fieldCategory: "Category",
98469
98465
  fieldCategoryPlaceholder: "e.g. web, code, data",
98470
- privateToAgent: "Only this agent",
98466
+ privateToAgent: "Only This Agent",
98471
98467
  privateToAgentHint: "Private skills are available to this agent only and take precedence over platform skills with the same slug.",
98472
98468
  instructionHint: "The playbook the agent follows when the skill is used. Edits apply immediately, including in conversations already in progress.",
98473
98469
  filesHint: "Optional resources the agent can use with this skill. References and scripts are text files; assets are uploaded files.",
@@ -98478,11 +98474,11 @@ var clawSandboxAgentSkills$3 = {
98478
98474
  fileTypeReference: "Reference",
98479
98475
  fileTypeScript: "Script",
98480
98476
  fileTypeAsset: "Asset",
98481
- fileNameLabel: "File name",
98477
+ fileNameLabel: "File Name",
98482
98478
  fileNamePlaceholder: "e.g. rubric.md",
98483
98479
  fileContentLabel: "Content",
98484
98480
  fileContentPlaceholder: "The file's text content",
98485
- addFileButton: "Add resource",
98481
+ addFileButton: "Add Resource",
98486
98482
  adding: "Adding...",
98487
98483
  uploading: "Uploading...",
98488
98484
  fileAdded: "Resource added",
@@ -98499,10 +98495,13 @@ var clawSandboxAgentSkills$3 = {
98499
98495
  editFileDialogTitle: "Edit Resource",
98500
98496
  deleteFileDialogTitle: "Delete Resource",
98501
98497
  deleteFileConfirmation: "Are you sure you want to delete {name}? This action cannot be undone.",
98502
- chooseFile: "Choose file",
98498
+ chooseFile: "Choose File",
98503
98499
  upload: "Upload",
98504
98500
  download: "Download",
98505
- resourcesItemLabel: "resources"
98501
+ tabsAriaLabel: "Skills",
98502
+ tabAgentSkills: "Agent Skills",
98503
+ tabAvailableSkills: "Available Skills",
98504
+ addedBadge: "Added"
98506
98505
  };
98507
98506
  var clawSandboxHelpers$3 = {
98508
98507
  unknown: "Unknown",
@@ -102413,7 +102412,7 @@ var platformNavbar$3 = {
102413
102412
  placementExamFallback: "Placement exam"
102414
102413
  };
102415
102414
  var slashSkillPicker$3 = {
102416
- listLabel: "Agent skills",
102415
+ listLabel: "Agent Skills",
102417
102416
  resultsAnnouncement: "{count} skills available. Use arrow keys to browse and Enter to select.",
102418
102417
  loading: "Loading..."
102419
102418
  };
@@ -103780,7 +103779,6 @@ var analyticsAnalyticsAuditLogStats$2 = {
103780
103779
  };
103781
103780
  var analyticsAnalyticsCourseDetail$2 = {
103782
103781
  goBackAriaLabel: "Retour à la liste des cours",
103783
- backToCourses: "Retour aux cours",
103784
103782
  activeEnrollments: "Inscriptions actives",
103785
103783
  completedEnrollments: "Inscriptions terminées",
103786
103784
  timeSpent: "Temps passé",
@@ -103943,7 +103941,6 @@ var analyticsAnalyticsOverview$2 = {
103943
103941
  };
103944
103942
  var analyticsAnalyticsProgramDetail$2 = {
103945
103943
  backAriaLabel: "Retour à la liste des programmes",
103946
- backButton: "Retour aux programmes",
103947
103944
  statActiveUsers: "Utilisateurs actifs",
103948
103945
  statEnrollments: "Inscriptions",
103949
103946
  statTimeSpent: "Temps passé",
@@ -104940,9 +104937,7 @@ var clawSandboxAgentSkills$2 = {
104940
104937
  fieldDescriptionPlaceholder: "ex. Rechercher des informations sur le web",
104941
104938
  fieldInstruction: "Instruction",
104942
104939
  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.",
104943
- effectiveHeading: "Compétences de cet agent",
104944
- catalogHeading: "Compétences disponibles",
104945
- noEffectiveSkills: "Cet agent n'a pas encore de compétences activées. Ajoutez-en une depuis les compétences disponibles.",
104940
+ noEffectiveSkills: "Cet agent n'a pas encore de compétences activées. Ajoutez-en une depuis l'onglet Compétences disponibles.",
104946
104941
  addToAgent: "Ajouter",
104947
104942
  addToAgentLabel: "Ajouter {name} à cet agent",
104948
104943
  removeFromAgent: "Retirer de l'agent",
@@ -104988,7 +104983,10 @@ var clawSandboxAgentSkills$2 = {
104988
104983
  chooseFile: "Choisir un fichier",
104989
104984
  upload: "Téléverser",
104990
104985
  download: "Télécharger",
104991
- resourcesItemLabel: "ressources"
104986
+ tabsAriaLabel: "Compétences",
104987
+ tabAgentSkills: "Compétences de l'agent",
104988
+ tabAvailableSkills: "Compétences disponibles",
104989
+ addedBadge: "Ajoutée"
104992
104990
  };
104993
104991
  var clawSandboxHelpers$2 = {
104994
104992
  unknown: "Inconnu",
@@ -110100,7 +110098,6 @@ var analyticsAnalyticsAuditLogStats$1 = {
110100
110098
  };
110101
110099
  var analyticsAnalyticsCourseDetail$1 = {
110102
110100
  goBackAriaLabel: "Volver a la lista de cursos",
110103
- backToCourses: "Volver a los cursos",
110104
110101
  activeEnrollments: "Inscripciones activas",
110105
110102
  completedEnrollments: "Inscripciones completadas",
110106
110103
  timeSpent: "Tiempo invertido",
@@ -110263,7 +110260,6 @@ var analyticsAnalyticsOverview$1 = {
110263
110260
  };
110264
110261
  var analyticsAnalyticsProgramDetail$1 = {
110265
110262
  backAriaLabel: "Volver a la lista de programas",
110266
- backButton: "Volver a programas",
110267
110263
  statActiveUsers: "Usuarios activos",
110268
110264
  statEnrollments: "Inscripciones",
110269
110265
  statTimeSpent: "Tiempo empleado",
@@ -111260,9 +111256,7 @@ var clawSandboxAgentSkills$1 = {
111260
111256
  fieldDescriptionPlaceholder: "ej. Buscar información en la web",
111261
111257
  fieldInstruction: "Instrucción",
111262
111258
  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.",
111263
- effectiveHeading: "Habilidades de este agente",
111264
- catalogHeading: "Habilidades disponibles",
111265
- noEffectiveSkills: "Este agente aún no tiene habilidades habilitadas. Añade una desde las habilidades disponibles.",
111259
+ noEffectiveSkills: "Este agente aún no tiene habilidades habilitadas. Añade una desde la pestaña Habilidades disponibles.",
111266
111260
  addToAgent: "Añadir",
111267
111261
  addToAgentLabel: "Añadir {name} a este agente",
111268
111262
  removeFromAgent: "Quitar del agente",
@@ -111308,7 +111302,10 @@ var clawSandboxAgentSkills$1 = {
111308
111302
  chooseFile: "Elegir archivo",
111309
111303
  upload: "Subir",
111310
111304
  download: "Descargar",
111311
- resourcesItemLabel: "recursos"
111305
+ tabsAriaLabel: "Habilidades",
111306
+ tabAgentSkills: "Habilidades del agente",
111307
+ tabAvailableSkills: "Habilidades disponibles",
111308
+ addedBadge: "Añadida"
111312
111309
  };
111313
111310
  var clawSandboxHelpers$1 = {
111314
111311
  unknown: "Desconocido",
@@ -116420,7 +116417,6 @@ var analyticsAnalyticsAuditLogStats = {
116420
116417
  };
116421
116418
  var analyticsAnalyticsCourseDetail = {
116422
116419
  goBackAriaLabel: "返回课程列表",
116423
- backToCourses: "返回课程",
116424
116420
  activeEnrollments: "活跃注册",
116425
116421
  completedEnrollments: "已完成注册",
116426
116422
  timeSpent: "学习时长",
@@ -116583,7 +116579,6 @@ var analyticsAnalyticsOverview = {
116583
116579
  };
116584
116580
  var analyticsAnalyticsProgramDetail = {
116585
116581
  backAriaLabel: "返回项目列表",
116586
- backButton: "返回项目",
116587
116582
  statActiveUsers: "活跃用户",
116588
116583
  statEnrollments: "注册人数",
116589
116584
  statTimeSpent: "花费时间",
@@ -117580,9 +117575,7 @@ var clawSandboxAgentSkills = {
117580
117575
  fieldDescriptionPlaceholder: "例如:在网络上搜索信息",
117581
117576
  fieldInstruction: "指令",
117582
117577
  sessionNote: "在此添加或移除的技能仅对新的聊天会话生效。技能指令的修改会立即生效,包括正在进行的对话。",
117583
- effectiveHeading: "此智能体的技能",
117584
- catalogHeading: "可用技能",
117585
- noEffectiveSkills: "此智能体尚未启用任何技能。请从下方的可用技能中添加。",
117578
+ noEffectiveSkills: "此智能体尚未启用任何技能。请从“可用技能”标签页添加。",
117586
117579
  addToAgent: "添加",
117587
117580
  addToAgentLabel: "将 {name} 添加到此智能体",
117588
117581
  removeFromAgent: "从智能体中移除",
@@ -117628,7 +117621,10 @@ var clawSandboxAgentSkills = {
117628
117621
  chooseFile: "选择文件",
117629
117622
  upload: "上传",
117630
117623
  download: "下载",
117631
- resourcesItemLabel: "资源"
117624
+ tabsAriaLabel: "技能",
117625
+ tabAgentSkills: "智能体技能",
117626
+ tabAvailableSkills: "可用技能",
117627
+ addedBadge: "已添加"
117632
117628
  };
117633
117629
  var clawSandboxHelpers = {
117634
117630
  unknown: "未知",
@@ -151376,7 +151372,7 @@ function SubscriptionDetail({ subscription: initialSubscription, platformKey, on
151376
151372
  }
151377
151373
  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(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
151378
151374
  ? t('purchasesPurchasesTab.labelAccessUntil')
151379
- : 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: t('purchasesPurchasesTab.backToPurchases') })] }) })), (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')] })] }) }))] }));
151375
+ : 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')] })] }) }))] }));
151380
151376
  }
151381
151377
  // ── Subscription Card (List Item) ──
151382
151378
  function SubscriptionCard({ sub, onClick }) {
@@ -180941,7 +180937,7 @@ function QuestionsEditor({ platformKey, onBack, initialFormId = null, startNew =
180941
180937
  }
180942
180938
  function BackButton$1({ onBack }) {
180943
180939
  const t = useT();
180944
- return (jsxs("button", { type: "button", onClick: onBack, className: "inline-flex items-center gap-1.5 text-sm text-gray-600 hover:text-gray-900 dark:text-gray-300", children: [jsx(ArrowLeft, { className: "h-4 w-4" }), t('profileApplicationsQuestionsEditor.backToApplications')] }));
180940
+ 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" }) }));
180945
180941
  }
180946
180942
  function SectionCard({ section, expanded, autoFocusTitle = false, onToggle, onChange, onRemove, onMove, onMakeCandidate, onEditField, onAddField, }) {
180947
180943
  var _a;
@@ -181259,7 +181255,7 @@ function SubmissionDetail({ platformKey, submissionId, onBack, }) {
181259
181255
  }
181260
181256
  function BackButton({ onBack }) {
181261
181257
  const t = useT();
181262
- return (jsxs("button", { type: "button", onClick: onBack, className: "inline-flex items-center gap-1.5 text-sm text-gray-600 hover:text-gray-900 dark:text-gray-300", children: [jsx(ArrowLeft, { className: "h-4 w-4" }), t('profileApplicationsTab.backToSubmissions')] }));
181258
+ 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" }) }));
181263
181259
  }
181264
181260
  function MaskedNotice({ title }) {
181265
181261
  const t = useT();
@@ -181760,7 +181756,7 @@ function BlocksView({ platformKey, onBack, }) {
181760
181756
  toast.error(t('profileApplicationsTab.actionFailed'));
181761
181757
  }
181762
181758
  };
181763
- return (jsxs("div", { className: "space-y-5 pt-4", children: [jsxs("button", { type: "button", onClick: onBack, className: "inline-flex items-center gap-1.5 text-sm text-gray-600 hover:text-gray-900 dark:text-gray-300", children: [jsx(ArrowLeft, { className: "h-4 w-4" }), t('profileApplicationsTab.backToForms')] }), 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) => {
181759
+ 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) => {
181764
181760
  var _a, _b;
181765
181761
  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));
181766
181762
  })) })] }) })] }));
@@ -181927,7 +181923,7 @@ function SubmissionsPipeline({ platformKey, form, onBack, onOpen, }) {
181927
181923
  const date = new Date(raw);
181928
181924
  return Number.isNaN(date.getTime()) ? '—' : date.toLocaleDateString();
181929
181925
  };
181930
- return (jsxs("div", { className: "space-y-5 pt-4", children: [jsxs("div", { className: "flex flex-wrap items-center justify-between gap-3", children: [jsxs("button", { type: "button", onClick: onBack, className: "inline-flex items-center gap-1.5 text-sm text-gray-600 hover:text-gray-900 dark:text-gray-300", children: [jsx(ArrowLeft, { className: "h-4 w-4" }), t('profileApplicationsTab.backToForms')] }), jsx("h4", { className: "text-sm font-semibold text-gray-900 dark:text-gray-100", children: form
181926
+ 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
181931
181927
  ? t('profileApplicationsTab.submissionsFor', {
181932
181928
  form: ((_a = form.schema) === null || _a === void 0 ? void 0 : _a.title) || form.name || t('profileApplicationsTab.untitledForm'),
181933
181929
  })
@@ -190486,7 +190482,7 @@ function PaywallDetail({ platformKey, authURL, itemType, itemId, itemName, isCus
190486
190482
  if (!isCustom && isLoading) {
190487
190483
  return (jsxs("div", { className: "space-y-4", children: [jsx(Skeleton, { className: "h-8 w-48" }), jsx(Skeleton, { className: "h-64 w-full" })] }));
190488
190484
  }
190489
- 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('monetizationPaywallDetail.back')] }), 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
190485
+ 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
190490
190486
  ? setCurrentStep
190491
190487
  : (step) => {
190492
190488
  // During creation, only allow navigating back to already-completed steps
@@ -254031,9 +254027,9 @@ function SkillResourcesSection({ platformKey, skillId }) {
254031
254027
  }
254032
254028
  return isCreating ? t('clawSandboxAgentSkills.adding') : t('clawSandboxAgentSkills.addFileButton');
254033
254029
  };
254034
- 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', {
254030
+ 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', {
254035
254031
  name: resource.filename,
254036
- }), 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(AdvancedPagination, { currentPage: page, totalPages: totalPages, onPageChange: setPage, totalCount: totalCount, itemsPerPage: RESOURCES_PAGE_SIZE, itemLabel: t('clawSandboxAgentSkills.resourcesItemLabel') })] })), jsxs(OverlayModal, { open: showFileDialog, onClose: closeFileDialog, title: t(editingResource
254032
+ }), 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
254037
254033
  ? 'clawSandboxAgentSkills.editFileDialogTitle'
254038
254034
  : '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$1, { 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$1, { 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$1, { 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$1, { 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', {
254039
254035
  name: (_c = deletingResource === null || deletingResource === void 0 ? void 0 : deletingResource.filename) !== null && _c !== void 0 ? _c : '',
@@ -254051,20 +254047,19 @@ const EMPTY_SKILL_FORM = {
254051
254047
  instruction: '',
254052
254048
  privateToAgent: false,
254053
254049
  };
254054
- // The builder resolves the effective skill set client-side, which needs the
254055
- // complete catalog and assignment lists. Request one explicit large page so
254056
- // the result is deterministic even if the backend later configures a default
254057
- // page size (the list endpoints unwrap paginated envelopes to `results`).
254050
+ /** Page size for both skill lists. */
254051
+ const SKILLS_PAGE_SIZE = 10;
254052
+ // Resolving the agent's own set (assignment metadata + its private skills)
254053
+ // needs a catalog lookup that the API cannot scope server-side yet (there is
254054
+ // no `mentor=` filter), so one bounded background fetch covers the join.
254058
254055
  const FULL_LIST_LIMIT = 1000;
254059
254056
  function AgentSkills({ platformKey, mentorUniqueId }) {
254060
- var _a;
254057
+ var _a, _b, _c, _d;
254061
254058
  const t = useT();
254062
254059
  // Skills are managed independently of the sandbox connection — org-level
254063
254060
  // skills and the mentor's assignments both resolve without a wired Claw
254064
254061
  // instance, so we always fetch and let admins add/assign skills freely.
254065
- // Always fetch the backend enforces read access; RBAC here only gates
254066
- // the write affordances (a partial permissions map must not blank the UI).
254067
- const { data: availableSkills, isLoading: isLoadingSkills } = useGetAgentSkillsQuery({
254062
+ const { data: joinCatalog, isLoading: isLoadingSkills } = useGetAgentSkillsQuery({
254068
254063
  org: platformKey,
254069
254064
  limit: FULL_LIST_LIMIT,
254070
254065
  offset: 0,
@@ -254075,6 +254070,21 @@ function AgentSkills({ platformKey, mentorUniqueId }) {
254075
254070
  limit: FULL_LIST_LIMIT,
254076
254071
  offset: 0,
254077
254072
  });
254073
+ // The "Available skills" tab pages the catalog server-side.
254074
+ const [catalogPage, setCatalogPage] = useState(1);
254075
+ const { data: catalogSkillsPage, isLoading: isLoadingCatalog } = useGetAgentSkillsQuery({
254076
+ org: platformKey,
254077
+ enabled: true,
254078
+ limit: SKILLS_PAGE_SIZE,
254079
+ offset: (catalogPage - 1) * SKILLS_PAGE_SIZE,
254080
+ });
254081
+ const catalogSkills = (_a = catalogSkillsPage === null || catalogSkillsPage === void 0 ? void 0 : catalogSkillsPage.results) !== null && _a !== void 0 ? _a : [];
254082
+ const catalogTotalCount = (_b = catalogSkillsPage === null || catalogSkillsPage === void 0 ? void 0 : catalogSkillsPage.count) !== null && _b !== void 0 ? _b : 0;
254083
+ const catalogTotalPages = Math.max(1, Math.ceil(catalogTotalCount / SKILLS_PAGE_SIZE));
254084
+ useEffect(() => {
254085
+ if (catalogPage > catalogTotalPages)
254086
+ setCatalogPage(catalogTotalPages);
254087
+ }, [catalogPage, catalogTotalPages]);
254078
254088
  // Assignment mutations (attach/detach/toggle on the agent)
254079
254089
  const [createAssignment, { isLoading: isCreatingAssignment }] = useCreateMentorSkillAssignmentMutation();
254080
254090
  const [updateAssignment, { isLoading: isUpdatingAssignment }] = useUpdateMentorSkillAssignmentMutation();
@@ -254089,18 +254099,24 @@ function AgentSkills({ platformKey, mentorUniqueId }) {
254089
254099
  const [form, setForm] = useState(EMPTY_SKILL_FORM);
254090
254100
  const isLoading = isLoadingSkills || isLoadingAssignments;
254091
254101
  const isMutatingAgentSkill = isCreatingAssignment || isUpdatingAssignment || isDeletingAssignment || isUpdatingSkill;
254092
- const allSkills = availableSkills !== null && availableSkills !== void 0 ? availableSkills : [];
254102
+ const allSkills = (_c = joinCatalog === null || joinCatalog === void 0 ? void 0 : joinCatalog.results) !== null && _c !== void 0 ? _c : [];
254093
254103
  const effectiveSkills = resolveEffectiveAgentSkills(allSkills, assignments !== null && assignments !== void 0 ? assignments : [], mentorUniqueId);
254094
254104
  const effectiveUniqueIds = new Set(effectiveSkills.map((s) => s.unique_id));
254095
254105
  const effectiveSlugs = new Set(effectiveSkills.map((s) => s.slug));
254096
- // Catalog skills this agent could still attach: enabled, platform-wide
254097
- // (never another agent's private skills), and not already effective. A
254098
- // skill whose slug is already effective (e.g. shadowed by a private skill)
254099
- // would dedupe away after attaching — don't offer an Add that does nothing.
254100
- const attachableSkills = allSkills.filter((skill) => skill.enabled &&
254101
- !skill.mentor &&
254102
- !effectiveUniqueIds.has(skill.unique_id) &&
254103
- !effectiveSlugs.has(skill.slug));
254106
+ // The "Agent skills" tab pages the (small, per-agent) effective set locally.
254107
+ const [agentPage, setAgentPage] = useState(1);
254108
+ const agentTotalPages = Math.max(1, Math.ceil(effectiveSkills.length / SKILLS_PAGE_SIZE));
254109
+ useEffect(() => {
254110
+ if (agentPage > agentTotalPages)
254111
+ setAgentPage(agentTotalPages);
254112
+ }, [agentPage, agentTotalPages]);
254113
+ const pagedEffectiveSkills = effectiveSkills.slice((agentPage - 1) * SKILLS_PAGE_SIZE, agentPage * SKILLS_PAGE_SIZE);
254114
+ // Catalog rows already covered by the agent's set (attached, or shadowed by
254115
+ // a same-slug private skill) show an "Added" chip instead of an Add button
254116
+ // — hiding them would make server pages uneven. Another agent's private
254117
+ // skills are not attachable at all.
254118
+ const isCoveredByAgent = (skill) => effectiveUniqueIds.has(skill.unique_id) || effectiveSlugs.has(skill.slug);
254119
+ const isOtherAgentsPrivate = (skill) => !!skill.mentor && skill.mentor !== mentorUniqueId;
254104
254120
  // Featured skills from the `main` platform are read-only for tenants — the
254105
254121
  // API 404s writes against them, so hide the edit/delete affordances.
254106
254122
  const isSkillEditable = (skill) => {
@@ -254226,6 +254242,7 @@ function AgentSkills({ platformKey, mentorUniqueId }) {
254226
254242
  version: form.version,
254227
254243
  category: form.category,
254228
254244
  instruction: form.instruction,
254245
+ mentor: form.privateToAgent ? mentorUniqueId : null,
254229
254246
  }).unwrap();
254230
254247
  toast.success(t('clawSandboxAgentSkills.skillUpdated'));
254231
254248
  closeAllDialogs();
@@ -254267,23 +254284,25 @@ function AgentSkills({ platformKey, mentorUniqueId }) {
254267
254284
  if (isLoading) {
254268
254285
  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') })] }));
254269
254286
  }
254270
- 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("div", { className: "space-y-2", children: [jsx("h3", { className: "text-sm font-semibold text-gray-700", children: t('clawSandboxAgentSkills.effectiveHeading') }), 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') }) })) : (jsx("div", { className: "space-y-3", children: effectiveSkills.map((effective) => {
254271
- var _a;
254272
- return (jsxs("div", { className: "flex items-center justify-between gap-4 rounded-lg border p-4", 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
254273
- ? 'clawSandboxAgentSkills.skillEnabledLabel'
254274
- : 'clawSandboxAgentSkills.skillDisabledLabel', { name: effective.name }) }), renderSkillMenu(effective.skill, effective)] })] }, effective.unique_id));
254275
- }) }))] }), jsxs("div", { className: "space-y-2", children: [jsx("h3", { className: "text-sm font-semibold text-gray-700", children: t('clawSandboxAgentSkills.catalogHeading') }), attachableSkills.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.noSkillsAvailable') }) })) : (jsx("div", { className: "space-y-3", children: attachableSkills.map((skill) => (jsxs("div", { className: "flex items-center justify-between gap-4 rounded-lg border p-4", 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: [jsxs(Button$1, { variant: "outline", size: "sm", className: "cursor-pointer", disabled: isMutatingAgentSkill, onClick: () => handleAttach(skill), "aria-label": t('clawSandboxAgentSkills.addToAgentLabel', { name: skill.name }), children: [jsx(Plus, { className: "h-4 w-4" }), t('clawSandboxAgentSkills.addToAgent')] }), renderSkillMenu(skill)] })] }, skill.id))) }))] }), 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, showPrivateToggle: true }), 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
254287
+ 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) => {
254288
+ var _a;
254289
+ 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
254290
+ ? 'clawSandboxAgentSkills.skillEnabledLabel'
254291
+ : 'clawSandboxAgentSkills.skillDisabledLabel', { name: effective.name }) }), renderSkillMenu(effective.skill, effective)] })] }, effective.unique_id));
254292
+ }), 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', {
254293
+ name: skill.name,
254294
+ }), 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
254276
254295
  ? t('clawSandboxAgentSkills.creating')
254277
254296
  : 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
254278
254297
  ? t('clawSandboxAgentSkills.saving')
254279
- : 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: (_a = deletingSkill === null || deletingSkill === void 0 ? void 0 : deletingSkill.name) !== null && _a !== void 0 ? _a : '' }) }), 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
254298
+ : 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
254280
254299
  ? t('clawSandboxAgentSkills.deleting')
254281
254300
  : t('clawSandboxAgentSkills.delete') })] })] })] }));
254282
254301
  }
254283
254302
  // ── Shared Skill Form ────────────────────────────────────────────────────────
254284
- function SkillForm({ form, onChange, showPrivateToggle = false, }) {
254303
+ function SkillForm({ form, onChange, }) {
254285
254304
  const t = useT();
254286
- return (jsxs("div", { className: "mt-4 grid gap-4", children: [jsxs("div", { className: "space-y-2", children: [jsx(Label$1, { 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$1, { 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$1, { 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$1, { 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$1, { htmlFor: "skill-description", className: "text-sm font-medium text-[#646464]", children: t('clawSandboxAgentSkills.fieldDescription') }), jsx(Input, { id: "skill-description", name: "skill-description", value: form.description, onChange: (e) => onChange({ ...form, description: e.target.value }), placeholder: t('clawSandboxAgentSkills.fieldDescriptionPlaceholder'), className: "py-6" })] }), showPrivateToggle && (jsxs("div", { className: "flex items-center justify-between rounded-lg border p-4", children: [jsxs("div", { className: "space-y-1", children: [jsx(Label$1, { 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 overflow-hidden", children: [jsx(Label$1, { 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 }) })] })] }));
254305
+ 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$1, { 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$1, { 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$1, { 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$1, { 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$1, { 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$1, { 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$1, { 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 }) })] })] }));
254287
254306
  }
254288
254307
 
254289
254308
  /** Distance (px) from the list bottom at which the next page is requested. */
@@ -254315,16 +254334,20 @@ function SlashSkillPicker({ skills, activeIndex, listboxId, onSelect, onActiveIn
254315
254334
  };
254316
254335
  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
254317
254336
  ? t('slashSkillPicker.loading')
254318
- : 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) => (jsxs("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),
254337
+ : 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),
254319
254338
  // onMouseDown so selection wins over the textarea losing focus.
254320
254339
  onMouseDown: (e) => {
254321
254340
  e.preventDefault();
254322
254341
  onSelect(skill);
254323
- }, 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.description && (jsx("span", { className: "line-clamp-2 text-xs text-gray-500", children: skill.description }))] }, 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') })] }))] }))] }));
254342
+ }, 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') })] }))] }))] }));
254324
254343
  }
254325
254344
 
254326
254345
  /** Matches a composer value that is a single `/`-prefixed token (no whitespace). */
254327
254346
  const SLASH_TOKEN_RE = /^\/\S*$/;
254347
+ /** Whether the composer text is a `/` skill token (single word, leading slash). */
254348
+ function isSlashCommandToken(value) {
254349
+ return SLASH_TOKEN_RE.test(value);
254350
+ }
254328
254351
  /**
254329
254352
  * State machine for the chat `/` skill picker. Opens while the composer holds
254330
254353
  * a single `/`-prefixed token and at least one enabled skill matches; `Esc`
@@ -254407,6 +254430,55 @@ function useSlashSkillPicker({ inputValue, setInputValue, skills, isLoading = fa
254407
254430
  };
254408
254431
  }
254409
254432
 
254433
+ /** Assignment rows carry everything the picker shows (name + slug + enabled). */
254434
+ const toSlashSkill = (assignment) => {
254435
+ var _a;
254436
+ return ({
254437
+ unique_id: assignment.skill,
254438
+ name: assignment.skill_name,
254439
+ slug: (_a = assignment.skill_slug) !== null && _a !== void 0 ? _a : assignment.skill_name,
254440
+ enabled: assignment.enabled,
254441
+ origin: 'assignment',
254442
+ assignmentId: assignment.id,
254443
+ });
254444
+ };
254445
+ /**
254446
+ * Lazy, paged fetch of the agent's skills for the chat `/` picker, straight
254447
+ * from the per-agent skills endpoint (`/agents/{uuid}/skills/`) — the
254448
+ * org-wide agent-skills catalog is not involved. Fetching is deferred until
254449
+ * the user first types `/` (then kept warm), and errors degrade to an empty
254450
+ * list so the picker simply stays closed.
254451
+ */
254452
+ function useSlashSkills({ org, mentorUniqueId, enabled, active, pageSize = MENTOR_SKILL_ASSIGNMENTS_PAGE_SIZE, }) {
254453
+ const [offset, setOffset] = useState(0);
254454
+ // Sticky: once the user opens the picker, keep results cached for the session.
254455
+ const [activated, setActivated] = useState(false);
254456
+ useEffect(() => {
254457
+ if (active && !activated)
254458
+ setActivated(true);
254459
+ }, [active, activated]);
254460
+ // A different agent gets its own cache entry — restart from the first page.
254461
+ useEffect(() => {
254462
+ setOffset(0);
254463
+ }, [org, mentorUniqueId]);
254464
+ const { data, isLoading, isFetching } = useGetMentorSkillAssignmentsInfiniteQuery({ org, mentorUniqueId: mentorUniqueId !== null && mentorUniqueId !== void 0 ? mentorUniqueId : '', limit: pageSize, offset }, { skip: !enabled || !mentorUniqueId || !org || !activated });
254465
+ const rows = data === null || data === void 0 ? void 0 : data.results;
254466
+ const skills = useMemo(() => (rows !== null && rows !== void 0 ? rows : []).map(toSlashSkill), [rows]);
254467
+ const loadedCount = skills.length;
254468
+ const hasMore = !!(data === null || data === void 0 ? void 0 : data.next);
254469
+ const loadMore = useCallback(() => {
254470
+ if (hasMore && !isFetching)
254471
+ setOffset(loadedCount);
254472
+ }, [hasMore, isFetching, loadedCount]);
254473
+ return {
254474
+ skills,
254475
+ isLoading: (isLoading || isFetching) && loadedCount === 0,
254476
+ isFetchingMore: isFetching && loadedCount > 0,
254477
+ hasMore,
254478
+ loadMore,
254479
+ };
254480
+ }
254481
+
254410
254482
  lazy(() => Promise.resolve().then(function () { return createProjectModal; }).then((mod) => ({
254411
254483
  default: mod.CreateProjectModal,
254412
254484
  })));
@@ -256667,8 +256739,8 @@ function SubmitMessageButton({ isPreviewMode, allowAnonymousAccess, isUploading,
256667
256739
  const PromptGalleryModal$1 = dynamic(() => Promise.resolve().then(function () { return promptGalleryModal; }).then((mod) => mod.PromptGalleryModal), {
256668
256740
  ssr: false,
256669
256741
  });
256670
- 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, }) {
256671
- var _a, _b, _c, _d, _e;
256742
+ 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, }) {
256743
+ var _a, _b, _c, _d, _e, _f;
256672
256744
  const t = useT();
256673
256745
  const dispatch = useDispatch();
256674
256746
  const mentorSettings = useMentorSettings({
@@ -256721,14 +256793,25 @@ function ChatInputForm({ onSubmit, onScreenSharingClick, isScreenSharingModalOpe
256721
256793
  const setInputValue = (input) => {
256722
256794
  dispatch(chatInputSliceActions.setTextareaInput(input));
256723
256795
  };
256724
- // `/` skill picker — active only when the host supplies the agent's
256725
- // effective skills (or reports them loading). No fetching happens here.
256726
- const effectiveSlashSkills = slashSkills !== null && slashSkills !== void 0 ? slashSkills : [];
256796
+ // `/` skill picker — fetches the agent's skills lazily from the per-agent
256797
+ // skills endpoint on the first `/` keystroke (the popup shows a loading row
256798
+ // meanwhile; scrolling loads more). A host-supplied `slashSkills` list
256799
+ // bypasses fetching entirely.
256800
+ const mentorUniqueId = (_c = mentorSettings === null || mentorSettings === void 0 ? void 0 : mentorSettings.data) === null || _c === void 0 ? void 0 : _c.mentorUniqueId;
256801
+ const slashTokenActive = slashSkillsEnabled && isSlashCommandToken(inputValue);
256802
+ const fetchedSlashSkills = useSlashSkills({
256803
+ org: tenantKey,
256804
+ mentorUniqueId,
256805
+ enabled: slashSkillsEnabled && !slashSkills,
256806
+ active: slashTokenActive,
256807
+ });
256808
+ const effectiveSlashSkills = slashSkills !== null && slashSkills !== void 0 ? slashSkills : (slashSkillsEnabled ? fetchedSlashSkills.skills : []);
256809
+ const pickerLoading = slashSkills ? slashSkillsLoading : fetchedSlashSkills.isLoading;
256727
256810
  const slashPicker = useSlashSkillPicker({
256728
256811
  inputValue,
256729
256812
  setInputValue,
256730
256813
  skills: effectiveSlashSkills,
256731
- isLoading: slashSkillsLoading,
256814
+ isLoading: pickerLoading,
256732
256815
  });
256733
256816
  const handleSelectPrompt = (promptText) => {
256734
256817
  setInputValue(promptText);
@@ -256794,9 +256877,9 @@ function ChatInputForm({ onSubmit, onScreenSharingClick, isScreenSharingModalOpe
256794
256877
  }
256795
256878
  return persistentChatInputLabel ? '' : t('chatInputForm.askAnything');
256796
256879
  };
256797
- 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 }) })), ((_c = mentorSettings === null || mentorSettings === void 0 ? void 0 : mentorSettings.data) === null || _c === void 0 ? void 0 : _c.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: (_d = mentorSettings === null || mentorSettings === void 0 ? void 0 : mentorSettings.data) === null || _d === void 0 ? void 0 : _d.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: slashSkillsLoading })), 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
256880
+ 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
256798
256881
  ? 'block px-[18.5px] pt-3 text-xs font-medium text-gray-600'
256799
- : 'sr-only'), children: t('chatInputForm.askAnything') }), jsx(AutoResizeTextarea, { id: "chat-input-textarea", "aria-labelledby": "chat-input-label", "aria-describedby": ((_e = mentorSettings === null || mentorSettings === void 0 ? void 0 : mentorSettings.data) === null || _e === void 0 ? void 0 : _e.disclaimer) ? 'chat-input-disclaimer' : undefined, ...((effectiveSlashSkills.length > 0 || slashPicker.open) && {
256882
+ : '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) && {
256800
256883
  role: 'combobox',
256801
256884
  'aria-expanded': slashPicker.open,
256802
256885
  'aria-haspopup': 'listbox',
@@ -279688,7 +279771,7 @@ const CODE_FILE_EXTENSIONS = new Set([
279688
279771
  'css',
279689
279772
  'sh',
279690
279773
  ]);
279691
- function Chat({ mode = 'default', isPreviewMode = false, hasBorder = true, isInCanvasView = false, config, redirectToAuthSpa, username, userTenants, visitingTenant, axdToken, mentorId, tenantKey, userIsStudent, isPublicRoute, showConversationStarters = false, showExploreMentors = false, projectId, slashSkills, slashSkillsLoading = false, }) {
279774
+ function Chat({ mode = 'default', isPreviewMode = false, hasBorder = true, isInCanvasView = false, config, redirectToAuthSpa, username, userTenants, visitingTenant, axdToken, mentorId, tenantKey, userIsStudent, isPublicRoute, showConversationStarters = false, showExploreMentors = false, projectId, slashSkillsEnabled = false, slashSkills, slashSkillsLoading = false, }) {
279692
279775
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
279693
279776
  const t = useT();
279694
279777
  const { metadata } = useTenantContext();
@@ -280717,7 +280800,7 @@ function Chat({ mode = 'default', isPreviewMode = false, hasBorder = true, isInC
280717
280800
  !(messages.length > 0 &&
280718
280801
  ((_g = messages[messages.length - 1]) === null || _g === void 0 ? void 0 : _g.role) === 'assistant' &&
280719
280802
  ((_h = messages[messages.length - 1]) === null || _h === void 0 ? void 0 : _h.artifactVersions) &&
280720
- ((_l = (_k = (_j = messages[messages.length - 1]) === null || _j === void 0 ? void 0 : _j.artifactVersions) === null || _k === void 0 ? void 0 : _k.length) !== null && _l !== void 0 ? _l : 0) > 0) && jsx(LoadingMessage, { mentorName: mentorName, profileImage: profileImage }), !showingSharedChat && guidedPrompts] }) }) }), jsx("div", { className: "flex-shrink-0 overflow-y-auto border-t border-gray-200 bg-white p-3 [scrollbar-gutter:stable]", children: jsx(ChatInputForm, { mentorId: mentorId, userIsStudent: userIsStudent, isPublicRoute: isPublicRoute, slashSkills: slashSkills, slashSkillsLoading: slashSkillsLoading, sessionId: sessionId, onSubmit: handleSubmit, stopGenerating: stopGenerating, onScreenSharingClick: () => {
280803
+ ((_l = (_k = (_j = messages[messages.length - 1]) === null || _j === void 0 ? void 0 : _j.artifactVersions) === null || _k === void 0 ? void 0 : _k.length) !== null && _l !== void 0 ? _l : 0) > 0) && jsx(LoadingMessage, { mentorName: mentorName, profileImage: profileImage }), !showingSharedChat && guidedPrompts] }) }) }), jsx("div", { className: "flex-shrink-0 overflow-y-auto border-t border-gray-200 bg-white p-3 [scrollbar-gutter:stable]", children: jsx(ChatInputForm, { mentorId: mentorId, userIsStudent: userIsStudent, isPublicRoute: isPublicRoute, slashSkillsEnabled: slashSkillsEnabled, slashSkills: slashSkills, slashSkillsLoading: slashSkillsLoading, sessionId: sessionId, onSubmit: handleSubmit, stopGenerating: stopGenerating, onScreenSharingClick: () => {
280721
280804
  var _a;
280722
280805
  if (enableChatPopupActions && isInIframe()) {
280723
280806
  sendMessageToParentWebsite({
@@ -280749,7 +280832,7 @@ function Chat({ mode = 'default', isPreviewMode = false, hasBorder = true, isInC
280749
280832
  height: '100%',
280750
280833
  }, children: [jsx(CanvasView$1, { canvasTitle: canvasState.title, canvasContent: canvasState.content, canvasType: canvasState.type, artifactId: canvasState.artifactId, org: canvasState.org, userId: canvasState.userId, fileExtension: canvasState.fileExtension, metadata: canvasState.metadata, sessionId: sessionId, tenantKey: tenantKey, refreshTrigger: canvasRefreshTrigger, sendMessage: (text, options) => {
280751
280834
  sendMessage(activeTab, text, options);
280752
- }, onClose: handleCloseCanvas }, `${(_m = canvasState.artifactId) !== null && _m !== void 0 ? _m : 'canvas'}-${canvasRefreshTrigger}`), jsx("div", { className: "flex-shrink-0 border-t border-gray-200 bg-white p-3 md:hidden", children: jsx(ChatInputForm, { mentorId: mentorId, userIsStudent: userIsStudent, isPublicRoute: isPublicRoute, slashSkills: slashSkills, slashSkillsLoading: slashSkillsLoading, sessionId: sessionId, onSubmit: handleSubmit, stopGenerating: stopGenerating, onScreenSharingClick: () => {
280835
+ }, onClose: handleCloseCanvas }, `${(_m = canvasState.artifactId) !== null && _m !== void 0 ? _m : 'canvas'}-${canvasRefreshTrigger}`), jsx("div", { className: "flex-shrink-0 border-t border-gray-200 bg-white p-3 md:hidden", children: jsx(ChatInputForm, { mentorId: mentorId, userIsStudent: userIsStudent, isPublicRoute: isPublicRoute, slashSkillsEnabled: slashSkillsEnabled, slashSkills: slashSkills, slashSkillsLoading: slashSkillsLoading, sessionId: sessionId, onSubmit: handleSubmit, stopGenerating: stopGenerating, onScreenSharingClick: () => {
280753
280836
  var _a;
280754
280837
  if (enableChatPopupActions && isInIframe()) {
280755
280838
  sendMessageToParentWebsite({
@@ -280796,7 +280879,7 @@ function Chat({ mode = 'default', isPreviewMode = false, hasBorder = true, isInC
280796
280879
  (isAdvancedMode ||
280797
280880
  isEmbeddedMode ||
280798
280881
  (messages.length > 0 &&
280799
- (messages[0].role === 'assistant' ? messages.slice(1) : messages).length > 0)) && (jsx("div", { className: "flex-shrink-0 overflow-y-auto pb-3.5 [scrollbar-gutter:stable]", children: jsx(ChatInputForm, { mentorId: mentorId, userIsStudent: userIsStudent, isPublicRoute: isPublicRoute, slashSkills: slashSkills, slashSkillsLoading: slashSkillsLoading, sessionId: (_u = cachedSessionId === null || cachedSessionId === void 0 ? void 0 : cachedSessionId[mentorId]) !== null && _u !== void 0 ? _u : sessionId, onSubmit: handleSubmit, stopGenerating: stopGenerating, onScreenSharingClick: () => {
280882
+ (messages[0].role === 'assistant' ? messages.slice(1) : messages).length > 0)) && (jsx("div", { className: "flex-shrink-0 overflow-y-auto pb-3.5 [scrollbar-gutter:stable]", children: jsx(ChatInputForm, { mentorId: mentorId, userIsStudent: userIsStudent, isPublicRoute: isPublicRoute, slashSkillsEnabled: slashSkillsEnabled, slashSkills: slashSkills, slashSkillsLoading: slashSkillsLoading, sessionId: (_u = cachedSessionId === null || cachedSessionId === void 0 ? void 0 : cachedSessionId[mentorId]) !== null && _u !== void 0 ? _u : sessionId, onSubmit: handleSubmit, stopGenerating: stopGenerating, onScreenSharingClick: () => {
280800
280883
  var _a;
280801
280884
  if (enableChatPopupActions && isInIframe()) {
280802
280885
  sendMessageToParentWebsite({