@iblai/iblai-js 2.6.0 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/data-layer/playwright/claw-sandbox-helpers.d.ts +31 -0
- package/dist/data-layer/playwright/index.d.ts +2 -2
- package/dist/playwright/index.cjs +75 -1
- package/dist/playwright/index.cjs.map +1 -1
- package/dist/playwright/index.d.ts +33 -2
- package/dist/playwright/index.esm.js +71 -2
- package/dist/playwright/index.esm.js.map +1 -1
- package/dist/playwright/playwright/claw-sandbox-helpers.d.ts +31 -0
- package/dist/playwright/playwright/index.d.ts +2 -2
- package/dist/security/playwright/claw-sandbox-helpers.d.ts +31 -0
- package/dist/security/playwright/index.d.ts +2 -2
- package/dist/web-containers/playwright/claw-sandbox-helpers.d.ts +31 -0
- package/dist/web-containers/playwright/index.d.ts +2 -2
- package/dist/web-containers/source/index.esm.js +212 -56
- package/dist/web-containers/source/next/index.esm.js +114 -16
- package/dist/web-utils/playwright/claw-sandbox-helpers.d.ts +31 -0
- package/dist/web-utils/playwright/index.d.ts +2 -2
- package/package.json +4 -4
|
@@ -3,7 +3,7 @@ import React__default, { useRef, useEffect, useState, useCallback, useLayoutEffe
|
|
|
3
3
|
import { useDispatch, useSelector } from 'react-redux';
|
|
4
4
|
import { selectSessionId, selectActiveChatMessages, useCachedSessionId, chatActions, LOCAL_STORAGE_KEYS, TimeTracker, getInitials, useTenantMetadata, useCurrentTenant, selectRbacPermissions, isPureWatcher, WithPermissions, canWriteField, useStripeUpgrade, openExternalUrl, CHAT_AREA_SIZE, isAlphaNumeric32, checkRbacPermission, getTimeAgo, REQUIRED_ACTIONS_FOR_GROUPS, getVisibleAnalyticsTabs, formatRelativeTime as formatRelativeTime$2, ANONYMOUS_USERNAME, combineCSVData, WATCHER_HIDDEN_REPORTS, canViewPlatformAuditLogs, redirectToAuthSpaJoinTenant, redirectToAuthSpa, getAuthSpaJoinUrl, useOS, selectNumberOfActiveChatMessages, useUsername, selectStreaming, isLoggedIn, TOOLS, hasRemoteAiConfig, isSafariBrowser, useShowAttachment, useShowVoiceCall, useShowVoiceRecorder, useMentorSettings, selectShowingSharedChat, useShowFreeTrialDialog, useEmbedMode, chatInputSliceSelectors, useResponsive, useAccessingPublicRoute, useVisitingTenant, useModelFileUploadCapabilities, useChatFileUpload, useVoiceChat, selectAttachedFiles, MENTOR_CHAT_DOCUMENTS_EXTENSIONS, chatInputSliceActions, removeFile, WithFormPermissions, MENTOR_VISIBILITY } from '@iblai/web-utils';
|
|
5
5
|
import * as dataLayer from '@iblai/data-layer';
|
|
6
|
-
import { useCreateSessionIdMutation, useTimeTrackingMutation, useGetUserMetadataQuery, useGetUserMetadataEdxQuery, useUpdateUserMetadataMutation, useUpdateUserMetadataEdxMutation, useUploadProfileImageMutation, useResetPasswordMutation, useSelfRetireMutation, useCreateUserInstitutionMutation, useGetUserInstitutionsQuery, useCreateUserEducationMutation, useUpdateUserEducationMutation, useDeleteUserEducationMutation, useGetUserEducationQuery, useCreateUserCompanyMutation, useGetUserCompaniesQuery, useCreateUserExperienceMutation, useUpdateUserExperienceMutation, useDeleteUserExperienceMutation, useGetUserExperienceQuery, useGetUserResumeQuery, useCreateUserResumeMutation, useGetMySubscriptionsQuery, useGetItemSubscriptionQuery, useCancelSubscriptionMutation, useGetLearnerDetailsQuery, useGetUserEnrolledCoursesQuery, useGetUserEnrolledProgramsQuery, useGetUserCatalogPathwaysQuery, useGetUsersAsAssertionsQuery, useGetUserEarnedSkillsQuery, useGetUserReportedSkillsQuery, useGetUserDesiredSkillsQuery, useCreateGlobalMemoryMutation, useUpdateGlobalMemoryMutation, useUpdateMentorMemoryMutation, useGetMemsearchStatusQuery, useGetUserMemorySettingsQuery, useUpdateUserMemorySettingsMutation, useGetGlobalMemoriesQuery, useGetAllMentorMemoriesQuery, useDeleteGlobalMemoryMutation, useDeleteMentorMemoryMutation, useGetAiSearchMentorsQuery, useGetUserChatHistoryReportsQuery, USER_CHAT_HISTORY_REPORT_ACTIVE_STATES, useCreateUserChatHistoryReportMutation, useLazyGetDownloadReportFromURLQuery, useGetUserChatHistoryReportStatusQuery, userChatHistoryApiSlice, USER_CHAT_HISTORY_QUERY_KEYS, useGetUserChatHistoryQuery, useGetUserChatHistoryFilterQuery, useGetMentorsQuery, useGetUserChatHistorySessionQuery, 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, useGetTenantMetadataQuery, useUpdateTenantMetadataMutation, useLazyGetTenantMetadataQuery, useDeleteApiKeyMutation, useGetApiKeyQuery, useGetApiKeyFieldPermissionsQuery, useUpdateApiKeyMutation, useGetApiKeysQuery, unwrapApiTokenList, useCreateApiKeyMutation, useCreateLLMCredentialMutation, useGetCredentialsSchemaQuery, useGetMaskedLLMCredentialsQuery, useGetLlmsQuery, useDeleteIntegrationCredentialMutation, useDeleteCredentialMutation, useCreateIntegrationCredentialMutation, useGetIntegrationCredentialsSchemaQuery, useGetMaskedIntegrationCredentialsQuery, useGetAccountBillingInfoQuery, useUpdateAutoRechargeInfoMutation, useTriggerAutoRechargeMutation, useGetAgentSpendCapQuery, useGetTenantSpendCapQuery, useListAgentUserSpendCapsQuery, useUpsertAgentSpendCapMutation, useDeleteAgentSpendCapMutation, useUpsertTenantSpendCapMutation, useDeleteTenantSpendCapMutation, useUpsertUserSpendCapMutation, useDeleteUserSpendCapMutation, useGetFinancialStatsQuery, useListAgentSpendCapsQuery, useGetCreditTransactionsQuery, useCreateStripeCustomerPortalMutation, useSetPlatformConfigurationsMutation, useGetPlatformConfigurationsQuery, useUpdatePlatformMembershipMutation, useGetPlatformMembershipQuery, useGetCustomDomainsQuery, useCreateCustomDomainMutation, useDeleteCustomDomainMutation, useGetStudentMentorCreationStatusQuery, useSetStudentMentorCreationStatusMutation, coreApiSlice, recommendationPromptTypeEnum, useGetRecommendedPromptsListQuery, useCreateRecommendedPromptMutation, useUpdateRecommendedPromptMutation, useDeleteRecommendedPromptMutation, useLazyGetPublicPlatformImageAssetFileUrlQuery, useCreatePlatformImageAssetMutation, useGetProviderConfigQuery, useCreateProviderConfigMutation, useDeleteProviderConfigMutation, useGetExternalMappingQuery, useGetCredentialsListQuery, useCreateExternalMappingMutation, useDeleteExternalMappingMutation, useGetMemsearchConfigQuery, useUpdateMemsearchConfigMutation, useGetStripeConnectStatusQuery, useStartStripeConnectOnboardingMutation, useLazyGetStripeConnectDashboardQuery, useListPaywallsQuery, useListPricesQuery, useCreatePriceMutation, useUpdatePriceMutation, useDeletePriceMutation, useGetPaywallConfigQuery, useEnablePaywallMutation, useUpdatePaywallMutation, useGetNotificationsCountQuery, useLazyGetNotificationsQuery, useMarkAllAsReadMutation, useCreateNotificationPreviewMutation, useSendNotificationMutation, USER_PROGRESS_DATA_POINTS, useResetTemplateMutation, useSendTestTemplateEmailMutation, useUpdateTemplateMutation, useGetTemplateDetailsQuery, USER_PROGRESS_SUMMARY_TYPE, useGetTemplatesQuery, useLazyGetTemplateDetailsQuery, useToggleTemplateMutation, useGetTopicsStatsQuery, useGetUsersStatsQuery, useGetSessionStatsQuery, useGetTopicsDetailsStatsQuery, useGetAccessTimeHeatmapQuery, useGetUserDetailsStatsQuery, useGetTranscriptsConversationHeadlineQuery, useGetAverageRatingQuery, useGetDetailedFinancialStatsQuery, useGetTranscriptsMessagesDetailsQuery, useGetTranscriptsMessagesQuery, useGetReportDetailQuery, useGetMentorPublicSettingsQuery, useGetReportsQuery, useCreateReportMutation, useGetContentAnalyticsQuery, useGetContentAnalyticsDetailsQuery, useGetRevenueQuery, useListSubscribersQuery, useGetAuditLogsQuery, useGetPlatformAuditLogsQuery, PLATFORM_AUDIT_EVENT_TYPES, PLATFORM_AUDIT_ACTION_CODES, useGetMentorMemoriesListQuery, useGetMentorMemoriesQuery, useGetMemoryCategoriesAdminQuery, useLazyGetCourseMetaDataQuery, useLazyGetCourseCompletionOutlinesQuery, useLazyGetCourseEligibilityQuery, useLazyGetUserEnrolledCoursesQuery, useLazyGetUserAssignedCoursesQuery, useLazyGetUserCredentialsQuery, useLazyGetOverTimeActivityQuery, useLazyGetCatalogSearchQuery, useCreateOrUpdateUserReportedSkillMutation, useCreateOrUpdateUserDesiredSkillMutation, useLazyGetPathwayListQuery, useLazyGetUserAssignedPathwaysQuery, useLazyGetUserEnrolledPathwaysQuery, useLazyGetPathwayCompletionQuery, useLazyGetProgramListQuery, useLazyGetProgramCompletionQuery, useLazyGetUserEnrolledProgramsQuery, useLazyGetAssignedProgramsQuery, useLazyGetUserSkillsPointsQuery, useLazyGetUserReportedSkillsQuery, useLazyGetUserDesiredSkillsQuery, useLazyGetUserCatalogPathwaysQuery, useLazyGetPerLearnerInfoQuery, useLazyGetEdxSSOTokenQuery, useCreateCourseEnrollmentMutation, useCreateStripeCheckoutSessionMutation, useLazyGetCourseProgressQuery, useLazyGetCourseCompletionQuery, useLazyGetPersonnalizedSearchQuery, useUpdateExamAttemptMutation, useStartExamMutation, useLazyGetExamInfoQuery, useGetClawMentorConfigQuery, useGetClawInstancesQuery, useGetAgentConfigQuery, useUpdateClawMentorConfigMutation, useCreateClawMentorConfigMutation, useDeleteClawMentorConfigMutation, usePushClawConfigMutation, useCreateClawInstanceMutation, useDeleteClawInstanceMutation, useUpdateAgentConfigMutation, useHealthCheckClawInstanceMutation, useTestConnectivityClawInstanceMutation, useUpdateClawInstanceMutation, useGetAgentSkillResourcesQuery, useCreateAgentSkillResourceMutation, useUpdateAgentSkillResourceMutation, useUploadAgentSkillResourceAssetMutation, useDeleteAgentSkillResourceMutation, useGetMentorSkillAssignmentsQuery, useGetAgentSkillsQuery, useCreateMentorSkillAssignmentMutation, useUpdateMentorSkillAssignmentMutation, useDeleteMentorSkillAssignmentMutation, useCreateAgentSkillMutation, useUpdateAgentSkillMutation, useDeleteAgentSkillMutation, filterSlashSkills, useGetMentorSkillAssignmentsInfiniteQuery, MENTOR_SKILL_ASSIGNMENTS_PAGE_SIZE, useCreateCheckoutMutation, useGetUserProjectsQuery, useUpdateUserProjectMutation, useGetTrainingDocumentsQuery, useGetVectorDocumentsQuery, useCreateMentorMemoryMutation, useLazyGetConnectedServiceAuthUrlQuery, useCreateUserProjectMutation, useDeleteUserProjectMutation, useGetUserProjectDetailsQuery, useEditTrainingDocumentMutation, useAddTrainingDocumentMutation, useLazyGetCredentialsQuery, useGetMentorSettingsQuery, useEditMentorMutation, useGetMentorCategoriesQuery, useCreateMentorMutation, useUpdateUserPlatformMetadataMutation, useGetApplicationStatusQuery, useListOwnApplicationsQuery, useGetApplicationFormQuery, useWithdrawApplicationMutation, useRenewApplicationMutation, useCreateApplicationDraftMutation, useSubmitApplicationMutation, useUpdateApplicationMutation, useUploadApplicationAttachmentMutation, useDeleteApplicationAttachmentMutation, useGetPromptCategoriesQuery, useCreatePromptMutation, useDeletePromptMutation, useGetPromptsSearchQuery, useUpdatePromptMutation, useDeleteTrainingDocumentMutation, useGetTrainingDocumentRetrainScheduleQuery, useCreateTrainingDocumentRetrainScheduleMutation } from '@iblai/data-layer';
|
|
6
|
+
import { useCreateSessionIdMutation, useTimeTrackingMutation, useGetUserMetadataQuery, useGetUserMetadataEdxQuery, useUpdateUserMetadataMutation, useUpdateUserMetadataEdxMutation, useUploadProfileImageMutation, useResetPasswordMutation, useSelfRetireMutation, useCreateUserInstitutionMutation, useGetUserInstitutionsQuery, useCreateUserEducationMutation, useUpdateUserEducationMutation, useDeleteUserEducationMutation, useGetUserEducationQuery, useCreateUserCompanyMutation, useGetUserCompaniesQuery, useCreateUserExperienceMutation, useUpdateUserExperienceMutation, useDeleteUserExperienceMutation, useGetUserExperienceQuery, useGetUserResumeQuery, useCreateUserResumeMutation, useGetMySubscriptionsQuery, useGetItemSubscriptionQuery, useCancelSubscriptionMutation, useGetLearnerDetailsQuery, useGetUserEnrolledCoursesQuery, useGetUserEnrolledProgramsQuery, useGetUserCatalogPathwaysQuery, useGetUsersAsAssertionsQuery, useGetUserEarnedSkillsQuery, useGetUserReportedSkillsQuery, useGetUserDesiredSkillsQuery, useCreateGlobalMemoryMutation, useUpdateGlobalMemoryMutation, useUpdateMentorMemoryMutation, useGetMemsearchStatusQuery, useGetUserMemorySettingsQuery, useUpdateUserMemorySettingsMutation, useGetGlobalMemoriesQuery, useGetAllMentorMemoriesQuery, useDeleteGlobalMemoryMutation, useDeleteMentorMemoryMutation, useGetAiSearchMentorsQuery, useGetUserChatHistoryReportsQuery, USER_CHAT_HISTORY_REPORT_ACTIVE_STATES, useCreateUserChatHistoryReportMutation, useLazyGetDownloadReportFromURLQuery, useGetUserChatHistoryReportStatusQuery, userChatHistoryApiSlice, USER_CHAT_HISTORY_QUERY_KEYS, useGetUserChatHistoryQuery, useGetUserChatHistoryFilterQuery, useGetMentorsQuery, useGetUserChatHistorySessionQuery, 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, useGetTenantMetadataQuery, useUpdateTenantMetadataMutation, useLazyGetTenantMetadataQuery, useDeleteApiKeyMutation, useGetApiKeyQuery, useGetApiKeyFieldPermissionsQuery, useUpdateApiKeyMutation, useGetApiKeysQuery, unwrapApiTokenList, useCreateApiKeyMutation, useCreateLLMCredentialMutation, useGetCredentialsSchemaQuery, useGetMaskedLLMCredentialsQuery, useGetLlmsQuery, useDeleteIntegrationCredentialMutation, useDeleteCredentialMutation, useCreateIntegrationCredentialMutation, useGetIntegrationCredentialsSchemaQuery, useGetMaskedIntegrationCredentialsQuery, useGetAccountBillingInfoQuery, useUpdateAutoRechargeInfoMutation, useTriggerAutoRechargeMutation, useGetAgentSpendCapQuery, useGetTenantSpendCapQuery, useListAgentUserSpendCapsQuery, useUpsertAgentSpendCapMutation, useDeleteAgentSpendCapMutation, useUpsertTenantSpendCapMutation, useDeleteTenantSpendCapMutation, useUpsertUserSpendCapMutation, useDeleteUserSpendCapMutation, useGetFinancialStatsQuery, useListAgentSpendCapsQuery, useGetCreditTransactionsQuery, useCreateStripeCustomerPortalMutation, useSetPlatformConfigurationsMutation, useGetPlatformConfigurationsQuery, useUpdatePlatformMembershipMutation, useGetPlatformMembershipQuery, useGetCustomDomainsQuery, useCreateCustomDomainMutation, useDeleteCustomDomainMutation, useGetStudentMentorCreationStatusQuery, useSetStudentMentorCreationStatusMutation, coreApiSlice, recommendationPromptTypeEnum, useGetRecommendedPromptsListQuery, useCreateRecommendedPromptMutation, useUpdateRecommendedPromptMutation, useDeleteRecommendedPromptMutation, useLazyGetPublicPlatformImageAssetFileUrlQuery, useCreatePlatformImageAssetMutation, useGetProviderConfigQuery, useCreateProviderConfigMutation, useDeleteProviderConfigMutation, useGetExternalMappingQuery, useGetCredentialsListQuery, useCreateExternalMappingMutation, useDeleteExternalMappingMutation, useGetMemsearchConfigQuery, useUpdateMemsearchConfigMutation, useGetStripeConnectStatusQuery, useStartStripeConnectOnboardingMutation, useLazyGetStripeConnectDashboardQuery, useListPaywallsQuery, useListPricesQuery, useCreatePriceMutation, useUpdatePriceMutation, useDeletePriceMutation, useGetPaywallConfigQuery, useEnablePaywallMutation, useUpdatePaywallMutation, useGetNotificationsCountQuery, useLazyGetNotificationsQuery, useMarkAllAsReadMutation, useCreateNotificationPreviewMutation, useSendNotificationMutation, USER_PROGRESS_DATA_POINTS, useResetTemplateMutation, useSendTestTemplateEmailMutation, useUpdateTemplateMutation, useGetTemplateDetailsQuery, USER_PROGRESS_SUMMARY_TYPE, useGetTemplatesQuery, useLazyGetTemplateDetailsQuery, useToggleTemplateMutation, useGetTopicsStatsQuery, useGetUsersStatsQuery, useGetSessionStatsQuery, useGetTopicsDetailsStatsQuery, useGetAccessTimeHeatmapQuery, useGetUserDetailsStatsQuery, useGetTranscriptsConversationHeadlineQuery, useGetAverageRatingQuery, useGetDetailedFinancialStatsQuery, useGetTranscriptsMessagesDetailsQuery, useGetTranscriptsMessagesQuery, useGetReportDetailQuery, useGetMentorPublicSettingsQuery, useGetReportsQuery, useCreateReportMutation, useGetContentAnalyticsQuery, useGetContentAnalyticsDetailsQuery, useGetRevenueQuery, useListSubscribersQuery, useGetAuditLogsQuery, useGetPlatformAuditLogsQuery, PLATFORM_AUDIT_EVENT_TYPES, PLATFORM_AUDIT_ACTION_CODES, useGetMentorMemoriesListQuery, useGetMentorMemoriesQuery, useGetMemoryCategoriesAdminQuery, useLazyGetCourseMetaDataQuery, useLazyGetCourseCompletionOutlinesQuery, useLazyGetCourseEligibilityQuery, useLazyGetUserEnrolledCoursesQuery, useLazyGetUserAssignedCoursesQuery, useLazyGetUserCredentialsQuery, useLazyGetOverTimeActivityQuery, useLazyGetCatalogSearchQuery, useCreateOrUpdateUserReportedSkillMutation, useCreateOrUpdateUserDesiredSkillMutation, useLazyGetPathwayListQuery, useLazyGetUserAssignedPathwaysQuery, useLazyGetUserEnrolledPathwaysQuery, useLazyGetPathwayCompletionQuery, useLazyGetProgramListQuery, useLazyGetProgramCompletionQuery, useLazyGetUserEnrolledProgramsQuery, useLazyGetAssignedProgramsQuery, useLazyGetUserSkillsPointsQuery, useLazyGetUserReportedSkillsQuery, useLazyGetUserDesiredSkillsQuery, useLazyGetUserCatalogPathwaysQuery, useLazyGetPerLearnerInfoQuery, useLazyGetEdxSSOTokenQuery, useCreateCourseEnrollmentMutation, useCreateStripeCheckoutSessionMutation, useLazyGetCourseProgressQuery, useLazyGetCourseCompletionQuery, useLazyGetPersonnalizedSearchQuery, useUpdateExamAttemptMutation, useStartExamMutation, useLazyGetExamInfoQuery, useGetMentorSettingsQuery, useEditMentorMutation, useGetClawMentorConfigQuery, useGetClawInstancesQuery, useGetAgentConfigQuery, useUpdateClawMentorConfigMutation, useCreateClawMentorConfigMutation, useDeleteClawMentorConfigMutation, usePushClawConfigMutation, useCreateClawInstanceMutation, useDeleteClawInstanceMutation, useUpdateAgentConfigMutation, useHealthCheckClawInstanceMutation, useTestConnectivityClawInstanceMutation, useUpdateClawInstanceMutation, useGetAgentSkillResourcesQuery, useCreateAgentSkillResourceMutation, useUpdateAgentSkillResourceMutation, useUploadAgentSkillResourceAssetMutation, useDeleteAgentSkillResourceMutation, useGetMentorSkillAssignmentsQuery, useGetAgentSkillsQuery, useCreateMentorSkillAssignmentMutation, useUpdateMentorSkillAssignmentMutation, useDeleteMentorSkillAssignmentMutation, useCreateAgentSkillMutation, useUpdateAgentSkillMutation, useDeleteAgentSkillMutation, filterSlashSkills, useGetMentorSkillAssignmentsInfiniteQuery, MENTOR_SKILL_ASSIGNMENTS_PAGE_SIZE, useCreateCheckoutMutation, useGetUserProjectsQuery, useUpdateUserProjectMutation, useGetTrainingDocumentsQuery, useGetVectorDocumentsQuery, useCreateMentorMemoryMutation, useLazyGetConnectedServiceAuthUrlQuery, useCreateUserProjectMutation, useDeleteUserProjectMutation, useGetUserProjectDetailsQuery, useEditTrainingDocumentMutation, useAddTrainingDocumentMutation, useLazyGetCredentialsQuery, useGetMentorCategoriesQuery, useCreateMentorMutation, useUpdateUserPlatformMetadataMutation, useGetApplicationStatusQuery, useListOwnApplicationsQuery, useGetApplicationFormQuery, useWithdrawApplicationMutation, useRenewApplicationMutation, useCreateApplicationDraftMutation, useSubmitApplicationMutation, useUpdateApplicationMutation, useUploadApplicationAttachmentMutation, useDeleteApplicationAttachmentMutation, useGetPromptCategoriesQuery, useCreatePromptMutation, useDeletePromptMutation, useGetPromptsSearchQuery, useUpdatePromptMutation, useDeleteTrainingDocumentMutation, useGetTrainingDocumentRetrainScheduleQuery, useCreateTrainingDocumentRetrainScheduleMutation } from '@iblai/data-layer';
|
|
7
7
|
import { toast } from 'sonner';
|
|
8
8
|
import { jsx, Fragment as Fragment$1, jsxs } from 'react/jsx-runtime';
|
|
9
9
|
import * as ReactDOM from 'react-dom';
|
|
@@ -61916,7 +61916,22 @@ var clawSandboxSandboxConfig$3 = {
|
|
|
61916
61916
|
saving: "Saving...",
|
|
61917
61917
|
save: "Save",
|
|
61918
61918
|
instanceUpdated: "Instance updated",
|
|
61919
|
-
failedToUpdateInstance: "Failed to update instance"
|
|
61919
|
+
failedToUpdateInstance: "Failed to update instance",
|
|
61920
|
+
sandboxKindDescription: "Choose how this agent runs code. Only one sandbox type can be enabled at a time.",
|
|
61921
|
+
kindComputationalRuntime: "Computing Runtime",
|
|
61922
|
+
kindComputationalRuntimeShort: "Give this agent a lightweight JavaScript calculator for quick computations — the low-cost option.",
|
|
61923
|
+
kindComputationalRuntimeDetail: "Runs small JavaScript snippets in-process with strict memory and time limits. Great for math, dates and data wrangling at minimal cost. No shell, no Python, no network, no files that outlive the turn — choose the Virtual Machine Shell if you need those.",
|
|
61924
|
+
kindVirtualMachine: "Virtual Machine Shell",
|
|
61925
|
+
kindVirtualMachineShort: "Give this agent a full Linux virtual machine: it can write files and run real shell commands in an isolated sandbox.",
|
|
61926
|
+
kindVirtualMachineDetail: "Gives the agent a full Linux Virtual Machine. A private VM is created only when the agent runs a command and is destroyed when the chat ends; files it saves in /workspace carry over between turns. No network access unless you grant an egress profile. Use for data analysis, code that must actually run, or file generation (PDF, XLSX…). This adds additional costs per usage. Use Computing Runtime if you only need simple computations.",
|
|
61927
|
+
kindClaw: "Claw",
|
|
61928
|
+
kindClawShort: "Power this agent with a dedicated Claw worker — a persistent agent host with its own skills and plugins, billed by usage.",
|
|
61929
|
+
kindClawDetail: "Chat is handled by an OpenClaw-protocol worker instead of the built-in agent. Workers keep long-lived state, install skills and plugins, and report measured token usage that is billed against your credits in near-real-time. Requires a provisioned Claw instance for your tenant; built-in agent features (RAG tools, the VM and JS runtimes) don't apply while Claw is active.",
|
|
61930
|
+
kindInfoAriaLabel: "More info about {kind}",
|
|
61931
|
+
kindToggleAriaLabel: "{kind} {state}",
|
|
61932
|
+
sandboxKindUpdated: "Sandbox type updated",
|
|
61933
|
+
failedToUpdateSandboxKind: "Failed to update sandbox type",
|
|
61934
|
+
sandboxKindTitle: "Sandbox Type"
|
|
61920
61935
|
};
|
|
61921
61936
|
var common$3 = {
|
|
61922
61937
|
close: "Close",
|
|
@@ -63830,12 +63845,14 @@ var profileOrganization$3 = {
|
|
|
63830
63845
|
defaultName: "Default",
|
|
63831
63846
|
support: "Support",
|
|
63832
63847
|
supportEmailPlaceholder: "Enter organization support address",
|
|
63833
|
-
supportPhone: "
|
|
63848
|
+
supportPhone: "Call / Text",
|
|
63834
63849
|
supportPhonePlaceholder: "Enter organization support phone number",
|
|
63835
63850
|
notSet: "Not set",
|
|
63836
63851
|
helpCenter: "Help Center",
|
|
63837
63852
|
toggleHelpCenterVisibility: "Toggle Help Center visibility",
|
|
63838
63853
|
helpCenterUrlPlaceholder: "Enter help center URL",
|
|
63854
|
+
documentation: "Documentation",
|
|
63855
|
+
documentationPlaceholder: "Enter organization documentation URL",
|
|
63839
63856
|
lightLogo: "Light Logo",
|
|
63840
63857
|
removeImage: "Remove image",
|
|
63841
63858
|
upload: "+ Upload",
|
|
@@ -63848,6 +63865,7 @@ var profileOrganization$3 = {
|
|
|
63848
63865
|
supportUpdated: "Support updated successfully",
|
|
63849
63866
|
updateFailed: "Failed to update",
|
|
63850
63867
|
supportPhoneUpdated: "Support phone updated successfully",
|
|
63868
|
+
documentationUpdated: "Documentation updated successfully",
|
|
63851
63869
|
helpCenterUpdated: "Help Center updated successfully",
|
|
63852
63870
|
helpCenterEnabled: "Help Center enabled",
|
|
63853
63871
|
helpCenterDisabled: "Help Center disabled"
|
|
@@ -69036,7 +69054,22 @@ var clawSandboxSandboxConfig$2 = {
|
|
|
69036
69054
|
saving: "Enregistrement en cours...",
|
|
69037
69055
|
save: "Enregistrer",
|
|
69038
69056
|
instanceUpdated: "Instance mise à jour",
|
|
69039
|
-
failedToUpdateInstance: "Échec de la mise à jour de l'instance"
|
|
69057
|
+
failedToUpdateInstance: "Échec de la mise à jour de l'instance",
|
|
69058
|
+
sandboxKindDescription: "Choisissez comment cet agent exécute du code. Un seul type de sandbox peut être activé à la fois.",
|
|
69059
|
+
kindComputationalRuntime: "Environnement de calcul",
|
|
69060
|
+
kindComputationalRuntimeShort: "Donnez à cet agent une calculatrice JavaScript légère pour des calculs rapides — l'option la plus économique.",
|
|
69061
|
+
kindComputationalRuntimeDetail: "Exécute de petits extraits JavaScript dans le processus avec des limites strictes de mémoire et de temps. Idéal pour les mathématiques, les dates et la manipulation de données à coût minimal. Pas de shell, pas de Python, pas de réseau, pas de fichiers qui survivent au tour — choisissez la machine virtuelle si vous en avez besoin.",
|
|
69062
|
+
kindVirtualMachine: "Shell de machine virtuelle",
|
|
69063
|
+
kindVirtualMachineShort: "Donnez à cet agent une machine virtuelle Linux complète : il peut écrire des fichiers et exécuter de vraies commandes shell dans un sandbox isolé.",
|
|
69064
|
+
kindVirtualMachineDetail: "Donne à l'agent une machine virtuelle Linux complète. Une VM privée est créée uniquement lorsque l'agent exécute une commande et détruite à la fin du chat ; les fichiers enregistrés dans /workspace sont conservés entre les tours. Aucun accès réseau sauf si vous accordez un profil de sortie. À utiliser pour l'analyse de données, du code qui doit réellement s'exécuter ou la génération de fichiers (PDF, XLSX…). Cela ajoute des coûts supplémentaires à l'usage. Utilisez l'environnement de calcul si vous n'avez besoin que de calculs simples.",
|
|
69065
|
+
kindClaw: "Claw",
|
|
69066
|
+
kindClawShort: "Propulsez cet agent avec un worker Claw dédié — un hôte d'agent persistant avec ses propres skills et plugins, facturé à l'usage.",
|
|
69067
|
+
kindClawDetail: "Le chat est géré par un worker au protocole OpenClaw au lieu de l'agent intégré. Les workers conservent un état de longue durée, installent des skills et des plugins, et rapportent une consommation de tokens mesurée, facturée sur vos crédits quasiment en temps réel. Nécessite une instance Claw provisionnée pour votre tenant ; les fonctionnalités de l'agent intégré (outils RAG, la VM et les environnements JS) ne s'appliquent pas lorsque Claw est actif.",
|
|
69068
|
+
kindInfoAriaLabel: "Plus d'informations sur {kind}",
|
|
69069
|
+
kindToggleAriaLabel: "{kind} {state}",
|
|
69070
|
+
sandboxKindUpdated: "Type de sandbox mis à jour",
|
|
69071
|
+
failedToUpdateSandboxKind: "Échec de la mise à jour du type de sandbox",
|
|
69072
|
+
sandboxKindTitle: "Type de sandbox"
|
|
69040
69073
|
};
|
|
69041
69074
|
var common$2 = {
|
|
69042
69075
|
close: "Fermer",
|
|
@@ -70950,12 +70983,14 @@ var profileOrganization$2 = {
|
|
|
70950
70983
|
defaultName: "Par défaut",
|
|
70951
70984
|
support: "Assistance",
|
|
70952
70985
|
supportEmailPlaceholder: "Entrez l'adresse d'assistance de l'organisation",
|
|
70953
|
-
supportPhone: "
|
|
70986
|
+
supportPhone: "Appel / SMS",
|
|
70954
70987
|
supportPhonePlaceholder: "Entrez le numéro de téléphone d'assistance de l'organisation",
|
|
70955
70988
|
notSet: "Non défini",
|
|
70956
70989
|
helpCenter: "Centre d'aide",
|
|
70957
70990
|
toggleHelpCenterVisibility: "Activer/désactiver la visibilité du centre d'aide",
|
|
70958
70991
|
helpCenterUrlPlaceholder: "Entrez l'URL du centre d'aide",
|
|
70992
|
+
documentation: "Documentation",
|
|
70993
|
+
documentationPlaceholder: "Entrez l'URL de la documentation de l'organisation",
|
|
70959
70994
|
lightLogo: "Logo clair",
|
|
70960
70995
|
removeImage: "Supprimer l'image",
|
|
70961
70996
|
upload: "+ Télécharger",
|
|
@@ -70968,6 +71003,7 @@ var profileOrganization$2 = {
|
|
|
70968
71003
|
supportUpdated: "Assistance mise à jour avec succès",
|
|
70969
71004
|
updateFailed: "Échec de la mise à jour",
|
|
70970
71005
|
supportPhoneUpdated: "Téléphone d'assistance mis à jour avec succès",
|
|
71006
|
+
documentationUpdated: "Documentation mise à jour avec succès",
|
|
70971
71007
|
helpCenterUpdated: "Centre d'aide mis à jour avec succès",
|
|
70972
71008
|
helpCenterEnabled: "Centre d'aide activé",
|
|
70973
71009
|
helpCenterDisabled: "Centre d'aide désactivé"
|
|
@@ -75990,7 +76026,22 @@ var clawSandboxSandboxConfig$1 = {
|
|
|
75990
76026
|
saving: "Guardando...",
|
|
75991
76027
|
save: "Guardar",
|
|
75992
76028
|
instanceUpdated: "Instancia actualizada",
|
|
75993
|
-
failedToUpdateInstance: "Error al actualizar la instancia"
|
|
76029
|
+
failedToUpdateInstance: "Error al actualizar la instancia",
|
|
76030
|
+
sandboxKindDescription: "Elige cómo ejecuta código este agente. Solo se puede habilitar un tipo de sandbox a la vez.",
|
|
76031
|
+
kindComputationalRuntime: "Entorno de cómputo",
|
|
76032
|
+
kindComputationalRuntimeShort: "Dale a este agente una calculadora JavaScript ligera para cálculos rápidos: la opción de menor costo.",
|
|
76033
|
+
kindComputationalRuntimeDetail: "Ejecuta pequeños fragmentos de JavaScript en el proceso con límites estrictos de memoria y tiempo. Ideal para matemáticas, fechas y transformación de datos a un costo mínimo. Sin shell, sin Python, sin red y sin archivos que persistan entre turnos; elige la máquina virtual si los necesitas.",
|
|
76034
|
+
kindVirtualMachine: "Shell de máquina virtual",
|
|
76035
|
+
kindVirtualMachineShort: "Dale a este agente una máquina virtual Linux completa: puede escribir archivos y ejecutar comandos de shell reales en un sandbox aislado.",
|
|
76036
|
+
kindVirtualMachineDetail: "Le da al agente una máquina virtual Linux completa. Se crea una VM privada solo cuando el agente ejecuta un comando y se destruye al terminar el chat; los archivos guardados en /workspace se conservan entre turnos. Sin acceso a la red a menos que concedas un perfil de egreso. Úsala para análisis de datos, código que debe ejecutarse realmente o generación de archivos (PDF, XLSX…). Esto añade costos adicionales por uso. Usa el entorno de cómputo si solo necesitas cálculos simples.",
|
|
76037
|
+
kindClaw: "Claw",
|
|
76038
|
+
kindClawShort: "Impulsa este agente con un worker Claw dedicado: un host de agente persistente con sus propias skills y plugins, facturado por uso.",
|
|
76039
|
+
kindClawDetail: "El chat lo gestiona un worker con protocolo OpenClaw en lugar del agente integrado. Los workers mantienen estado de larga duración, instalan skills y plugins, y reportan el uso de tokens medido, que se factura contra tus créditos casi en tiempo real. Requiere una instancia de Claw aprovisionada para tu tenant; las funciones del agente integrado (herramientas RAG, la VM y los entornos JS) no aplican mientras Claw está activo.",
|
|
76040
|
+
kindInfoAriaLabel: "Más información sobre {kind}",
|
|
76041
|
+
kindToggleAriaLabel: "{kind} {state}",
|
|
76042
|
+
sandboxKindUpdated: "Tipo de sandbox actualizado",
|
|
76043
|
+
failedToUpdateSandboxKind: "No se pudo actualizar el tipo de sandbox",
|
|
76044
|
+
sandboxKindTitle: "Tipo de sandbox"
|
|
75994
76045
|
};
|
|
75995
76046
|
var common$1 = {
|
|
75996
76047
|
close: "Cerrar",
|
|
@@ -77904,12 +77955,14 @@ var profileOrganization$1 = {
|
|
|
77904
77955
|
defaultName: "Predeterminado",
|
|
77905
77956
|
support: "Soporte",
|
|
77906
77957
|
supportEmailPlaceholder: "Ingrese la dirección de soporte de la organización",
|
|
77907
|
-
supportPhone: "
|
|
77958
|
+
supportPhone: "Llamar / Mensaje",
|
|
77908
77959
|
supportPhonePlaceholder: "Ingrese el número de teléfono de soporte de la organización",
|
|
77909
77960
|
notSet: "No establecido",
|
|
77910
77961
|
helpCenter: "Centro de ayuda",
|
|
77911
77962
|
toggleHelpCenterVisibility: "Alternar visibilidad del centro de ayuda",
|
|
77912
77963
|
helpCenterUrlPlaceholder: "Ingrese la URL del centro de ayuda",
|
|
77964
|
+
documentation: "Documentación",
|
|
77965
|
+
documentationPlaceholder: "Ingrese la URL de la documentación de la organización",
|
|
77913
77966
|
lightLogo: "Logo claro",
|
|
77914
77967
|
removeImage: "Eliminar imagen",
|
|
77915
77968
|
upload: "+ Subir",
|
|
@@ -77922,6 +77975,7 @@ var profileOrganization$1 = {
|
|
|
77922
77975
|
supportUpdated: "Soporte actualizado correctamente",
|
|
77923
77976
|
updateFailed: "Error al actualizar",
|
|
77924
77977
|
supportPhoneUpdated: "Teléfono de soporte actualizado correctamente",
|
|
77978
|
+
documentationUpdated: "Documentación actualizada correctamente",
|
|
77925
77979
|
helpCenterUpdated: "Centro de ayuda actualizado correctamente",
|
|
77926
77980
|
helpCenterEnabled: "Centro de ayuda habilitado",
|
|
77927
77981
|
helpCenterDisabled: "Centro de ayuda deshabilitado"
|
|
@@ -82944,7 +82998,22 @@ var clawSandboxSandboxConfig = {
|
|
|
82944
82998
|
saving: "保存中...",
|
|
82945
82999
|
save: "保存",
|
|
82946
83000
|
instanceUpdated: "实例已更新",
|
|
82947
|
-
failedToUpdateInstance: "更新实例失败"
|
|
83001
|
+
failedToUpdateInstance: "更新实例失败",
|
|
83002
|
+
sandboxKindDescription: "选择该智能体运行代码的方式。一次只能启用一种沙箱类型。",
|
|
83003
|
+
kindComputationalRuntime: "计算运行时",
|
|
83004
|
+
kindComputationalRuntimeShort: "为该智能体提供轻量级 JavaScript 计算器,用于快速计算——低成本选项。",
|
|
83005
|
+
kindComputationalRuntimeDetail: "在进程内运行小段 JavaScript 代码,并有严格的内存和时间限制。适合以极低成本进行数学、日期和数据处理。没有 shell、没有 Python、没有网络,文件也不会跨轮次保留——如需这些功能请选择虚拟机。",
|
|
83006
|
+
kindVirtualMachine: "虚拟机 Shell",
|
|
83007
|
+
kindVirtualMachineShort: "为该智能体提供完整的 Linux 虚拟机:它可以在隔离沙箱中写入文件并执行真实的 shell 命令。",
|
|
83008
|
+
kindVirtualMachineDetail: "为智能体提供完整的 Linux 虚拟机。仅当智能体执行命令时才会创建专属虚拟机,并在聊天结束时销毁;保存在 /workspace 中的文件会在轮次之间保留。除非授予出站网络配置,否则无网络访问。适用于数据分析、必须真正运行的代码或文件生成(PDF、XLSX 等)。这会按使用量产生额外费用。若只需简单计算,请使用计算运行时。",
|
|
83009
|
+
kindClaw: "Claw",
|
|
83010
|
+
kindClawShort: "使用专用 Claw worker 驱动该智能体——一个拥有自己的技能和插件的持久化智能体主机,按用量计费。",
|
|
83011
|
+
kindClawDetail: "聊天由 OpenClaw 协议的 worker 处理,而不是内置智能体。Worker 保留长期状态、安装技能和插件,并上报实测的 token 用量,几乎实时地从您的额度中扣费。需要为您的租户预配 Claw 实例;Claw 激活期间,内置智能体功能(RAG 工具、虚拟机和 JS 运行时)不适用。",
|
|
83012
|
+
kindInfoAriaLabel: "关于{kind}的更多信息",
|
|
83013
|
+
kindToggleAriaLabel: "{kind}{state}",
|
|
83014
|
+
sandboxKindUpdated: "沙箱类型已更新",
|
|
83015
|
+
failedToUpdateSandboxKind: "更新沙箱类型失败",
|
|
83016
|
+
sandboxKindTitle: "沙箱类型"
|
|
82948
83017
|
};
|
|
82949
83018
|
var common = {
|
|
82950
83019
|
close: "关闭",
|
|
@@ -84858,12 +84927,14 @@ var profileOrganization = {
|
|
|
84858
84927
|
defaultName: "默认",
|
|
84859
84928
|
support: "支持",
|
|
84860
84929
|
supportEmailPlaceholder: "输入组织支持地址",
|
|
84861
|
-
supportPhone: "
|
|
84930
|
+
supportPhone: "电话 / 短信",
|
|
84862
84931
|
supportPhonePlaceholder: "输入组织支持电话号码",
|
|
84863
84932
|
notSet: "未设置",
|
|
84864
84933
|
helpCenter: "帮助中心",
|
|
84865
84934
|
toggleHelpCenterVisibility: "切换帮助中心可见性",
|
|
84866
84935
|
helpCenterUrlPlaceholder: "输入帮助中心 URL",
|
|
84936
|
+
documentation: "文档",
|
|
84937
|
+
documentationPlaceholder: "输入组织文档网址",
|
|
84867
84938
|
lightLogo: "浅色徽标",
|
|
84868
84939
|
removeImage: "删除图片",
|
|
84869
84940
|
upload: "+ 上传",
|
|
@@ -84876,6 +84947,7 @@ var profileOrganization = {
|
|
|
84876
84947
|
supportUpdated: "支持信息更新成功",
|
|
84877
84948
|
updateFailed: "更新失败",
|
|
84878
84949
|
supportPhoneUpdated: "支持电话更新成功",
|
|
84950
|
+
documentationUpdated: "文档更新成功",
|
|
84879
84951
|
helpCenterUpdated: "帮助中心更新成功",
|
|
84880
84952
|
helpCenterEnabled: "帮助中心已启用",
|
|
84881
84953
|
helpCenterDisabled: "帮助中心已禁用"
|
|
@@ -195864,22 +195936,25 @@ function AdvancedTab({ platformKey, username, currentSPA, authURL, currentPlatfo
|
|
|
195864
195936
|
'enable_profile_screen_on_start_page',
|
|
195865
195937
|
'enable_get_started_screen_on_start_page',
|
|
195866
195938
|
];
|
|
195939
|
+
// Settings that are edited in the Organization tab, so they are not duplicated here
|
|
195940
|
+
const organizationTabSlugs = ['show_help', 'support_url', 'help_center_url', 'documentation_url'];
|
|
195867
195941
|
// String settings rendered as a free-text input; every other string setting is
|
|
195868
195942
|
// either handled by a dedicated component or exposed through its own options list
|
|
195869
195943
|
const stringSettingSlugs = [
|
|
195870
195944
|
'overall_default_mentor',
|
|
195871
|
-
'help_center_url',
|
|
195872
195945
|
'monetization_base_path',
|
|
195873
195946
|
'skills_welcome_tagline',
|
|
195874
195947
|
];
|
|
195875
195948
|
const getConfigurableMetadatas = () => {
|
|
195876
195949
|
// Include boolean, select and whitelisted string settings, but exclude start
|
|
195877
|
-
// screen settings which are handled by the StartScreenContent component
|
|
195950
|
+
// screen settings which are handled by the StartScreenContent component and
|
|
195951
|
+
// settings owned by the Organization tab
|
|
195878
195952
|
const configurableMetadatas = getAllMetadatas().filter((metadata) => (typeof metadata.defaultValue === 'boolean' ||
|
|
195879
195953
|
hasSelectableOptions(metadata) ||
|
|
195880
195954
|
(typeof metadata.defaultValue === 'string' &&
|
|
195881
195955
|
stringSettingSlugs.includes(metadata.slug))) &&
|
|
195882
|
-
!startScreenSlugs.includes(metadata.slug)
|
|
195956
|
+
!startScreenSlugs.includes(metadata.slug) &&
|
|
195957
|
+
!organizationTabSlugs.includes(metadata.slug));
|
|
195883
195958
|
// Show all configurable settings when no SPA is specified
|
|
195884
195959
|
if (!currentSPA)
|
|
195885
195960
|
return configurableMetadatas;
|
|
@@ -235162,10 +235237,14 @@ function readErrorMessage(err, fallback) {
|
|
|
235162
235237
|
return fallback;
|
|
235163
235238
|
}
|
|
235164
235239
|
const PAGE_SIZE$1 = 5;
|
|
235240
|
+
function SandboxKindRow({ label, description, detailTooltip, infoAriaLabel, checked, disabled, onToggle, switchAriaLabel, testId, }) {
|
|
235241
|
+
return (jsxs("div", { className: "flex items-center justify-between gap-4", children: [jsxs("div", { className: "min-w-0", children: [jsxs("div", { className: "flex items-center gap-2", children: [jsx("span", { className: "text-sm font-medium text-gray-700", children: label }), jsx(TooltipProvider, { children: jsxs(Tooltip$1, { children: [jsx(TooltipTrigger, { "aria-label": infoAriaLabel, children: jsx(Info$3, { className: "h-4 w-4 shrink-0 text-gray-400" }) }), jsx(TooltipContent, { className: "ibl-tooltip-content max-w-[320px]", children: jsx("p", { children: detailTooltip }) })] }) })] }), jsx("p", { className: "text-xs text-gray-500", children: description })] }), jsx(Switch, { checked: checked, disabled: disabled, onCheckedChange: onToggle, className: "cursor-pointer data-[state=checked]:bg-blue-500", "aria-label": switchAriaLabel, "data-testid": testId })] }));
|
|
235242
|
+
}
|
|
235165
235243
|
function parseModelIdentifier(model) {
|
|
235166
235244
|
if (!model) {
|
|
235167
235245
|
return { provider: '', llmName: '' };
|
|
235168
235246
|
}
|
|
235247
|
+
/* istanbul ignore next -- @preserve String.split never yields undefined entries */
|
|
235169
235248
|
const [provider = '', ...llmParts] = model.split('/');
|
|
235170
235249
|
return {
|
|
235171
235250
|
provider,
|
|
@@ -235177,6 +235256,7 @@ function getResolvedUsername(username) {
|
|
|
235177
235256
|
if (username === null || username === void 0 ? void 0 : username.trim()) {
|
|
235178
235257
|
return username.trim();
|
|
235179
235258
|
}
|
|
235259
|
+
/* istanbul ignore if -- @preserve SSR guard; jsdom always has window */
|
|
235180
235260
|
if (typeof window === 'undefined') {
|
|
235181
235261
|
return '';
|
|
235182
235262
|
}
|
|
@@ -235191,19 +235271,35 @@ function SandboxConfig({ platformKey, mentorUniqueId, username }) {
|
|
|
235191
235271
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
235192
235272
|
const t = useT();
|
|
235193
235273
|
const resolvedUsername = getResolvedUsername(username);
|
|
235274
|
+
// Sandbox kind flags come from mentor settings; the same update endpoint
|
|
235275
|
+
// persists all three (claw / virtual machine / computational runtime).
|
|
235276
|
+
const { data: mentorSettingsData, isLoading: isLoadingMentorSettings } = useGetMentorSettingsQuery({ mentor: mentorUniqueId, org: platformKey }, { skip: !platformKey || !mentorUniqueId });
|
|
235277
|
+
const [editMentor, { isLoading: isSavingSandboxKind }] = useEditMentorMutation();
|
|
235278
|
+
const sandboxSettings = mentorSettingsData;
|
|
235279
|
+
// Optimistic overrides so switches flip immediately; reverted on failure.
|
|
235280
|
+
const [flagOverrides, setFlagOverrides] = useState({});
|
|
235281
|
+
const sandboxFlags = {
|
|
235282
|
+
enable_computational_runtime: Boolean(sandboxSettings === null || sandboxSettings === void 0 ? void 0 : sandboxSettings.enable_computational_runtime),
|
|
235283
|
+
enable_virtual_machine: Boolean(sandboxSettings === null || sandboxSettings === void 0 ? void 0 : sandboxSettings.enable_virtual_machine),
|
|
235284
|
+
enable_claw: Boolean(sandboxSettings === null || sandboxSettings === void 0 ? void 0 : sandboxSettings.enable_claw),
|
|
235285
|
+
...flagOverrides,
|
|
235286
|
+
};
|
|
235287
|
+
const clawEnabled = sandboxFlags.enable_claw;
|
|
235194
235288
|
const { data: mentorConfigData, isLoading: isLoadingConfigs, isError: isMentorConfigError, } = useGetClawMentorConfigQuery({
|
|
235195
235289
|
org: platformKey,
|
|
235196
235290
|
mentorUniqueId,
|
|
235197
|
-
}
|
|
235291
|
+
},
|
|
235292
|
+
// The claw config/instances only matter while Claw is the selected kind.
|
|
235293
|
+
{ skip: !clawEnabled });
|
|
235198
235294
|
// GET /claw-config/ 404s when no config exists — that's the "not connected"
|
|
235199
235295
|
// state, not an error. The create/delete mutations write the cache directly
|
|
235200
235296
|
// (see api-slice onQueryStarted), so we don't need to refetch after either.
|
|
235201
235297
|
const mentorConfig = isMentorConfigError ? null : (mentorConfigData !== null && mentorConfigData !== void 0 ? mentorConfigData : null);
|
|
235202
|
-
const { data: instances, isLoading: isLoadingInstances, refetch: refetchInstances, } = useGetClawInstancesQuery({ org: platformKey });
|
|
235298
|
+
const { data: instances, isLoading: isLoadingInstances, refetch: refetchInstances, } = useGetClawInstancesQuery({ org: platformKey }, { skip: !clawEnabled });
|
|
235203
235299
|
const { data: agentConfig } = useGetAgentConfigQuery({
|
|
235204
235300
|
org: platformKey,
|
|
235205
235301
|
mentorUniqueId,
|
|
235206
|
-
});
|
|
235302
|
+
}, { skip: !clawEnabled });
|
|
235207
235303
|
const { data: llmProviders, isLoading: isLoadingLLMProviders, isError: isLLMProvidersError, } = useGetLlmsQuery({
|
|
235208
235304
|
org: platformKey,
|
|
235209
235305
|
userId: resolvedUsername,
|
|
@@ -235235,7 +235331,7 @@ function SandboxConfig({ platformKey, mentorUniqueId, username }) {
|
|
|
235235
235331
|
claw_type: 'openclaw',
|
|
235236
235332
|
gateway_token: '',
|
|
235237
235333
|
});
|
|
235238
|
-
const isLoading = isLoadingConfigs || isLoadingInstances;
|
|
235334
|
+
const isLoading = isLoadingMentorSettings || isLoadingConfigs || isLoadingInstances;
|
|
235239
235335
|
const allInstances = instances !== null && instances !== void 0 ? instances : [];
|
|
235240
235336
|
const availableLLMProviders = useMemo(() => (llmProviders !== null && llmProviders !== void 0 ? llmProviders : []), [llmProviders]);
|
|
235241
235337
|
const filteredLLMProviders = useMemo(() => availableLLMProviders.filter((provider) => provider.name.toLowerCase().includes(llmSearchQuery.toLowerCase())), [availableLLMProviders, llmSearchQuery]);
|
|
@@ -235267,6 +235363,36 @@ function SandboxConfig({ platformKey, mentorUniqueId, username }) {
|
|
|
235267
235363
|
return (jsx("div", { className: "flex items-center justify-center py-10", children: jsx(LoaderCircle, { className: "h-5 w-5 animate-spin text-blue-500" }) }));
|
|
235268
235364
|
}
|
|
235269
235365
|
// ── Handlers ─────────────────────────────────────────────────────────────
|
|
235366
|
+
/** Persist a sandbox-kind change through the mentor-settings endpoint.
|
|
235367
|
+
* The switches flip optimistically and revert if the save fails. */
|
|
235368
|
+
const handleSandboxKindChange = async (patch) => {
|
|
235369
|
+
const previousOverrides = flagOverrides;
|
|
235370
|
+
setFlagOverrides((current) => ({ ...current, ...patch }));
|
|
235371
|
+
try {
|
|
235372
|
+
await editMentor({
|
|
235373
|
+
mentor: mentorUniqueId,
|
|
235374
|
+
org: platformKey,
|
|
235375
|
+
userId: resolvedUsername,
|
|
235376
|
+
// @ts-expect-error the installed MentorSettingsRequest type predates the sandbox flags
|
|
235377
|
+
formData: patch,
|
|
235378
|
+
}).unwrap();
|
|
235379
|
+
toast.success(t('clawSandboxSandboxConfig.sandboxKindUpdated'));
|
|
235380
|
+
}
|
|
235381
|
+
catch (_a) {
|
|
235382
|
+
setFlagOverrides(previousOverrides);
|
|
235383
|
+
toast.error(t('clawSandboxSandboxConfig.failedToUpdateSandboxKind'));
|
|
235384
|
+
}
|
|
235385
|
+
};
|
|
235386
|
+
/** The kinds are mutually exclusive — enabling one turns the other two off
|
|
235387
|
+
* in the same PATCH; toggling the active kind off leaves none enabled. */
|
|
235388
|
+
const handleSelectKind = (flag, value) => handleSandboxKindChange(value
|
|
235389
|
+
? {
|
|
235390
|
+
enable_claw: false,
|
|
235391
|
+
enable_virtual_machine: false,
|
|
235392
|
+
enable_computational_runtime: false,
|
|
235393
|
+
[flag]: true,
|
|
235394
|
+
}
|
|
235395
|
+
: { [flag]: false });
|
|
235270
235396
|
const handleConnect = async (instanceId) => {
|
|
235271
235397
|
setConnectingInstanceId(instanceId);
|
|
235272
235398
|
try {
|
|
@@ -235286,6 +235412,7 @@ function SandboxConfig({ platformKey, mentorUniqueId, username }) {
|
|
|
235286
235412
|
}
|
|
235287
235413
|
};
|
|
235288
235414
|
const handleDisconnect = async () => {
|
|
235415
|
+
/* istanbul ignore if -- @preserve defensive; Disconnect only renders in the connected view */
|
|
235289
235416
|
if (!mentorConfig)
|
|
235290
235417
|
return;
|
|
235291
235418
|
// Close the modal up front — the cache is also optimistically cleared in
|
|
@@ -235328,6 +235455,7 @@ function SandboxConfig({ platformKey, mentorUniqueId, username }) {
|
|
|
235328
235455
|
}
|
|
235329
235456
|
};
|
|
235330
235457
|
const handleDeleteInstance = async () => {
|
|
235458
|
+
/* istanbul ignore if -- @preserve defensive; the confirm dialog only opens with an id set */
|
|
235331
235459
|
if (!deletingInstanceId)
|
|
235332
235460
|
return;
|
|
235333
235461
|
try {
|
|
@@ -235341,6 +235469,7 @@ function SandboxConfig({ platformKey, mentorUniqueId, username }) {
|
|
|
235341
235469
|
}
|
|
235342
235470
|
};
|
|
235343
235471
|
const handleToggle = async (field, value) => {
|
|
235472
|
+
/* istanbul ignore if -- @preserve defensive; the switch only renders in the connected view */
|
|
235344
235473
|
if (!mentorConfig)
|
|
235345
235474
|
return;
|
|
235346
235475
|
try {
|
|
@@ -235353,8 +235482,10 @@ function SandboxConfig({ platformKey, mentorUniqueId, username }) {
|
|
|
235353
235482
|
};
|
|
235354
235483
|
const handlePush = async () => {
|
|
235355
235484
|
var _a, _b;
|
|
235485
|
+
/* istanbul ignore if -- @preserve defensive; Push only renders in the connected view */
|
|
235356
235486
|
if (!mentorConfig)
|
|
235357
235487
|
return;
|
|
235488
|
+
/* istanbul ignore if -- @preserve defensive; the Push button is disabled in this state */
|
|
235358
235489
|
if (!hasAgentConfiguration) {
|
|
235359
235490
|
toast.error(t('clawSandboxSandboxConfig.setAgentConfigBeforePushing'));
|
|
235360
235491
|
return;
|
|
@@ -235373,6 +235504,7 @@ function SandboxConfig({ platformKey, mentorUniqueId, username }) {
|
|
|
235373
235504
|
}
|
|
235374
235505
|
};
|
|
235375
235506
|
const handleCreateInstance = async () => {
|
|
235507
|
+
/* istanbul ignore if -- @preserve defensive; the Create button is disabled in this state */
|
|
235376
235508
|
if (!newInstance.name || !newInstance.server_url || !newInstance.gateway_token) {
|
|
235377
235509
|
toast.error(t('clawSandboxSandboxConfig.nameUrlTokenRequired'));
|
|
235378
235510
|
return;
|
|
@@ -235417,47 +235549,68 @@ function SandboxConfig({ platformKey, mentorUniqueId, username }) {
|
|
|
235417
235549
|
toast.error(t('clawSandboxSandboxConfig.failedToUpdateModel'));
|
|
235418
235550
|
}
|
|
235419
235551
|
};
|
|
235552
|
+
// ── Sandbox kind selection ───────────────────────────────────────────────
|
|
235553
|
+
const sandboxKindsSection = (jsxs("div", { className: "rounded-lg border p-6", children: [jsxs("div", { className: "mb-4", children: [jsx("h4", { className: "text-sm font-medium text-gray-900", children: t('clawSandboxSandboxConfig.sandboxKindTitle') }), jsx("p", { className: "mt-1 text-xs text-gray-500", children: t('clawSandboxSandboxConfig.sandboxKindDescription') })] }), jsxs("div", { className: "space-y-4", children: [jsx(SandboxKindRow, { label: t('clawSandboxSandboxConfig.kindComputationalRuntime'), description: t('clawSandboxSandboxConfig.kindComputationalRuntimeShort'), detailTooltip: t('clawSandboxSandboxConfig.kindComputationalRuntimeDetail'), infoAriaLabel: t('clawSandboxSandboxConfig.kindInfoAriaLabel', {
|
|
235554
|
+
kind: t('clawSandboxSandboxConfig.kindComputationalRuntime'),
|
|
235555
|
+
}), checked: sandboxFlags.enable_computational_runtime, disabled: isSavingSandboxKind, onToggle: (value) => handleSelectKind('enable_computational_runtime', value), switchAriaLabel: t('clawSandboxSandboxConfig.kindToggleAriaLabel', {
|
|
235556
|
+
kind: t('clawSandboxSandboxConfig.kindComputationalRuntime'),
|
|
235557
|
+
state: sandboxFlags.enable_computational_runtime
|
|
235558
|
+
? t('clawSandboxSandboxConfig.enabled')
|
|
235559
|
+
: t('clawSandboxSandboxConfig.disabled'),
|
|
235560
|
+
}), testId: "sandbox-kind-computational-runtime" }), jsx(SandboxKindRow, { label: t('clawSandboxSandboxConfig.kindVirtualMachine'), description: t('clawSandboxSandboxConfig.kindVirtualMachineShort'), detailTooltip: t('clawSandboxSandboxConfig.kindVirtualMachineDetail'), infoAriaLabel: t('clawSandboxSandboxConfig.kindInfoAriaLabel', {
|
|
235561
|
+
kind: t('clawSandboxSandboxConfig.kindVirtualMachine'),
|
|
235562
|
+
}), checked: sandboxFlags.enable_virtual_machine, disabled: isSavingSandboxKind, onToggle: (value) => handleSelectKind('enable_virtual_machine', value), switchAriaLabel: t('clawSandboxSandboxConfig.kindToggleAriaLabel', {
|
|
235563
|
+
kind: t('clawSandboxSandboxConfig.kindVirtualMachine'),
|
|
235564
|
+
state: sandboxFlags.enable_virtual_machine
|
|
235565
|
+
? t('clawSandboxSandboxConfig.enabled')
|
|
235566
|
+
: t('clawSandboxSandboxConfig.disabled'),
|
|
235567
|
+
}), testId: "sandbox-kind-virtual-machine" }), jsx(SandboxKindRow, { label: t('clawSandboxSandboxConfig.kindClaw'), description: t('clawSandboxSandboxConfig.kindClawShort'), detailTooltip: t('clawSandboxSandboxConfig.kindClawDetail'), infoAriaLabel: t('clawSandboxSandboxConfig.kindInfoAriaLabel', {
|
|
235568
|
+
kind: t('clawSandboxSandboxConfig.kindClaw'),
|
|
235569
|
+
}), checked: clawEnabled, disabled: isSavingSandboxKind, onToggle: (value) => handleSelectKind('enable_claw', value), switchAriaLabel: t('clawSandboxSandboxConfig.kindToggleAriaLabel', {
|
|
235570
|
+
kind: t('clawSandboxSandboxConfig.kindClaw'),
|
|
235571
|
+
state: clawEnabled
|
|
235572
|
+
? t('clawSandboxSandboxConfig.enabled')
|
|
235573
|
+
: t('clawSandboxSandboxConfig.disabled'),
|
|
235574
|
+
}), testId: "sandbox-kind-claw" })] })] }));
|
|
235420
235575
|
// ── Not connected: show instance table ───────────────────────────────────
|
|
235421
|
-
|
|
235422
|
-
|
|
235423
|
-
|
|
235424
|
-
|
|
235425
|
-
|
|
235426
|
-
|
|
235427
|
-
|
|
235428
|
-
|
|
235429
|
-
|
|
235430
|
-
|
|
235431
|
-
|
|
235432
|
-
|
|
235433
|
-
|
|
235434
|
-
|
|
235435
|
-
|
|
235436
|
-
|
|
235437
|
-
|
|
235438
|
-
|
|
235439
|
-
|
|
235440
|
-
|
|
235441
|
-
|
|
235442
|
-
|
|
235443
|
-
|
|
235444
|
-
|
|
235445
|
-
|
|
235446
|
-
|
|
235447
|
-
|
|
235448
|
-
|
|
235449
|
-
|
|
235450
|
-
|
|
235451
|
-
|
|
235452
|
-
|
|
235453
|
-
|
|
235454
|
-
|
|
235455
|
-
|
|
235456
|
-
|
|
235457
|
-
: t('clawSandboxSandboxConfig.delete') })] })] })] }));
|
|
235458
|
-
}
|
|
235576
|
+
const notConnectedSection = (jsxs("div", { className: "space-y-4", children: [jsxs("div", { className: "flex flex-col items-start justify-between gap-4 sm:flex-row sm:items-center", children: [jsxs("div", { className: "relative w-full sm:w-64", children: [jsx(Search, { className: "absolute top-2.5 left-2.5 h-4 w-4 text-gray-500" }), jsx(Input, { id: "instance-search", name: "instance-search", type: "search", placeholder: t('clawSandboxSandboxConfig.searchInstancesPlaceholder'), className: "pl-8", value: instanceSearchQuery, onChange: (e) => {
|
|
235577
|
+
setInstanceSearchQuery(e.target.value);
|
|
235578
|
+
setCurrentPage(1);
|
|
235579
|
+
} })] }), jsxs(Button$1, { onClick: () => setShowNewInstanceForm(true), size: "sm", className: "cursor-pointer bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-white hover:opacity-90", children: [jsx(Plus, { className: "h-4 w-4" }), t('clawSandboxSandboxConfig.addInstance')] })] }), jsx("div", { className: "overflow-hidden rounded-md border", children: jsx("div", { className: "overflow-x-auto", children: jsx("div", { className: "inline-block min-w-full align-middle", children: jsxs(Table, { className: "min-w-full", children: [jsx(TableHeader, { children: jsxs(TableRow, { className: "bg-muted/50 border-b", children: [jsx(TableHead, { className: "p-3 text-left text-sm whitespace-nowrap text-[#646464]", children: t('clawSandboxSandboxConfig.colName') }), jsx(TableHead, { className: "p-3 text-left text-sm whitespace-nowrap text-[#646464]", children: t('clawSandboxSandboxConfig.colUrl') }), jsx(TableHead, { className: "p-3 text-left text-sm whitespace-nowrap text-[#646464]", children: t('clawSandboxSandboxConfig.colType') }), jsx(TableHead, { className: "p-3 text-left text-sm whitespace-nowrap text-[#646464]", children: t('clawSandboxSandboxConfig.colStatus') }), jsx(TableHead, { className: "p-3 text-left text-sm whitespace-nowrap text-[#646464]", children: t('clawSandboxSandboxConfig.colHealth') }), jsx(TableHead, { className: "p-3 text-left text-sm whitespace-nowrap text-[#646464]", children: t('clawSandboxSandboxConfig.colVersion') }), jsx(TableHead, { className: "p-3 text-left text-sm whitespace-nowrap text-[#646464]", children: t('clawSandboxSandboxConfig.colLastCheck') }), jsx(TableHead, { className: "p-3 text-right text-sm whitespace-nowrap text-[#646464]" })] }) }), jsx(TableBody, { children: pagedInstances.length === 0 ? (jsx(TableRow, { children: jsx(TableCell, { colSpan: 8, className: "p-6 text-center text-sm text-gray-500", children: instanceSearchQuery
|
|
235580
|
+
? t('clawSandboxSandboxConfig.noInstancesMatchSearch')
|
|
235581
|
+
: t('clawSandboxSandboxConfig.noInstancesAvailable') }) })) : (pagedInstances.map((inst) => {
|
|
235582
|
+
var _a;
|
|
235583
|
+
return (jsxs(TableRow, { className: "border-b last:border-0", children: [jsx(TableCell, { className: "p-3 font-medium whitespace-nowrap text-[#646464]", children: inst.name }), jsx(TableCell, { className: "p-3 whitespace-nowrap text-[#646464] truncate max-w-[250px]", children: jsx(TooltipProvider, { children: jsxs(Tooltip$1, { children: [jsx(TooltipTrigger, { asChild: true, children: jsx("span", { className: "text-blue-600 hover:text-blue-800 cursor-default", children: inst.server_url }) }), jsx(TooltipContent, { className: "bg-gray-700 px-3 py-2 text-sm font-medium text-white shadow-sm", children: jsx("p", { children: inst.server_url }) })] }) }) }), jsx(TableCell, { className: "p-3 whitespace-nowrap text-[#646464]", children: inst.claw_type }), jsx(TableCell, { className: "p-3 whitespace-nowrap", children: jsx(StatusDot, { value: inst.status, kind: "status" }) }), jsx(TableCell, { className: "p-3 whitespace-nowrap", children: jsx(StatusDot, { value: inst.last_health_status, kind: "health" }) }), jsx(TableCell, { className: "p-3 whitespace-nowrap text-[#646464]", children: (_a = inst.claw_version) !== null && _a !== void 0 ? _a : '—' }), jsx(TableCell, { className: "p-3 whitespace-nowrap text-[#646464]", children: timeAgo(inst.last_health_check, t('clawSandboxSandboxConfig.never')) }), jsx(TableCell, { className: "p-3 text-right", children: (() => {
|
|
235584
|
+
const unhealthy = isInstanceUnhealthy(inst.status);
|
|
235585
|
+
const isThisConnecting = connectingInstanceId === inst.id;
|
|
235586
|
+
const connectDisabled = unhealthy || isCreating || connectingInstanceId !== null;
|
|
235587
|
+
// Surfaced as a first-class button (not tucked in the
|
|
235588
|
+
// three-dot menu) so connecting is one click. A
|
|
235589
|
+
// disabled button swallows pointer events, so wrap it
|
|
235590
|
+
// in a span when we need the unhealthy tooltip to show.
|
|
235591
|
+
const connectButton = (jsxs(Button$1, { variant: "outline", size: "sm", className: "cursor-pointer", disabled: connectDisabled, onClick: () => handleConnect(inst.id), "aria-label": isThisConnecting
|
|
235592
|
+
? t('clawSandboxSandboxConfig.connectingInstance')
|
|
235593
|
+
: t('clawSandboxSandboxConfig.connect'), "data-testid": `connect-instance-${inst.id}`, children: [isThisConnecting ? (jsx(LoaderCircle, { className: "mr-2 h-4 w-4 animate-spin" })) : (jsx(Link2, { className: "mr-2 h-4 w-4" })), isThisConnecting
|
|
235594
|
+
? t('clawSandboxSandboxConfig.connecting')
|
|
235595
|
+
: t('clawSandboxSandboxConfig.connect')] }));
|
|
235596
|
+
return (jsxs("div", { className: "flex items-center justify-end gap-2", children: [unhealthy ? (jsx(TooltipProvider, { children: jsxs(Tooltip$1, { children: [jsx(TooltipTrigger, { asChild: true, children: jsx("span", { tabIndex: 0, children: connectButton }) }), jsx(TooltipContent, { side: "left", collisionPadding: 12, className: "max-w-[260px] rounded-lg bg-gray-700 px-3 py-2 text-xs leading-snug font-medium break-words whitespace-normal text-white shadow-sm", children: t('clawSandboxSandboxConfig.instanceUnhealthyTooltip') })] }) })) : (connectButton), jsxs(DropdownMenu, { children: [jsx(DropdownMenuTrigger, { asChild: true, children: jsxs(Button$1, { variant: "ghost", size: "sm", "aria-label": t('clawSandboxSandboxConfig.actions'), children: [jsx(Ellipsis, { className: "h-4 w-4" }), jsx("span", { className: "sr-only", children: t('clawSandboxSandboxConfig.actions') })] }) }), jsxs(DropdownMenuContent, { align: "end", children: [jsxs(DropdownMenuItem, { className: "cursor-pointer", onClick: () => runInstanceChecks(inst.id), disabled: checkingInstanceId !== null, children: [checkingInstanceId === inst.id ? (jsx(LoaderCircle, { className: "mr-2 h-4 w-4 animate-spin" })) : (jsx(Activity, { className: "mr-2 h-4 w-4" })), t('clawSandboxSandboxConfig.runChecks')] }), jsxs(DropdownMenuItem, { className: "cursor-pointer", onClick: () => setEditingInstance(inst), children: [jsx(Pen, { className: "mr-2 h-4 w-4" }), t('clawSandboxSandboxConfig.edit')] }), jsxs(DropdownMenuItem, { variant: "destructive", className: "cursor-pointer", onClick: () => setDeletingInstanceId(inst.id), children: [jsx(Trash2, { className: "mr-2 h-4 w-4" }), t('clawSandboxSandboxConfig.delete')] })] })] })] }));
|
|
235597
|
+
})() })] }, inst.id));
|
|
235598
|
+
})) })] }) }) }) }), jsx(IblPagination, { currentPage: currentPage, totalPages: totalPages, onPageChange: setCurrentPage, disabled: false }), jsx(OverlayModal, { open: showNewInstanceForm, onClose: () => setShowNewInstanceForm(false), title: t('clawSandboxSandboxConfig.newInstanceTitle'), className: "max-w-lg", children: jsxs("div", { className: "grid gap-4", children: [jsxs("div", { className: "space-y-2", children: [jsx(Label$2, { htmlFor: "new-instance-name", className: "text-sm font-medium text-[#646464]", children: t('clawSandboxSandboxConfig.fieldName') }), jsx(Input, { id: "new-instance-name", name: "new-instance-name", value: newInstance.name, onChange: (e) => setNewInstance({ ...newInstance, name: e.target.value }), placeholder: t('clawSandboxSandboxConfig.namePlaceholder'), className: "py-6" })] }), jsxs("div", { className: "space-y-2", children: [jsx(Label$2, { htmlFor: "new-instance-type", className: "text-sm font-medium text-[#646464]", children: t('clawSandboxSandboxConfig.fieldType') }), jsxs(Select$1, { value: newInstance.claw_type, onValueChange: (value) => setNewInstance({ ...newInstance, claw_type: value }), children: [jsx(SelectTrigger, { id: "new-instance-type", className: "py-6", children: jsx(SelectValue, {}) }), jsxs(SelectContent, { children: [jsx(SelectItem, { value: "openclaw", children: "OpenClaw" }), jsx(SelectItem, { value: "ironclaw", children: "IronClaw" })] })] })] }), jsxs("div", { className: "space-y-2", children: [jsx(Label$2, { htmlFor: "new-instance-url", className: "text-sm font-medium text-[#646464]", children: t('clawSandboxSandboxConfig.fieldServerUrl') }), jsx(Input, { id: "new-instance-url", name: "new-instance-url", value: newInstance.server_url, onChange: (e) => setNewInstance({ ...newInstance, server_url: e.target.value }), placeholder: t('clawSandboxSandboxConfig.serverUrlPlaceholder'), className: "py-6" })] }), jsxs("div", { className: "space-y-2", children: [jsx(Label$2, { htmlFor: "new-instance-token", className: "text-sm font-medium text-[#646464]", children: t('clawSandboxSandboxConfig.fieldGatewayToken') }), jsx(Input, { id: "new-instance-token", name: "new-instance-token", value: newInstance.gateway_token, onChange: (e) => setNewInstance({ ...newInstance, gateway_token: e.target.value }), placeholder: t('clawSandboxSandboxConfig.gatewayTokenPlaceholder'), type: "password", className: "py-6", required: true })] }), jsxs("div", { className: "flex justify-end gap-2 pt-2", children: [jsx(Button$1, { variant: "outline", onClick: () => setShowNewInstanceForm(false), children: t('clawSandboxSandboxConfig.cancel') }), jsx(Button$1, { onClick: handleCreateInstance, disabled: isCreatingInstance ||
|
|
235599
|
+
!newInstance.name ||
|
|
235600
|
+
!newInstance.server_url ||
|
|
235601
|
+
!newInstance.gateway_token, className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-white hover:opacity-90", children: isCreatingInstance
|
|
235602
|
+
? t('clawSandboxSandboxConfig.creating')
|
|
235603
|
+
: t('clawSandboxSandboxConfig.create') })] })] }) }), editingInstance && (jsx(EditInstanceDialog, { instance: editingInstance, org: platformKey, onClose: () => {
|
|
235604
|
+
setEditingInstance(null);
|
|
235605
|
+
refetchInstances();
|
|
235606
|
+
}, onSaved: (id) => {
|
|
235607
|
+
// Re-verify the instance after edit; URL or token may have changed.
|
|
235608
|
+
void runInstanceChecks(id, true);
|
|
235609
|
+
} })), jsxs(OverlayModal, { open: !!deletingInstanceId, onClose: () => setDeletingInstanceId(null), title: t('clawSandboxSandboxConfig.deleteInstanceTitle'), className: "max-w-md", children: [jsx("p", { className: "text-sm text-gray-600", children: t('clawSandboxSandboxConfig.deleteInstanceConfirm') }), jsxs("div", { className: "flex justify-end gap-2 pt-2", children: [jsx(Button$1, { variant: "outline", onClick: () => setDeletingInstanceId(null), children: t('clawSandboxSandboxConfig.cancel') }), jsx(Button$1, { onClick: handleDeleteInstance, disabled: isDeletingInstance, className: "bg-red-600 text-white hover:bg-red-700", children: isDeletingInstance
|
|
235610
|
+
? t('clawSandboxSandboxConfig.deleting')
|
|
235611
|
+
: t('clawSandboxSandboxConfig.delete') })] })] })] }));
|
|
235459
235612
|
// ── Connected: show config controls ──────────────────────────────────────
|
|
235460
|
-
|
|
235613
|
+
const connectedSection = mentorConfig ? (jsxs("div", { className: "space-y-6", children: [jsxs("div", { className: "rounded-lg border p-6", children: [jsxs("div", { className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between mb-4", children: [jsx("h4", { className: "text-sm font-medium text-gray-900", children: t('clawSandboxSandboxConfig.connectedInstance') }), jsxs("div", { className: "flex items-center gap-2", children: [jsxs(Button$1, { variant: "outline", size: "sm", onClick: () => (connectedInstance === null || connectedInstance === void 0 ? void 0 : connectedInstance.id) !== undefined && runInstanceChecks(connectedInstance.id), disabled: checkingInstanceId !== null || (connectedInstance === null || connectedInstance === void 0 ? void 0 : connectedInstance.id) === undefined, children: [checkingInstanceId === (connectedInstance === null || connectedInstance === void 0 ? void 0 : connectedInstance.id) ? (jsx(LoaderCircle, { className: "h-4 w-4 animate-spin mr-1" })) : (jsx(Activity, { className: "h-4 w-4 mr-1" })), t('clawSandboxSandboxConfig.runChecks')] }), jsxs(Button$1, { variant: "ghost", size: "sm", onClick: () => setShowDisconnectConfirm(true), disabled: isDeleting, className: "text-red-500 hover:text-red-700 hover:bg-red-50", children: [isDeleting ? (jsx(LoaderCircle, { className: "h-4 w-4 animate-spin mr-1" })) : (jsx(Trash2, { className: "h-4 w-4 mr-1" })), t('clawSandboxSandboxConfig.disconnect')] })] })] }), jsxs("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: [jsxs("div", { children: [jsx("p", { className: "text-xs text-gray-400 mb-1", children: t('clawSandboxSandboxConfig.fieldName') }), jsx("p", { className: "text-sm text-gray-700 font-medium", children: (_a = connectedInstance === null || connectedInstance === void 0 ? void 0 : connectedInstance.name) !== null && _a !== void 0 ? _a : mentorConfig.server_name })] }), jsxs("div", { className: "sm:col-span-2 lg:col-span-2", children: [jsx("p", { className: "text-xs text-gray-400 mb-1", children: t('clawSandboxSandboxConfig.fieldServerUrl') }), jsx("p", { className: "text-sm text-blue-600 break-all", children: (_b = connectedInstance === null || connectedInstance === void 0 ? void 0 : connectedInstance.server_url) !== null && _b !== void 0 ? _b : '—' })] }), jsxs("div", { children: [jsx("p", { className: "text-xs text-gray-400 mb-1", children: t('clawSandboxSandboxConfig.colStatus') }), jsx(StatusDot, { value: (_c = connectedInstance === null || connectedInstance === void 0 ? void 0 : connectedInstance.status) !== null && _c !== void 0 ? _c : mentorConfig.server_status, kind: "status" })] }), jsxs("div", { children: [jsx("p", { className: "text-xs text-gray-400 mb-1", children: t('clawSandboxSandboxConfig.colHealth') }), jsx(StatusDot, { value: (_d = connectedInstance === null || connectedInstance === void 0 ? void 0 : connectedInstance.last_health_status) !== null && _d !== void 0 ? _d : mentorConfig.server_last_health_status, kind: "health" })] }), jsxs("div", { children: [jsx("p", { className: "text-xs text-gray-400 mb-1", children: t('clawSandboxSandboxConfig.colLastCheck') }), jsx("p", { className: "text-sm text-gray-700", children: timeAgo((_e = connectedInstance === null || connectedInstance === void 0 ? void 0 : connectedInstance.last_health_check) !== null && _e !== void 0 ? _e : mentorConfig.server_last_health_check, t('clawSandboxSandboxConfig.never')) })] })] })] }), jsxs("div", { className: "flex items-center justify-between rounded-lg border p-6", children: [jsxs("div", { className: "flex items-center gap-2", children: [jsx("span", { className: "text-sm font-medium text-gray-700", children: t('clawSandboxSandboxConfig.autoPushOnSave') }), jsx(TooltipProvider, { children: jsxs(Tooltip$1, { children: [jsx(TooltipTrigger, { "aria-label": t('clawSandboxSandboxConfig.autoPushInfoAriaLabel'), children: jsx(Info$3, { className: "h-4 w-4 text-gray-400" }) }), jsx(TooltipContent, { className: "ibl-tooltip-content", children: jsx("p", { children: t('clawSandboxSandboxConfig.autoPushTooltip') }) })] }) })] }), jsx(Switch, { checked: mentorConfig.auto_push, onCheckedChange: (v) => handleToggle('auto_push', v), disabled: isUpdating, className: "cursor-pointer data-[state=checked]:bg-blue-500", "aria-label": t('clawSandboxSandboxConfig.autoPushAriaLabel', {
|
|
235461
235614
|
state: mentorConfig.auto_push
|
|
235462
235615
|
? t('clawSandboxSandboxConfig.enabled')
|
|
235463
235616
|
: t('clawSandboxSandboxConfig.disabled'),
|
|
@@ -235499,13 +235652,15 @@ function SandboxConfig({ platformKey, mentorUniqueId, username }) {
|
|
|
235499
235652
|
}) }))] })) })), selectedLLMProvider && (jsx(LLMProviderModal, { isOpen: true, onClose: closeLLMPicker, onSelect: handleSelectLLM, llmProvider: selectedLLMProvider, isSelecting: isUpdatingLLM, mentorSettings: {
|
|
235500
235653
|
llm_name: currentModel.llmName,
|
|
235501
235654
|
llm_provider: currentModel.provider,
|
|
235502
|
-
}, llms: availableLLMProviders }))] }));
|
|
235655
|
+
}, llms: availableLLMProviders }))] })) : null;
|
|
235656
|
+
return (jsxs("div", { className: "space-y-6", children: [sandboxKindsSection, clawEnabled && (mentorConfig ? connectedSection : notConnectedSection)] }));
|
|
235503
235657
|
}
|
|
235504
235658
|
// ── Edit Instance Dialog ─────────────────────────────────────────────────────
|
|
235505
235659
|
function EditInstanceDialog({ instance, org, onClose, onSaved, }) {
|
|
235506
235660
|
var _a, _b, _c;
|
|
235507
235661
|
const t = useT();
|
|
235508
235662
|
const [updateInstance, { isLoading }] = useUpdateClawInstanceMutation();
|
|
235663
|
+
/* istanbul ignore next -- @preserve defensive nullish defaults; instances always carry these fields */
|
|
235509
235664
|
const [form, setForm] = useState({
|
|
235510
235665
|
name: (_a = instance.name) !== null && _a !== void 0 ? _a : '',
|
|
235511
235666
|
server_url: (_b = instance.server_url) !== null && _b !== void 0 ? _b : '',
|
|
@@ -235513,6 +235668,7 @@ function EditInstanceDialog({ instance, org, onClose, onSaved, }) {
|
|
|
235513
235668
|
gateway_token: '',
|
|
235514
235669
|
});
|
|
235515
235670
|
const handleSave = async () => {
|
|
235671
|
+
/* istanbul ignore if -- @preserve defensive; the Save button is disabled in this state */
|
|
235516
235672
|
if (!form.name || !form.server_url || !form.gateway_token) {
|
|
235517
235673
|
toast.error(t('clawSandboxSandboxConfig.nameUrlTokenRequired'));
|
|
235518
235674
|
return;
|