@epam/ai-dial-chat-hooks 1.3.0-dev.96 → 1.3.0-rc.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/api-error/api-error.d.ts +2 -0
- package/api-error/api-error.d.ts.map +1 -1
- package/api-error/api-error.js +31 -23
- package/api-transport/create-unauthorized-middleware.js +4 -1
- package/attachment/attach-constraints.d.ts +31 -0
- package/attachment/attach-constraints.d.ts.map +1 -0
- package/attachment/attach-constraints.js +18 -0
- package/attachment/useAttachmentAction/useAttachmentAction.d.ts +1 -1
- package/attachment/useAttachmentAction/useAttachmentAction.d.ts.map +1 -1
- package/attachment/useAttachmentAction/useAttachmentAction.js +25 -28
- package/attachments.js +2 -1
- package/catalog/application-credentials.d.ts +15 -0
- package/catalog/application-credentials.d.ts.map +1 -0
- package/catalog/application-credentials.js +28 -0
- package/catalog/catalog-derivations.d.ts +5 -3
- package/catalog/catalog-derivations.d.ts.map +1 -1
- package/catalog/catalog-derivations.js +13 -6
- package/catalog/catalog-entity-kind.d.ts +31 -0
- package/catalog/catalog-entity-kind.d.ts.map +1 -0
- package/catalog/catalog-entity-kind.js +21 -0
- package/catalog/catalog-preferences.d.ts +8 -0
- package/catalog/catalog-preferences.d.ts.map +1 -0
- package/catalog/catalog-preferences.js +5 -0
- package/catalog/create-publish-api.d.ts +3 -1
- package/catalog/create-publish-api.d.ts.map +1 -1
- package/catalog/create-publish-api.js +4 -0
- package/catalog/deployment-id.d.ts +13 -4
- package/catalog/deployment-id.d.ts.map +1 -1
- package/catalog/deployment-id.js +17 -3
- package/catalog/entity-details.d.ts +2 -0
- package/catalog/entity-details.d.ts.map +1 -1
- package/catalog/favorite-entity-type.d.ts +5 -0
- package/catalog/favorite-entity-type.d.ts.map +1 -0
- package/catalog/favorite-entity-type.js +10 -0
- package/catalog/map-deployment-limits-to-input.d.ts +4 -3
- package/catalog/map-deployment-limits-to-input.d.ts.map +1 -1
- package/catalog/map-deployment-limits-to-input.js +3 -4
- package/catalog/map-deployment-to-catalog-item.d.ts +12 -1
- package/catalog/map-deployment-to-catalog-item.d.ts.map +1 -1
- package/catalog/map-deployment-to-catalog-item.js +22 -15
- package/catalog/map-entity-details-to-catalog.d.ts.map +1 -1
- package/catalog/map-entity-details-to-catalog.js +69 -24
- package/catalog/map-skill-to-catalog-item.d.ts +4 -5
- package/catalog/map-skill-to-catalog-item.d.ts.map +1 -1
- package/catalog/map-skill-to-catalog-item.js +29 -38
- package/catalog/publish.d.ts +1 -1
- package/catalog/publish.d.ts.map +1 -1
- package/catalog/resource-folder.d.ts +8 -0
- package/catalog/resource-folder.d.ts.map +1 -0
- package/catalog/resource-folder.js +13 -0
- package/catalog/resource-name-conflict.d.ts +22 -0
- package/catalog/resource-name-conflict.d.ts.map +1 -0
- package/catalog/resource-name-conflict.js +32 -0
- package/catalog/resource-save-adapter.d.ts +36 -0
- package/catalog/resource-save-adapter.d.ts.map +1 -0
- package/catalog/resource-save-adapter.js +4 -0
- package/catalog/resource-save-adapters.d.ts +93 -0
- package/catalog/resource-save-adapters.d.ts.map +1 -0
- package/catalog/resource-save-adapters.js +116 -0
- package/catalog/resource-save.d.ts +76 -0
- package/catalog/resource-save.d.ts.map +1 -0
- package/catalog/resource-save.js +52 -0
- package/catalog/unpublishable-folders.d.ts +21 -0
- package/catalog/unpublishable-folders.d.ts.map +1 -0
- package/catalog/unpublishable-folders.js +21 -0
- package/catalog/usage-limit-rows.d.ts +14 -0
- package/catalog/usage-limit-rows.d.ts.map +1 -0
- package/catalog/usage-limit-rows.js +19 -0
- package/catalog/use-publish-history.d.ts +19 -0
- package/catalog/use-publish-history.d.ts.map +1 -0
- package/catalog/use-publish-history.js +25 -0
- package/catalog/useApplicationCredentialActions/useApplicationCredentialActions.d.ts +57 -0
- package/catalog/useApplicationCredentialActions/useApplicationCredentialActions.d.ts.map +1 -0
- package/catalog/useApplicationCredentialActions/useApplicationCredentialActions.js +67 -0
- package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.d.ts +15 -5
- package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.d.ts.map +1 -1
- package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.js +71 -89
- package/catalog/useCatalogItemDelete/useCatalogItemDelete.d.ts +41 -0
- package/catalog/useCatalogItemDelete/useCatalogItemDelete.d.ts.map +1 -0
- package/catalog/useCatalogItemDelete/useCatalogItemDelete.js +37 -0
- package/catalog/useCatalogToolsetCredentials/useCatalogToolsetCredentials.d.ts.map +1 -1
- package/catalog/useCatalogToolsetCredentials/useCatalogToolsetCredentials.js +72 -77
- package/catalog/useFavoriteEntitiesState/useFavoriteEntitiesState.js +1 -1
- package/catalog/usePublishFolders/usePublishFolders.d.ts +8 -0
- package/catalog/usePublishFolders/usePublishFolders.d.ts.map +1 -1
- package/catalog/usePublishFolders/usePublishFolders.js +32 -29
- package/catalog/useResourceFolders/useResourceFolders.d.ts +33 -0
- package/catalog/useResourceFolders/useResourceFolders.d.ts.map +1 -0
- package/catalog/useResourceFolders/useResourceFolders.js +58 -0
- package/catalog/useResourceSavePanel/useResourceSavePanel.d.ts +64 -0
- package/catalog/useResourceSavePanel/useResourceSavePanel.d.ts.map +1 -0
- package/catalog/useResourceSavePanel/useResourceSavePanel.js +173 -0
- package/catalog/useSkillItemDetails.js +3 -3
- package/catalog/useUnpublishConfirmation/useUnpublishConfirmation.d.ts +43 -0
- package/catalog/useUnpublishConfirmation/useUnpublishConfirmation.d.ts.map +1 -0
- package/catalog/useUnpublishConfirmation/useUnpublishConfirmation.js +46 -0
- package/catalog/useUnpublishableFolders/useUnpublishableFolders.d.ts +22 -0
- package/catalog/useUnpublishableFolders/useUnpublishableFolders.d.ts.map +1 -0
- package/catalog/useUnpublishableFolders/useUnpublishableFolders.js +53 -0
- package/catalog.js +41 -23
- package/conversation/conversation-data-source.d.ts +47 -0
- package/conversation/conversation-data-source.d.ts.map +1 -0
- package/conversation/conversation-data-source.js +11 -0
- package/conversation/conversation-draft/conversation-draft-store.js +40 -40
- package/conversation/conversation-list.d.ts +6 -0
- package/conversation/conversation-list.d.ts.map +1 -0
- package/conversation/conversation-list.js +5 -0
- package/conversation/conversation-title-stream.d.ts +33 -0
- package/conversation/conversation-title-stream.d.ts.map +1 -0
- package/conversation/conversation-title-stream.js +103 -0
- package/conversation/conversation-transfer/attachment-refs.d.ts +10 -2
- package/conversation/conversation-transfer/attachment-refs.d.ts.map +1 -1
- package/conversation/conversation-transfer/attachment-refs.js +31 -9
- package/conversation/conversation-transfer/export-conversation.d.ts +5 -1
- package/conversation/conversation-transfer/export-conversation.d.ts.map +1 -1
- package/conversation/conversation-transfer/export-conversation.js +19 -18
- package/conversation/conversation-transfer/import-conversation.d.ts +11 -6
- package/conversation/conversation-transfer/import-conversation.d.ts.map +1 -1
- package/conversation/conversation-transfer/import-conversation.js +65 -69
- package/conversation/conversation-transfer/progress.js +1 -1
- package/conversation/conversation-transfer/zip-export.js +1 -7
- package/conversation/conversation-transfer/zip-import.js +1 -1
- package/conversation/create-chat-stream-api.d.ts +24 -3
- package/conversation/create-chat-stream-api.d.ts.map +1 -1
- package/conversation/create-chat-stream-api.js +67 -56
- package/conversation/generation-registry.d.ts +30 -0
- package/conversation/generation-registry.d.ts.map +1 -0
- package/conversation/generation-registry.js +33 -0
- package/conversation/message-utils.d.ts +6 -0
- package/conversation/message-utils.d.ts.map +1 -1
- package/conversation/message-utils.js +14 -10
- package/conversation/scheduled-task-grouping.d.ts +53 -0
- package/conversation/scheduled-task-grouping.d.ts.map +1 -0
- package/conversation/scheduled-task-grouping.js +45 -0
- package/conversation/useActiveConversationSync/useActiveConversationSync.d.ts +4 -2
- package/conversation/useActiveConversationSync/useActiveConversationSync.d.ts.map +1 -1
- package/conversation/useActiveConversationSync/useActiveConversationSync.js +19 -12
- package/conversation/useAttachmentUpload/useAttachmentUpload.d.ts.map +1 -1
- package/conversation/useAttachmentUpload/useAttachmentUpload.js +4 -1
- package/conversation/useConversationComposerDraft/useConversationComposerDraft.js +1 -5
- package/conversation/useConversationDiscovery/useConversationDiscovery.d.ts +22 -0
- package/conversation/useConversationDiscovery/useConversationDiscovery.d.ts.map +1 -0
- package/conversation/useConversationDiscovery/useConversationDiscovery.js +60 -0
- package/conversation/useConversationExport/useConversationExport.d.ts.map +1 -1
- package/conversation/useConversationExport/useConversationExport.js +113 -122
- package/conversation/useConversationHandlers/message-utils.js +2 -2
- package/conversation/useConversationHandlers/useConversationHandlers.js +41 -41
- package/conversation/useConversationImport/useConversationImport.js +24 -24
- package/conversation/useConversationPanelItems/useConversationPanelItems.d.ts +18 -5
- package/conversation/useConversationPanelItems/useConversationPanelItems.d.ts.map +1 -1
- package/conversation/useConversationPanelItems/useConversationPanelItems.js +34 -30
- package/conversation/useConversationScroll/useConversationScroll.d.ts.map +1 -1
- package/conversation/useConversationScroll/useConversationScroll.js +69 -72
- package/conversation/useConversationStream/conversation-path.js +2 -2
- package/conversation/useConversationStream/conversation-stream.types.d.ts +142 -0
- package/conversation/useConversationStream/conversation-stream.types.d.ts.map +1 -0
- package/conversation/useConversationStream/frame-scheduler.js +17 -17
- package/conversation/useConversationStream/generation-resume.d.ts +24 -2
- package/conversation/useConversationStream/generation-resume.d.ts.map +1 -1
- package/conversation/useConversationStream/generation-resume.js +110 -121
- package/conversation/useConversationStream/stream-errors.d.ts +10 -0
- package/conversation/useConversationStream/stream-errors.d.ts.map +1 -0
- package/conversation/useConversationStream/stream-errors.js +10 -0
- package/conversation/useConversationStream/stream-session.d.ts +51 -0
- package/conversation/useConversationStream/stream-session.d.ts.map +1 -0
- package/conversation/useConversationStream/stream-session.js +179 -0
- package/conversation/useConversationStream/useConversationReloadErrors.d.ts +25 -0
- package/conversation/useConversationStream/useConversationReloadErrors.d.ts.map +1 -0
- package/conversation/useConversationStream/useConversationReloadErrors.js +38 -0
- package/conversation/useConversationStream/useConversationStream.d.ts +3 -136
- package/conversation/useConversationStream/useConversationStream.d.ts.map +1 -1
- package/conversation/useConversationStream/useConversationStream.js +141 -325
- package/conversation/useConversationStream/useStopGeneration.d.ts +29 -0
- package/conversation/useConversationStream/useStopGeneration.d.ts.map +1 -0
- package/conversation/useConversationStream/useStopGeneration.js +48 -0
- package/conversation/useConversationStream/useStreamPathState.d.ts +39 -0
- package/conversation/useConversationStream/useStreamPathState.d.ts.map +1 -0
- package/conversation/useConversationStream/useStreamPathState.js +55 -0
- package/conversation/useConversationTitleEnrichmentController.d.ts +64 -0
- package/conversation/useConversationTitleEnrichmentController.d.ts.map +1 -0
- package/conversation/useConversationTitleEnrichmentController.js +155 -0
- package/conversation/useDeploymentChangeTracking.d.ts +14 -0
- package/conversation/useDeploymentChangeTracking.d.ts.map +1 -0
- package/conversation/useDeploymentChangeTracking.js +23 -0
- package/conversation/useEntityPreselection/useEntityPreselection.d.ts +108 -0
- package/conversation/useEntityPreselection/useEntityPreselection.d.ts.map +1 -0
- package/conversation/useEntityPreselection/useEntityPreselection.js +78 -0
- package/conversation/useMessageSelectionReply/useMessageSelectionReply.js +4 -10
- package/conversation/useTranscribeAudio/useTranscribeAudio.d.ts +8 -1
- package/conversation/useTranscribeAudio/useTranscribeAudio.d.ts.map +1 -1
- package/conversation/useTranscribeAudio/useTranscribeAudio.js +23 -17
- package/conversation/useVisibleConversationIdsReporter/useVisibleConversationIdsReporter.d.ts +16 -0
- package/conversation/useVisibleConversationIdsReporter/useVisibleConversationIdsReporter.d.ts.map +1 -0
- package/conversation/useVisibleConversationIdsReporter/useVisibleConversationIdsReporter.js +17 -0
- package/conversation-overlay.js +1 -2
- package/conversation-sources/stage-citations.d.ts +9 -0
- package/conversation-sources/stage-citations.d.ts.map +1 -0
- package/conversation-sources/stage-citations.js +8 -0
- package/conversation-sources/useConversationAnnotationPool/useConversationAnnotationPool.d.ts +4 -0
- package/conversation-sources/useConversationAnnotationPool/useConversationAnnotationPool.d.ts.map +1 -0
- package/conversation-sources/useConversationAnnotationPool/useConversationAnnotationPool.js +5 -0
- package/conversation-sources.js +3 -1
- package/conversation.js +45 -35
- package/entry-points/attachments.d.ts +1 -0
- package/entry-points/attachments.d.ts.map +1 -1
- package/entry-points/catalog.d.ts +17 -0
- package/entry-points/catalog.d.ts.map +1 -1
- package/entry-points/conversation-sources.d.ts +2 -0
- package/entry-points/conversation-sources.d.ts.map +1 -1
- package/entry-points/conversation.d.ts +10 -0
- package/entry-points/conversation.d.ts.map +1 -1
- package/entry-points/external-services.d.ts +6 -0
- package/entry-points/external-services.d.ts.map +1 -0
- package/entry-points/file-manager-canvas.d.ts +1 -0
- package/entry-points/file-manager-canvas.d.ts.map +1 -1
- package/entry-points/file-manager.d.ts +2 -0
- package/entry-points/file-manager.d.ts.map +1 -1
- package/entry-points/oauth.d.ts +1 -0
- package/entry-points/oauth.d.ts.map +1 -1
- package/entry-points/offline-credentials.d.ts +2 -0
- package/entry-points/offline-credentials.d.ts.map +1 -1
- package/entry-points/project.d.ts +20 -0
- package/entry-points/project.d.ts.map +1 -0
- package/entry-points/scheduled-tasks.d.ts +6 -0
- package/entry-points/scheduled-tasks.d.ts.map +1 -1
- package/entry-points/sharing.d.ts +4 -0
- package/entry-points/sharing.d.ts.map +1 -1
- package/entry-points/skill-editor.d.ts +2 -0
- package/entry-points/skill-editor.d.ts.map +1 -1
- package/entry-points/skills-state.d.ts +1 -0
- package/entry-points/skills-state.d.ts.map +1 -1
- package/entry-points/usage-limits.d.ts +1 -0
- package/entry-points/usage-limits.d.ts.map +1 -1
- package/entry-points/utils.d.ts +6 -0
- package/entry-points/utils.d.ts.map +1 -1
- package/entry-points/viewport-layout.d.ts +1 -0
- package/entry-points/viewport-layout.d.ts.map +1 -1
- package/external-services/useExternalServiceLogin.d.ts +99 -0
- package/external-services/useExternalServiceLogin.d.ts.map +1 -0
- package/external-services/useExternalServiceLogin.js +93 -0
- package/external-services.d.ts +2 -0
- package/external-services.js +5 -0
- package/file-manager-canvas.js +3 -2
- package/file-manager.js +32 -30
- package/files/attachment-canvas.d.ts +12 -0
- package/files/attachment-canvas.d.ts.map +1 -1
- package/files/attachment-canvas.js +18 -10
- package/files/attachment-dto-to-display.d.ts.map +1 -1
- package/files/attachment-dto-to-display.js +13 -12
- package/files/attachment-types.js +1 -1
- package/files/browser-download.d.ts +9 -0
- package/files/browser-download.d.ts.map +1 -0
- package/files/browser-download.js +23 -0
- package/files/create-files-api.d.ts +3 -4
- package/files/create-files-api.d.ts.map +1 -1
- package/files/create-files-api.js +1 -1
- package/files/create-upload-file-with-progress.d.ts +21 -1
- package/files/create-upload-file-with-progress.d.ts.map +1 -1
- package/files/create-upload-file-with-progress.js +50 -34
- package/files/dial-file-manager-copy-move.util.d.ts.map +1 -1
- package/files/dial-file-manager-copy-move.util.js +28 -28
- package/files/dial-file-manager-mapping.util.d.ts +6 -2
- package/files/dial-file-manager-mapping.util.d.ts.map +1 -1
- package/files/dial-file-manager-mapping.util.js +85 -72
- package/files/dial-file-manager.types.d.ts +15 -5
- package/files/dial-file-manager.types.d.ts.map +1 -1
- package/files/dial-file-to-attachment.js +3 -3
- package/files/dial-file.d.ts +19 -0
- package/files/dial-file.d.ts.map +1 -1
- package/files/dial-file.js +20 -12
- package/files/dial-files-api.d.ts +2 -2
- package/files/dial-files-api.d.ts.map +1 -1
- package/files/download-progress.d.ts +33 -0
- package/files/download-progress.d.ts.map +1 -0
- package/files/download-progress.js +28 -0
- package/files/source-content.js +1 -1
- package/files/useDialFileListing/useDialFileListing.js +51 -66
- package/files/useDialFileManager/useDialFileManager.d.ts.map +1 -1
- package/files/useDialFileManager/useDialFileManager.js +5 -2
- package/files/useDialFileManagerSections/useDialFileManagerSections.d.ts.map +1 -1
- package/files/useDialFileManagerSections/useDialFileManagerSections.js +59 -68
- package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.js +1 -1
- package/files/useDialFileMetadata/useDialFileMetadata.js +3 -3
- package/files/useDialFileMutations/useDialFileMutations.d.ts +9 -0
- package/files/useDialFileMutations/useDialFileMutations.d.ts.map +1 -1
- package/files/useDialFileMutations/useDialFileMutations.js +232 -159
- package/files/useDialFilePreview/useDialFilePreview.d.ts +33 -0
- package/files/useDialFilePreview/useDialFilePreview.d.ts.map +1 -0
- package/files/useDialFilePreview/useDialFilePreview.js +45 -0
- package/files/useDialFileUploadBatch/useDialFileUploadBatch.d.ts.map +1 -1
- package/files/useDialFileUploadBatch/useDialFileUploadBatch.js +114 -103
- package/files/useFileAttachmentModalState/useFileAttachmentModalState.d.ts +25 -0
- package/files/useFileAttachmentModalState/useFileAttachmentModalState.d.ts.map +1 -0
- package/files/useFileAttachmentModalState/useFileAttachmentModalState.js +19 -0
- package/files/useFileAttachmentPicker/useFileAttachmentPicker.js +2 -2
- package/files/useUnshareConfirmationState/useUnshareConfirmationState.d.ts +23 -0
- package/files/useUnshareConfirmationState/useUnshareConfirmationState.d.ts.map +1 -0
- package/files/useUnshareConfirmationState/useUnshareConfirmationState.js +18 -0
- package/index.d.ts +81 -0
- package/index.d.ts.map +1 -1
- package/index.js +244 -163
- package/mcp-apps/mcp-apps-api-client.d.ts.map +1 -1
- package/mcp-apps/mcp-apps-api-client.js +18 -17
- package/mcp-apps/useMcpAppHostContext/useMcpAppHostContext.d.ts +3 -2
- package/mcp-apps/useMcpAppHostContext/useMcpAppHostContext.d.ts.map +1 -1
- package/mcp-apps/useMcpAppHostContext/useMcpAppHostContext.js +28 -10
- package/mcp-apps/useMcpAppTools/useMcpAppTools.d.ts.map +1 -1
- package/mcp-apps/useMcpAppTools/useMcpAppTools.js +45 -45
- package/oauth/authorize-url.d.ts +7 -1
- package/oauth/authorize-url.d.ts.map +1 -1
- package/oauth/authorize-url.js +14 -4
- package/oauth/callback-exchange.d.ts +49 -0
- package/oauth/callback-exchange.d.ts.map +1 -0
- package/oauth/callback-exchange.js +29 -0
- package/oauth/handshake.js +3 -10
- package/oauth/models.d.ts +25 -0
- package/oauth/models.d.ts.map +1 -1
- package/oauth/toolset-id.d.ts +7 -0
- package/oauth/toolset-id.d.ts.map +1 -1
- package/oauth/toolset-id.js +9 -2
- package/oauth/useOAuthCallbackCompletion/useOAuthCallbackCompletion.js +2 -5
- package/oauth/useToolsetLogin/useToolsetLogin.d.ts +7 -1
- package/oauth/useToolsetLogin/useToolsetLogin.d.ts.map +1 -1
- package/oauth/useToolsetLogin/useToolsetLogin.js +51 -42
- package/oauth.js +9 -8
- package/offline-credentials/map-offline-credentials-response.d.ts +5 -2
- package/offline-credentials/map-offline-credentials-response.d.ts.map +1 -1
- package/offline-credentials/map-offline-credentials-response.js +9 -7
- package/offline-credentials/scheduled-tasks-login-banner.d.ts +31 -0
- package/offline-credentials/scheduled-tasks-login-banner.d.ts.map +1 -0
- package/offline-credentials/scheduled-tasks-login-banner.js +17 -0
- package/offline-credentials/useOfflineCredentialsGate/useOfflineCredentialsGate.d.ts +5 -1
- package/offline-credentials/useOfflineCredentialsGate/useOfflineCredentialsGate.d.ts.map +1 -1
- package/offline-credentials/useOfflineCredentialsGate/useOfflineCredentialsGate.js +25 -22
- package/offline-credentials/useOfflineCredentialsLogin/useOfflineCredentialsLogin.js +13 -13
- package/offline-credentials.js +6 -4
- package/package.json +36 -26
- package/project/create-project-chat.d.ts +34 -0
- package/project/create-project-chat.d.ts.map +1 -0
- package/project/create-project-chat.js +27 -0
- package/project/project-conversation-data-source.d.ts +36 -0
- package/project/project-conversation-data-source.d.ts.map +1 -0
- package/project/project-conversation-data-source.js +67 -0
- package/project/project-events.d.ts +14 -0
- package/project/project-events.d.ts.map +1 -0
- package/project/project-events.js +25 -0
- package/project/project-file-preview.d.ts +32 -0
- package/project/project-file-preview.d.ts.map +1 -0
- package/project/project-file-preview.js +25 -0
- package/project/project-form-errors.d.ts +23 -0
- package/project/project-form-errors.d.ts.map +1 -0
- package/project/project-form-errors.js +46 -0
- package/project/project-limits.d.ts +17 -0
- package/project/project-limits.d.ts.map +1 -0
- package/project/project-limits.js +11 -0
- package/project/project-mapping.d.ts +16 -0
- package/project/project-mapping.d.ts.map +1 -0
- package/project/project-mapping.js +43 -0
- package/project/project-refresh.d.ts +12 -0
- package/project/project-refresh.d.ts.map +1 -0
- package/project/project-refresh.js +6 -0
- package/project/project-viewed-marks.d.ts +9 -0
- package/project/project-viewed-marks.d.ts.map +1 -0
- package/project/project-viewed-marks.js +8 -0
- package/project/project-watch-stream.d.ts +26 -0
- package/project/project-watch-stream.d.ts.map +1 -0
- package/project/project-watch-stream.js +39 -0
- package/project/projects-api-client.d.ts +179 -0
- package/project/projects-api-client.d.ts.map +1 -0
- package/project/projects-api-client.js +90 -0
- package/project/use-pinned-project-chats.d.ts +58 -0
- package/project/use-pinned-project-chats.d.ts.map +1 -0
- package/project/use-pinned-project-chats.js +269 -0
- package/project/use-project-actions.d.ts +53 -0
- package/project/use-project-actions.d.ts.map +1 -0
- package/project/use-project-actions.js +92 -0
- package/project/use-project-artifacts.d.ts +24 -0
- package/project/use-project-artifacts.d.ts.map +1 -0
- package/project/use-project-artifacts.js +78 -0
- package/project/use-project-conversations.d.ts +32 -0
- package/project/use-project-conversations.d.ts.map +1 -0
- package/project/use-project-conversations.js +200 -0
- package/project/use-project-draft.d.ts +46 -0
- package/project/use-project-draft.d.ts.map +1 -0
- package/project/use-project-draft.js +54 -0
- package/project/use-project-file-preview.d.ts +47 -0
- package/project/use-project-file-preview.d.ts.map +1 -0
- package/project/use-project-file-preview.js +50 -0
- package/project/use-project-submit.d.ts +49 -0
- package/project/use-project-submit.d.ts.map +1 -0
- package/project/use-project-submit.js +73 -0
- package/project/use-project-watch.d.ts +24 -0
- package/project/use-project-watch.d.ts.map +1 -0
- package/project/use-project-watch.js +41 -0
- package/project/use-project.d.ts +23 -0
- package/project/use-project.d.ts.map +1 -0
- package/project/use-project.js +73 -0
- package/project/use-projects.d.ts +27 -0
- package/project/use-projects.d.ts.map +1 -0
- package/project/use-projects.js +92 -0
- package/project.d.ts +2 -0
- package/project.js +20 -0
- package/prompt/prompt.d.ts +11 -0
- package/prompt/prompt.d.ts.map +1 -1
- package/prompt/prompt.js +7 -3
- package/scheduled-task/active-scheduled-task.d.ts +58 -0
- package/scheduled-task/active-scheduled-task.d.ts.map +1 -0
- package/scheduled-task/active-scheduled-task.js +18 -0
- package/scheduled-task/scheduled-task-description.d.ts +2 -0
- package/scheduled-task/scheduled-task-description.d.ts.map +1 -1
- package/scheduled-task/scheduled-task-description.js +33 -24
- package/scheduled-task/scheduled-task-display.d.ts +106 -0
- package/scheduled-task/scheduled-task-display.d.ts.map +1 -0
- package/scheduled-task/scheduled-task-display.js +69 -0
- package/scheduled-task/scheduled-task-next-occurrence.d.ts +9 -0
- package/scheduled-task/scheduled-task-next-occurrence.d.ts.map +1 -0
- package/scheduled-task/scheduled-task-next-occurrence.js +20 -0
- package/scheduled-task/scheduled-task-preparation.d.ts +1 -1
- package/scheduled-task/scheduled-task-trigger.d.ts.map +1 -1
- package/scheduled-task/scheduled-task-trigger.js +75 -48
- package/scheduled-task/use-scheduled-task-runs.js +19 -31
- package/scheduled-task/use-scheduled-tasks.d.ts +2 -2
- package/scheduled-task/use-scheduled-tasks.js +1 -1
- package/scheduled-task/useActiveScheduledTaskDetails.d.ts +18 -0
- package/scheduled-task/useActiveScheduledTaskDetails.d.ts.map +1 -0
- package/scheduled-task/useActiveScheduledTaskDetails.js +40 -0
- package/scheduled-task/useScheduledTaskSkillDisplayNames/useScheduledTaskSkillDisplayNames.d.ts +17 -0
- package/scheduled-task/useScheduledTaskSkillDisplayNames/useScheduledTaskSkillDisplayNames.d.ts.map +1 -0
- package/scheduled-task/useScheduledTaskSkillDisplayNames/useScheduledTaskSkillDisplayNames.js +29 -0
- package/scheduled-task/useStartScheduledTask.d.ts +41 -0
- package/scheduled-task/useStartScheduledTask.d.ts.map +1 -0
- package/scheduled-task/useStartScheduledTask.js +169 -0
- package/scheduled-tasks.js +13 -7
- package/scroll-anchoring.js +1 -2
- package/share-invitation/models.d.ts +46 -0
- package/share-invitation/models.d.ts.map +1 -0
- package/share-invitation/share-invitation-error.d.ts +6 -0
- package/share-invitation/share-invitation-error.d.ts.map +1 -0
- package/share-invitation/share-invitation-error.js +37 -0
- package/share-invitation/types.d.ts +10 -0
- package/share-invitation/types.d.ts.map +1 -0
- package/share-invitation/types.js +6 -0
- package/share-invitation/useAcceptShareInvitation/useAcceptShareInvitation.d.ts +9 -0
- package/share-invitation/useAcceptShareInvitation/useAcceptShareInvitation.d.ts.map +1 -0
- package/share-invitation/useAcceptShareInvitation/useAcceptShareInvitation.js +26 -0
- package/shared/application-schema.js +3 -3
- package/shared/client-channel.d.ts +53 -0
- package/shared/client-channel.d.ts.map +1 -0
- package/shared/client-channel.js +6 -0
- package/shared/cron-day-of-month.js +10 -10
- package/shared/external-services.d.ts +1 -1
- package/shared/locale.d.ts +6 -2
- package/shared/locale.d.ts.map +1 -1
- package/shared/locale.js +4 -4
- package/shared/read-sse-events.d.ts +10 -0
- package/shared/read-sse-events.d.ts.map +1 -0
- package/shared/read-sse-events.js +33 -0
- package/shared/serialized-writer.d.ts +12 -0
- package/shared/serialized-writer.d.ts.map +1 -0
- package/shared/serialized-writer.js +44 -0
- package/shared/sleep.d.ts +3 -0
- package/shared/sleep.d.ts.map +1 -0
- package/shared/sleep.js +13 -0
- package/shared/theme-colors.d.ts +16 -0
- package/shared/theme-colors.d.ts.map +1 -0
- package/shared/theme-colors.js +14 -0
- package/shared/url-cleanup.d.ts +18 -0
- package/shared/url-cleanup.d.ts.map +1 -0
- package/shared/url-cleanup.js +18 -0
- package/shared/usage-stat.d.ts +3 -0
- package/shared/usage-stat.d.ts.map +1 -0
- package/shared/usage-stat.js +4 -0
- package/shared/useAppVersionCheck/useAppVersionCheck.d.ts +22 -0
- package/shared/useAppVersionCheck/useAppVersionCheck.d.ts.map +1 -0
- package/shared/useAppVersionCheck/useAppVersionCheck.js +36 -0
- package/shared/usePersistedState/usePersistedState.d.ts +28 -0
- package/shared/usePersistedState/usePersistedState.d.ts.map +1 -0
- package/shared/usePersistedState/usePersistedState.js +24 -0
- package/sharing.js +5 -2
- package/signin-interrupt/models.d.ts +48 -0
- package/signin-interrupt/models.d.ts.map +1 -0
- package/signin-interrupt/signin-row-info.d.ts +10 -0
- package/signin-interrupt/signin-row-info.d.ts.map +1 -0
- package/signin-interrupt/signin-row-info.js +21 -0
- package/signin-interrupt/types.d.ts +28 -0
- package/signin-interrupt/types.d.ts.map +1 -0
- package/signin-interrupt/types.js +10 -0
- package/signin-interrupt/useSigninInterrupt/useSigninInterrupt.d.ts +52 -0
- package/signin-interrupt/useSigninInterrupt/useSigninInterrupt.d.ts.map +1 -0
- package/signin-interrupt/useSigninInterrupt/useSigninInterrupt.js +270 -0
- package/skill/skill-file-batch-validation.d.ts +4 -0
- package/skill/skill-file-batch-validation.d.ts.map +1 -1
- package/skill/skill-file-batch-validation.js +34 -33
- package/skill/skill-lookup.d.ts +20 -0
- package/skill/skill-lookup.d.ts.map +1 -0
- package/skill/skill-lookup.js +12 -0
- package/skill/skill-types.js +1 -1
- package/skill/skill.d.ts +5 -1
- package/skill/skill.d.ts.map +1 -1
- package/skill/skill.js +27 -28
- package/skill/useSkillArchiveImport/useSkillArchiveImport.js +1 -7
- package/skill/useSkillEditorSubmit.d.ts +15 -1
- package/skill/useSkillEditorSubmit.d.ts.map +1 -1
- package/skill/useSkillEditorSubmit.js +164 -87
- package/skill/useSkillFileActions.d.ts +2 -0
- package/skill/useSkillFileActions.d.ts.map +1 -1
- package/skill/useSkillFileActions.js +36 -21
- package/skill-editor/useSkillFilePreviewSyncController.d.ts +41 -0
- package/skill-editor/useSkillFilePreviewSyncController.d.ts.map +1 -0
- package/skill-editor/useSkillFilePreviewSyncController.js +58 -0
- package/skill-editor/useSkillFileSystemPicker/useSkillFileSystemPicker.d.ts +23 -0
- package/skill-editor/useSkillFileSystemPicker/useSkillFileSystemPicker.d.ts.map +1 -0
- package/skill-editor/useSkillFileSystemPicker/useSkillFileSystemPicker.js +43 -0
- package/skill-editor.js +11 -9
- package/skills-state.js +3 -2
- package/source-content.js +1 -2
- package/usage/map-user-usage-to-model-limits.d.ts.map +1 -1
- package/usage/map-user-usage-to-model-limits.js +24 -24
- package/usage/usage-banner-source.d.ts +8 -7
- package/usage/usage-banner-source.d.ts.map +1 -1
- package/usage/usage-banner-source.js +46 -21
- package/usage/usage-gauge.d.ts +3 -0
- package/usage/usage-gauge.d.ts.map +1 -0
- package/usage/usage-gauge.js +4 -0
- package/usage/usage-reset-time.d.ts +12 -3
- package/usage/usage-reset-time.d.ts.map +1 -1
- package/usage/usage-reset-time.js +48 -38
- package/usage/useDeploymentUsageLimits/useDeploymentUsageLimits.d.ts +42 -18
- package/usage/useDeploymentUsageLimits/useDeploymentUsageLimits.d.ts.map +1 -1
- package/usage/useDeploymentUsageLimits/useDeploymentUsageLimits.js +23 -28
- package/usage/useUsageLimitBanner/useUsageLimitBanner.d.ts +10 -8
- package/usage/useUsageLimitBanner/useUsageLimitBanner.d.ts.map +1 -1
- package/usage/useUsageLimitBanner/useUsageLimitBanner.js +28 -25
- package/usage/useUsageLimitBannerDismissal/useUsageLimitBannerDismissal.js +1 -1
- package/usage-limits.js +10 -8
- package/useChatSettingsFormConfig/useChatSettingsFormConfig.d.ts +2 -0
- package/useChatSettingsFormConfig/useChatSettingsFormConfig.d.ts.map +1 -1
- package/useChatSettingsFormConfig/useChatSettingsFormConfig.js +25 -21
- package/usePageFileDrag/usePageFileDrag.js +3 -3
- package/useShareLink/useShareLink.js +18 -18
- package/utils.js +23 -17
- package/viewport-layout/canvas-width.d.ts +39 -0
- package/viewport-layout/canvas-width.d.ts.map +1 -0
- package/viewport-layout/canvas-width.js +23 -0
- package/viewport-layout.js +2 -1
|
@@ -4,7 +4,10 @@ import { createUploadPathAllocator as n } from "../conversation-transfer/build-u
|
|
|
4
4
|
import { AttachmentErrorReason as r } from "@epam/ai-dial-chat-shared";
|
|
5
5
|
import { useCallback as i, useRef as a } from "react";
|
|
6
6
|
//#region src/conversation/useAttachmentUpload/useAttachmentUpload.ts
|
|
7
|
-
var o = 700, s = 5, c = (e) =>
|
|
7
|
+
var o = 700, s = 5, c = (e) => {
|
|
8
|
+
let n = e.split("/").filter(Boolean).pop() ?? "file";
|
|
9
|
+
return t(n).replace(/\.\.+/g, ".").replace(/^\.+/, "") || "file";
|
|
10
|
+
}, l = (e) => typeof e == "object" && !!e && "response" in e && e.response?.status === 409, u = ({ filesApi: t, bucket: u, onNetworkError: d, debounceMs: f = o }) => {
|
|
8
11
|
let p = a([]), m = a(null), h = a(null), g = i((t, r) => {
|
|
9
12
|
let i = `${t}|${e(r)}`;
|
|
10
13
|
return h.current?.key !== i && (h.current = {
|
|
@@ -54,11 +54,7 @@ var r = 300, i = {
|
|
|
54
54
|
}
|
|
55
55
|
if (!u || !s || (e.isRestored = !0, e.hasUserInput)) return;
|
|
56
56
|
let t = s.read(c);
|
|
57
|
-
|
|
58
|
-
e.text = t.text, e.skills = t.skills, g.current(t);
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
m.current && g.current(i);
|
|
57
|
+
t ? (e.text = t.text, e.skills = t.skills, g.current(t)) : m.current && g.current(i);
|
|
62
58
|
}, [
|
|
63
59
|
s,
|
|
64
60
|
c,
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** Inputs for a session-scoped discovery retry loop. */
|
|
2
|
+
export interface UseConversationDiscoveryOptions {
|
|
3
|
+
/** Current complete listing. */
|
|
4
|
+
items: readonly {
|
|
5
|
+
id: string;
|
|
6
|
+
}[];
|
|
7
|
+
/** Refreshes the listing. Initial failures propagate to the caller. */
|
|
8
|
+
refresh: () => Promise<void>;
|
|
9
|
+
/** Opaque identity; changing it retires all previous work. */
|
|
10
|
+
sessionKey: unknown;
|
|
11
|
+
/** Converts host IDs to a comparable identity. */
|
|
12
|
+
normalizeId: (id: string) => string;
|
|
13
|
+
/** Receives retry failures for the current session. */
|
|
14
|
+
onError?: (error: unknown) => void;
|
|
15
|
+
/** Additional retries per missing ID. Defaults to five. */
|
|
16
|
+
retryCount?: number;
|
|
17
|
+
/** Delay after settlement, in milliseconds. Defaults to 2000. */
|
|
18
|
+
retryDelayMs?: number;
|
|
19
|
+
}
|
|
20
|
+
/** Refreshes expected conversations using one bounded retry loop per session. */
|
|
21
|
+
export declare const useConversationDiscovery: ({ items: conversations, refresh, sessionKey, normalizeId, onError, retryCount, retryDelayMs, }: UseConversationDiscoveryOptions) => ((expectedIds?: readonly string[]) => Promise<void>);
|
|
22
|
+
//# sourceMappingURL=useConversationDiscovery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useConversationDiscovery.d.ts","sourceRoot":"","sources":["../../../src/conversation/useConversationDiscovery/useConversationDiscovery.ts"],"names":[],"mappings":"AAYA,wDAAwD;AACxD,MAAM,WAAW,+BAA+B;IAC9C,gCAAgC;IAChC,KAAK,EAAE,SAAS;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACjC,uEAAuE;IACvE,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,8DAA8D;IAC9D,UAAU,EAAE,OAAO,CAAC;IACpB,kDAAkD;IAClD,WAAW,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,CAAC;IACpC,uDAAuD;IACvD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,2DAA2D;IAC3D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iEAAiE;IACjE,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AACD,iFAAiF;AACjF,eAAO,MAAM,wBAAwB,GAAI,gGAQtC,+BAA+B,KAAG,CAAC,CACpC,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,KAC5B,OAAO,CAAC,IAAI,CAAC,CAkFjB,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { useCallback as e, useLayoutEffect as t, useRef as n } from "react";
|
|
2
|
+
//#region src/conversation/useConversationDiscovery/useConversationDiscovery.ts
|
|
3
|
+
var r = 2e3, i = 5, a = ({ items: a, refresh: o, sessionKey: s, normalizeId: c, onError: l, retryCount: u = i, retryDelayMs: d = r }) => {
|
|
4
|
+
let f = n(null), p = n(/* @__PURE__ */ new Set());
|
|
5
|
+
t(() => {
|
|
6
|
+
let e = {
|
|
7
|
+
pending: /* @__PURE__ */ new Map(),
|
|
8
|
+
inFlight: !1,
|
|
9
|
+
retired: !1
|
|
10
|
+
};
|
|
11
|
+
return f.current = e, () => {
|
|
12
|
+
e.retired = !0, clearTimeout(e.timer);
|
|
13
|
+
};
|
|
14
|
+
}, [s]), t(() => {
|
|
15
|
+
p.current = new Set(a.map(({ id: e }) => c(e)));
|
|
16
|
+
}, [a, c]);
|
|
17
|
+
let m = e((e) => {
|
|
18
|
+
let t = () => {
|
|
19
|
+
for (let [t, n] of e.pending) (p.current.has(t) || n === 0) && e.pending.delete(t);
|
|
20
|
+
}, n = () => {
|
|
21
|
+
t(), !(e.retired || e.timer || e.inFlight || e.pending.size === 0) && (e.timer = setTimeout(() => {
|
|
22
|
+
e.timer = void 0, r();
|
|
23
|
+
}, d));
|
|
24
|
+
}, r = async () => {
|
|
25
|
+
if (t(), !(e.retired || e.pending.size === 0)) {
|
|
26
|
+
for (let [t, n] of e.pending) e.pending.set(t, n - 1);
|
|
27
|
+
e.inFlight = !0;
|
|
28
|
+
try {
|
|
29
|
+
await o();
|
|
30
|
+
} catch (t) {
|
|
31
|
+
e.retired || l?.(t);
|
|
32
|
+
} finally {
|
|
33
|
+
e.inFlight = !1, n();
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
n();
|
|
38
|
+
}, [
|
|
39
|
+
o,
|
|
40
|
+
l,
|
|
41
|
+
d
|
|
42
|
+
]);
|
|
43
|
+
return e(async (e = []) => {
|
|
44
|
+
let t = f.current;
|
|
45
|
+
if (t && !t.retired) {
|
|
46
|
+
for (let n of e) {
|
|
47
|
+
let e = c(n);
|
|
48
|
+
!p.current.has(e) && !t.pending.has(e) && t.pending.set(e, u);
|
|
49
|
+
}
|
|
50
|
+
await o(), m(t);
|
|
51
|
+
}
|
|
52
|
+
}, [
|
|
53
|
+
o,
|
|
54
|
+
m,
|
|
55
|
+
c,
|
|
56
|
+
u
|
|
57
|
+
]);
|
|
58
|
+
};
|
|
59
|
+
//#endregion
|
|
60
|
+
export { a as useConversationDiscovery };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useConversationExport.d.ts","sourceRoot":"","sources":["../../../src/conversation/useConversationExport/useConversationExport.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,gBAAgB,EACrB,KAAK,QAAQ,EACd,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAGL,KAAK,uBAAuB,EAI7B,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"useConversationExport.d.ts","sourceRoot":"","sources":["../../../src/conversation/useConversationExport/useConversationExport.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,gBAAgB,EACrB,KAAK,QAAQ,EACd,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAGL,KAAK,uBAAuB,EAI7B,MAAM,2BAA2B,CAAC;AAsBnC,OAAO,EACL,sBAAsB,EACtB,KAAK,8BAA8B,EACnC,KAAK,gCAAgC,EAErC,KAAK,gCAAgC,EAEtC,MAAM,gCAAgC,CAAC;AASxC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,yBAAyB,QAAoB,CAAC;AAyD3D,UAAU,yBAAyB;IACjC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAsBD,oDAAoD;AACpD,MAAM,WAAW,2BAA2B;IAC1C,+EAA+E;IAC/E,gBAAgB,EAAE,IAAI,CACpB,gBAAgB,EAChB,iBAAiB,GAAG,mBAAmB,CACxC,CAAC;IACF,iFAAiF;IACjF,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,iBAAiB,CAAC,CAAC;IAC5C,yFAAyF;IACzF,yBAAyB,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,MAAM,CAAC;IAC9D,2GAA2G;IAC3G,qBAAqB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,yBAAyB,CAAC;IACtE,uFAAuF;IACvF,mBAAmB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACtE;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gDAAgD;IAChD,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,gCAAgC,KAAK,IAAI,CAAC;IAC9D,6FAA6F;IAC7F,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,gCAAgC,KAAK,IAAI,CAAC;IAC9D,+BAA+B;IAC/B,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,8BAA8B,KAAK,IAAI,CAAC;CAC3D;AAED,qDAAqD;AACrD,MAAM,WAAW,2BAA2B;IAC1C,4FAA4F;IAC5F,IAAI,EAAE,uBAAuB,EAAE,CAAC;IAChC,2EAA2E;IAC3E,YAAY,EAAE,CACZ,cAAc,EAAE,MAAM,EACtB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,sBAAsB,KACzB,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,4DAA4D;IAC5D,SAAS,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,sFAAsF;IACtF,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,0FAA0F;IAC1F,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,oFAAoF;IACpF,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,+DAA+D;IAC/D,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,GAAI,wJAUnC,2BAA2B,KAAG,2BAuchC,CAAC"}
|
|
@@ -1,49 +1,38 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { collectAttachmentRefs as e } from "../conversation-transfer/attachment-refs.js";
|
|
2
|
+
import { ConversationExportMode as t, ConversationTransferWarningCode as n, ExportFileNameKind as r } from "../conversation-transfer/types.js";
|
|
3
|
+
import { EXPORT_APP_NAME as i, buildExportEnvelope as a, buildExportFileName as o, serializeExportEnvelope as s, stripConversationAttachments as c } from "../conversation-transfer/export-conversation.js";
|
|
4
4
|
import { resolveDialFileBucketAndPath as l } from "../conversation-transfer/dial-file-resolve.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
5
|
+
import { sleep as u } from "../../shared/sleep.js";
|
|
6
|
+
import { runWithConcurrency as d } from "../conversation-transfer/async.js";
|
|
7
|
+
import { ConversationTransferKind as f, ConversationTransferPhase as p, buildTransferProgress as m } from "../conversation-transfer/progress.js";
|
|
8
|
+
import { useConversationTransferQueue as h } from "../conversation-transfer/queue.js";
|
|
9
|
+
import { buildDialArchive as g } from "../conversation-transfer/zip-export.js";
|
|
10
|
+
import { ResponseError as _ } from "@epam/ai-dial-chat-api-client";
|
|
11
|
+
import { ConversationTransferErrorCode as v, ConversationTransferSubjectKind as y, ConversationTransferUnitKind as b, triggerBlobDownload as x } from "@epam/ai-dial-chat-shared";
|
|
12
|
+
import { useCallback as S } from "react";
|
|
12
13
|
//#region src/conversation/useConversationExport/useConversationExport.ts
|
|
13
|
-
var
|
|
14
|
+
var C = 5, w = 536870912, T = 429, E = 5, D = 2e3, O = (e) => e instanceof _ && e.response.status === T, k = (e, t) => {
|
|
14
15
|
let n = Number(e.response.headers.get("Retry-After"));
|
|
15
|
-
return Number.isFinite(n) && n > 0 ? n * 1e3 :
|
|
16
|
-
},
|
|
17
|
-
if (t.aborted) {
|
|
18
|
-
n();
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
let r = setTimeout(n, e);
|
|
22
|
-
t.addEventListener("abort", () => {
|
|
23
|
-
clearTimeout(r), n();
|
|
24
|
-
}, { once: !0 });
|
|
25
|
-
}), A = async (e, t, n) => {
|
|
16
|
+
return Number.isFinite(n) && n > 0 ? n * 1e3 : D * t;
|
|
17
|
+
}, A = async (e, t, n) => {
|
|
26
18
|
for (let r = 1;; r += 1) try {
|
|
27
19
|
return await e.getConversation({ path: t }, { signal: n });
|
|
28
20
|
} catch (e) {
|
|
29
|
-
if (n.aborted || !
|
|
30
|
-
await k(
|
|
21
|
+
if (n.aborted || !O(e) || r >= E) throw e;
|
|
22
|
+
await u(k(e, r), n);
|
|
31
23
|
}
|
|
32
|
-
}, j = (e) => !e.sharedWithMe && !e.publishedWithMe, M = (e) => e instanceof RangeError, N = (
|
|
33
|
-
let I =
|
|
24
|
+
}, j = (e) => !e.sharedWithMe && !e.publishedWithMe, M = (e) => e instanceof RangeError, N = (e) => e === t.WithoutAttachments ? f.ExportSingle : f.ExportSingleWithAttachments, P = ({ conversationsApi: u, filesApi: _, normalizeConversationPath: T, classifyTransferError: E = () => ({}), resolveErrorTraceId: D = async () => void 0, maxArchiveBytes: O = w, onSuccess: k, onWarning: P, onError: F }) => {
|
|
25
|
+
let I = h(), L = S(async (e, t, n) => {
|
|
34
26
|
let r = !1, i = !1, a = 0, o = () => {
|
|
35
27
|
a += 1, n(a, e.length);
|
|
36
28
|
};
|
|
37
29
|
return {
|
|
38
|
-
entries: await
|
|
30
|
+
entries: await d(e, C, async (e) => {
|
|
39
31
|
if (t.aborted || i) return;
|
|
40
32
|
let n = l(e.fileId);
|
|
41
|
-
if (!n)
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
try {
|
|
46
|
-
let e = await w.downloadFileRaw({
|
|
33
|
+
if (!n) r = !0, o();
|
|
34
|
+
else try {
|
|
35
|
+
let e = await _.downloadFileRaw({
|
|
47
36
|
bucket: n.bucket,
|
|
48
37
|
path: n.path
|
|
49
38
|
}, { signal: t }), r = new Uint8Array(await e.raw.arrayBuffer());
|
|
@@ -64,98 +53,99 @@ var S = 5, C = 512 * 1024 * 1024, w = 429, T = 5, E = 2e3, D = (e) => e instance
|
|
|
64
53
|
anySkipped: !t.aborted && !i && r,
|
|
65
54
|
isUnauthorized: !t.aborted && i
|
|
66
55
|
};
|
|
67
|
-
}, [E,
|
|
68
|
-
let
|
|
56
|
+
}, [E, _]), R = S(async (r, i, o, l, d, f) => {
|
|
57
|
+
let h = N(l), _;
|
|
69
58
|
try {
|
|
70
|
-
_ = await A(
|
|
59
|
+
_ = await A(u, T(i), f);
|
|
71
60
|
} catch (e) {
|
|
72
|
-
if (
|
|
61
|
+
if (f.aborted) return;
|
|
73
62
|
if (E(e).isUnauthorized) F?.({
|
|
74
|
-
jobId:
|
|
75
|
-
code:
|
|
76
|
-
}), I.failJob(
|
|
63
|
+
jobId: r,
|
|
64
|
+
code: v.Unauthorized
|
|
65
|
+
}), I.failJob(r, v.Unauthorized);
|
|
77
66
|
else {
|
|
78
67
|
let t = await D(e);
|
|
79
68
|
F?.({
|
|
80
|
-
jobId:
|
|
81
|
-
code:
|
|
82
|
-
titles: [
|
|
69
|
+
jobId: r,
|
|
70
|
+
code: v.Unknown,
|
|
71
|
+
titles: [o],
|
|
83
72
|
traceId: t
|
|
84
|
-
}), I.failJob(
|
|
73
|
+
}), I.failJob(r, v.Unknown);
|
|
85
74
|
}
|
|
86
75
|
console.error("Failed to fetch conversation for export", e);
|
|
87
76
|
return;
|
|
88
77
|
}
|
|
89
|
-
if (!
|
|
90
|
-
I.setJobProgress(
|
|
91
|
-
kind:
|
|
92
|
-
phase:
|
|
78
|
+
if (!f.aborted) {
|
|
79
|
+
I.setJobProgress(r, m({
|
|
80
|
+
kind: h,
|
|
81
|
+
phase: p.Prepare
|
|
93
82
|
}));
|
|
94
83
|
try {
|
|
95
|
-
if (l ===
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
84
|
+
if (l === t.WithoutAttachments) {
|
|
85
|
+
let e = a([c(_)], []), t = s(e);
|
|
86
|
+
x(t, d), k?.({
|
|
87
|
+
jobId: r,
|
|
88
|
+
titles: [o]
|
|
89
|
+
}), I.succeedJob(r);
|
|
100
90
|
return;
|
|
101
91
|
}
|
|
102
|
-
let
|
|
103
|
-
I.setJobProgress(
|
|
104
|
-
kind:
|
|
105
|
-
phase:
|
|
92
|
+
let i = e(_), { entries: u, anySkipped: y, isUnauthorized: S } = await L(i, f, (e, t) => {
|
|
93
|
+
I.setJobProgress(r, m({
|
|
94
|
+
kind: h,
|
|
95
|
+
phase: p.Transfer,
|
|
106
96
|
completed: e,
|
|
107
97
|
total: t
|
|
108
98
|
}, {
|
|
109
99
|
completed: e,
|
|
110
100
|
total: t,
|
|
111
|
-
kind:
|
|
101
|
+
kind: b.Attachment
|
|
112
102
|
}));
|
|
113
103
|
});
|
|
114
|
-
if (
|
|
104
|
+
if (f.aborted) return;
|
|
115
105
|
if (S) {
|
|
116
106
|
F?.({
|
|
117
|
-
jobId:
|
|
118
|
-
code:
|
|
119
|
-
}), I.failJob(
|
|
107
|
+
jobId: r,
|
|
108
|
+
code: v.Unauthorized
|
|
109
|
+
}), I.failJob(r, v.Unauthorized);
|
|
120
110
|
return;
|
|
121
111
|
}
|
|
122
|
-
I.setJobProgress(
|
|
123
|
-
kind:
|
|
124
|
-
phase:
|
|
125
|
-
completed:
|
|
126
|
-
total:
|
|
112
|
+
I.setJobProgress(r, m({
|
|
113
|
+
kind: h,
|
|
114
|
+
phase: p.Transfer,
|
|
115
|
+
completed: i.length,
|
|
116
|
+
total: i.length
|
|
127
117
|
}));
|
|
128
|
-
let C =
|
|
118
|
+
let C = u.reduce((e, t) => e + t.data.byteLength, 0);
|
|
129
119
|
if (C > O) {
|
|
130
120
|
F?.({
|
|
131
|
-
jobId:
|
|
132
|
-
code:
|
|
133
|
-
titles: [
|
|
134
|
-
}), I.failJob(
|
|
121
|
+
jobId: r,
|
|
122
|
+
code: v.FileTooLarge,
|
|
123
|
+
titles: [o]
|
|
124
|
+
}), I.failJob(r, v.FileTooLarge), console.error(`Refused to build an export archive of ${C} bytes: over the ${O}-byte limit`);
|
|
135
125
|
return;
|
|
136
126
|
}
|
|
137
|
-
let { blob:
|
|
138
|
-
|
|
139
|
-
jobId:
|
|
140
|
-
code:
|
|
141
|
-
}),
|
|
142
|
-
jobId:
|
|
143
|
-
titles: [
|
|
144
|
-
}),
|
|
127
|
+
let w = a([_], []), { blob: T, skippedPaths: E } = g(w, u), D = y || E.length > 0;
|
|
128
|
+
D && P?.({
|
|
129
|
+
jobId: r,
|
|
130
|
+
code: n.AttachmentSkipped
|
|
131
|
+
}), x(T, d), k?.({
|
|
132
|
+
jobId: r,
|
|
133
|
+
titles: [o]
|
|
134
|
+
}), D ? I.warnJob(r, n.AttachmentSkipped) : I.succeedJob(r);
|
|
145
135
|
} catch (e) {
|
|
146
|
-
if (
|
|
147
|
-
let t = M(e) ?
|
|
136
|
+
if (f.aborted) return;
|
|
137
|
+
let t = M(e) ? v.FileTooLarge : v.Unknown, n = await D(e);
|
|
148
138
|
F?.({
|
|
149
|
-
jobId:
|
|
139
|
+
jobId: r,
|
|
150
140
|
code: t,
|
|
151
|
-
titles: [
|
|
152
|
-
traceId:
|
|
153
|
-
}), I.failJob(
|
|
141
|
+
titles: [o],
|
|
142
|
+
traceId: n
|
|
143
|
+
}), I.failJob(r, t), console.error("Failed to build conversation export archive", e);
|
|
154
144
|
}
|
|
155
145
|
}
|
|
156
146
|
}, [
|
|
157
147
|
E,
|
|
158
|
-
|
|
148
|
+
u,
|
|
159
149
|
L,
|
|
160
150
|
O,
|
|
161
151
|
T,
|
|
@@ -164,50 +154,50 @@ var S = 5, C = 512 * 1024 * 1024, w = 429, T = 5, E = 2e3, D = (e) => e instance
|
|
|
164
154
|
P,
|
|
165
155
|
I,
|
|
166
156
|
D
|
|
167
|
-
]), z =
|
|
168
|
-
let s = a
|
|
169
|
-
kind:
|
|
170
|
-
title:
|
|
157
|
+
]), z = S((e, n, a) => {
|
|
158
|
+
let s = o(a === t.WithoutAttachments ? r.SingleConversation : r.SingleConversationWithAttachments, i), c = I.addJob({
|
|
159
|
+
kind: y.Single,
|
|
160
|
+
title: n
|
|
171
161
|
}, s);
|
|
172
|
-
return I.startJob(c, (
|
|
173
|
-
}, [I, R]), B =
|
|
174
|
-
let r =
|
|
162
|
+
return I.startJob(c, (t) => R(c, e, n, a, s, t));
|
|
163
|
+
}, [I, R]), B = S(async (e, t, n) => {
|
|
164
|
+
let r = f.ExportAll, i = [], o;
|
|
175
165
|
do {
|
|
176
166
|
if (n.aborted) return;
|
|
177
167
|
let t;
|
|
178
168
|
try {
|
|
179
|
-
t = await
|
|
169
|
+
t = await u.listConversations({ nextToken: o }, { signal: n });
|
|
180
170
|
} catch (t) {
|
|
181
171
|
if (n.aborted) return;
|
|
182
172
|
if (E(t).isUnauthorized) F?.({
|
|
183
173
|
jobId: e,
|
|
184
|
-
code:
|
|
185
|
-
}), I.failJob(e,
|
|
174
|
+
code: v.Unauthorized
|
|
175
|
+
}), I.failJob(e, v.Unauthorized);
|
|
186
176
|
else {
|
|
187
177
|
let n = await D(t);
|
|
188
178
|
F?.({
|
|
189
179
|
jobId: e,
|
|
190
|
-
code:
|
|
180
|
+
code: v.Unknown,
|
|
191
181
|
traceId: n
|
|
192
|
-
}), I.failJob(e,
|
|
182
|
+
}), I.failJob(e, v.Unknown);
|
|
193
183
|
}
|
|
194
184
|
console.error("Failed to list conversations for export", t);
|
|
195
185
|
return;
|
|
196
186
|
}
|
|
197
|
-
|
|
187
|
+
i.push(...t.items.filter(j).map((e) => ({
|
|
198
188
|
id: e.id,
|
|
199
189
|
title: e.title
|
|
200
|
-
}))),
|
|
201
|
-
} while (
|
|
202
|
-
I.setJobProgress(e,
|
|
190
|
+
}))), o = t.nextToken;
|
|
191
|
+
} while (o);
|
|
192
|
+
I.setJobProgress(e, m({
|
|
203
193
|
kind: r,
|
|
204
|
-
phase:
|
|
194
|
+
phase: p.Prepare
|
|
205
195
|
}));
|
|
206
196
|
let l = [];
|
|
207
|
-
for (let t of
|
|
197
|
+
for (let t of i) {
|
|
208
198
|
if (n.aborted) return;
|
|
209
199
|
try {
|
|
210
|
-
let e = await A(
|
|
200
|
+
let e = await A(u, T(t.id), n);
|
|
211
201
|
l.push(e);
|
|
212
202
|
} catch (r) {
|
|
213
203
|
if (n.aborted) return;
|
|
@@ -215,15 +205,15 @@ var S = 5, C = 512 * 1024 * 1024, w = 429, T = 5, E = 2e3, D = (e) => e instance
|
|
|
215
205
|
if (i.isUnauthorized) {
|
|
216
206
|
F?.({
|
|
217
207
|
jobId: e,
|
|
218
|
-
code:
|
|
219
|
-
}), I.failJob(e,
|
|
208
|
+
code: v.Unauthorized
|
|
209
|
+
}), I.failJob(e, v.Unauthorized);
|
|
220
210
|
return;
|
|
221
211
|
}
|
|
222
212
|
if (i.isNotFound) {
|
|
223
213
|
let n = await D(r);
|
|
224
214
|
F?.({
|
|
225
215
|
jobId: e,
|
|
226
|
-
code:
|
|
216
|
+
code: v.NotFound,
|
|
227
217
|
titles: [t.title],
|
|
228
218
|
traceId: n
|
|
229
219
|
}), console.error("Skipped a conversation during export-all: not found", r);
|
|
@@ -232,27 +222,28 @@ var S = 5, C = 512 * 1024 * 1024, w = 429, T = 5, E = 2e3, D = (e) => e instance
|
|
|
232
222
|
let a = await D(r);
|
|
233
223
|
F?.({
|
|
234
224
|
jobId: e,
|
|
235
|
-
code:
|
|
225
|
+
code: v.Unknown,
|
|
236
226
|
traceId: a
|
|
237
|
-
}), I.failJob(e,
|
|
227
|
+
}), I.failJob(e, v.Unknown), console.error("Aborted export-all: failed to fetch conversation", r);
|
|
238
228
|
return;
|
|
239
229
|
} finally {
|
|
240
|
-
I.setJobProgress(e,
|
|
230
|
+
I.setJobProgress(e, m({
|
|
241
231
|
kind: r,
|
|
242
|
-
phase:
|
|
232
|
+
phase: p.Transfer,
|
|
243
233
|
completed: l.length,
|
|
244
|
-
total:
|
|
234
|
+
total: i.length
|
|
245
235
|
}, {
|
|
246
236
|
completed: l.length,
|
|
247
|
-
total:
|
|
248
|
-
kind:
|
|
237
|
+
total: i.length,
|
|
238
|
+
kind: b.Conversation
|
|
249
239
|
}));
|
|
250
240
|
}
|
|
251
241
|
}
|
|
252
242
|
if (!n.aborted) try {
|
|
253
|
-
|
|
243
|
+
let n = a(l.map(c), []), r = s(n);
|
|
244
|
+
x(r, t), k?.({ jobId: e }), I.succeedJob(e);
|
|
254
245
|
} catch (t) {
|
|
255
|
-
let n = M(t) ?
|
|
246
|
+
let n = M(t) ? v.FileTooLarge : v.Unknown, r = await D(t);
|
|
256
247
|
F?.({
|
|
257
248
|
jobId: e,
|
|
258
249
|
code: n,
|
|
@@ -261,14 +252,14 @@ var S = 5, C = 512 * 1024 * 1024, w = 429, T = 5, E = 2e3, D = (e) => e instance
|
|
|
261
252
|
}
|
|
262
253
|
}, [
|
|
263
254
|
E,
|
|
264
|
-
|
|
255
|
+
u,
|
|
265
256
|
T,
|
|
266
257
|
F,
|
|
267
258
|
k,
|
|
268
259
|
I,
|
|
269
260
|
D
|
|
270
|
-
]), V =
|
|
271
|
-
let e =
|
|
261
|
+
]), V = S(() => {
|
|
262
|
+
let e = o(r.AllConversationsHistory, i), t = I.addJob({ kind: y.All }, e);
|
|
272
263
|
return I.startJob(t, (n) => B(t, e, n));
|
|
273
264
|
}, [I, B]);
|
|
274
265
|
return {
|
|
@@ -282,4 +273,4 @@ var S = 5, C = 512 * 1024 * 1024, w = 429, T = 5, E = 2e3, D = (e) => e instance
|
|
|
282
273
|
};
|
|
283
274
|
};
|
|
284
275
|
//#endregion
|
|
285
|
-
export {
|
|
276
|
+
export { w as DEFAULT_MAX_ARCHIVE_BYTES, P as useConversationExport };
|
|
@@ -3,10 +3,10 @@ import { MessageRole as e } from "@epam/ai-dial-chat-shared";
|
|
|
3
3
|
var t = (e) => e != null && Object.keys(e).length > 0, n = (e, n) => t(n) ? {
|
|
4
4
|
...e,
|
|
5
5
|
configuration_value: n
|
|
6
|
-
} : e, r = (e, t) => (e?.length ?? 0)
|
|
6
|
+
} : e, r = (e, t) => (e?.length ?? 0) !== (t?.length ?? 0) || (e ?? []).some((e, n) => e.url !== t?.[n]?.url), i = (e, t, n, i, a) => {
|
|
7
7
|
if (t !== e.content || i.length > 0) return !0;
|
|
8
8
|
let o = e.custom_content?.attachments?.length ?? 0;
|
|
9
|
-
return n.length
|
|
9
|
+
return n.length !== o || a != null && r(e.custom_content?.skills, a);
|
|
10
10
|
}, a = (t) => t == null || t.role !== e.Assistant || !!t.wasStoppedByUser || t.streamErrorMessage != null, o = (e, t, n, r, o, s) => {
|
|
11
11
|
let c = e[t];
|
|
12
12
|
return c ? i(c, n, r, o, s) || a(e[t + 1]) : !1;
|