@epam/ai-dial-chat-hooks 1.3.0-dev.98 → 1.4.0-dev.5
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 +19 -4
- package/conversation/create-chat-stream-api.d.ts.map +1 -1
- package/conversation/create-chat-stream-api.js +67 -61
- 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 +32 -2
- package/conversation/useConversationStream/generation-resume.d.ts.map +1 -1
- package/conversation/useConversationStream/generation-resume.js +114 -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 -339
- 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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-conversation-data-source.d.ts","sourceRoot":"","sources":["../../src/project/project-conversation-data-source.ts"],"names":[],"mappings":"AAKA,OAAO,EAEL,KAAK,sBAAsB,EAE5B,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,wCAAwC,CAAC;AAGhD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAU/D,iEAAiE;AACjE,MAAM,WAAW,oCAAoC;IACnD,6BAA6B;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,gJAAgJ;IAChJ,OAAO,EAAE,OAAO,CAAC;IACjB,4GAA4G;IAC5G,MAAM,EAAE,IAAI,CACV,iBAAiB,EACf,wBAAwB,GACxB,yBAAyB,GACzB,2BAA2B,GAC3B,2BAA2B,CAC9B,CAAC;IACF,qHAAqH;IACrH,MAAM,EAAE,IAAI,CACV,uBAAuB,EACvB,cAAc,GAAG,cAAc,GAAG,qBAAqB,CACxD,CAAC;IACF,iGAAiG;IACjG,MAAM,EAAE;QACN,gDAAgD;QAChD,oBAAoB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,CAAC;QAC7C,wEAAwE;QACxE,YAAY,EAAE,MAAM,MAAM,CAAC;KAC5B,CAAC;IACF,yGAAyG;IACzG,YAAY,EAAE,IAAI,CAAC,qBAAqB,EAAE,SAAS,GAAG,MAAM,CAAC,CAAC;IAC9D,uGAAuG;IACvG,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAsED;;;;;;;GAOG;AACH,eAAO,MAAM,mCAAmC,GAAI,mFAQjD,oCAAoC,KAAG,sBAiEzC,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { createChatStreamApi as e } from "../conversation/create-chat-stream-api.js";
|
|
2
|
+
import { NO_CONVERSATION_LIST_SYNC as t } from "../conversation/conversation-data-source.js";
|
|
3
|
+
import { getBrowserTimezone as n } from "../shared/browser-timezone.js";
|
|
4
|
+
import { sleep as r } from "../shared/sleep.js";
|
|
5
|
+
//#region src/project/project-conversation-data-source.ts
|
|
6
|
+
var i = "projects/", a = 5, o = 2e3, s = 5e3, c = "data: {\"action\":\"UPDATE\"}\n\n", l = (e) => e.startsWith(i) ? e : `${i}${e}`, u = (e) => {
|
|
7
|
+
let t = new TextEncoder().encode(c);
|
|
8
|
+
return new ReadableStream({ async pull(n) {
|
|
9
|
+
await r(s, e), e.aborted ? n.close() : n.enqueue(t);
|
|
10
|
+
} }, { highWaterMark: 0 });
|
|
11
|
+
}, d = (e, t, n, i) => {
|
|
12
|
+
let s = new AbortController();
|
|
13
|
+
return (async () => {
|
|
14
|
+
for (let c = 0; c < a; c++) {
|
|
15
|
+
if (await r(o, s.signal), s.signal.aborted) return;
|
|
16
|
+
try {
|
|
17
|
+
let { name: r } = await e(t, s.signal);
|
|
18
|
+
if (s.signal.aborted) return;
|
|
19
|
+
if (r && r !== n) {
|
|
20
|
+
i(r);
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
} catch {
|
|
24
|
+
if (s.signal.aborted) return;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
})(), () => s.abort();
|
|
28
|
+
}, f = ({ projectId: r, canEdit: i, client: a, stream: o, routes: s, viewedWriter: c, notFoundMessageKey: f }) => {
|
|
29
|
+
let { streamCompletion: p, stopCompletion: m } = e({
|
|
30
|
+
...o,
|
|
31
|
+
getTimezone: n
|
|
32
|
+
}), h = {
|
|
33
|
+
...t,
|
|
34
|
+
markUnread: (e) => c.drop(e),
|
|
35
|
+
markViewed: async (e) => {
|
|
36
|
+
try {
|
|
37
|
+
await c.enqueue(e);
|
|
38
|
+
} catch {}
|
|
39
|
+
},
|
|
40
|
+
shouldMarkOpenChatViewed: !0
|
|
41
|
+
}, g = (e, t) => a.saveProjectConversation(l(e), t);
|
|
42
|
+
return {
|
|
43
|
+
transport: {
|
|
44
|
+
streamCompletion: p,
|
|
45
|
+
stopCompletion: m,
|
|
46
|
+
watchConversation: async (e, t) => u(t),
|
|
47
|
+
attachToGeneration: (e, t) => a.attachToProjectGeneration(r, e, t),
|
|
48
|
+
getConversation: async (e, t) => await a.getProjectConversation(e, t),
|
|
49
|
+
saveConversation: async (e, t) => await g(e, t)
|
|
50
|
+
},
|
|
51
|
+
getConversation: a.getProjectConversation,
|
|
52
|
+
saveConversation: g,
|
|
53
|
+
handlersApi: {
|
|
54
|
+
saveConversation: ({ path: e, saveConversationBodyDto: t }) => g(e, t.conversation),
|
|
55
|
+
deleteConversation: ({ path: e }) => a.deleteProjectConversation(l(e))
|
|
56
|
+
},
|
|
57
|
+
watchTitle: (e, t, n) => d(a.getProjectConversation, e, t, n),
|
|
58
|
+
getConversationRoute: s.getConversationRoute,
|
|
59
|
+
getExitRoute: s.getExitRoute,
|
|
60
|
+
isReadOnly: () => !i,
|
|
61
|
+
listSync: h,
|
|
62
|
+
canDuplicate: !1,
|
|
63
|
+
notFoundMessageKey: f
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
//#endregion
|
|
67
|
+
export { f as createProjectConversationDataSource };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ProjectWatchEventDto } from '@epam/ai-dial-chat-api-client';
|
|
2
|
+
import { ProjectItem } from '@epam/ai-dial-projects';
|
|
3
|
+
/** The part of a projects watch event the hooks react to; `etag` is the project's new aggregate ETag, absent on a delete. */
|
|
4
|
+
export type ProjectWatchEvent = Pick<ProjectWatchEventDto, 'id' | 'action' | 'timestamp' | 'etag'>;
|
|
5
|
+
/** Returns the payload as a {@link ProjectWatchEvent}, or `undefined` when it is not one. */
|
|
6
|
+
export declare const parseProjectWatchEvent: (payload: unknown) => ProjectWatchEvent | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* Returns the projects after one watch event: a create or update moves the
|
|
9
|
+
* project's `updatedAt` forward (never back), a delete removes it, and an
|
|
10
|
+
* event for an unlisted project is ignored. Returns `items` itself when
|
|
11
|
+
* nothing changed.
|
|
12
|
+
*/
|
|
13
|
+
export declare const applyProjectEvent: (items: ProjectItem[], event: ProjectWatchEvent) => ProjectItem[];
|
|
14
|
+
//# sourceMappingURL=project-events.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-events.d.ts","sourceRoot":"","sources":["../../src/project/project-events.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAE1D,6HAA6H;AAC7H,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAClC,oBAAoB,EACpB,IAAI,GAAG,QAAQ,GAAG,WAAW,GAAG,MAAM,CACvC,CAAC;AAMF,6FAA6F;AAC7F,eAAO,MAAM,sBAAsB,GACjC,SAAS,OAAO,KACf,iBAAiB,GAAG,SAiBtB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,GAC5B,OAAO,WAAW,EAAE,EACpB,OAAO,iBAAiB,KACvB,WAAW,EAab,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ProjectWatchAction as e } from "@epam/ai-dial-chat-api-client";
|
|
2
|
+
//#region src/project/project-events.ts
|
|
3
|
+
var t = new Set(Object.values(e)), n = (e) => {
|
|
4
|
+
if (typeof e != "object" || !e) return;
|
|
5
|
+
let { id: n, action: r, timestamp: i, etag: a } = e;
|
|
6
|
+
if (typeof n == "string" && typeof r == "string" && t.has(r) && typeof i == "number") return {
|
|
7
|
+
id: n,
|
|
8
|
+
action: r,
|
|
9
|
+
timestamp: i,
|
|
10
|
+
...typeof a == "string" ? { etag: a } : {}
|
|
11
|
+
};
|
|
12
|
+
}, r = (t, n) => {
|
|
13
|
+
let r = t.findIndex((e) => e.id === n.id);
|
|
14
|
+
if (r < 0) return t;
|
|
15
|
+
if (n.action === e.Delete) return t.filter((e, t) => t !== r);
|
|
16
|
+
let i = t[r];
|
|
17
|
+
if ((i.updatedAt ?? 0) >= n.timestamp) return t;
|
|
18
|
+
let a = [...t];
|
|
19
|
+
return a[r] = {
|
|
20
|
+
...i,
|
|
21
|
+
updatedAt: n.timestamp
|
|
22
|
+
}, a;
|
|
23
|
+
};
|
|
24
|
+
//#endregion
|
|
25
|
+
export { r as applyProjectEvent, n as parseProjectWatchEvent };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { DisplayAttachment } from '@epam/ai-dial-chat-shared';
|
|
2
|
+
import { ProjectContextFile, ProjectOutputItem } from '@epam/ai-dial-projects';
|
|
3
|
+
/** A project file card the page opens in the canvas: its card id, name and MIME type. */
|
|
4
|
+
export interface ProjectFileCard {
|
|
5
|
+
/** Id of the card on the page; also the attachment id. */
|
|
6
|
+
id: string;
|
|
7
|
+
/** File name shown in the canvas header. */
|
|
8
|
+
name: string;
|
|
9
|
+
/** MIME type of the file. */
|
|
10
|
+
contentType: string;
|
|
11
|
+
}
|
|
12
|
+
/** Builds the locator a canvas content resolver fetches for a project file, from the project id and the file name. The host owns the scheme. */
|
|
13
|
+
export type ProjectFileLocatorBuilder = (projectId: string, name: string) => string;
|
|
14
|
+
/** Resolves a project file locator to the URL that downloads it, or `undefined` when the host serves no download for it. The host owns the endpoints. */
|
|
15
|
+
export type ProjectFileDownloadUrlResolver = (locator: string) => string | undefined;
|
|
16
|
+
/** Returns the canvas key of a project file, `{scope}::{id}`; the scope keeps one file name in two projects apart. */
|
|
17
|
+
export declare const toProjectPreviewKey: (scope: string, id: string) => string;
|
|
18
|
+
/** Returns the card id behind a canvas key, or `undefined` when the key belongs to another scope or is not a project key. */
|
|
19
|
+
export declare const fromProjectPreviewKey: (scope: string, key: string | undefined) => string | undefined;
|
|
20
|
+
/** Returns the card id of an output in a project preview key, `artifacts/{name}`. */
|
|
21
|
+
export declare const toProjectOutputCardId: (name: string) => string;
|
|
22
|
+
/** Returns the output name behind a card id, or `undefined` when the card is not an output. */
|
|
23
|
+
export declare const fromProjectOutputCardId: (cardId: string | undefined) => string | undefined;
|
|
24
|
+
/** Returns the attachment for a file stored in a project; its `url` is the host-built locator the canvas content resolvers fetch like any DIAL file. */
|
|
25
|
+
export declare const toStoredProjectFileAttachment: ({ id, name, contentType }: ProjectFileCard, projectId: string, toLocator: ProjectFileLocatorBuilder) => DisplayAttachment;
|
|
26
|
+
/** Returns the attachment the project view opens in the canvas for one of its outputs; its `url` is the host-built output locator. */
|
|
27
|
+
export declare const toProjectOutputAttachment: ({ name, contentType }: ProjectOutputItem, projectId: string, toLocator: ProjectFileLocatorBuilder) => DisplayAttachment;
|
|
28
|
+
/** Returns the attachment a project form opens in the canvas for one of its cards: a file added in this session is its own attachment (it carries the `File`), a stored one is built from its project, and a stored file with no project yields `undefined`. */
|
|
29
|
+
export declare const toProjectContextFileAttachment: (file: ProjectContextFile, projectId: string | null, toLocator: ProjectFileLocatorBuilder) => DisplayAttachment | undefined;
|
|
30
|
+
/** Downloads a project file attachment, a file added in this session from its own `File` and a stored one from the URL the host resolves for its locator; returns whether a download started. */
|
|
31
|
+
export declare const downloadProjectFileAttachment: (attachment: DisplayAttachment, resolveDownloadUrl: ProjectFileDownloadUrlResolver | undefined) => boolean;
|
|
32
|
+
//# sourceMappingURL=project-file-preview.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-file-preview.d.ts","sourceRoot":"","sources":["../../src/project/project-file-preview.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,iBAAiB,EAMvB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACvB,MAAM,wBAAwB,CAAC;AAMhC,yFAAyF;AACzF,MAAM,WAAW,eAAe;IAC9B,0DAA0D;IAC1D,EAAE,EAAE,MAAM,CAAC;IACX,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,6BAA6B;IAC7B,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,gJAAgJ;AAChJ,MAAM,MAAM,yBAAyB,GAAG,CACtC,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,KACT,MAAM,CAAC;AAEZ,yJAAyJ;AACzJ,MAAM,MAAM,8BAA8B,GAAG,CAC3C,OAAO,EAAE,MAAM,KACZ,MAAM,GAAG,SAAS,CAAC;AAExB,sHAAsH;AACtH,eAAO,MAAM,mBAAmB,GAAI,OAAO,MAAM,EAAE,IAAI,MAAM,KAAG,MACvB,CAAC;AAE1C,6HAA6H;AAC7H,eAAO,MAAM,qBAAqB,GAChC,OAAO,MAAM,EACb,KAAK,MAAM,GAAG,SAAS,KACtB,MAAM,GAAG,SAGX,CAAC;AAEF,qFAAqF;AACrF,eAAO,MAAM,qBAAqB,GAAI,MAAM,MAAM,KAAG,MAClB,CAAC;AAEpC,+FAA+F;AAC/F,eAAO,MAAM,uBAAuB,GAClC,QAAQ,MAAM,GAAG,SAAS,KACzB,MAAM,GAAG,SAGG,CAAC;AAEhB,wJAAwJ;AACxJ,eAAO,MAAM,6BAA6B,GACxC,2BAA2B,eAAe,EAC1C,WAAW,MAAM,EACjB,WAAW,yBAAyB,KACnC,iBAOD,CAAC;AAEH,sIAAsI;AACtI,eAAO,MAAM,yBAAyB,GACpC,uBAAuB,iBAAiB,EACxC,WAAW,MAAM,EACjB,WAAW,yBAAyB,KACnC,iBAKA,CAAC;AAEJ,gQAAgQ;AAChQ,eAAO,MAAM,8BAA8B,GACzC,MAAM,kBAAkB,EACxB,WAAW,MAAM,GAAG,IAAI,EACxB,WAAW,yBAAyB,KACnC,iBAAiB,GAAG,SAKtB,CAAC;AAEF,iMAAiM;AACjM,eAAO,MAAM,6BAA6B,GACxC,YAAY,iBAAiB,EAC7B,oBAAoB,8BAA8B,GAAG,SAAS,KAC7D,OAeF,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { RequestStatus as e, ensureDownloadFilename as t, getAttachmentTypeFromMime as n, triggerAnchorDownload as r, triggerBlobDownload as i } from "@epam/ai-dial-chat-shared";
|
|
2
|
+
import { isStoredContextFile as a } from "@epam/ai-dial-projects";
|
|
3
|
+
//#region src/project/project-file-preview.ts
|
|
4
|
+
var o = "::", s = "artifacts/", c = (e, t) => `${e}${o}${t}`, l = (e, t) => {
|
|
5
|
+
let n = `${e}${o}`;
|
|
6
|
+
return t?.startsWith(n) ? t.slice(n.length) : void 0;
|
|
7
|
+
}, u = (e) => `${s}${e}`, d = (e) => e?.startsWith(s) ? e.slice(10) : void 0, f = ({ id: t, name: r, contentType: i }, a, o) => ({
|
|
8
|
+
id: t,
|
|
9
|
+
name: r,
|
|
10
|
+
contentType: i,
|
|
11
|
+
type: n(i),
|
|
12
|
+
status: e.Idle,
|
|
13
|
+
url: o(a, r)
|
|
14
|
+
}), p = ({ name: e, contentType: t }, n, r) => f({
|
|
15
|
+
id: e,
|
|
16
|
+
name: e,
|
|
17
|
+
contentType: t
|
|
18
|
+
}, n, r), m = (e, t, n) => a(e) ? t == null ? void 0 : f(e, t, n) : e, h = (e, n) => {
|
|
19
|
+
let { name: a, url: o, contentType: s } = e, c = t(a, o, s);
|
|
20
|
+
if ("file" in e && e.file instanceof Blob) return i(e.file, c), !0;
|
|
21
|
+
let l = o == null ? void 0 : n?.(o);
|
|
22
|
+
return l != null && (r(l, c), !0);
|
|
23
|
+
};
|
|
24
|
+
//#endregion
|
|
25
|
+
export { h as downloadProjectFileAttachment, d as fromProjectOutputCardId, l as fromProjectPreviewKey, m as toProjectContextFileAttachment, p as toProjectOutputAttachment, u as toProjectOutputCardId, c as toProjectPreviewKey, f as toStoredProjectFileAttachment };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** Why the BFF rejected a project create or edit, as the form explains it. */
|
|
2
|
+
export declare enum ProjectFormErrorReason {
|
|
3
|
+
NameTaken = "name-taken",
|
|
4
|
+
NameInvalid = "name-invalid",
|
|
5
|
+
TooManyFiles = "too-many-files",
|
|
6
|
+
FilesRejected = "files-rejected",
|
|
7
|
+
UnknownFile = "unknown-file"
|
|
8
|
+
}
|
|
9
|
+
/** The project form field a rejection belongs to. */
|
|
10
|
+
export declare enum ProjectFormErrorField {
|
|
11
|
+
Name = "name",
|
|
12
|
+
Context = "context"
|
|
13
|
+
}
|
|
14
|
+
/** Where a rejected create or edit request's message goes on the project form. */
|
|
15
|
+
export interface ProjectFormError {
|
|
16
|
+
/** Field the message is shown under. */
|
|
17
|
+
field: ProjectFormErrorField;
|
|
18
|
+
/** Why the request was rejected; the host resolves the message. */
|
|
19
|
+
reason: ProjectFormErrorReason;
|
|
20
|
+
}
|
|
21
|
+
/** Returns the form field and reason a `ProjectCreateErrorCode` maps to, or `null` when the rejection belongs in a toast. */
|
|
22
|
+
export declare const getProjectFormError: (code: string | undefined) => ProjectFormError | null;
|
|
23
|
+
//# sourceMappingURL=project-form-errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-form-errors.d.ts","sourceRoot":"","sources":["../../src/project/project-form-errors.ts"],"names":[],"mappings":"AAEA,8EAA8E;AAC9E,oBAAY,sBAAsB;IAChC,SAAS,eAAe;IACxB,WAAW,iBAAiB;IAC5B,YAAY,mBAAmB;IAC/B,aAAa,mBAAmB;IAChC,WAAW,iBAAiB;CAC7B;AAED,qDAAqD;AACrD,oBAAY,qBAAqB;IAC/B,IAAI,SAAS;IACb,OAAO,YAAY;CACpB;AAED,kFAAkF;AAClF,MAAM,WAAW,gBAAgB;IAC/B,wCAAwC;IACxC,KAAK,EAAE,qBAAqB,CAAC;IAC7B,mEAAmE;IACnE,MAAM,EAAE,sBAAsB,CAAC;CAChC;AAyCD,6HAA6H;AAC7H,eAAO,MAAM,mBAAmB,GAC9B,MAAM,MAAM,GAAG,SAAS,KACvB,gBAAgB,GAAG,IACmC,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ProjectCreateErrorCode as e } from "@epam/ai-dial-chat-api-client";
|
|
2
|
+
//#region src/project/project-form-errors.ts
|
|
3
|
+
var t = /* @__PURE__ */ function(e) {
|
|
4
|
+
return e.NameTaken = "name-taken", e.NameInvalid = "name-invalid", e.TooManyFiles = "too-many-files", e.FilesRejected = "files-rejected", e.UnknownFile = "unknown-file", e;
|
|
5
|
+
}({}), n = /* @__PURE__ */ function(e) {
|
|
6
|
+
return e.Name = "name", e.Context = "context", e;
|
|
7
|
+
}({}), r = {
|
|
8
|
+
[e.NameTaken]: {
|
|
9
|
+
field: "name",
|
|
10
|
+
reason: "name-taken"
|
|
11
|
+
},
|
|
12
|
+
[e.InvalidName]: {
|
|
13
|
+
field: "name",
|
|
14
|
+
reason: "name-invalid"
|
|
15
|
+
},
|
|
16
|
+
[e.TooManyFiles]: {
|
|
17
|
+
field: "context",
|
|
18
|
+
reason: "too-many-files"
|
|
19
|
+
},
|
|
20
|
+
[e.UnsupportedFileType]: {
|
|
21
|
+
field: "context",
|
|
22
|
+
reason: "files-rejected"
|
|
23
|
+
},
|
|
24
|
+
[e.FileTooLarge]: {
|
|
25
|
+
field: "context",
|
|
26
|
+
reason: "files-rejected"
|
|
27
|
+
},
|
|
28
|
+
[e.CapacityExceeded]: {
|
|
29
|
+
field: "context",
|
|
30
|
+
reason: "files-rejected"
|
|
31
|
+
},
|
|
32
|
+
[e.InvalidFileName]: {
|
|
33
|
+
field: "context",
|
|
34
|
+
reason: "files-rejected"
|
|
35
|
+
},
|
|
36
|
+
[e.DuplicateFileName]: {
|
|
37
|
+
field: "context",
|
|
38
|
+
reason: "files-rejected"
|
|
39
|
+
},
|
|
40
|
+
[e.UnknownFile]: {
|
|
41
|
+
field: "context",
|
|
42
|
+
reason: "unknown-file"
|
|
43
|
+
}
|
|
44
|
+
}, i = (e) => (e == null ? void 0 : r[e]) ?? null;
|
|
45
|
+
//#endregion
|
|
46
|
+
export { n as ProjectFormErrorField, t as ProjectFormErrorReason, i as getProjectFormError };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** Defaults matching the BFF's `PROJECT_CONTEXT_*` defaults, used before the client config loads. */
|
|
2
|
+
export declare const DEFAULT_PROJECT_CONTEXT_FILE_MAX_BYTES = 1048576;
|
|
3
|
+
export declare const DEFAULT_PROJECT_CONTEXT_TOTAL_MAX_BYTES = 10485760;
|
|
4
|
+
export declare const DEFAULT_PROJECT_CONTEXT_ALLOWED_EXTENSIONS: string[];
|
|
5
|
+
/** Returns `value` when it is a positive finite number, otherwise `fallback`. */
|
|
6
|
+
export declare const resolveByteLimit: (value: unknown, fallback: number) => number;
|
|
7
|
+
/**
|
|
8
|
+
* Returns `value` lower-cased when it is a non-empty array of non-empty
|
|
9
|
+
* strings, otherwise `fallback`. An older BFF omits the field entirely.
|
|
10
|
+
*/
|
|
11
|
+
export declare const resolveExtensionList: (value: unknown, fallback: string[]) => string[];
|
|
12
|
+
/**
|
|
13
|
+
* Returns every MIME type `MIME_TYPE_EXT_MAP` maps to one of `extensions`,
|
|
14
|
+
* for the file manager's MIME-based `allowedTypes` filter.
|
|
15
|
+
*/
|
|
16
|
+
export declare const getMimeTypesForExtensions: (extensions: string[], mimeTypeExtensions: Record<string, string>) => string[];
|
|
17
|
+
//# sourceMappingURL=project-limits.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-limits.d.ts","sourceRoot":"","sources":["../../src/project/project-limits.ts"],"names":[],"mappings":"AAAA,qGAAqG;AACrG,eAAO,MAAM,sCAAsC,UAAY,CAAC;AAChE,eAAO,MAAM,uCAAuC,WAAa,CAAC;AAClE,eAAO,MAAM,0CAA0C,UAItD,CAAC;AAEF,iFAAiF;AACjF,eAAO,MAAM,gBAAgB,GAAI,OAAO,OAAO,EAAE,UAAU,MAAM,KAAG,MAGtD,CAAC;AAEf;;;GAGG;AACH,eAAO,MAAM,oBAAoB,GAC/B,OAAO,OAAO,EACd,UAAU,MAAM,EAAE,KACjB,MAAM,EAKK,CAAC;AAEf;;;GAGG;AACH,eAAO,MAAM,yBAAyB,GACpC,YAAY,MAAM,EAAE,EACpB,oBAAoB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KACzC,MAAM,EAOR,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region src/project/project-limits.ts
|
|
2
|
+
var e = 1048576, t = 10485760, n = [
|
|
3
|
+
"csv",
|
|
4
|
+
"pdf",
|
|
5
|
+
"xlsx"
|
|
6
|
+
], r = (e, t) => typeof e == "number" && Number.isFinite(e) && e > 0 ? e : t, i = (e, t) => Array.isArray(e) && e.length > 0 && e.every((e) => typeof e == "string" && e.length > 0) ? e.map((e) => e.toLowerCase()) : t, a = (e, t) => {
|
|
7
|
+
let n = new Set(e.map((e) => e.toLowerCase()));
|
|
8
|
+
return Object.entries(t).filter(([, e]) => n.has(e)).map(([e]) => e);
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { n as DEFAULT_PROJECT_CONTEXT_ALLOWED_EXTENSIONS, e as DEFAULT_PROJECT_CONTEXT_FILE_MAX_BYTES, t as DEFAULT_PROJECT_CONTEXT_TOTAL_MAX_BYTES, a as getMimeTypesForExtensions, r as resolveByteLimit, i as resolveExtensionList };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ProjectSource as ProjectSourceDto, ProjectArtifactItemDto, ProjectDetailsDto, ProjectDto } from '@epam/ai-dial-chat-api-client';
|
|
2
|
+
import { FilterTab } from '@epam/ai-dial-chat-shared';
|
|
3
|
+
import { ProjectItem, ProjectOutputItem, ProjectSource, ProjectViewModel, StoredProjectContextFile } from '@epam/ai-dial-projects';
|
|
4
|
+
/** Maps a BFF project source onto the Projects lib's source. */
|
|
5
|
+
export declare const mapProjectSource: (source: ProjectSourceDto) => ProjectSource;
|
|
6
|
+
/** Maps a BFF project source onto the conversation list's Origin filter tab. */
|
|
7
|
+
export declare const mapProjectSourceToFilterTab: (source: ProjectSourceDto) => FilterTab;
|
|
8
|
+
/** Maps a BFF project to the card item the Projects lib renders; the sort date falls back to the creation time. */
|
|
9
|
+
export declare const mapProjectDtoToItem: (project: ProjectDto) => ProjectItem;
|
|
10
|
+
/** Maps a project's BFF details to the content the project view renders; content types come from the file names. */
|
|
11
|
+
export declare const mapProjectDetailsToViewModel: (project: ProjectDetailsDto) => ProjectViewModel;
|
|
12
|
+
/** Maps a project's stored context files to the cards the project form renders; ids are `stored:{name}`. */
|
|
13
|
+
export declare const mapStoredContextFiles: (project: ProjectDetailsDto) => StoredProjectContextFile[];
|
|
14
|
+
/** Maps a project's BFF artifact listing to the output cards the project view renders, keeping its order; content types come from the file names. */
|
|
15
|
+
export declare const mapProjectArtifactsToOutputs: (items: ProjectArtifactItemDto[]) => ProjectOutputItem[];
|
|
16
|
+
//# sourceMappingURL=project-mapping.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-mapping.d.ts","sourceRoot":"","sources":["../../src/project/project-mapping.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,IAAI,gBAAgB,EACjC,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,EACtB,KAAK,UAAU,EAChB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,SAAS,EAIV,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,aAAa,EACb,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,EAC9B,MAAM,wBAAwB,CAAC;AAchC,gEAAgE;AAChE,eAAO,MAAM,gBAAgB,GAAI,QAAQ,gBAAgB,KAAG,aACnC,CAAC;AAQ1B,gFAAgF;AAChF,eAAO,MAAM,2BAA2B,GACtC,QAAQ,gBAAgB,KACvB,SAAwC,CAAC;AAE5C,mHAAmH;AACnH,eAAO,MAAM,mBAAmB,GAAI,SAAS,UAAU,KAAG,WAMxD,CAAC;AAEH,oHAAoH;AACpH,eAAO,MAAM,4BAA4B,GACvC,SAAS,iBAAiB,KACzB,gBAQD,CAAC;AAEH,4GAA4G;AAC5G,eAAO,MAAM,qBAAqB,GAChC,SAAS,iBAAiB,KACzB,wBAAwB,EAYvB,CAAC;AAEL,qJAAqJ;AACrJ,eAAO,MAAM,4BAA4B,GACvC,OAAO,sBAAsB,EAAE,KAC9B,iBAAiB,EAIf,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ProjectSource as e } from "@epam/ai-dial-chat-api-client";
|
|
2
|
+
import { FilterTab as t, RequestStatus as n, getAttachmentTypeFromMime as r, inferMimeTypeFromPath as i } from "@epam/ai-dial-chat-shared";
|
|
3
|
+
import { ProjectSource as a } from "@epam/ai-dial-projects";
|
|
4
|
+
//#region src/project/project-mapping.ts
|
|
5
|
+
var o = "", s = {
|
|
6
|
+
[e.Personal]: a.Personal,
|
|
7
|
+
[e.Shared]: a.Shared,
|
|
8
|
+
[e.Organization]: a.Organization
|
|
9
|
+
}, c = (e) => s[e], l = {
|
|
10
|
+
[e.Personal]: t.MyChats,
|
|
11
|
+
[e.Shared]: t.Shared,
|
|
12
|
+
[e.Organization]: t.Organization
|
|
13
|
+
}, u = (e) => l[e], d = (e) => ({
|
|
14
|
+
id: e.id,
|
|
15
|
+
name: e.name,
|
|
16
|
+
source: c(e.source),
|
|
17
|
+
parentPath: e.parentPath,
|
|
18
|
+
updatedAt: e.updatedAt ?? e.createdAt
|
|
19
|
+
}), f = (e) => ({
|
|
20
|
+
name: e.name,
|
|
21
|
+
description: e.description,
|
|
22
|
+
instructions: e.instructions,
|
|
23
|
+
contextFiles: e.contextFiles.map(({ name: e }) => ({
|
|
24
|
+
name: e,
|
|
25
|
+
contentType: i(e) ?? o
|
|
26
|
+
}))
|
|
27
|
+
}), p = (e) => e.contextFiles.map(({ name: e, size: t }) => {
|
|
28
|
+
let a = i(e) ?? o;
|
|
29
|
+
return {
|
|
30
|
+
id: `stored:${e}`,
|
|
31
|
+
name: e,
|
|
32
|
+
size: t,
|
|
33
|
+
contentType: a,
|
|
34
|
+
type: r(a),
|
|
35
|
+
status: n.Idle,
|
|
36
|
+
isStored: !0
|
|
37
|
+
};
|
|
38
|
+
}), m = (e) => e.map(({ name: e }) => ({
|
|
39
|
+
name: e,
|
|
40
|
+
contentType: i(e) ?? o
|
|
41
|
+
}));
|
|
42
|
+
//#endregion
|
|
43
|
+
export { m as mapProjectArtifactsToOutputs, f as mapProjectDetailsToViewModel, d as mapProjectDtoToItem, c as mapProjectSource, u as mapProjectSourceToFilterTab, p as mapStoredContextFiles };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** How a silent refresh of one loaded project ended. */
|
|
2
|
+
export declare enum ProjectRefreshOutcome {
|
|
3
|
+
/** The details were replaced with the fresh read. */
|
|
4
|
+
Updated = "updated",
|
|
5
|
+
/** The project no longer exists; the page should leave it. */
|
|
6
|
+
NotFound = "not-found",
|
|
7
|
+
/** The read failed; the loaded details are kept. */
|
|
8
|
+
Failed = "failed",
|
|
9
|
+
/** No project was loaded, or a newer refresh or an id change superseded this one. */
|
|
10
|
+
Skipped = "skipped"
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=project-refresh.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-refresh.d.ts","sourceRoot":"","sources":["../../src/project/project-refresh.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,oBAAY,qBAAqB;IAC/B,qDAAqD;IACrD,OAAO,YAAY;IACnB,8DAA8D;IAC9D,QAAQ,cAAc;IACtB,oDAAoD;IACpD,MAAM,WAAW;IACjB,qFAAqF;IACrF,OAAO,YAAY;CACpB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ProjectConversationItemDto } from '@epam/ai-dial-chat-api-client';
|
|
2
|
+
/** Conversation id → its `updatedAt` when the viewer marked it viewed. */
|
|
3
|
+
export type ViewedMarks = Map<string, number | undefined>;
|
|
4
|
+
/**
|
|
5
|
+
* Returns whether a listed conversation shows as unread once the viewer's
|
|
6
|
+
* marks apply, and drops a mark that the listing's newer `updatedAt` outdated.
|
|
7
|
+
*/
|
|
8
|
+
export declare const applyViewedMark: (marks: ViewedMarks, { id, updatedAt, isUnread, }: Pick<ProjectConversationItemDto, "id" | "updatedAt" | "isUnread">) => boolean;
|
|
9
|
+
//# sourceMappingURL=project-viewed-marks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-viewed-marks.d.ts","sourceRoot":"","sources":["../../src/project/project-viewed-marks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAEhF,0EAA0E;AAC1E,MAAM,MAAM,WAAW,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;AAE1D;;;GAGG;AACH,eAAO,MAAM,eAAe,GAC1B,OAAO,WAAW,EAClB,8BAIG,IAAI,CAAC,0BAA0B,EAAE,IAAI,GAAG,WAAW,GAAG,UAAU,CAAC,KACnE,OAaF,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
//#region src/project/project-viewed-marks.ts
|
|
2
|
+
var e = (e, { id: t, updatedAt: n, isUnread: r }) => {
|
|
3
|
+
if (!e.has(t)) return r;
|
|
4
|
+
let i = e.get(t);
|
|
5
|
+
return n != null && i != null && n > i && (e.delete(t), r);
|
|
6
|
+
};
|
|
7
|
+
//#endregion
|
|
8
|
+
export { e as applyViewedMark };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ProjectWatchEvent } from './project-events';
|
|
2
|
+
import { ProjectsApiClient } from './projects-api-client';
|
|
3
|
+
/** Delays before each reconnect attempt of a dropped watch stream. */
|
|
4
|
+
export declare const WATCH_RECONNECT_DELAYS_MS: number[];
|
|
5
|
+
/** One run of a projects watch stream, from its first open until it gives up or `signal` aborts. */
|
|
6
|
+
export interface ProjectWatchRun {
|
|
7
|
+
/** The client's stream opener. */
|
|
8
|
+
watchProjects: NonNullable<ProjectsApiClient['watchProjects']>;
|
|
9
|
+
/** The project ids to watch. */
|
|
10
|
+
ids: string[];
|
|
11
|
+
/** Ends the run: the open stream is released and no reconnect fires. */
|
|
12
|
+
signal: AbortSignal;
|
|
13
|
+
/** Called with each well-formed event. */
|
|
14
|
+
onEvent: (event: ProjectWatchEvent) => void;
|
|
15
|
+
/** Called after a dropped stream was reopened, so the caller can catch up on the gap. */
|
|
16
|
+
onReconnected: () => void;
|
|
17
|
+
/** Called once when the watch cannot be opened or kept open, for the rest of the visit. */
|
|
18
|
+
onUnavailable: () => void;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Keeps a projects watch open: a stream that drops is reopened with a bounded
|
|
22
|
+
* backoff, and a watch whose first open fails (a Core without project events,
|
|
23
|
+
* a project no longer readable) or whose retries run out gives up.
|
|
24
|
+
*/
|
|
25
|
+
export declare const runProjectWatch: ({ watchProjects, ids, signal, onEvent, onReconnected, onUnavailable, }: ProjectWatchRun) => void;
|
|
26
|
+
//# sourceMappingURL=project-watch-stream.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-watch-stream.d.ts","sourceRoot":"","sources":["../../src/project/project-watch-stream.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,sEAAsE;AACtE,eAAO,MAAM,yBAAyB,UAAkC,CAAC;AAEzE,oGAAoG;AACpG,MAAM,WAAW,eAAe;IAC9B,kCAAkC;IAClC,aAAa,EAAE,WAAW,CAAC,iBAAiB,CAAC,eAAe,CAAC,CAAC,CAAC;IAC/D,gCAAgC;IAChC,GAAG,EAAE,MAAM,EAAE,CAAC;IACd,wEAAwE;IACxE,MAAM,EAAE,WAAW,CAAC;IACpB,0CAA0C;IAC1C,OAAO,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC5C,yFAAyF;IACzF,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,2FAA2F;IAC3F,aAAa,EAAE,MAAM,IAAI,CAAC;CAC3B;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAAI,wEAO7B,eAAe,KAAG,IA2CpB,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { parseProjectWatchEvent as e } from "./project-events.js";
|
|
2
|
+
import { readSseEvents as t } from "../shared/read-sse-events.js";
|
|
3
|
+
//#region src/project/project-watch-stream.ts
|
|
4
|
+
var n = [
|
|
5
|
+
1e3,
|
|
6
|
+
2e3,
|
|
7
|
+
4e3,
|
|
8
|
+
8e3,
|
|
9
|
+
16e3
|
|
10
|
+
], r = ({ watchProjects: r, ids: i, signal: a, onEvent: o, onReconnected: s, onUnavailable: c }) => {
|
|
11
|
+
let l;
|
|
12
|
+
a.addEventListener("abort", () => clearTimeout(l), { once: !0 });
|
|
13
|
+
let u = (t) => {
|
|
14
|
+
let n = e(t);
|
|
15
|
+
return n != null && o(n), a.aborted;
|
|
16
|
+
}, d = (e) => {
|
|
17
|
+
let t = n[e];
|
|
18
|
+
t == null ? c() : l = setTimeout(() => {
|
|
19
|
+
f(e, !0);
|
|
20
|
+
}, t);
|
|
21
|
+
}, f = async (e, n) => {
|
|
22
|
+
let o;
|
|
23
|
+
try {
|
|
24
|
+
o = await r(i, a);
|
|
25
|
+
} catch {
|
|
26
|
+
if (a.aborted) return;
|
|
27
|
+
if (!n) {
|
|
28
|
+
c();
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
d(e + 1);
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
n && s(), await t(o, u), !a.aborted && d(0);
|
|
35
|
+
};
|
|
36
|
+
f(0, !1);
|
|
37
|
+
};
|
|
38
|
+
//#endregion
|
|
39
|
+
export { n as WATCH_RECONNECT_DELAYS_MS, r as runProjectWatch };
|