@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,64 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
/** Completion outcome of one incremental request. */
|
|
3
|
+
export declare enum ConversationTitleRequestEnd {
|
|
4
|
+
Complete = "complete",
|
|
5
|
+
Budget = "budget",
|
|
6
|
+
Unsupported = "unsupported",
|
|
7
|
+
Stopped = "stopped"
|
|
8
|
+
}
|
|
9
|
+
/** Minimal list row required for title reconciliation. */
|
|
10
|
+
export interface ConversationTitleItem {
|
|
11
|
+
/** Exact resource identity. */
|
|
12
|
+
id: string;
|
|
13
|
+
/** Current display title. */
|
|
14
|
+
title: string;
|
|
15
|
+
/** Whether the title still needs enrichment. */
|
|
16
|
+
isTitlePending?: boolean;
|
|
17
|
+
}
|
|
18
|
+
/** Outcome of an incremental transport call. */
|
|
19
|
+
export interface ConversationTitleTransportResult {
|
|
20
|
+
/** Completion or fallback outcome. */
|
|
21
|
+
end: ConversationTitleRequestEnd;
|
|
22
|
+
/** IDs with a terminal outcome, including missing titles. */
|
|
23
|
+
settledIds: readonly string[];
|
|
24
|
+
}
|
|
25
|
+
/** Host transports and scheduling policies. Keep this object stable. */
|
|
26
|
+
export interface ConversationTitleEnrichmentOptions {
|
|
27
|
+
/** Fetches one JSON batch. */
|
|
28
|
+
getTitles: (ids: string[], signal: AbortSignal) => Promise<{
|
|
29
|
+
items: {
|
|
30
|
+
id: string;
|
|
31
|
+
title: string;
|
|
32
|
+
}[];
|
|
33
|
+
}>;
|
|
34
|
+
/** Optional incremental transport; omitted for JSON-only hosts. */
|
|
35
|
+
streamTitles?: (ids: string[], signal: AbortSignal, onTitle: (id: string, title: string) => void) => Promise<ConversationTitleTransportResult>;
|
|
36
|
+
/** Maximum IDs in each JSON batch; must be positive. */
|
|
37
|
+
batchSize: number;
|
|
38
|
+
/** Maximum IDs in each incremental request; must be positive. */
|
|
39
|
+
maxIds: number;
|
|
40
|
+
/** Maximum encoded JSON-array bytes per incremental request. */
|
|
41
|
+
maxBytes: number;
|
|
42
|
+
/** Maximum delay before buffered titles flush. */
|
|
43
|
+
flushMs: number;
|
|
44
|
+
/** Maximum buffered title count; must be positive. */
|
|
45
|
+
maxPendingUpdates: number;
|
|
46
|
+
/** Duration for which local writes override remote snapshots. */
|
|
47
|
+
protectionMs: number;
|
|
48
|
+
/** Clock for local protection; defaults to Date.now. */
|
|
49
|
+
now?: () => number;
|
|
50
|
+
}
|
|
51
|
+
/** Resolves list titles without blocking the initial history response. */
|
|
52
|
+
export declare const useConversationTitleEnrichmentController: <T extends ConversationTitleItem>(identityScope: unknown, setConversations: Dispatch<SetStateAction<T[]>>, options: ConversationTitleEnrichmentOptions) => {
|
|
53
|
+
applyConversationList: (items: T[], requestedAtRevision: number) => void;
|
|
54
|
+
getTitleRevision: () => number;
|
|
55
|
+
rememberTitle: (id: string, title: string, options?: {
|
|
56
|
+
isWriting?: boolean;
|
|
57
|
+
protect?: boolean;
|
|
58
|
+
}) => void;
|
|
59
|
+
forgetTitle: (id: string, isPending?: boolean) => void;
|
|
60
|
+
restoreTitle: (id: string, title: string) => void;
|
|
61
|
+
setVisibleConversationIds: (viewKey: string, ids: string[] | null) => void;
|
|
62
|
+
isUpdatingTitles: boolean;
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=useConversationTitleEnrichmentController.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useConversationTitleEnrichmentController.d.ts","sourceRoot":"","sources":["../../src/conversation/useConversationTitleEnrichmentController.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,cAAc,EAKpB,MAAM,OAAO,CAAC;AAEf,qDAAqD;AACrD,oBAAY,2BAA2B;IACrC,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,WAAW,gBAAgB;IAC3B,OAAO,YAAY;CACpB;AACD,0DAA0D;AAC1D,MAAM,WAAW,qBAAqB;IACpC,+BAA+B;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,gDAAgD;IAChD,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AACD,gDAAgD;AAChD,MAAM,WAAW,gCAAgC;IAC/C,sCAAsC;IACtC,GAAG,EAAE,2BAA2B,CAAC;IACjC,6DAA6D;IAC7D,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;CAC/B;AACD,wEAAwE;AACxE,MAAM,WAAW,kCAAkC;IACjD,8BAA8B;IAC9B,SAAS,EAAE,CACT,GAAG,EAAE,MAAM,EAAE,EACb,MAAM,EAAE,WAAW,KAChB,OAAO,CAAC;QAAE,KAAK,EAAE;YAAE,EAAE,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE,EAAE,CAAA;KAAE,CAAC,CAAC;IACzD,mEAAmE;IACnE,YAAY,CAAC,EAAE,CACb,GAAG,EAAE,MAAM,EAAE,EACb,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,KACzC,OAAO,CAAC,gCAAgC,CAAC,CAAC;IAC/C,wDAAwD;IACxD,SAAS,EAAE,MAAM,CAAC;IAClB,iEAAiE;IACjE,MAAM,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,QAAQ,EAAE,MAAM,CAAC;IACjB,kDAAkD;IAClD,OAAO,EAAE,MAAM,CAAC;IAChB,sDAAsD;IACtD,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iEAAiE;IACjE,YAAY,EAAE,MAAM,CAAC;IACrB,wDAAwD;IACxD,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;CACpB;AA2DD,0EAA0E;AAC1E,eAAO,MAAM,wCAAwC,GACnD,CAAC,SAAS,qBAAqB,EAE/B,eAAe,OAAO,EACtB,kBAAkB,QAAQ,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,EAC/C,SAAS,kCAAkC;mCAwFjC,CAAC,EAAE,uBAAuB,MAAM;;wBApClC,MAAM,SACH,MAAM,YACJ;QAAE,SAAS,CAAC,EAAE,OAAO,CAAC;QAAC,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE;sBAelB,MAAM;uBAUpC,MAAM,SAAS,MAAM;yCApChB,MAAM,OAAO,MAAM,EAAE,GAAG,IAAI;;CA+RzC,CAAC"}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { useCallback as e, useLayoutEffect as t, useRef as n, useState as r } from "react";
|
|
2
|
+
//#region src/conversation/useConversationTitleEnrichmentController.ts
|
|
3
|
+
var i = /* @__PURE__ */ function(e) {
|
|
4
|
+
return e.Complete = "complete", e.Budget = "budget", e.Unsupported = "unsupported", e.Stopped = "stopped", e;
|
|
5
|
+
}({}), a = new TextEncoder(), o = (e, t, n) => {
|
|
6
|
+
let r = 2, i = [];
|
|
7
|
+
for (let o of e) {
|
|
8
|
+
if (i.length >= t) break;
|
|
9
|
+
let e = a.encode(JSON.stringify(o)).length + +!!i.length;
|
|
10
|
+
if (r + e > n) break;
|
|
11
|
+
r += e, i.push(o);
|
|
12
|
+
}
|
|
13
|
+
return i;
|
|
14
|
+
}, s = (e, t) => new Promise((n) => {
|
|
15
|
+
let r = () => {
|
|
16
|
+
cancelAnimationFrame(i), clearTimeout(a), e.removeEventListener("abort", r), n();
|
|
17
|
+
}, i = requestAnimationFrame(r), a = setTimeout(r, t);
|
|
18
|
+
e.addEventListener("abort", r, { once: !0 });
|
|
19
|
+
}), c = (e, t) => {
|
|
20
|
+
let n = new Set(e), r = /* @__PURE__ */ new Set();
|
|
21
|
+
for (let e of t.values()) for (let t of e) n.has(t) && r.add(t);
|
|
22
|
+
return r.size === 0 ? e : [...r, ...e.filter((e) => !r.has(e))];
|
|
23
|
+
}, l = (i, a, l) => {
|
|
24
|
+
let { getTitles: u, streamTitles: d, batchSize: f, maxIds: p, maxBytes: m, flushMs: h, maxPendingUpdates: g, protectionMs: _, now: v = Date.now } = l, y = n(null), b = n(/* @__PURE__ */ new Map()), x = n(/* @__PURE__ */ new Map()), S = n(/* @__PURE__ */ new Map()), C = n(/* @__PURE__ */ new Set()), w = n(0), T = n(!!d), E = n(/* @__PURE__ */ new Map()), [D, O] = r(!1);
|
|
25
|
+
t(() => (b.current.clear(), x.current.clear(), S.current.clear(), C.current.clear(), w.current = 0, E.current.clear(), T.current = !!d, O(!1), () => {
|
|
26
|
+
y.current?.abort(), y.current = null;
|
|
27
|
+
}), [i, d]);
|
|
28
|
+
let k = e(() => w.current, []), A = e((e, t) => {
|
|
29
|
+
t ? E.current.set(e, t) : E.current.delete(e);
|
|
30
|
+
}, []), j = e((e, t, n = {}) => {
|
|
31
|
+
let r = ++w.current;
|
|
32
|
+
x.current.set(e, r), b.current.set(e, {
|
|
33
|
+
title: t,
|
|
34
|
+
revision: r,
|
|
35
|
+
isWriting: n.isWriting,
|
|
36
|
+
protectedUntil: n.protect === !1 ? void 0 : v() + _
|
|
37
|
+
});
|
|
38
|
+
}, [v, _]), M = e((e, t = !1) => {
|
|
39
|
+
let n = ++w.current;
|
|
40
|
+
x.current.set(e, n), S.current.set(e, n), t ? C.current.add(e) : C.current.delete(e), b.current.delete(e);
|
|
41
|
+
}, []), N = e((e, t) => {
|
|
42
|
+
S.current.delete(e), C.current.delete(e), j(e, t, { protect: !1 });
|
|
43
|
+
}, [j]);
|
|
44
|
+
return {
|
|
45
|
+
applyConversationList: e((e, t) => {
|
|
46
|
+
y.current?.abort();
|
|
47
|
+
let n = new AbortController();
|
|
48
|
+
y.current = n;
|
|
49
|
+
let r = e.filter(({ id: e }) => !C.current.has(e) && (S.current.get(e) ?? 0) <= t);
|
|
50
|
+
for (let [e, n] of S.current) n <= t && !C.current.has(e) && S.current.delete(e);
|
|
51
|
+
let i = new Set(r.map(({ id: e }) => e));
|
|
52
|
+
for (let e of b.current.keys()) i.has(e) || b.current.delete(e);
|
|
53
|
+
for (let e of x.current.keys()) !i.has(e) && !S.current.has(e) && x.current.delete(e);
|
|
54
|
+
a(r.map((e) => {
|
|
55
|
+
let n = b.current.get(e.id);
|
|
56
|
+
return n && (e.isTitlePending || n.isWriting || (n.protectedUntil ?? 0) > v() || n.revision > t) ? {
|
|
57
|
+
...e,
|
|
58
|
+
title: n.title,
|
|
59
|
+
...(n.protectedUntil ?? 0) > v() || n.isWriting || n.revision > t ? { isTitlePending: !1 } : {}
|
|
60
|
+
} : (e.isTitlePending || b.current.set(e.id, {
|
|
61
|
+
title: e.title,
|
|
62
|
+
revision: x.current.get(e.id) ?? 0
|
|
63
|
+
}), e);
|
|
64
|
+
}));
|
|
65
|
+
let l = [...new Set(r.filter((e) => e.isTitlePending && !b.current.get(e.id)?.isWriting && (b.current.get(e.id)?.protectedUntil ?? 0) <= v() && (x.current.get(e.id) ?? 0) <= t).map((e) => e.id))], _ = new Map(l.map((e) => [e, x.current.get(e) ?? 0])), w = (e) => _.get(e) === (x.current.get(e) ?? 0), D = () => y.current === n && !n.signal.aborted;
|
|
66
|
+
O(l.length > 0);
|
|
67
|
+
let k = /* @__PURE__ */ new Map(), A, j, M = () => {
|
|
68
|
+
if (A !== void 0 && cancelAnimationFrame(A), clearTimeout(j), A = void 0, j = void 0, k.size === 0) return;
|
|
69
|
+
let e = new Map([...k].filter(([e]) => w(e)));
|
|
70
|
+
k.clear(), D() && e.size !== 0 && (e.forEach((e, t) => {
|
|
71
|
+
b.current.set(t, {
|
|
72
|
+
title: e,
|
|
73
|
+
revision: x.current.get(t) ?? 0
|
|
74
|
+
});
|
|
75
|
+
}), a((t) => {
|
|
76
|
+
if (!D()) return t;
|
|
77
|
+
let n = !1, r = t.map((t) => {
|
|
78
|
+
let r = e.get(t.id);
|
|
79
|
+
return r !== void 0 && w(t.id) && (t.title !== r || t.isTitlePending) ? (n = !0, {
|
|
80
|
+
...t,
|
|
81
|
+
title: r,
|
|
82
|
+
isTitlePending: !1
|
|
83
|
+
}) : t;
|
|
84
|
+
});
|
|
85
|
+
return n ? r : t;
|
|
86
|
+
}));
|
|
87
|
+
};
|
|
88
|
+
n.signal.addEventListener("abort", M, { once: !0 });
|
|
89
|
+
let N = (e, t) => {
|
|
90
|
+
D() && w(e) && (k.set(e, t), k.size >= g ? M() : j === void 0 && (A = requestAnimationFrame(M), j = setTimeout(M, h)));
|
|
91
|
+
}, P = async (e) => {
|
|
92
|
+
for (let t = 0; t < e.length; t += f) {
|
|
93
|
+
if (!D()) return;
|
|
94
|
+
let r = e.slice(t, t + f).filter(w);
|
|
95
|
+
if (r.length !== 0) try {
|
|
96
|
+
let e = await u(r, n.signal);
|
|
97
|
+
if (!D()) return;
|
|
98
|
+
for (let { id: t, title: n } of e.items) r.includes(t) && N(t, n);
|
|
99
|
+
M();
|
|
100
|
+
} catch {
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}, F = async (e, t) => {
|
|
105
|
+
if (!d) return "unsupported";
|
|
106
|
+
try {
|
|
107
|
+
let r = new Set(e), i = await d(e, n.signal, (e, t) => {
|
|
108
|
+
D() && r.has(e) && N(e, t);
|
|
109
|
+
});
|
|
110
|
+
if (!D()) return "stopped";
|
|
111
|
+
for (let e of i.settledIds) r.has(e) && t.add(e);
|
|
112
|
+
return i.end;
|
|
113
|
+
} catch {
|
|
114
|
+
return "stopped";
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
(async () => {
|
|
118
|
+
let e = l;
|
|
119
|
+
try {
|
|
120
|
+
for (e.length > 0 && await s(n.signal, h); e.length > 0 && D();) {
|
|
121
|
+
if (e = c(e.filter(w), E.current), T.current === !1) {
|
|
122
|
+
await P(e);
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
let t = o(e, p, m);
|
|
126
|
+
if (t.length === 0) return;
|
|
127
|
+
let r = /* @__PURE__ */ new Set(), i = await F(t, r);
|
|
128
|
+
if (i === "unsupported") y.current === n && (T.current = !1);
|
|
129
|
+
else if (e = e.filter((e) => !r.has(e)), i === "stopped" || r.size === 0) return;
|
|
130
|
+
}
|
|
131
|
+
} finally {
|
|
132
|
+
M(), y.current === n && O(!1);
|
|
133
|
+
}
|
|
134
|
+
})();
|
|
135
|
+
}, [
|
|
136
|
+
a,
|
|
137
|
+
u,
|
|
138
|
+
d,
|
|
139
|
+
f,
|
|
140
|
+
p,
|
|
141
|
+
m,
|
|
142
|
+
h,
|
|
143
|
+
g,
|
|
144
|
+
v
|
|
145
|
+
]),
|
|
146
|
+
getTitleRevision: k,
|
|
147
|
+
rememberTitle: j,
|
|
148
|
+
forgetTitle: M,
|
|
149
|
+
restoreTitle: N,
|
|
150
|
+
setVisibleConversationIds: A,
|
|
151
|
+
isUpdatingTitles: D
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
//#endregion
|
|
155
|
+
export { i as ConversationTitleRequestEnd, l as useConversationTitleEnrichmentController };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** Host selection and conversation lifecycle inputs. */
|
|
2
|
+
export interface DeploymentChangeTrackingOptions {
|
|
3
|
+
/** Active conversation identity; absent outside a conversation. */
|
|
4
|
+
conversationId: string | undefined;
|
|
5
|
+
/** Restored or user-selected deployment. */
|
|
6
|
+
selectedDeploymentId: string | null;
|
|
7
|
+
/** Whether conversation restoration has finished. */
|
|
8
|
+
isLoaded: boolean;
|
|
9
|
+
/** Reports user changes after restoration. */
|
|
10
|
+
onChange: (previous: string | null, next: string) => void;
|
|
11
|
+
}
|
|
12
|
+
/** Tracks user selection changes without treating conversation restoration as a change. */
|
|
13
|
+
export declare const useDeploymentChangeTracking: ({ conversationId, selectedDeploymentId, isLoaded, onChange, }: DeploymentChangeTrackingOptions) => void;
|
|
14
|
+
//# sourceMappingURL=useDeploymentChangeTracking.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDeploymentChangeTracking.d.ts","sourceRoot":"","sources":["../../src/conversation/useDeploymentChangeTracking.ts"],"names":[],"mappings":"AAEA,wDAAwD;AACxD,MAAM,WAAW,+BAA+B;IAC9C,mEAAmE;IACnE,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,4CAA4C;IAC5C,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,qDAAqD;IACrD,QAAQ,EAAE,OAAO,CAAC;IAClB,8CAA8C;IAC9C,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC3D;AACD,2FAA2F;AAC3F,eAAO,MAAM,2BAA2B,GAAI,+DAKzC,+BAA+B,KAAG,IAoBpC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { useEffect as e, useRef as t } from "react";
|
|
2
|
+
//#region src/conversation/useDeploymentChangeTracking.ts
|
|
3
|
+
var n = ({ conversationId: n, selectedDeploymentId: r, isLoaded: i, onChange: a }) => {
|
|
4
|
+
let o = t(void 0);
|
|
5
|
+
e(() => {
|
|
6
|
+
if (!n || !i) {
|
|
7
|
+
o.current = void 0;
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
let e = o.current;
|
|
11
|
+
o.current = {
|
|
12
|
+
conversationId: n,
|
|
13
|
+
deploymentId: r
|
|
14
|
+
}, e && e.conversationId === n && e.deploymentId !== r && r !== null && a(e.deploymentId, r);
|
|
15
|
+
}, [
|
|
16
|
+
n,
|
|
17
|
+
r,
|
|
18
|
+
i,
|
|
19
|
+
a
|
|
20
|
+
]);
|
|
21
|
+
};
|
|
22
|
+
//#endregion
|
|
23
|
+
export { n as useDeploymentChangeTracking };
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/** Sources whose arrival values may be consumed. */
|
|
2
|
+
export declare enum EntityPreselectionSource {
|
|
3
|
+
Deployment = "deployment",
|
|
4
|
+
Skill = "skill",
|
|
5
|
+
Prompt = "prompt"
|
|
6
|
+
}
|
|
7
|
+
/** Failure outcomes interpreted by the host. */
|
|
8
|
+
export declare enum EntityPreselectionOutcome {
|
|
9
|
+
DeploymentUnavailable = "deployment-unavailable",
|
|
10
|
+
DeploymentsLoadFailed = "deployments-load-failed",
|
|
11
|
+
SkillUnavailable = "skill-unavailable",
|
|
12
|
+
SkillsLoadFailed = "skills-load-failed",
|
|
13
|
+
PromptUnavailable = "prompt-unavailable"
|
|
14
|
+
}
|
|
15
|
+
/** Parsed arrival values; the controller captures these once per mount. */
|
|
16
|
+
export interface EntityPreselectionSnapshot {
|
|
17
|
+
/** Requested deployment identity. */
|
|
18
|
+
deploymentId: string | null;
|
|
19
|
+
/** Requested skill reference. */
|
|
20
|
+
skillId: string | null;
|
|
21
|
+
/** Requested prompt identity. */
|
|
22
|
+
promptId: string | null;
|
|
23
|
+
/** Sources already provided by the host, which take precedence. */
|
|
24
|
+
superseded: readonly EntityPreselectionSource[];
|
|
25
|
+
/** Disables all application, consumption and outcome side effects. */
|
|
26
|
+
isDisabled: boolean;
|
|
27
|
+
}
|
|
28
|
+
/** Structural prompt passed to the host's composer or parameter popup. */
|
|
29
|
+
export interface EntityPreselectionPrompt {
|
|
30
|
+
/** Canonical identity. */
|
|
31
|
+
id: string;
|
|
32
|
+
/** Display name. */
|
|
33
|
+
name: string;
|
|
34
|
+
/** Optional description. */
|
|
35
|
+
description?: string;
|
|
36
|
+
/** Prompt content. */
|
|
37
|
+
content: string;
|
|
38
|
+
}
|
|
39
|
+
/** A resolved skill mention. */
|
|
40
|
+
export interface EntityPreselectionSkill {
|
|
41
|
+
/** Canonical reference. */
|
|
42
|
+
url: string;
|
|
43
|
+
/** Resolved display name. */
|
|
44
|
+
name: string;
|
|
45
|
+
}
|
|
46
|
+
/** Loaded prompt and parameter policy. */
|
|
47
|
+
export interface EntityPreselectionPromptResult {
|
|
48
|
+
/** Resolved prompt. */
|
|
49
|
+
prompt: EntityPreselectionPrompt;
|
|
50
|
+
/** Whether the host must ask for parameter values. */
|
|
51
|
+
hasParameters: boolean;
|
|
52
|
+
}
|
|
53
|
+
/** Host actions for applying resolved entities. */
|
|
54
|
+
export interface EntityPreselectionSinks {
|
|
55
|
+
/** Selects a deployment without persisting a preference. */
|
|
56
|
+
restoreSelectedItemId: (id: string) => void;
|
|
57
|
+
/** Inserts a skill mention. */
|
|
58
|
+
selectSkillByUrl: (url: string) => void;
|
|
59
|
+
/** Seeds combined prompt text and skill references. */
|
|
60
|
+
seedSkillMentions: (content: string, entries: {
|
|
61
|
+
url: string;
|
|
62
|
+
}[] | undefined) => void;
|
|
63
|
+
/** Seeds plain prompt text. */
|
|
64
|
+
seedComposerText: (text: string) => void;
|
|
65
|
+
/** Opens a parameterized prompt. */
|
|
66
|
+
openParametersPopup: (prompt: EntityPreselectionPrompt) => void;
|
|
67
|
+
}
|
|
68
|
+
/** Host listings, loaders and side-effect adapters. */
|
|
69
|
+
export interface UseEntityPreselectionOptions {
|
|
70
|
+
/** Parsed arrival snapshot. */
|
|
71
|
+
snapshot: EntityPreselectionSnapshot;
|
|
72
|
+
/** Whether the deployment listing is pending. */
|
|
73
|
+
isDeploymentsLoading: boolean;
|
|
74
|
+
/** Whether deployment loading failed. */
|
|
75
|
+
deploymentsError: unknown;
|
|
76
|
+
/** Looks up an eligible deployment in the current listing. */
|
|
77
|
+
resolveDeployment: (id: string) => {
|
|
78
|
+
id: string;
|
|
79
|
+
} | undefined;
|
|
80
|
+
/** Whether skill listing is pending. */
|
|
81
|
+
isSkillsLoading: boolean;
|
|
82
|
+
/** Whether skill loading failed. */
|
|
83
|
+
skillsError: unknown;
|
|
84
|
+
/** Whether skills are available in this host. */
|
|
85
|
+
isSkillsEnabled: boolean;
|
|
86
|
+
/** Looks up a valid skill in current listings. */
|
|
87
|
+
resolveSkill: (id: string) => EntityPreselectionSkill | undefined;
|
|
88
|
+
/** Whether prompts are available in this host. */
|
|
89
|
+
isPromptsEnabled: boolean;
|
|
90
|
+
/** Loads and adapts a prompt; undefined means unavailable. */
|
|
91
|
+
loadPrompt: (id: string, signal: AbortSignal) => Promise<EntityPreselectionPromptResult | undefined>;
|
|
92
|
+
/** Application sinks, read from the latest committed render. */
|
|
93
|
+
sinks: EntityPreselectionSinks;
|
|
94
|
+
/** Consumes supplied arrival sources, leaving URL/router policy to the host. */
|
|
95
|
+
onConsume: (sources: EntityPreselectionSource[]) => void;
|
|
96
|
+
/** Reports a typed failure, optional host error and original identity. */
|
|
97
|
+
onOutcome: (outcome: EntityPreselectionOutcome, id: string, error?: unknown) => void;
|
|
98
|
+
}
|
|
99
|
+
/** Deployment override flags for default-selection coordination. */
|
|
100
|
+
export interface UseEntityPreselectionResult {
|
|
101
|
+
/** Pending or successfully applied deployment override. */
|
|
102
|
+
isDeploymentOverrideActive: boolean;
|
|
103
|
+
/** Deployment resolution has not settled yet. */
|
|
104
|
+
isDeploymentPending: boolean;
|
|
105
|
+
}
|
|
106
|
+
/** Applies arrival entities once, preserving source precedence and ignoring retired work. */
|
|
107
|
+
export declare const useEntityPreselection: (options: UseEntityPreselectionOptions) => UseEntityPreselectionResult;
|
|
108
|
+
//# sourceMappingURL=useEntityPreselection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useEntityPreselection.d.ts","sourceRoot":"","sources":["../../../src/conversation/useEntityPreselection/useEntityPreselection.ts"],"names":[],"mappings":"AAEA,oDAAoD;AACpD,oBAAY,wBAAwB;IAClC,UAAU,eAAe;IACzB,KAAK,UAAU;IACf,MAAM,WAAW;CAClB;AACD,gDAAgD;AAChD,oBAAY,yBAAyB;IACnC,qBAAqB,2BAA2B;IAChD,qBAAqB,4BAA4B;IACjD,gBAAgB,sBAAsB;IACtC,gBAAgB,uBAAuB;IACvC,iBAAiB,uBAAuB;CACzC;AACD,2EAA2E;AAC3E,MAAM,WAAW,0BAA0B;IACzC,qCAAqC;IACrC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,iCAAiC;IACjC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,iCAAiC;IACjC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,mEAAmE;IACnE,UAAU,EAAE,SAAS,wBAAwB,EAAE,CAAC;IAChD,sEAAsE;IACtE,UAAU,EAAE,OAAO,CAAC;CACrB;AACD,0EAA0E;AAC1E,MAAM,WAAW,wBAAwB;IACvC,0BAA0B;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,oBAAoB;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,4BAA4B;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sBAAsB;IACtB,OAAO,EAAE,MAAM,CAAC;CACjB;AACD,gCAAgC;AAChC,MAAM,WAAW,uBAAuB;IACtC,2BAA2B;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,6BAA6B;IAC7B,IAAI,EAAE,MAAM,CAAC;CACd;AACD,0CAA0C;AAC1C,MAAM,WAAW,8BAA8B;IAC7C,uBAAuB;IACvB,MAAM,EAAE,wBAAwB,CAAC;IACjC,sDAAsD;IACtD,aAAa,EAAE,OAAO,CAAC;CACxB;AACD,mDAAmD;AACnD,MAAM,WAAW,uBAAuB;IACtC,4DAA4D;IAC5D,qBAAqB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,+BAA+B;IAC/B,gBAAgB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,uDAAuD;IACvD,iBAAiB,EAAE,CACjB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,EAAE,GAAG,SAAS,KACnC,IAAI,CAAC;IACV,+BAA+B;IAC/B,gBAAgB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,oCAAoC;IACpC,mBAAmB,EAAE,CAAC,MAAM,EAAE,wBAAwB,KAAK,IAAI,CAAC;CACjE;AACD,uDAAuD;AACvD,MAAM,WAAW,4BAA4B;IAC3C,+BAA+B;IAC/B,QAAQ,EAAE,0BAA0B,CAAC;IACrC,iDAAiD;IACjD,oBAAoB,EAAE,OAAO,CAAC;IAC9B,yCAAyC;IACzC,gBAAgB,EAAE,OAAO,CAAC;IAC1B,8DAA8D;IAC9D,iBAAiB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,CAAC;IAC9D,wCAAwC;IACxC,eAAe,EAAE,OAAO,CAAC;IACzB,oCAAoC;IACpC,WAAW,EAAE,OAAO,CAAC;IACrB,iDAAiD;IACjD,eAAe,EAAE,OAAO,CAAC;IACzB,kDAAkD;IAClD,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,uBAAuB,GAAG,SAAS,CAAC;IAClE,kDAAkD;IAClD,gBAAgB,EAAE,OAAO,CAAC;IAC1B,8DAA8D;IAC9D,UAAU,EAAE,CACV,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,WAAW,KAChB,OAAO,CAAC,8BAA8B,GAAG,SAAS,CAAC,CAAC;IACzD,gEAAgE;IAChE,KAAK,EAAE,uBAAuB,CAAC;IAC/B,gFAAgF;IAChF,SAAS,EAAE,CAAC,OAAO,EAAE,wBAAwB,EAAE,KAAK,IAAI,CAAC;IACzD,0EAA0E;IAC1E,SAAS,EAAE,CACT,OAAO,EAAE,yBAAyB,EAClC,EAAE,EAAE,MAAM,EACV,KAAK,CAAC,EAAE,OAAO,KACZ,IAAI,CAAC;CACX;AACD,oEAAoE;AACpE,MAAM,WAAW,2BAA2B;IAC1C,2DAA2D;IAC3D,0BAA0B,EAAE,OAAO,CAAC;IACpC,iDAAiD;IACjD,mBAAmB,EAAE,OAAO,CAAC;CAC9B;AAQD,6FAA6F;AAC7F,eAAO,MAAM,qBAAqB,GAChC,SAAS,4BAA4B,KACpC,2BAsLF,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { useEffect as e, useRef as t, useState as n } from "react";
|
|
2
|
+
//#region src/conversation/useEntityPreselection/useEntityPreselection.ts
|
|
3
|
+
var r = /* @__PURE__ */ function(e) {
|
|
4
|
+
return e.Deployment = "deployment", e.Skill = "skill", e.Prompt = "prompt", e;
|
|
5
|
+
}({}), i = /* @__PURE__ */ function(e) {
|
|
6
|
+
return e.DeploymentUnavailable = "deployment-unavailable", e.DeploymentsLoadFailed = "deployments-load-failed", e.SkillUnavailable = "skill-unavailable", e.SkillsLoadFailed = "skills-load-failed", e.PromptUnavailable = "prompt-unavailable", e;
|
|
7
|
+
}({}), a = (r) => {
|
|
8
|
+
let [i] = n(r.snapshot), a = (e, t) => !i.isDisabled && t !== null && !i.superseded.includes(e), [o, s] = n(() => a("deployment", i.deploymentId) ? "pending" : "idle"), [c, l] = n(() => ({ status: a("skill", i.skillId) ? "pending" : "idle" })), [u, d] = n(() => ({ status: a("prompt", i.promptId) ? "pending" : "idle" })), f = t(r);
|
|
9
|
+
e(() => {
|
|
10
|
+
f.current = r;
|
|
11
|
+
});
|
|
12
|
+
let p = t(!1), m = t(!1), h = t(!1), g = t(!1), _ = t(!1);
|
|
13
|
+
return e(() => {
|
|
14
|
+
if (i.isDisabled || p.current) return;
|
|
15
|
+
p.current = !0;
|
|
16
|
+
let e = {
|
|
17
|
+
deployment: i.deploymentId,
|
|
18
|
+
skill: i.skillId,
|
|
19
|
+
prompt: i.promptId
|
|
20
|
+
};
|
|
21
|
+
f.current.onConsume(i.superseded.filter((t) => !!e[t]));
|
|
22
|
+
}, [i]), e(() => {
|
|
23
|
+
if (o !== "pending" || r.isDeploymentsLoading || m.current) return;
|
|
24
|
+
m.current = !0;
|
|
25
|
+
let e = i.deploymentId ?? "", t = f.current, n = t.resolveDeployment(e);
|
|
26
|
+
n ? (t.sinks.restoreSelectedItemId(n.id), s("resolved")) : (t.onOutcome(t.deploymentsError == null ? "deployment-unavailable" : "deployments-load-failed", e), s("failed")), t.onConsume(["deployment"]);
|
|
27
|
+
}, [
|
|
28
|
+
o,
|
|
29
|
+
r.isDeploymentsLoading,
|
|
30
|
+
r.deploymentsError,
|
|
31
|
+
r.resolveDeployment,
|
|
32
|
+
i.deploymentId
|
|
33
|
+
]), e(() => {
|
|
34
|
+
if (c.status !== "pending" || r.isSkillsLoading || h.current) return;
|
|
35
|
+
h.current = !0;
|
|
36
|
+
let e = i.skillId ?? "", t = f.current, n = t.isSkillsEnabled ? t.resolveSkill(e) : void 0;
|
|
37
|
+
n ? l({
|
|
38
|
+
status: "resolved",
|
|
39
|
+
value: n
|
|
40
|
+
}) : (t.onOutcome(t.isSkillsEnabled && t.skillsError != null ? "skills-load-failed" : "skill-unavailable", e), l({ status: "failed" }), t.onConsume(["skill"]));
|
|
41
|
+
}, [
|
|
42
|
+
c.status,
|
|
43
|
+
r.isSkillsLoading,
|
|
44
|
+
r.skillsError,
|
|
45
|
+
r.isSkillsEnabled,
|
|
46
|
+
r.resolveSkill,
|
|
47
|
+
i.skillId
|
|
48
|
+
]), e(() => {
|
|
49
|
+
if (u.status !== "pending" || g.current) return;
|
|
50
|
+
let e = new AbortController(), t = i.promptId ?? "";
|
|
51
|
+
return (async () => {
|
|
52
|
+
let n, i;
|
|
53
|
+
try {
|
|
54
|
+
n = r.isPromptsEnabled ? await f.current.loadPrompt(t, e.signal) : void 0;
|
|
55
|
+
} catch (e) {
|
|
56
|
+
i = e;
|
|
57
|
+
}
|
|
58
|
+
e.signal.aborted || (g.current = !0, n ? d({
|
|
59
|
+
status: "resolved",
|
|
60
|
+
value: n
|
|
61
|
+
}) : (f.current.onOutcome("prompt-unavailable", t, i), d({ status: "failed" }), f.current.onConsume(["prompt"])));
|
|
62
|
+
})(), () => e.abort();
|
|
63
|
+
}, [
|
|
64
|
+
u.status,
|
|
65
|
+
r.isPromptsEnabled,
|
|
66
|
+
i.promptId
|
|
67
|
+
]), e(() => {
|
|
68
|
+
if (_.current || c.status === "pending" || u.status === "pending" || !c.value && !u.value) return;
|
|
69
|
+
_.current = !0;
|
|
70
|
+
let { sinks: e, onConsume: t } = f.current, n = u.value?.prompt, r = [];
|
|
71
|
+
c.value && n ? (u.value?.hasParameters ? (e.selectSkillByUrl(c.value.url), e.openParametersPopup(n)) : e.seedSkillMentions(`/${c.value.name} ${n.content}`, [{ url: c.value.url }]), r.push("skill", "prompt")) : c.value ? (e.selectSkillByUrl(c.value.url), r.push("skill")) : n && (u.value?.hasParameters ? e.openParametersPopup(n) : e.seedComposerText(n.content), r.push("prompt")), t(r);
|
|
72
|
+
}, [c, u]), {
|
|
73
|
+
isDeploymentOverrideActive: o === "pending" || o === "resolved",
|
|
74
|
+
isDeploymentPending: o === "pending"
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
//#endregion
|
|
78
|
+
export { i as EntityPreselectionOutcome, r as EntityPreselectionSource, a as useEntityPreselection };
|
|
@@ -112,16 +112,10 @@ var o = "button,input,textarea,select,iframe,[role=\"button\"],[contenteditable=
|
|
|
112
112
|
"End",
|
|
113
113
|
"PageUp",
|
|
114
114
|
"PageDown"
|
|
115
|
-
].includes(e.key) || (e.ctrlKey || e.metaKey) && e.key.toLowerCase() === "a"))
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
if (g.current) {
|
|
120
|
-
if (e.key === "Escape") {
|
|
121
|
-
O();
|
|
122
|
-
return;
|
|
123
|
-
}
|
|
124
|
-
if (e.key === "Tab" && !e.shiftKey && !h.current?.contains(document.activeElement)) {
|
|
115
|
+
].includes(e.key) || (e.ctrlKey || e.metaKey) && e.key.toLowerCase() === "a")) r = !0, O(), _.current = null;
|
|
116
|
+
else if (g.current) {
|
|
117
|
+
if (e.key === "Escape") O();
|
|
118
|
+
else if (e.key === "Tab" && !e.shiftKey && !h.current?.contains(document.activeElement)) {
|
|
125
119
|
let t = h.current?.querySelector("button");
|
|
126
120
|
t && (e.preventDefault(), t.focus());
|
|
127
121
|
}
|
|
@@ -6,8 +6,15 @@ export interface TranscribeWithDeploymentParams {
|
|
|
6
6
|
deployment: string;
|
|
7
7
|
signal: AbortSignal;
|
|
8
8
|
}
|
|
9
|
+
/** Upload file MIME policy. */
|
|
10
|
+
export declare enum UploadMimeTypePolicy {
|
|
11
|
+
Preserve = "preserve",
|
|
12
|
+
Normalize = "normalize"
|
|
13
|
+
}
|
|
9
14
|
/** Parameters for {@link useTranscribeAudio}. */
|
|
10
15
|
export interface UseTranscribeAudioParams {
|
|
16
|
+
/** File upload MIME policy; defaults to preserve. */
|
|
17
|
+
uploadMimeTypePolicy?: UploadMimeTypePolicy;
|
|
11
18
|
/** Already-configured generated-client instance used for the ASR-model path. */
|
|
12
19
|
transcriptionApi?: Pick<TranscriptionApi, 'transcribeAudio'>;
|
|
13
20
|
/** Already-configured generated-client instance used to upload the recording. */
|
|
@@ -39,5 +46,5 @@ export interface UseTranscribeAudioResult {
|
|
|
39
46
|
* library's concern — callers translate `AudioTranscriptionErrorReason` at
|
|
40
47
|
* the call site.
|
|
41
48
|
*/
|
|
42
|
-
export declare const useTranscribeAudio: ({ transcriptionApi, filesApi, transcribeWithDeployment, bucket, asrModelId, selectedDeploymentId, maxSizeBytes, }: UseTranscribeAudioParams) => UseTranscribeAudioResult;
|
|
49
|
+
export declare const useTranscribeAudio: ({ transcriptionApi, filesApi, transcribeWithDeployment, bucket, asrModelId, selectedDeploymentId, maxSizeBytes, uploadMimeTypePolicy, }: UseTranscribeAudioParams) => UseTranscribeAudioResult;
|
|
43
50
|
//# sourceMappingURL=useTranscribeAudio.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTranscribeAudio.d.ts","sourceRoot":"","sources":["../../../src/conversation/useTranscribeAudio/useTranscribeAudio.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAShF,6EAA6E;AAC7E,MAAM,WAAW,8BAA8B;IAC7C,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,WAAW,CAAC;CACrB;AAED,iDAAiD;AACjD,MAAM,WAAW,wBAAwB;IACvC,gFAAgF;IAChF,gBAAgB,CAAC,EAAE,IAAI,CAAC,gBAAgB,EAAE,iBAAiB,CAAC,CAAC;IAC7D,iFAAiF;IACjF,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;IACvC;;;;OAIG;IACH,wBAAwB,CAAC,EAAE,CACzB,MAAM,EAAE,8BAA8B,KACnC,OAAO,CAAC,MAAM,CAAC,CAAC;IACrB,uDAAuD;IACvD,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;IAClC,4FAA4F;IAC5F,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uEAAuE;IACvE,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,8EAA8E;IAC9E,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,kDAAkD;AAClD,MAAM,WAAW,wBAAwB;IACvC,sGAAsG;IACtG,eAAe,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;CACvE;AAED;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,GAAI,
|
|
1
|
+
{"version":3,"file":"useTranscribeAudio.d.ts","sourceRoot":"","sources":["../../../src/conversation/useTranscribeAudio/useTranscribeAudio.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAShF,6EAA6E;AAC7E,MAAM,WAAW,8BAA8B;IAC7C,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,WAAW,CAAC;CACrB;AAED,+BAA+B;AAC/B,oBAAY,oBAAoB;IAC9B,QAAQ,aAAa;IACrB,SAAS,cAAc;CACxB;AAED,iDAAiD;AACjD,MAAM,WAAW,wBAAwB;IACvC,qDAAqD;IACrD,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C,gFAAgF;IAChF,gBAAgB,CAAC,EAAE,IAAI,CAAC,gBAAgB,EAAE,iBAAiB,CAAC,CAAC;IAC7D,iFAAiF;IACjF,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;IACvC;;;;OAIG;IACH,wBAAwB,CAAC,EAAE,CACzB,MAAM,EAAE,8BAA8B,KACnC,OAAO,CAAC,MAAM,CAAC,CAAC;IACrB,uDAAuD;IACvD,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;IAClC,4FAA4F;IAC5F,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uEAAuE;IACvE,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,8EAA8E;IAC9E,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,kDAAkD;AAClD,MAAM,WAAW,wBAAwB;IACvC,sGAAsG;IACtG,eAAe,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;CACvE;AAED;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,GAAI,yIAShC,wBAAwB,KAAG,wBAmF7B,CAAC"}
|
|
@@ -3,42 +3,48 @@ import { withTranscriptionRetry as n } from "./transcription-retry.js";
|
|
|
3
3
|
import { normalizeMimeType as r } from "@epam/ai-dial-chat-shared";
|
|
4
4
|
import { useCallback as i } from "react";
|
|
5
5
|
//#region src/conversation/useTranscribeAudio/useTranscribeAudio.ts
|
|
6
|
-
var a =
|
|
7
|
-
|
|
6
|
+
var a = /* @__PURE__ */ function(e) {
|
|
7
|
+
return e.Preserve = "preserve", e.Normalize = "normalize", e;
|
|
8
|
+
}({}), o = ({ transcriptionApi: a, filesApi: o, transcribeWithDeployment: s, bucket: c, asrModelId: l, selectedDeploymentId: u, maxSizeBytes: d, uploadMimeTypePolicy: f = "preserve" }) => ({ transcribeAudio: i(async (i, p) => {
|
|
9
|
+
if (p.throwIfAborted(), !c || !l && !u) throw new e(t.Unavailable);
|
|
8
10
|
if (i.size > d) throw new e(t.TooLarge, d);
|
|
9
11
|
try {
|
|
10
|
-
let d =
|
|
12
|
+
let d = r(i.type), m = f === "normalize" && i.type !== d ? new File([i], i.name, {
|
|
13
|
+
type: d,
|
|
14
|
+
lastModified: i.lastModified
|
|
15
|
+
}) : i, h = `uploads/${(/* @__PURE__ */ new Date()).toISOString().slice(0, 7)}/${encodeURIComponent(i.name)}`, { url: g } = await o.uploadFile({
|
|
11
16
|
bucket: c,
|
|
12
|
-
path:
|
|
13
|
-
file:
|
|
14
|
-
}, { signal:
|
|
15
|
-
|
|
16
|
-
let
|
|
17
|
+
path: h,
|
|
18
|
+
file: m
|
|
19
|
+
}, { signal: p });
|
|
20
|
+
p.throwIfAborted();
|
|
21
|
+
let _ = r(i.type);
|
|
17
22
|
if (l) {
|
|
18
23
|
if (!a) throw new e(t.Unavailable);
|
|
19
24
|
return await n(async () => (await a.transcribeAudio({ transcribeAudioDto: {
|
|
20
|
-
audioUrl:
|
|
21
|
-
mimeType:
|
|
22
|
-
} }, { signal:
|
|
25
|
+
audioUrl: g,
|
|
26
|
+
mimeType: _
|
|
27
|
+
} }, { signal: p })).transcript ?? "", p);
|
|
23
28
|
}
|
|
24
29
|
if (!u || !s) throw new e(t.Unavailable);
|
|
25
30
|
return await n(() => s({
|
|
26
|
-
audioUrl:
|
|
27
|
-
mimeType:
|
|
31
|
+
audioUrl: g,
|
|
32
|
+
mimeType: _,
|
|
28
33
|
deployment: u,
|
|
29
|
-
signal:
|
|
30
|
-
}),
|
|
34
|
+
signal: p
|
|
35
|
+
}), p);
|
|
31
36
|
} catch (n) {
|
|
32
|
-
throw
|
|
37
|
+
throw p.aborted || n instanceof e ? n : new e(t.Failed);
|
|
33
38
|
}
|
|
34
39
|
}, [
|
|
35
40
|
c,
|
|
36
41
|
l,
|
|
37
42
|
u,
|
|
38
43
|
d,
|
|
44
|
+
f,
|
|
39
45
|
o,
|
|
40
46
|
a,
|
|
41
47
|
s
|
|
42
48
|
]) });
|
|
43
49
|
//#endregion
|
|
44
|
-
export { a as useTranscribeAudio };
|
|
50
|
+
export { a as UploadMimeTypePolicy, o as useTranscribeAudio };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** Parameters of `useVisibleConversationIdsReporter`. */
|
|
2
|
+
export interface UseVisibleConversationIdsReporterParams {
|
|
3
|
+
/** Conversations the view lists, by their list resource id. */
|
|
4
|
+
items: readonly {
|
|
5
|
+
id: string;
|
|
6
|
+
}[];
|
|
7
|
+
/** Whether the view is shown; a hidden view reports `null` but keeps its last ids. */
|
|
8
|
+
isVisible: boolean;
|
|
9
|
+
/** Maps a list resource id to the id the rendered panel reports. */
|
|
10
|
+
toPanelConversationId: (id: string) => string;
|
|
11
|
+
/** Registers this view's visible list ids, or `null` to withdraw them; usually from `useConversationTitleEnrichmentController`. */
|
|
12
|
+
setVisibleConversationIds: (viewKey: string, ids: string[] | null) => void;
|
|
13
|
+
}
|
|
14
|
+
/** Returns the panel's visible-ids callback, which registers the matching list ids under this view while it is visible. */
|
|
15
|
+
export declare const useVisibleConversationIdsReporter: ({ items, isVisible, toPanelConversationId, setVisibleConversationIds, }: UseVisibleConversationIdsReporterParams) => ((panelIds: string[]) => void);
|
|
16
|
+
//# sourceMappingURL=useVisibleConversationIdsReporter.d.ts.map
|
package/conversation/useVisibleConversationIdsReporter/useVisibleConversationIdsReporter.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useVisibleConversationIdsReporter.d.ts","sourceRoot":"","sources":["../../../src/conversation/useVisibleConversationIdsReporter/useVisibleConversationIdsReporter.ts"],"names":[],"mappings":"AAEA,yDAAyD;AACzD,MAAM,WAAW,uCAAuC;IACtD,+DAA+D;IAC/D,KAAK,EAAE,SAAS;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACjC,sFAAsF;IACtF,SAAS,EAAE,OAAO,CAAC;IACnB,oEAAoE;IACpE,qBAAqB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,CAAC;IAC9C,mIAAmI;IACnI,yBAAyB,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,KAAK,IAAI,CAAC;CAC5E;AAOD,2HAA2H;AAC3H,eAAO,MAAM,iCAAiC,GAAI,yEAK/C,uCAAuC,KAAG,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,IAAI,CAoCzE,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { useCallback as e, useEffect as t, useId as n, useMemo as r, useRef as i } from "react";
|
|
2
|
+
//#region src/conversation/useVisibleConversationIdsReporter/useVisibleConversationIdsReporter.ts
|
|
3
|
+
var a = ({ items: a, isVisible: o, toPanelConversationId: s, setVisibleConversationIds: c }) => {
|
|
4
|
+
let l = n(), u = r(() => new Map(a.map((e) => [s(e.id), e.id])), [a, s]), d = i([]), f = i(o), p = e(() => {
|
|
5
|
+
c(l, f.current ? d.current : null);
|
|
6
|
+
}, [c, l]), m = e((e) => {
|
|
7
|
+
d.current = e.flatMap((e) => {
|
|
8
|
+
let t = u.get(e);
|
|
9
|
+
return t ? [t] : [];
|
|
10
|
+
}), p();
|
|
11
|
+
}, [u, p]);
|
|
12
|
+
return t(() => {
|
|
13
|
+
f.current = o, p();
|
|
14
|
+
}, [o, p]), t(() => () => c(l, null), [c, l]), m;
|
|
15
|
+
};
|
|
16
|
+
//#endregion
|
|
17
|
+
export { a as useVisibleConversationIdsReporter };
|
package/conversation-overlay.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { e as toOverlayMessages };
|
|
1
|
+
export { toOverlayMessages } from "./conversation/overlay-messages.js";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Stage } from '@epam/ai-dial-chat-shared';
|
|
2
|
+
/**
|
|
3
|
+
* Returns `stages` with citation markup in each stage's `content` prepared
|
|
4
|
+
* for rendering (hidden while streaming, unsupported shapes escaped), keeping
|
|
5
|
+
* every stage without `<cit` markup — and the array itself when none has
|
|
6
|
+
* any — by reference so memoized stage rows are not re-rendered.
|
|
7
|
+
*/
|
|
8
|
+
export declare const prepareStageCitations: (stages: Stage[], isStreaming: boolean) => Stage[];
|
|
9
|
+
//# sourceMappingURL=stage-citations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stage-citations.d.ts","sourceRoot":"","sources":["../../src/conversation-sources/stage-citations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAGvD;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,GAChC,QAAQ,KAAK,EAAE,EACf,aAAa,OAAO,KACnB,KAAK,EAUP,CAAC"}
|