@epam/ai-dial-chat-hooks 1.3.0-dev.98 → 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 +18 -3
- 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 +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 -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,49 @@
|
|
|
1
|
+
import { CreateProjectResponseDto, UpdateProjectResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
2
|
+
import { ProjectFields, ProjectsApiClient, ProjectUpdateRequest } from './projects-api-client';
|
|
3
|
+
/** A rejected create or save, normalised for the page. */
|
|
4
|
+
export interface ProjectSubmitFailure {
|
|
5
|
+
/** `true` when the page unmounted mid-request; nothing should be shown. */
|
|
6
|
+
isAborted: boolean;
|
|
7
|
+
/** HTTP status of the rejection. */
|
|
8
|
+
status?: number;
|
|
9
|
+
/** The BFF's `ProjectCreateErrorCode`, when the rejection carried one. */
|
|
10
|
+
code?: string;
|
|
11
|
+
/** Trace id for the error toast. */
|
|
12
|
+
requestId?: string;
|
|
13
|
+
}
|
|
14
|
+
/** Result of one {@link useCreateProject} `create` call. */
|
|
15
|
+
export type CreateProjectOutcome = {
|
|
16
|
+
isCreated: true;
|
|
17
|
+
project: CreateProjectResponseDto;
|
|
18
|
+
} | ({
|
|
19
|
+
isCreated: false;
|
|
20
|
+
} & ProjectSubmitFailure);
|
|
21
|
+
/** Result of one {@link useSaveProject} `save` call. */
|
|
22
|
+
export type SaveProjectOutcome = {
|
|
23
|
+
isSaved: true;
|
|
24
|
+
project: UpdateProjectResponseDto;
|
|
25
|
+
} | ({
|
|
26
|
+
isSaved: false;
|
|
27
|
+
} & ProjectSubmitFailure);
|
|
28
|
+
/**
|
|
29
|
+
* Submits the New project form; the page owns the form state and decides
|
|
30
|
+
* what each outcome means.
|
|
31
|
+
*
|
|
32
|
+
* @param client - Configured project requests, from `createProjectsApiClient`.
|
|
33
|
+
*/
|
|
34
|
+
export declare const useCreateProject: (client: Pick<ProjectsApiClient, "createProject">) => {
|
|
35
|
+
create: (fields: ProjectFields, files: File[]) => Promise<CreateProjectOutcome>;
|
|
36
|
+
isSubmitting: boolean;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Submits the Edit project form as one atomic update, conditioned on the
|
|
40
|
+
* loaded `contentVersion`; the page owns the draft and decides what each
|
|
41
|
+
* outcome means.
|
|
42
|
+
*
|
|
43
|
+
* @param client - Configured project requests, from `createProjectsApiClient`.
|
|
44
|
+
*/
|
|
45
|
+
export declare const useSaveProject: (client: Pick<ProjectsApiClient, "updateProject">) => {
|
|
46
|
+
save: (request: ProjectUpdateRequest) => Promise<SaveProjectOutcome>;
|
|
47
|
+
isSubmitting: boolean;
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=use-project-submit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-project-submit.d.ts","sourceRoot":"","sources":["../../src/project/use-project-submit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,wBAAwB,EACxB,wBAAwB,EACzB,MAAM,+BAA+B,CAAC;AAGvC,OAAO,KAAK,EACV,aAAa,EACb,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,uBAAuB,CAAC;AAE/B,0DAA0D;AAC1D,MAAM,WAAW,oBAAoB;IACnC,2EAA2E;IAC3E,SAAS,EAAE,OAAO,CAAC;IACnB,oCAAoC;IACpC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0EAA0E;IAC1E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,4DAA4D;AAC5D,MAAM,MAAM,oBAAoB,GAC5B;IAAE,SAAS,EAAE,IAAI,CAAC;IAAC,OAAO,EAAE,wBAAwB,CAAA;CAAE,GACtD,CAAC;IAAE,SAAS,EAAE,KAAK,CAAA;CAAE,GAAG,oBAAoB,CAAC,CAAC;AAElD,wDAAwD;AACxD,MAAM,MAAM,kBAAkB,GAC1B;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,OAAO,EAAE,wBAAwB,CAAA;CAAE,GACpD,CAAC;IAAE,OAAO,EAAE,KAAK,CAAA;CAAE,GAAG,oBAAoB,CAAC,CAAC;AAkDhD;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,GAC3B,QAAQ,IAAI,CAAC,iBAAiB,EAAE,eAAe,CAAC;qBAMpC,aAAa,SACd,IAAI,EAAE,KACZ,OAAO,CAAC,oBAAoB,CAAC;;CAYnC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,GACzB,QAAQ,IAAI,CAAC,iBAAiB,EAAE,eAAe,CAAC;oBAK9B,oBAAoB,KAAG,OAAO,CAAC,kBAAkB,CAAC;;CAYrE,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { getApiErrorDetails as e } from "../api-error/api-error.js";
|
|
2
|
+
import { useCallback as t, useEffect as n, useRef as r, useState as i } from "react";
|
|
3
|
+
//#region src/project/use-project-submit.ts
|
|
4
|
+
var a = () => {
|
|
5
|
+
let [a, o] = i(!1), s = r(null);
|
|
6
|
+
return n(() => () => {
|
|
7
|
+
s.current?.abort();
|
|
8
|
+
}, []), {
|
|
9
|
+
run: t(async (t) => {
|
|
10
|
+
s.current?.abort();
|
|
11
|
+
let n = new AbortController();
|
|
12
|
+
s.current = n, o(!0);
|
|
13
|
+
try {
|
|
14
|
+
return {
|
|
15
|
+
isOk: !0,
|
|
16
|
+
value: await t(n.signal)
|
|
17
|
+
};
|
|
18
|
+
} catch (t) {
|
|
19
|
+
if (n.signal.aborted) return {
|
|
20
|
+
isOk: !1,
|
|
21
|
+
isAborted: !0
|
|
22
|
+
};
|
|
23
|
+
let { status: r, code: i, traceId: a } = await e(t);
|
|
24
|
+
return {
|
|
25
|
+
isOk: !1,
|
|
26
|
+
isAborted: !1,
|
|
27
|
+
status: r,
|
|
28
|
+
code: i,
|
|
29
|
+
requestId: a
|
|
30
|
+
};
|
|
31
|
+
} finally {
|
|
32
|
+
n.signal.aborted || o(!1), s.current === n && (s.current = null);
|
|
33
|
+
}
|
|
34
|
+
}, []),
|
|
35
|
+
isSubmitting: a
|
|
36
|
+
};
|
|
37
|
+
}, o = (e) => {
|
|
38
|
+
let { run: n, isSubmitting: r } = a();
|
|
39
|
+
return {
|
|
40
|
+
create: t(async (t, r) => {
|
|
41
|
+
let i = await n((n) => e.createProject(t, r, n));
|
|
42
|
+
if (i.isOk) return {
|
|
43
|
+
isCreated: !0,
|
|
44
|
+
project: i.value
|
|
45
|
+
};
|
|
46
|
+
let { isOk: a, ...o } = i;
|
|
47
|
+
return {
|
|
48
|
+
isCreated: !1,
|
|
49
|
+
...o
|
|
50
|
+
};
|
|
51
|
+
}, [e, n]),
|
|
52
|
+
isSubmitting: r
|
|
53
|
+
};
|
|
54
|
+
}, s = (e) => {
|
|
55
|
+
let { run: n, isSubmitting: r } = a();
|
|
56
|
+
return {
|
|
57
|
+
save: t(async (t) => {
|
|
58
|
+
let r = await n((n) => e.updateProject(t, n));
|
|
59
|
+
if (r.isOk) return {
|
|
60
|
+
isSaved: !0,
|
|
61
|
+
project: r.value
|
|
62
|
+
};
|
|
63
|
+
let { isOk: i, ...a } = r;
|
|
64
|
+
return {
|
|
65
|
+
isSaved: !1,
|
|
66
|
+
...a
|
|
67
|
+
};
|
|
68
|
+
}, [e, n]),
|
|
69
|
+
isSubmitting: r
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
//#endregion
|
|
73
|
+
export { o as useCreateProject, s as useSaveProject };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ProjectsApiClient } from './projects-api-client';
|
|
2
|
+
/** What `useProjectWatch` reports to the page that shows one project. */
|
|
3
|
+
export interface ProjectWatchOptions {
|
|
4
|
+
/** The loaded snapshot's aggregate ETag; the watch opens once it is known, and an event carrying it is skipped. */
|
|
5
|
+
etag: string | undefined;
|
|
6
|
+
/** Silent refresh of everything the page shows; at most one runs at a time, and a rejection is ignored. */
|
|
7
|
+
onChange: () => Promise<void>;
|
|
8
|
+
/** The project was deleted elsewhere; called at most once per project id. */
|
|
9
|
+
onDelete: () => void;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Keeps a page showing one project current: it watches that project, runs
|
|
13
|
+
* `onChange` for each change the page has not loaded yet — one at a time,
|
|
14
|
+
* plus one trailing run for whatever arrived meanwhile — and `onDelete` once
|
|
15
|
+
* when the project is deleted. A dropped stream is reopened with a bounded
|
|
16
|
+
* backoff and followed by one `onChange`; a watch that cannot be opened is
|
|
17
|
+
* not retried for the rest of the visit.
|
|
18
|
+
*
|
|
19
|
+
* @param client - Configured project requests, from `createProjectsApiClient`; it must be referentially stable, because a new object resubscribes.
|
|
20
|
+
* @param projectId - The watched project's DIAL id, or `null` while none is known.
|
|
21
|
+
* @param options - The loaded ETag and the page's callbacks; read at event time, so new identities never resubscribe.
|
|
22
|
+
*/
|
|
23
|
+
export declare const useProjectWatch: (client: Pick<ProjectsApiClient, "watchProjects">, projectId: string | null, options: ProjectWatchOptions) => void;
|
|
24
|
+
//# sourceMappingURL=use-project-watch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-project-watch.d.ts","sourceRoot":"","sources":["../../src/project/use-project-watch.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,yEAAyE;AACzE,MAAM,WAAW,mBAAmB;IAClC,mHAAmH;IACnH,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,2GAA2G;IAC3G,QAAQ,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,6EAA6E;IAC7E,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe,GAC1B,QAAQ,IAAI,CAAC,iBAAiB,EAAE,eAAe,CAAC,EAChD,WAAW,MAAM,GAAG,IAAI,EACxB,SAAS,mBAAmB,KAC3B,IAwEF,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { runProjectWatch as e } from "./project-watch-stream.js";
|
|
2
|
+
import { ProjectWatchAction as t } from "@epam/ai-dial-chat-api-client";
|
|
3
|
+
import { useEffect as n, useRef as r } from "react";
|
|
4
|
+
//#region src/project/use-project-watch.ts
|
|
5
|
+
var i = (i, a, o) => {
|
|
6
|
+
let s = r(o);
|
|
7
|
+
n(() => {
|
|
8
|
+
s.current = o;
|
|
9
|
+
});
|
|
10
|
+
let c = r(null), l = o.etag != null, { watchProjects: u } = i;
|
|
11
|
+
n(() => {
|
|
12
|
+
if (u == null || a == null || !l || c.current === a) return;
|
|
13
|
+
let n = new AbortController(), r = !1, i = !1, o = () => {
|
|
14
|
+
n.signal.aborted || (r ? i = !0 : (r = !0, (async () => {
|
|
15
|
+
try {
|
|
16
|
+
await s.current.onChange();
|
|
17
|
+
} catch {} finally {
|
|
18
|
+
r = !1, i && (i = !1, o());
|
|
19
|
+
}
|
|
20
|
+
})()));
|
|
21
|
+
};
|
|
22
|
+
return e({
|
|
23
|
+
watchProjects: u,
|
|
24
|
+
ids: [a],
|
|
25
|
+
signal: n.signal,
|
|
26
|
+
onEvent: (e) => {
|
|
27
|
+
e.id !== a || n.signal.aborted || (e.action === t.Delete ? (i = !1, n.abort(), s.current.onDelete()) : (e.etag == null || e.etag !== s.current.etag) && o());
|
|
28
|
+
},
|
|
29
|
+
onReconnected: o,
|
|
30
|
+
onUnavailable: () => {
|
|
31
|
+
c.current = a;
|
|
32
|
+
}
|
|
33
|
+
}), () => n.abort();
|
|
34
|
+
}, [
|
|
35
|
+
u,
|
|
36
|
+
a,
|
|
37
|
+
l
|
|
38
|
+
]);
|
|
39
|
+
};
|
|
40
|
+
//#endregion
|
|
41
|
+
export { i as useProjectWatch };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ProjectDetailsDto } from '@epam/ai-dial-chat-api-client';
|
|
2
|
+
import { ProjectRefreshOutcome } from './project-refresh';
|
|
3
|
+
import { ProjectsApiClient } from './projects-api-client';
|
|
4
|
+
/**
|
|
5
|
+
* Loads one project's details. Loading is derived from whether a result
|
|
6
|
+
* answers the current id and reload token, so a page never renders a stale
|
|
7
|
+
* project for a new id. A `404` is a not-found result, every other failure an
|
|
8
|
+
* error; the request is aborted on unmount and on an id change. `refresh`
|
|
9
|
+
* re-reads the loaded project without the loading state, for live updates.
|
|
10
|
+
*
|
|
11
|
+
* @param client - Configured project requests, from `createProjectsApiClient`; it must be referentially stable, because a new object reloads.
|
|
12
|
+
* @param id - The project's DIAL id, or `null` when the route names none.
|
|
13
|
+
* @param enabled - Whether the page is enabled; no request is sent while `false`.
|
|
14
|
+
*/
|
|
15
|
+
export declare const useProject: (client: Pick<ProjectsApiClient, "getProject">, id: string | null, enabled: boolean) => {
|
|
16
|
+
project: ProjectDetailsDto | null;
|
|
17
|
+
isLoading: boolean;
|
|
18
|
+
hasError: boolean;
|
|
19
|
+
isNotFound: boolean;
|
|
20
|
+
retry: () => void;
|
|
21
|
+
refresh: () => Promise<ProjectRefreshOutcome>;
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=use-project.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-project.d.ts","sourceRoot":"","sources":["../../src/project/use-project.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAGvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAU/D;;;;;;;;;;GAUG;AACH,eAAO,MAAM,UAAU,GACrB,QAAQ,IAAI,CAAC,iBAAiB,EAAE,YAAY,CAAC,EAC7C,IAAI,MAAM,GAAG,IAAI,EACjB,SAAS,OAAO;;;;;;mBA2CsB,OAAO,CAAC,qBAAqB,CAAC;CA8BrE,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { getApiErrorStatus as e } from "../api-error/api-error.js";
|
|
2
|
+
import { ProjectRefreshOutcome as t } from "./project-refresh.js";
|
|
3
|
+
import { useCallback as n, useEffect as r, useRef as i, useState as a } from "react";
|
|
4
|
+
//#region src/project/use-project.ts
|
|
5
|
+
var o = (o, s, c) => {
|
|
6
|
+
let [l, u] = a(0), [d, f] = a(), p = `${l}:${s ?? ""}`;
|
|
7
|
+
r(() => {
|
|
8
|
+
if (!c || s == null) return;
|
|
9
|
+
let t = new AbortController();
|
|
10
|
+
return (async () => {
|
|
11
|
+
try {
|
|
12
|
+
let e = await o.getProject(s, t.signal);
|
|
13
|
+
if (t.signal.aborted) return;
|
|
14
|
+
f({
|
|
15
|
+
key: p,
|
|
16
|
+
project: e,
|
|
17
|
+
hasError: !1,
|
|
18
|
+
isNotFound: !1
|
|
19
|
+
});
|
|
20
|
+
} catch (n) {
|
|
21
|
+
if (t.signal.aborted) return;
|
|
22
|
+
let r = e(n) === 404;
|
|
23
|
+
f({
|
|
24
|
+
key: p,
|
|
25
|
+
project: null,
|
|
26
|
+
hasError: !r,
|
|
27
|
+
isNotFound: r
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
})(), () => t.abort();
|
|
31
|
+
}, [
|
|
32
|
+
o,
|
|
33
|
+
c,
|
|
34
|
+
s,
|
|
35
|
+
p
|
|
36
|
+
]);
|
|
37
|
+
let m = n(() => {
|
|
38
|
+
u((e) => e + 1);
|
|
39
|
+
}, []), h = d?.key === p ? d : void 0, g = h?.project ?? null, _ = i(null);
|
|
40
|
+
r(() => () => {
|
|
41
|
+
_.current?.abort(), _.current = null;
|
|
42
|
+
}, [p]);
|
|
43
|
+
let v = n(async () => {
|
|
44
|
+
if (g == null || s == null) return t.Skipped;
|
|
45
|
+
_.current?.abort();
|
|
46
|
+
let n = new AbortController();
|
|
47
|
+
_.current = n;
|
|
48
|
+
try {
|
|
49
|
+
let e = await o.getProject(s, n.signal);
|
|
50
|
+
return n.signal.aborted ? t.Skipped : (f((t) => t?.key === p ? {
|
|
51
|
+
...t,
|
|
52
|
+
project: e
|
|
53
|
+
} : t), t.Updated);
|
|
54
|
+
} catch (r) {
|
|
55
|
+
return n.signal.aborted ? t.Skipped : e(r) === 404 ? t.NotFound : t.Failed;
|
|
56
|
+
}
|
|
57
|
+
}, [
|
|
58
|
+
o,
|
|
59
|
+
s,
|
|
60
|
+
p,
|
|
61
|
+
g
|
|
62
|
+
]);
|
|
63
|
+
return {
|
|
64
|
+
project: g,
|
|
65
|
+
isLoading: c && s != null && h == null,
|
|
66
|
+
hasError: h?.hasError ?? !1,
|
|
67
|
+
isNotFound: h?.isNotFound ?? !1,
|
|
68
|
+
retry: m,
|
|
69
|
+
refresh: v
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
//#endregion
|
|
73
|
+
export { o as useProject };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ProjectItem, ProjectSource } from '@epam/ai-dial-projects';
|
|
2
|
+
import { ProjectsApiClient } from './projects-api-client';
|
|
3
|
+
/**
|
|
4
|
+
* Loads the projects the session user can see, mapped to the Projects lib's
|
|
5
|
+
* cards, and keeps them current while mounted. Loading is derived from
|
|
6
|
+
* whether a result answers the current reload token, so an enabled page is
|
|
7
|
+
* loading from its very first render. The request is aborted on unmount or
|
|
8
|
+
* when `enabled` turns false.
|
|
9
|
+
*
|
|
10
|
+
* When the client offers `watchProjects`, a successful load opens one watch
|
|
11
|
+
* stream for the listed projects: an update moves a card's `updatedAt`
|
|
12
|
+
* forward and a delete removes it. A stream that drops is reopened with a
|
|
13
|
+
* bounded backoff and followed by a silent reload, so changes made during
|
|
14
|
+
* the gap are not lost; a watch that cannot be opened at all is not retried
|
|
15
|
+
* for the rest of the visit.
|
|
16
|
+
*
|
|
17
|
+
* @param client - Configured project requests, from `createProjectsApiClient`; it must be referentially stable, because a new object reloads.
|
|
18
|
+
* @param enabled - Whether the page is enabled; no request is sent while `false`.
|
|
19
|
+
*/
|
|
20
|
+
export declare const useProjects: (client: Pick<ProjectsApiClient, "listProjects" | "watchProjects">, enabled: boolean) => {
|
|
21
|
+
projects: ProjectItem[];
|
|
22
|
+
incompleteSources: ProjectSource[];
|
|
23
|
+
isLoading: boolean;
|
|
24
|
+
hasError: boolean;
|
|
25
|
+
retry: () => void;
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=use-projects.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-projects.d.ts","sourceRoot":"","sources":["../../src/project/use-projects.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAKzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAoC/D;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,WAAW,GACtB,QAAQ,IAAI,CAAC,iBAAiB,EAAE,cAAc,GAAG,eAAe,CAAC,EACjE,SAAS,OAAO;;;;;;CAmGjB,CAAC"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { mapProjectDtoToItem as e, mapProjectSource as t } from "./project-mapping.js";
|
|
2
|
+
import { applyProjectEvent as n } from "./project-events.js";
|
|
3
|
+
import { runProjectWatch as r } from "./project-watch-stream.js";
|
|
4
|
+
import { useCallback as i, useEffect as a, useRef as o, useState as s } from "react";
|
|
5
|
+
//#region src/project/use-projects.ts
|
|
6
|
+
var c = 1e3, l = "\n", u = ({ items: n, incompleteSources: r }, i) => {
|
|
7
|
+
let a = n.map(e);
|
|
8
|
+
return {
|
|
9
|
+
reloadToken: i,
|
|
10
|
+
projects: a,
|
|
11
|
+
incompleteSources: r.map(t),
|
|
12
|
+
hasError: !1,
|
|
13
|
+
watchKey: a.slice(0, c).map(({ id: e }) => e).sort().join(l)
|
|
14
|
+
};
|
|
15
|
+
}, d = (e, t) => {
|
|
16
|
+
let [c, d] = s(0), [f, p] = s(), m = o(!1), h = o(void 0);
|
|
17
|
+
a(() => {
|
|
18
|
+
if (!t) return;
|
|
19
|
+
let n = new AbortController();
|
|
20
|
+
return (async () => {
|
|
21
|
+
try {
|
|
22
|
+
let t = await e.listProjects(n.signal);
|
|
23
|
+
if (n.signal.aborted) return;
|
|
24
|
+
p(u(t, c));
|
|
25
|
+
} catch {
|
|
26
|
+
if (n.signal.aborted) return;
|
|
27
|
+
p({
|
|
28
|
+
reloadToken: c,
|
|
29
|
+
projects: [],
|
|
30
|
+
incompleteSources: [],
|
|
31
|
+
hasError: !0,
|
|
32
|
+
watchKey: ""
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
})(), () => n.abort();
|
|
36
|
+
}, [
|
|
37
|
+
e,
|
|
38
|
+
t,
|
|
39
|
+
c
|
|
40
|
+
]);
|
|
41
|
+
let g = i(async () => {
|
|
42
|
+
h.current?.abort();
|
|
43
|
+
let t = new AbortController();
|
|
44
|
+
h.current = t;
|
|
45
|
+
try {
|
|
46
|
+
let n = await e.listProjects(t.signal);
|
|
47
|
+
if (t.signal.aborted) return;
|
|
48
|
+
p((e) => e == null || e.hasError ? e : u(n, e.reloadToken));
|
|
49
|
+
} catch {}
|
|
50
|
+
}, [e]);
|
|
51
|
+
a(() => () => h.current?.abort(), []);
|
|
52
|
+
let _ = f?.reloadToken === c ? f : void 0, v = t ? _?.watchKey ?? "" : "", { watchProjects: y } = e;
|
|
53
|
+
a(() => {
|
|
54
|
+
if (y == null || v === "" || m.current) return;
|
|
55
|
+
let e = new AbortController();
|
|
56
|
+
return r({
|
|
57
|
+
watchProjects: y,
|
|
58
|
+
ids: v.split(l),
|
|
59
|
+
signal: e.signal,
|
|
60
|
+
onEvent: (e) => p((t) => {
|
|
61
|
+
if (t == null) return t;
|
|
62
|
+
let r = n(t.projects, e);
|
|
63
|
+
return r === t.projects ? t : {
|
|
64
|
+
...t,
|
|
65
|
+
projects: r
|
|
66
|
+
};
|
|
67
|
+
}),
|
|
68
|
+
onReconnected: () => {
|
|
69
|
+
g();
|
|
70
|
+
},
|
|
71
|
+
onUnavailable: () => {
|
|
72
|
+
m.current = !0;
|
|
73
|
+
}
|
|
74
|
+
}), () => e.abort();
|
|
75
|
+
}, [
|
|
76
|
+
y,
|
|
77
|
+
v,
|
|
78
|
+
g
|
|
79
|
+
]);
|
|
80
|
+
let b = i(() => {
|
|
81
|
+
d((e) => e + 1);
|
|
82
|
+
}, []);
|
|
83
|
+
return {
|
|
84
|
+
projects: _?.projects ?? [],
|
|
85
|
+
incompleteSources: _?.incompleteSources ?? [],
|
|
86
|
+
isLoading: t && _ == null,
|
|
87
|
+
hasError: _?.hasError ?? !1,
|
|
88
|
+
retry: b
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
//#endregion
|
|
92
|
+
export { d as useProjects };
|
package/project.d.ts
ADDED
package/project.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { buildCreateConversationDto as e, createProjectsApiClient as t, splitProjectConversationId as n } from "./project/projects-api-client.js";
|
|
2
|
+
import { mapProjectArtifactsToOutputs as r, mapProjectDetailsToViewModel as i, mapProjectDtoToItem as a, mapProjectSource as o, mapProjectSourceToFilterTab as s, mapStoredContextFiles as c } from "./project/project-mapping.js";
|
|
3
|
+
import { DEFAULT_PROJECT_CONTEXT_ALLOWED_EXTENSIONS as l, DEFAULT_PROJECT_CONTEXT_FILE_MAX_BYTES as u, DEFAULT_PROJECT_CONTEXT_TOTAL_MAX_BYTES as d, getMimeTypesForExtensions as f, resolveByteLimit as p, resolveExtensionList as m } from "./project/project-limits.js";
|
|
4
|
+
import { ProjectFormErrorField as h, ProjectFormErrorReason as g, getProjectFormError as _ } from "./project/project-form-errors.js";
|
|
5
|
+
import { downloadProjectFileAttachment as v, fromProjectOutputCardId as y, fromProjectPreviewKey as b, toProjectContextFileAttachment as x, toProjectOutputAttachment as S, toProjectOutputCardId as C, toProjectPreviewKey as w, toStoredProjectFileAttachment as T } from "./project/project-file-preview.js";
|
|
6
|
+
import { useProjectFilePreview as E } from "./project/use-project-file-preview.js";
|
|
7
|
+
import { ProjectDraftMode as D, useProjectDraft as O } from "./project/use-project-draft.js";
|
|
8
|
+
import { ProjectChatCreateFailure as k, classifyProjectChatCreateError as A, createProjectChat as j } from "./project/create-project-chat.js";
|
|
9
|
+
import { createProjectConversationDataSource as M } from "./project/project-conversation-data-source.js";
|
|
10
|
+
import { useProjects as N } from "./project/use-projects.js";
|
|
11
|
+
import { ProjectRefreshOutcome as P } from "./project/project-refresh.js";
|
|
12
|
+
import { useProject as F } from "./project/use-project.js";
|
|
13
|
+
import { useProjectWatch as I } from "./project/use-project-watch.js";
|
|
14
|
+
import { useCreateProject as L, useSaveProject as R } from "./project/use-project-submit.js";
|
|
15
|
+
import { useProjectConversations as z } from "./project/use-project-conversations.js";
|
|
16
|
+
import { PINNED_PROJECT_CHATS_LIMIT as B, usePinnedProjectChats as V } from "./project/use-pinned-project-chats.js";
|
|
17
|
+
import { useProjectArtifacts as H } from "./project/use-project-artifacts.js";
|
|
18
|
+
import { ProjectActionError as U, useProjectActions as W } from "./project/use-project-actions.js";
|
|
19
|
+
import { createSerializedKeyedWriter as G } from "./shared/serialized-writer.js";
|
|
20
|
+
export { l as DEFAULT_PROJECT_CONTEXT_ALLOWED_EXTENSIONS, u as DEFAULT_PROJECT_CONTEXT_FILE_MAX_BYTES, d as DEFAULT_PROJECT_CONTEXT_TOTAL_MAX_BYTES, B as PINNED_PROJECT_CHATS_LIMIT, U as ProjectActionError, k as ProjectChatCreateFailure, D as ProjectDraftMode, h as ProjectFormErrorField, g as ProjectFormErrorReason, P as ProjectRefreshOutcome, e as buildCreateConversationDto, A as classifyProjectChatCreateError, j as createProjectChat, M as createProjectConversationDataSource, t as createProjectsApiClient, G as createSerializedKeyedWriter, v as downloadProjectFileAttachment, y as fromProjectOutputCardId, b as fromProjectPreviewKey, f as getMimeTypesForExtensions, _ as getProjectFormError, r as mapProjectArtifactsToOutputs, i as mapProjectDetailsToViewModel, a as mapProjectDtoToItem, o as mapProjectSource, s as mapProjectSourceToFilterTab, c as mapStoredContextFiles, p as resolveByteLimit, m as resolveExtensionList, n as splitProjectConversationId, x as toProjectContextFileAttachment, S as toProjectOutputAttachment, C as toProjectOutputCardId, w as toProjectPreviewKey, T as toStoredProjectFileAttachment, L as useCreateProject, V as usePinnedProjectChats, F as useProject, W as useProjectActions, H as useProjectArtifacts, z as useProjectConversations, O as useProjectDraft, E as useProjectFilePreview, I as useProjectWatch, N as useProjects, R as useSaveProject };
|
package/prompt/prompt.d.ts
CHANGED
|
@@ -23,6 +23,17 @@ export declare const validatePromptName: (name: string) => PromptFieldError | nu
|
|
|
23
23
|
export declare const validatePromptDescription: (description: string) => PromptFieldError | null;
|
|
24
24
|
/** Validates a prompt body: required, and within the backend's length limit. */
|
|
25
25
|
export declare const validatePromptContent: (content: string) => PromptFieldError | null;
|
|
26
|
+
/** Field errors of a prompt form, keyed by field. */
|
|
27
|
+
export interface PromptFieldErrors {
|
|
28
|
+
/** Error of the name field. */
|
|
29
|
+
name?: PromptFieldError;
|
|
30
|
+
/** Error of the description field. */
|
|
31
|
+
description?: PromptFieldError;
|
|
32
|
+
/** Error of the prompt body field. */
|
|
33
|
+
content?: PromptFieldError;
|
|
34
|
+
}
|
|
35
|
+
/** The validator of each prompt form field. */
|
|
36
|
+
export declare const PROMPT_FIELD_VALIDATORS: Record<keyof PromptFieldErrors, (value: string) => PromptFieldError | null>;
|
|
26
37
|
/**
|
|
27
38
|
* Returns the characters left before a limit, or `null` while still further
|
|
28
39
|
* away than the announce threshold — a counter that fires on every keystroke
|
package/prompt/prompt.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt.d.ts","sourceRoot":"","sources":["../../src/prompt/prompt.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,oBAAY,gBAAgB;IAC1B,gDAAgD;IAChD,QAAQ,aAAa;IACrB,kEAAkE;IAClE,OAAO,YAAY;IACnB,oEAAoE;IACpE,WAAW,gBAAgB;IAC3B,4EAA4E;IAC5E,QAAQ,aAAa;CACtB;AAiBD,8DAA8D;AAC9D,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAE1C,4EAA4E;AAC5E,eAAO,MAAM,6BAA6B,OAAO,CAAC;AAElD,iEAAiE;AACjE,eAAO,MAAM,yBAAyB,QAAQ,CAAC;AAE/C,sFAAsF;AACtF,eAAO,MAAM,iCAAiC,KAAK,CAAC;AAEpD,yEAAyE;AACzE,eAAO,MAAM,kBAAkB,GAAI,MAAM,MAAM,KAAG,gBAAgB,GAAG,IAMpE,CAAC;AAEF,qEAAqE;AACrE,eAAO,MAAM,yBAAyB,GACpC,aAAa,MAAM,KAClB,gBAAgB,GAAG,IAGZ,CAAC;AAEX,gFAAgF;AAChF,eAAO,MAAM,qBAAqB,GAChC,SAAS,MAAM,KACd,gBAAgB,GAAG,IAMrB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,GACjC,OAAO,MAAM,EACb,WAAW,MAAM,KAChB,MAAM,GAAG,IAGX,CAAC;AAEF,qFAAqF;AACrF,eAAO,MAAM,eAAe,GAAI,UAAU,MAAM,EAAE,MAAM,MAAM,KAAG,MACxB,CAAC"}
|
|
1
|
+
{"version":3,"file":"prompt.d.ts","sourceRoot":"","sources":["../../src/prompt/prompt.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,oBAAY,gBAAgB;IAC1B,gDAAgD;IAChD,QAAQ,aAAa;IACrB,kEAAkE;IAClE,OAAO,YAAY;IACnB,oEAAoE;IACpE,WAAW,gBAAgB;IAC3B,4EAA4E;IAC5E,QAAQ,aAAa;CACtB;AAiBD,8DAA8D;AAC9D,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAE1C,4EAA4E;AAC5E,eAAO,MAAM,6BAA6B,OAAO,CAAC;AAElD,iEAAiE;AACjE,eAAO,MAAM,yBAAyB,QAAQ,CAAC;AAE/C,sFAAsF;AACtF,eAAO,MAAM,iCAAiC,KAAK,CAAC;AAEpD,yEAAyE;AACzE,eAAO,MAAM,kBAAkB,GAAI,MAAM,MAAM,KAAG,gBAAgB,GAAG,IAMpE,CAAC;AAEF,qEAAqE;AACrE,eAAO,MAAM,yBAAyB,GACpC,aAAa,MAAM,KAClB,gBAAgB,GAAG,IAGZ,CAAC;AAEX,gFAAgF;AAChF,eAAO,MAAM,qBAAqB,GAChC,SAAS,MAAM,KACd,gBAAgB,GAAG,IAMrB,CAAC;AAEF,qDAAqD;AACrD,MAAM,WAAW,iBAAiB;IAChC,+BAA+B;IAC/B,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,sCAAsC;IACtC,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAC/B,sCAAsC;IACtC,OAAO,CAAC,EAAE,gBAAgB,CAAC;CAC5B;AAED,+CAA+C;AAC/C,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAC1C,MAAM,iBAAiB,EACvB,CAAC,KAAK,EAAE,MAAM,KAAK,gBAAgB,GAAG,IAAI,CAK3C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,GACjC,OAAO,MAAM,EACb,WAAW,MAAM,KAChB,MAAM,GAAG,IAGX,CAAC;AAEF,qFAAqF;AACrF,eAAO,MAAM,eAAe,GAAI,UAAU,MAAM,EAAE,MAAM,MAAM,KAAG,MACxB,CAAC"}
|
package/prompt/prompt.js
CHANGED
|
@@ -4,9 +4,13 @@ var e = /* @__PURE__ */ function(e) {
|
|
|
4
4
|
}({}), t = /^(?!\.{1,2}$)[a-zA-Z0-9 _.-]+$/, n = 256, r = 2e3, i = 5e4, a = 10, o = (e) => {
|
|
5
5
|
let n = e.trim();
|
|
6
6
|
return n.length === 0 ? "required" : n.length > 256 ? "tooLong" : t.test(n) ? null : "invalidName";
|
|
7
|
-
}, s = (e) => e.length > 2e3 ? "tooLong" : null, c = (e) => e.trim().length === 0 ? "required" : e.length > 5e4 ? "tooLong" : null, l =
|
|
7
|
+
}, s = (e) => e.length > 2e3 ? "tooLong" : null, c = (e) => e.trim().length === 0 ? "required" : e.length > 5e4 ? "tooLong" : null, l = {
|
|
8
|
+
name: o,
|
|
9
|
+
description: s,
|
|
10
|
+
content: c
|
|
11
|
+
}, u = (e, t) => {
|
|
8
12
|
let n = t - e.length;
|
|
9
13
|
return n <= 10 ? n : null;
|
|
10
|
-
},
|
|
14
|
+
}, d = (e, t) => e ? `${e}/${t}` : t;
|
|
11
15
|
//#endregion
|
|
12
|
-
export { i as PROMPT_CONTENT_MAX_LENGTH, a as PROMPT_COUNTER_ANNOUNCE_THRESHOLD, r as PROMPT_DESCRIPTION_MAX_LENGTH, n as PROMPT_NAME_MAX_LENGTH, e as PromptFieldError,
|
|
16
|
+
export { i as PROMPT_CONTENT_MAX_LENGTH, a as PROMPT_COUNTER_ANNOUNCE_THRESHOLD, r as PROMPT_DESCRIPTION_MAX_LENGTH, l as PROMPT_FIELD_VALIDATORS, n as PROMPT_NAME_MAX_LENGTH, e as PromptFieldError, d as buildPromptPath, u as getRemainingCharacters, c as validatePromptContent, s as validatePromptDescription, o as validatePromptName };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/** Resolution status of scheduler metadata for the currently routed conversation. */
|
|
2
|
+
export declare enum ActiveScheduledTaskStatus {
|
|
3
|
+
Resolving = "resolving",
|
|
4
|
+
NotATaskConversation = "not-a-task-conversation",
|
|
5
|
+
TaskConversation = "task-conversation"
|
|
6
|
+
}
|
|
7
|
+
/** Fetch status of the active task's own details (separate from its run history). */
|
|
8
|
+
export declare enum ActiveScheduledTaskDetailState {
|
|
9
|
+
Idle = "idle",
|
|
10
|
+
Loading = "loading",
|
|
11
|
+
Error = "error",
|
|
12
|
+
Unavailable = "unavailable",
|
|
13
|
+
Success = "success"
|
|
14
|
+
}
|
|
15
|
+
/** Minimal scheduler metadata supplied by the host. */
|
|
16
|
+
export interface ActiveScheduledTaskCandidate {
|
|
17
|
+
/** Opaque conversation identity. */
|
|
18
|
+
id: string;
|
|
19
|
+
/** Whether the scheduler created this conversation. */
|
|
20
|
+
isScheduledTask?: boolean;
|
|
21
|
+
/** Schedule identity. */
|
|
22
|
+
scheduleId?: string;
|
|
23
|
+
/** Run identity. */
|
|
24
|
+
runId?: string;
|
|
25
|
+
/** Conversation update epoch. */
|
|
26
|
+
updatedAt?: number;
|
|
27
|
+
/** Conversation display title. */
|
|
28
|
+
title?: string;
|
|
29
|
+
}
|
|
30
|
+
/** Inputs for resolving scheduler metadata without routing knowledge. */
|
|
31
|
+
export interface ResolveActiveScheduledTaskOptions {
|
|
32
|
+
/** Guarded route identity, or null outside a conversation. */
|
|
33
|
+
routeConversationId: string | null;
|
|
34
|
+
/** Host feature decision. */
|
|
35
|
+
enabled: boolean;
|
|
36
|
+
/** Whether the conversation list is loading. */
|
|
37
|
+
isLoading: boolean;
|
|
38
|
+
/** Current conversation candidates. */
|
|
39
|
+
items: readonly ActiveScheduledTaskCandidate[];
|
|
40
|
+
/** Host identity matching policy. */
|
|
41
|
+
matches: (candidateId: string, routeId: string) => boolean;
|
|
42
|
+
}
|
|
43
|
+
/** Resolved active-task metadata. */
|
|
44
|
+
export interface ActiveScheduledTaskResolution {
|
|
45
|
+
/** Classification of the supplied conversation. */
|
|
46
|
+
status: ActiveScheduledTaskStatus;
|
|
47
|
+
/** Matched schedule identity. */
|
|
48
|
+
scheduleId?: string;
|
|
49
|
+
/** Matched run identity. */
|
|
50
|
+
runId?: string;
|
|
51
|
+
/** Matched conversation update epoch. */
|
|
52
|
+
conversationUpdatedAt?: number;
|
|
53
|
+
/** Matched conversation title. */
|
|
54
|
+
conversationTitle?: string;
|
|
55
|
+
}
|
|
56
|
+
/** Resolves scheduler metadata using the caller's identity policy. */
|
|
57
|
+
export declare const resolveActiveScheduledTask: ({ routeConversationId, enabled, isLoading, items, matches, }: ResolveActiveScheduledTaskOptions) => ActiveScheduledTaskResolution;
|
|
58
|
+
//# sourceMappingURL=active-scheduled-task.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"active-scheduled-task.d.ts","sourceRoot":"","sources":["../../src/scheduled-task/active-scheduled-task.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,oBAAY,yBAAyB;IACnC,SAAS,cAAc;IACvB,oBAAoB,4BAA4B;IAChD,gBAAgB,sBAAsB;CACvC;AAED,qFAAqF;AACrF,oBAAY,8BAA8B;IACxC,IAAI,SAAS;IACb,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,WAAW,gBAAgB;IAC3B,OAAO,YAAY;CACpB;AAED,uDAAuD;AACvD,MAAM,WAAW,4BAA4B;IAC3C,oCAAoC;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,uDAAuD;IACvD,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,yBAAyB;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oBAAoB;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iCAAiC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kCAAkC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AACD,yEAAyE;AACzE,MAAM,WAAW,iCAAiC;IAChD,8DAA8D;IAC9D,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,6BAA6B;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,gDAAgD;IAChD,SAAS,EAAE,OAAO,CAAC;IACnB,uCAAuC;IACvC,KAAK,EAAE,SAAS,4BAA4B,EAAE,CAAC;IAC/C,qCAAqC;IACrC,OAAO,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;CAC5D;AACD,qCAAqC;AACrC,MAAM,WAAW,6BAA6B;IAC5C,mDAAmD;IACnD,MAAM,EAAE,yBAAyB,CAAC;IAClC,iCAAiC;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4BAA4B;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yCAAyC;IACzC,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,kCAAkC;IAClC,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AACD,sEAAsE;AACtE,eAAO,MAAM,0BAA0B,GAAI,8DAMxC,iCAAiC,KAAG,6BAmBtC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//#region src/scheduled-task/active-scheduled-task.ts
|
|
2
|
+
var e = /* @__PURE__ */ function(e) {
|
|
3
|
+
return e.Resolving = "resolving", e.NotATaskConversation = "not-a-task-conversation", e.TaskConversation = "task-conversation", e;
|
|
4
|
+
}({}), t = /* @__PURE__ */ function(e) {
|
|
5
|
+
return e.Idle = "idle", e.Loading = "loading", e.Error = "error", e.Unavailable = "unavailable", e.Success = "success", e;
|
|
6
|
+
}({}), n = ({ routeConversationId: e, enabled: t, isLoading: n, items: r, matches: i }) => {
|
|
7
|
+
if (!e || !t) return { status: "not-a-task-conversation" };
|
|
8
|
+
let a = r.find((t) => i(t.id, e));
|
|
9
|
+
return a ? !a.isScheduledTask || !a.scheduleId || !a.runId ? { status: "not-a-task-conversation" } : {
|
|
10
|
+
status: "task-conversation",
|
|
11
|
+
scheduleId: a.scheduleId,
|
|
12
|
+
runId: a.runId,
|
|
13
|
+
conversationUpdatedAt: a.updatedAt,
|
|
14
|
+
conversationTitle: a.title
|
|
15
|
+
} : { status: n ? "resolving" : "not-a-task-conversation" };
|
|
16
|
+
};
|
|
17
|
+
//#endregion
|
|
18
|
+
export { t as ActiveScheduledTaskDetailState, e as ActiveScheduledTaskStatus, n as resolveActiveScheduledTask };
|
|
@@ -14,6 +14,8 @@ export interface ScheduledTaskTriggerDescription {
|
|
|
14
14
|
kind: ScheduledTaskTriggerDescriptionKind;
|
|
15
15
|
time?: string;
|
|
16
16
|
dayOfWeek?: string;
|
|
17
|
+
/** Every display-timezone weekday of a `Weekly` description, Monday first; `dayOfWeek` is its first entry. */
|
|
18
|
+
daysOfWeek?: string[];
|
|
17
19
|
dayOfMonth?: string;
|
|
18
20
|
intervalMinutes?: number;
|
|
19
21
|
date?: Date;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scheduled-task-description.d.ts","sourceRoot":"","sources":["../../src/scheduled-task/scheduled-task-description.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAGxE,8DAA8D;AAC9D,oBAAY,mCAAmC;IAC7C,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,aAAa,kBAAkB;IAC/B,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED,MAAM,WAAW,+BAA+B;IAC9C,IAAI,EAAE,mCAAmC,CAAC;IAC1C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,KAAK,CAAC;CACvB;AAED,MAAM,WAAW,sCAAsC;IACrD,qEAAqE;IACrE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6FAA6F;IAC7F,aAAa,CAAC,EAAE,IAAI,CAAC;CACtB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,4BAA4B,GACvC,SAAS,kBAAkB,EAC3B,+BAGG,sCAA2C,KAC7C,+
|
|
1
|
+
{"version":3,"file":"scheduled-task-description.d.ts","sourceRoot":"","sources":["../../src/scheduled-task/scheduled-task-description.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAGxE,8DAA8D;AAC9D,oBAAY,mCAAmC;IAC7C,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,aAAa,kBAAkB;IAC/B,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED,MAAM,WAAW,+BAA+B;IAC9C,IAAI,EAAE,mCAAmC,CAAC;IAC1C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8GAA8G;IAC9G,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,KAAK,CAAC;CACvB;AAED,MAAM,WAAW,sCAAsC;IACrD,qEAAqE;IACrE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6FAA6F;IAC7F,aAAa,CAAC,EAAE,IAAI,CAAC;CACtB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,4BAA4B,GACvC,SAAS,kBAAkB,EAC3B,+BAGG,sCAA2C,KAC7C,+BAuKF,CAAC"}
|