@epam/ai-dial-chat-hooks 1.3.0-dev.5 → 1.3.0-dev.55
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 +30 -0
- package/api-error/api-error.d.ts.map +1 -0
- package/api-transport/create-csrf-middleware.d.ts +15 -0
- package/api-transport/create-csrf-middleware.d.ts.map +1 -0
- package/api-transport/create-unauthorized-middleware.d.ts +40 -0
- package/api-transport/create-unauthorized-middleware.d.ts.map +1 -0
- package/attachment/useAttachmentAction/useAttachmentAction.d.ts +32 -0
- package/attachment/useAttachmentAction/useAttachmentAction.d.ts.map +1 -0
- package/attachment/useAttachmentValidation/useAttachmentValidation.d.ts +50 -0
- package/attachment/useAttachmentValidation/useAttachmentValidation.d.ts.map +1 -0
- package/attachments.d.ts +2 -94
- package/catalog/catalog-derivations.d.ts +27 -0
- package/catalog/catalog-derivations.d.ts.map +1 -0
- package/catalog/catalog-primary-action.d.ts +47 -0
- package/catalog/catalog-primary-action.d.ts.map +1 -0
- package/catalog/create-publish-api.d.ts +32 -0
- package/catalog/create-publish-api.d.ts.map +1 -0
- package/catalog/deployment-endpoint-url.d.ts +19 -0
- package/catalog/deployment-endpoint-url.d.ts.map +1 -0
- package/catalog/deployment-id.d.ts +42 -0
- package/catalog/deployment-id.d.ts.map +1 -0
- package/catalog/entity-details.d.ts +146 -0
- package/catalog/entity-details.d.ts.map +1 -0
- package/catalog/map-deployment-limits-to-catalog.d.ts +34 -0
- package/catalog/map-deployment-limits-to-catalog.d.ts.map +1 -0
- package/catalog/map-deployment-limits-to-input.d.ts +28 -0
- package/catalog/map-deployment-limits-to-input.d.ts.map +1 -0
- package/catalog/map-deployment-to-catalog-item.d.ts +61 -0
- package/catalog/map-deployment-to-catalog-item.d.ts.map +1 -0
- package/catalog/map-entity-details-to-catalog.d.ts +81 -0
- package/catalog/map-entity-details-to-catalog.d.ts.map +1 -0
- package/catalog/map-prompt-to-catalog-item.d.ts +43 -0
- package/catalog/map-prompt-to-catalog-item.d.ts.map +1 -0
- package/catalog/map-skill-to-catalog-item.d.ts +113 -0
- package/catalog/map-skill-to-catalog-item.d.ts.map +1 -0
- package/catalog/mcp-endpoint-url.d.ts +18 -0
- package/catalog/mcp-endpoint-url.d.ts.map +1 -0
- package/catalog/publish.d.ts +35 -0
- package/catalog/publish.d.ts.map +1 -0
- package/catalog/useApplicationCredentials/useApplicationCredentials.d.ts +19 -0
- package/catalog/useApplicationCredentials/useApplicationCredentials.d.ts.map +1 -0
- package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.d.ts +100 -0
- package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.d.ts.map +1 -0
- package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.js +139 -122
- package/catalog/useCatalogItemDetails.d.ts +70 -0
- package/catalog/useCatalogItemDetails.d.ts.map +1 -0
- package/catalog/useCatalogToolsetCredentials/useCatalogToolsetCredentials.d.ts +76 -0
- package/catalog/useCatalogToolsetCredentials/useCatalogToolsetCredentials.d.ts.map +1 -0
- package/catalog/useFavoriteEntitiesState/useFavoriteEntitiesState.d.ts +37 -0
- package/catalog/useFavoriteEntitiesState/useFavoriteEntitiesState.d.ts.map +1 -0
- package/catalog/usePublishFolders/usePublishFolders.d.ts +73 -0
- package/catalog/usePublishFolders/usePublishFolders.d.ts.map +1 -0
- package/catalog/useSkillDetailsPanelData/useSkillDetailsPanelData.d.ts +54 -0
- package/catalog/useSkillDetailsPanelData/useSkillDetailsPanelData.d.ts.map +1 -0
- package/catalog/useSkillItemDetails.d.ts +64 -0
- package/catalog/useSkillItemDetails.d.ts.map +1 -0
- package/catalog.d.ts +2 -1433
- package/conversation/announcement-message.d.ts +61 -0
- package/conversation/announcement-message.d.ts.map +1 -0
- package/conversation/conversation-transfer/async.d.ts +10 -0
- package/conversation/conversation-transfer/async.d.ts.map +1 -0
- package/conversation/conversation-transfer/attachment-refs.d.ts +42 -0
- package/conversation/conversation-transfer/attachment-refs.d.ts.map +1 -0
- package/conversation/conversation-transfer/build-upload-path.d.ts +42 -0
- package/conversation/conversation-transfer/build-upload-path.d.ts.map +1 -0
- package/conversation/conversation-transfer/date.d.ts +5 -0
- package/conversation/conversation-transfer/date.d.ts.map +1 -0
- package/conversation/conversation-transfer/dial-file-resolve.d.ts +10 -0
- package/conversation/conversation-transfer/dial-file-resolve.d.ts.map +1 -0
- package/conversation/conversation-transfer/export-conversation.d.ts +10 -0
- package/conversation/conversation-transfer/export-conversation.d.ts.map +1 -0
- package/conversation/conversation-transfer/import-conversation.d.ts +106 -0
- package/conversation/conversation-transfer/import-conversation.d.ts.map +1 -0
- package/conversation/conversation-transfer/progress.d.ts +60 -0
- package/conversation/conversation-transfer/progress.d.ts.map +1 -0
- package/conversation/conversation-transfer/queue.d.ts +54 -0
- package/conversation/conversation-transfer/queue.d.ts.map +1 -0
- package/conversation/conversation-transfer/types.d.ts +36 -0
- package/conversation/conversation-transfer/types.d.ts.map +1 -0
- package/conversation/conversation-transfer/zip-export.d.ts +31 -0
- package/conversation/conversation-transfer/zip-export.d.ts.map +1 -0
- package/conversation/conversation-transfer/zip-import.d.ts +17 -0
- package/conversation/conversation-transfer/zip-import.d.ts.map +1 -0
- package/conversation/create-chat-stream-api.d.ts +92 -0
- package/conversation/create-chat-stream-api.d.ts.map +1 -0
- package/conversation/deriveConversationRowActionState/deriveConversationRowActionState.d.ts +39 -0
- package/conversation/deriveConversationRowActionState/deriveConversationRowActionState.d.ts.map +1 -0
- package/conversation/display-name-watch.d.ts +4 -0
- package/conversation/display-name-watch.d.ts.map +1 -0
- package/conversation/footer-message.d.ts +10 -0
- package/conversation/footer-message.d.ts.map +1 -0
- package/conversation/get-model-id-from-conversation-id.d.ts +38 -0
- package/conversation/get-model-id-from-conversation-id.d.ts.map +1 -0
- package/conversation/greeting.d.ts +18 -0
- package/conversation/greeting.d.ts.map +1 -0
- package/conversation/message-factory.d.ts +7 -0
- package/conversation/message-factory.d.ts.map +1 -0
- package/conversation/message-utils.d.ts +67 -0
- package/conversation/message-utils.d.ts.map +1 -0
- package/conversation/overlay-messages.d.ts +5 -0
- package/conversation/overlay-messages.d.ts.map +1 -0
- package/conversation/quick-app-conversation-starters.d.ts +10 -0
- package/conversation/quick-app-conversation-starters.d.ts.map +1 -0
- package/conversation/stage.d.ts +77 -0
- package/conversation/stage.d.ts.map +1 -0
- package/conversation/starter-option.d.ts +21 -0
- package/conversation/starter-option.d.ts.map +1 -0
- package/conversation/useActiveConversationSync/useActiveConversationSync.d.ts +35 -0
- package/conversation/useActiveConversationSync/useActiveConversationSync.d.ts.map +1 -0
- package/conversation/useAsyncConfirmDialog/useAsyncConfirmDialog.d.ts +46 -0
- package/conversation/useAsyncConfirmDialog/useAsyncConfirmDialog.d.ts.map +1 -0
- package/conversation/useAttachmentUpload/useAttachmentUpload.d.ts +27 -0
- package/conversation/useAttachmentUpload/useAttachmentUpload.d.ts.map +1 -0
- package/conversation/useConversationExport/useConversationExport.d.ts +72 -0
- package/conversation/useConversationExport/useConversationExport.d.ts.map +1 -0
- package/conversation/useConversationHandlers/attachment-to-dto.d.ts +7 -0
- package/conversation/useConversationHandlers/attachment-to-dto.d.ts.map +1 -0
- package/conversation/useConversationHandlers/message-factory.d.ts +9 -0
- package/conversation/useConversationHandlers/message-factory.d.ts.map +1 -0
- package/conversation/useConversationHandlers/message-utils.d.ts +38 -0
- package/conversation/useConversationHandlers/message-utils.d.ts.map +1 -0
- package/conversation/useConversationHandlers/starter-option.d.ts +24 -0
- package/conversation/useConversationHandlers/starter-option.d.ts.map +1 -0
- package/conversation/useConversationHandlers/useConversationHandlers.d.ts +66 -0
- package/conversation/useConversationHandlers/useConversationHandlers.d.ts.map +1 -0
- package/conversation/useConversationImport/useConversationImport.d.ts +54 -0
- package/conversation/useConversationImport/useConversationImport.d.ts.map +1 -0
- package/conversation/useConversationLookupMaps/useConversationLookupMaps.d.ts +24 -0
- package/conversation/useConversationLookupMaps/useConversationLookupMaps.d.ts.map +1 -0
- package/conversation/useConversationPanelItems/useConversationPanelItems.d.ts +64 -0
- package/conversation/useConversationPanelItems/useConversationPanelItems.d.ts.map +1 -0
- package/conversation/useConversationScroll/useConversationScroll.d.ts +46 -0
- package/conversation/useConversationScroll/useConversationScroll.d.ts.map +1 -0
- package/conversation/useConversationStream/apply-chunk.d.ts +35 -0
- package/conversation/useConversationStream/apply-chunk.d.ts.map +1 -0
- package/conversation/useConversationStream/buffered-generation.d.ts +15 -0
- package/conversation/useConversationStream/buffered-generation.d.ts.map +1 -0
- package/conversation/useConversationStream/conversation-path.d.ts +7 -0
- package/conversation/useConversationStream/conversation-path.d.ts.map +1 -0
- package/conversation/useConversationStream/frame-scheduler.d.ts +14 -0
- package/conversation/useConversationStream/frame-scheduler.d.ts.map +1 -0
- package/conversation/useConversationStream/generation-resume.d.ts +85 -0
- package/conversation/useConversationStream/generation-resume.d.ts.map +1 -0
- package/conversation/useConversationStream/useConversationStream.d.ts +145 -0
- package/conversation/useConversationStream/useConversationStream.d.ts.map +1 -0
- package/conversation/useImportFilePicker/useImportFilePicker.d.ts +32 -0
- package/conversation/useImportFilePicker/useImportFilePicker.d.ts.map +1 -0
- package/conversation/useMessageSelectionReply/useMessageSelectionReply.d.ts +42 -0
- package/conversation/useMessageSelectionReply/useMessageSelectionReply.d.ts.map +1 -0
- package/conversation/useTranscribeAudio/audio-transcription-error.d.ts +19 -0
- package/conversation/useTranscribeAudio/audio-transcription-error.d.ts.map +1 -0
- package/conversation/useTranscribeAudio/transcription-retry.d.ts +2 -0
- package/conversation/useTranscribeAudio/transcription-retry.d.ts.map +1 -0
- package/conversation/useTranscribeAudio/useTranscribeAudio.d.ts +43 -0
- package/conversation/useTranscribeAudio/useTranscribeAudio.d.ts.map +1 -0
- package/conversation-overlay.d.ts +2 -7
- package/conversation-sources/useConversationSources/useConversationSources.d.ts +20 -0
- package/conversation-sources/useConversationSources/useConversationSources.d.ts.map +1 -0
- package/conversation-sources.d.ts +2 -25
- package/conversation-transfer.d.ts +2 -190
- package/conversation.d.ts +2 -1372
- package/entry-points/attachments.d.ts +3 -0
- package/entry-points/attachments.d.ts.map +1 -0
- package/entry-points/catalog.d.ts +25 -0
- package/entry-points/catalog.d.ts.map +1 -0
- package/entry-points/conversation-overlay.d.ts +2 -0
- package/entry-points/conversation-overlay.d.ts.map +1 -0
- package/entry-points/conversation-sources.d.ts +2 -0
- package/entry-points/conversation-sources.d.ts.map +1 -0
- package/entry-points/conversation-transfer.d.ts +7 -0
- package/entry-points/conversation-transfer.d.ts.map +1 -0
- package/entry-points/conversation.d.ts +33 -0
- package/entry-points/conversation.d.ts.map +1 -0
- package/entry-points/file-manager-canvas.d.ts +2 -0
- package/entry-points/file-manager-canvas.d.ts.map +1 -0
- package/entry-points/file-manager.d.ts +31 -0
- package/entry-points/file-manager.d.ts.map +1 -0
- package/entry-points/mcp-apps.d.ts +6 -0
- package/entry-points/mcp-apps.d.ts.map +1 -0
- package/entry-points/oauth.d.ts +10 -0
- package/entry-points/oauth.d.ts.map +1 -0
- package/entry-points/scheduled-tasks.d.ts +8 -0
- package/entry-points/scheduled-tasks.d.ts.map +1 -0
- package/entry-points/scroll-anchoring.d.ts +2 -0
- package/entry-points/scroll-anchoring.d.ts.map +1 -0
- package/entry-points/sharing.d.ts +3 -0
- package/entry-points/sharing.d.ts.map +1 -0
- package/entry-points/skill-editor.d.ts +9 -0
- package/entry-points/skill-editor.d.ts.map +1 -0
- package/entry-points/skills-state.d.ts +2 -0
- package/entry-points/skills-state.d.ts.map +1 -0
- package/entry-points/source-content.d.ts +2 -0
- package/entry-points/source-content.d.ts.map +1 -0
- package/entry-points/usage-limits.d.ts +8 -0
- package/entry-points/usage-limits.d.ts.map +1 -0
- package/entry-points/usage.d.ts +3 -0
- package/entry-points/usage.d.ts.map +1 -0
- package/entry-points/utils.d.ts +17 -0
- package/entry-points/utils.d.ts.map +1 -0
- package/entry-points/viewport-layout.d.ts +4 -0
- package/entry-points/viewport-layout.d.ts.map +1 -0
- package/file-manager-canvas.d.ts +2 -418
- package/file-manager.d.ts +2 -1237
- package/file-manager.js +25 -25
- package/files/annotation.d.ts +10 -0
- package/files/annotation.d.ts.map +1 -0
- package/files/attachment-canvas.d.ts +123 -0
- package/files/attachment-canvas.d.ts.map +1 -0
- package/files/attachment-dto-to-display.d.ts +10 -0
- package/files/attachment-dto-to-display.d.ts.map +1 -0
- package/files/attachment-types.d.ts +21 -0
- package/files/attachment-types.d.ts.map +1 -0
- package/files/create-files-api.d.ts +52 -0
- package/files/create-files-api.d.ts.map +1 -0
- package/files/create-upload-file-with-progress.d.ts +24 -0
- package/files/create-upload-file-with-progress.d.ts.map +1 -0
- package/files/dial-file-manager-copy-move.util.d.ts +15 -0
- package/files/dial-file-manager-copy-move.util.d.ts.map +1 -0
- package/files/dial-file-manager-mapping.util.d.ts +35 -0
- package/files/dial-file-manager-mapping.util.d.ts.map +1 -0
- package/files/dial-file-manager-path.util.d.ts +48 -0
- package/files/dial-file-manager-path.util.d.ts.map +1 -0
- package/files/dial-file-manager.model.d.ts +36 -0
- package/files/dial-file-manager.model.d.ts.map +1 -0
- package/files/dial-file-manager.model.js +7 -3
- package/files/dial-file-manager.types.d.ts +327 -0
- package/files/dial-file-manager.types.d.ts.map +1 -0
- package/files/dial-file-manager.types.js +1 -1
- package/files/dial-file-to-attachment.d.ts +26 -0
- package/files/dial-file-to-attachment.d.ts.map +1 -0
- package/files/dial-file.d.ts +17 -0
- package/files/dial-file.d.ts.map +1 -0
- package/files/dial-files-api.d.ts +71 -0
- package/files/dial-files-api.d.ts.map +1 -0
- package/files/download-destination.d.ts +31 -0
- package/files/download-destination.d.ts.map +1 -0
- package/files/file-manager-variant.d.ts +3 -0
- package/files/file-manager-variant.d.ts.map +1 -0
- package/files/file-name.d.ts +19 -0
- package/files/file-name.d.ts.map +1 -0
- package/files/prepare-download-destination.d.ts +8 -0
- package/files/prepare-download-destination.d.ts.map +1 -0
- package/files/resolve-dial-file-api-path.d.ts +12 -0
- package/files/resolve-dial-file-api-path.d.ts.map +1 -0
- package/files/source-content.d.ts +28 -0
- package/files/source-content.d.ts.map +1 -0
- package/files/useDialFileListing/useDialFileListing.d.ts +82 -0
- package/files/useDialFileListing/useDialFileListing.d.ts.map +1 -0
- package/files/useDialFileListing/useDialFileListing.js +24 -14
- package/files/useDialFileManager/useDialFileManager.d.ts +16 -0
- package/files/useDialFileManager/useDialFileManager.d.ts.map +1 -0
- package/files/useDialFileManager/useDialFileManager.js +148 -140
- package/files/useDialFileManagerSections/useDialFileManagerSections.d.ts +25 -0
- package/files/useDialFileManagerSections/useDialFileManagerSections.d.ts.map +1 -0
- package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.d.ts +15 -0
- package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.d.ts.map +1 -0
- package/files/useDialFileMetadata/useDialFileMetadata.d.ts +28 -0
- package/files/useDialFileMetadata/useDialFileMetadata.d.ts.map +1 -0
- package/files/useDialFileMutations/useDialFileMutations.d.ts +68 -0
- package/files/useDialFileMutations/useDialFileMutations.d.ts.map +1 -0
- package/files/useDialFileMutations/useDialFileMutations.js +206 -204
- package/files/useDialFileSharing/useDialFileSharing.d.ts +34 -0
- package/files/useDialFileSharing/useDialFileSharing.d.ts.map +1 -0
- package/files/useDialFileSharing/useDialFileSharing.js +45 -39
- package/files/useDialFileUploadBatch/useDialFileUploadBatch.d.ts +47 -0
- package/files/useDialFileUploadBatch/useDialFileUploadBatch.d.ts.map +1 -0
- package/files/useDialFileUploadBatch/useDialFileUploadBatch.js +8 -4
- package/files/useFileAttachmentPicker/useFileAttachmentPicker.d.ts +59 -0
- package/files/useFileAttachmentPicker/useFileAttachmentPicker.d.ts.map +1 -0
- package/index.d.ts +159 -6974
- package/index.d.ts.map +1 -0
- package/index.js +124 -117
- package/mcp-apps/mcp-apps-api-client.d.ts +28 -0
- package/mcp-apps/mcp-apps-api-client.d.ts.map +1 -0
- package/mcp-apps/useMcpAppHostAdapter/useMcpAppHostAdapter.d.ts +14 -0
- package/mcp-apps/useMcpAppHostAdapter/useMcpAppHostAdapter.d.ts.map +1 -0
- package/mcp-apps/useMcpAppHostContext/useMcpAppHostContext.d.ts +29 -0
- package/mcp-apps/useMcpAppHostContext/useMcpAppHostContext.d.ts.map +1 -0
- package/mcp-apps/useMcpAppTools/useMcpAppTools.d.ts +22 -0
- package/mcp-apps/useMcpAppTools/useMcpAppTools.d.ts.map +1 -0
- package/mcp-apps/useOpenMcpAppCanvas/useOpenMcpAppCanvas.d.ts +36 -0
- package/mcp-apps/useOpenMcpAppCanvas/useOpenMcpAppCanvas.d.ts.map +1 -0
- package/mcp-apps.d.ts +2 -256
- package/oauth/authorize-url.d.ts +16 -0
- package/oauth/authorize-url.d.ts.map +1 -0
- package/oauth/handshake.d.ts +30 -0
- package/oauth/handshake.d.ts.map +1 -0
- package/oauth/models.d.ts +81 -0
- package/oauth/models.d.ts.map +1 -0
- package/oauth/popup.d.ts +30 -0
- package/oauth/popup.d.ts.map +1 -0
- package/oauth/toolset-id.d.ts +53 -0
- package/oauth/toolset-id.d.ts.map +1 -0
- package/oauth/types.d.ts +84 -0
- package/oauth/types.d.ts.map +1 -0
- package/oauth/useOAuthCallbackCompletion/useOAuthCallbackCompletion.d.ts +54 -0
- package/oauth/useOAuthCallbackCompletion/useOAuthCallbackCompletion.d.ts.map +1 -0
- package/oauth/useToolsetLogin/useToolsetLogin.d.ts +79 -0
- package/oauth/useToolsetLogin/useToolsetLogin.d.ts.map +1 -0
- package/oauth.d.ts +2 -472
- package/package.json +26 -17
- package/prompt/export-prompt.d.ts +31 -0
- package/prompt/export-prompt.d.ts.map +1 -0
- package/prompt/prompt-resource.d.ts +30 -0
- package/prompt/prompt-resource.d.ts.map +1 -0
- package/prompt/prompt.d.ts +34 -0
- package/prompt/prompt.d.ts.map +1 -0
- package/prompt/usePromptsState/usePromptsState.d.ts +34 -0
- package/prompt/usePromptsState/usePromptsState.d.ts.map +1 -0
- package/scheduled-task/scheduled-task-description.d.ts +38 -0
- package/scheduled-task/scheduled-task-description.d.ts.map +1 -0
- package/scheduled-task/scheduled-task-mapping.d.ts +19 -0
- package/scheduled-task/scheduled-task-mapping.d.ts.map +1 -0
- package/scheduled-task/scheduled-task-preparation.d.ts +19 -0
- package/scheduled-task/scheduled-task-preparation.d.ts.map +1 -0
- package/scheduled-task/scheduled-task-trigger.d.ts +26 -0
- package/scheduled-task/scheduled-task-trigger.d.ts.map +1 -0
- package/scheduled-task/scheduled-tasks-api-client.d.ts +67 -0
- package/scheduled-task/scheduled-tasks-api-client.d.ts.map +1 -0
- package/scheduled-task/use-scheduled-task-runs.d.ts +40 -0
- package/scheduled-task/use-scheduled-task-runs.d.ts.map +1 -0
- package/scheduled-task/use-scheduled-task-runs.js +67 -67
- package/scheduled-task/use-scheduled-tasks.d.ts +28 -0
- package/scheduled-task/use-scheduled-tasks.d.ts.map +1 -0
- package/scheduled-tasks.d.ts +2 -250
- package/scroll-anchoring.d.ts +2 -50
- package/shared/application-schema.d.ts +18 -0
- package/shared/application-schema.d.ts.map +1 -0
- package/shared/application-schema.js +2 -2
- package/shared/browser-timezone.d.ts +7 -0
- package/shared/browser-timezone.d.ts.map +1 -0
- package/shared/cron-day-of-month.d.ts +21 -0
- package/shared/cron-day-of-month.d.ts.map +1 -0
- package/shared/cron-weekday.d.ts +5 -0
- package/shared/cron-weekday.d.ts.map +1 -0
- package/shared/custom-apps.d.ts +7 -0
- package/shared/custom-apps.d.ts.map +1 -0
- package/shared/external-services.d.ts +16 -0
- package/shared/external-services.d.ts.map +1 -0
- package/shared/formatting.d.ts +5 -0
- package/shared/formatting.d.ts.map +1 -0
- package/shared/locale.d.ts +45 -0
- package/shared/locale.d.ts.map +1 -0
- package/shared/string-utils.d.ts +11 -0
- package/shared/string-utils.d.ts.map +1 -0
- package/shared/toolset-login-events.d.ts +15 -0
- package/shared/toolset-login-events.d.ts.map +1 -0
- package/sharing.d.ts +2 -65
- package/skill/skill-archive.d.ts +7 -0
- package/skill/skill-archive.d.ts.map +1 -0
- package/skill/skill-file-batch-validation.d.ts +70 -0
- package/skill/skill-file-batch-validation.d.ts.map +1 -0
- package/skill/skill-file-preview.d.ts +25 -0
- package/skill/skill-file-preview.d.ts.map +1 -0
- package/skill/skill-manifest.d.ts +28 -0
- package/skill/skill-manifest.d.ts.map +1 -0
- package/skill/skill-types.d.ts +46 -0
- package/skill/skill-types.d.ts.map +1 -0
- package/skill/skill.d.ts +160 -0
- package/skill/skill.d.ts.map +1 -0
- package/skill/useSkillArchiveImport/useSkillArchiveImport.d.ts +65 -0
- package/skill/useSkillArchiveImport/useSkillArchiveImport.d.ts.map +1 -0
- package/skill/useSkillEditorLoad.d.ts +74 -0
- package/skill/useSkillEditorLoad.d.ts.map +1 -0
- package/skill/useSkillEditorSubmit.d.ts +125 -0
- package/skill/useSkillEditorSubmit.d.ts.map +1 -0
- package/skill/useSkillFileActions.d.ts +60 -0
- package/skill/useSkillFileActions.d.ts.map +1 -0
- package/skill/useSkillFilePreview.d.ts +38 -0
- package/skill/useSkillFilePreview.d.ts.map +1 -0
- package/skill/useSkillsState/useSkillsState.d.ts +35 -0
- package/skill/useSkillsState/useSkillsState.d.ts.map +1 -0
- package/skill-editor.d.ts +2 -655
- package/skills-state.d.ts +2 -40
- package/source-content.d.ts +2 -29
- package/usage/map-usage-data-to-dashboard.d.ts +39 -0
- package/usage/map-usage-data-to-dashboard.d.ts.map +1 -0
- package/usage/map-user-usage-to-model-limits.d.ts +62 -0
- package/usage/map-user-usage-to-model-limits.d.ts.map +1 -0
- package/usage/usage-banner-source.d.ts +23 -0
- package/usage/usage-banner-source.d.ts.map +1 -0
- package/usage/usage-banner-source.js +36 -0
- package/usage/usage-period.d.ts +7 -0
- package/usage/usage-period.d.ts.map +1 -0
- package/usage/usage-period.js +6 -0
- package/usage/usage-reset-time.d.ts +69 -0
- package/usage/usage-reset-time.d.ts.map +1 -0
- package/usage/usage-reset-time.js +72 -0
- package/usage/useDeploymentUsageLimits/useDeploymentUsageLimits.d.ts +32 -0
- package/usage/useDeploymentUsageLimits/useDeploymentUsageLimits.d.ts.map +1 -0
- package/usage/useDeploymentUsageLimits/useDeploymentUsageLimits.js +39 -0
- package/usage/useRefreshUsageAfterGeneration/useRefreshUsageAfterGeneration.d.ts +16 -0
- package/usage/useRefreshUsageAfterGeneration/useRefreshUsageAfterGeneration.d.ts.map +1 -0
- package/usage/useRefreshUsageAfterGeneration/useRefreshUsageAfterGeneration.js +14 -0
- package/usage/useUsageData/useUsageData.d.ts +28 -0
- package/usage/useUsageData/useUsageData.d.ts.map +1 -0
- package/usage/useUsageLimitBanner/useUsageLimitBanner.d.ts +56 -0
- package/usage/useUsageLimitBanner/useUsageLimitBanner.d.ts.map +1 -0
- package/usage/useUsageLimitBanner/useUsageLimitBanner.js +67 -0
- package/usage/useUsageLimitBannerDismissal/useUsageLimitBannerDismissal.d.ts +14 -0
- package/usage/useUsageLimitBannerDismissal/useUsageLimitBannerDismissal.d.ts.map +1 -0
- package/usage/useUsageLimitBannerDismissal/useUsageLimitBannerDismissal.js +19 -0
- package/usage-limits.d.ts +2 -0
- package/usage-limits.js +8 -0
- package/usage.d.ts +2 -125
- package/useChatSettingsFormConfig/useChatSettingsFormConfig.d.ts +128 -0
- package/useChatSettingsFormConfig/useChatSettingsFormConfig.d.ts.map +1 -0
- package/usePageFileDrag/usePageFileDrag.d.ts +16 -0
- package/usePageFileDrag/usePageFileDrag.d.ts.map +1 -0
- package/usePanelMaxWidth/usePanelMaxWidth.d.ts +6 -0
- package/usePanelMaxWidth/usePanelMaxWidth.d.ts.map +1 -0
- package/useShareLink/useShareLink.d.ts +23 -0
- package/useShareLink/useShareLink.d.ts.map +1 -0
- package/useShareRecipientsCount/useShareRecipientsCount.d.ts +36 -0
- package/useShareRecipientsCount/useShareRecipientsCount.d.ts.map +1 -0
- package/useToolsMenu/useToolsMenu.d.ts +31 -0
- package/useToolsMenu/useToolsMenu.d.ts.map +1 -0
- package/useViewportWidth/useViewportWidth.d.ts +3 -0
- package/useViewportWidth/useViewportWidth.d.ts.map +1 -0
- package/utils.d.ts +2 -404
- package/utils.js +10 -10
- package/viewport-layout.d.ts +2 -27
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { UsagePeriod as e } from "../usage-period.js";
|
|
2
|
+
import { selectUsageBannerSource as t } from "../usage-banner-source.js";
|
|
3
|
+
import { formatUsageResetShort as n } from "../usage-reset-time.js";
|
|
4
|
+
import { useDeploymentUsageLimits as r } from "../useDeploymentUsageLimits/useDeploymentUsageLimits.js";
|
|
5
|
+
import { useRefreshUsageAfterGeneration as i } from "../useRefreshUsageAfterGeneration/useRefreshUsageAfterGeneration.js";
|
|
6
|
+
import { useUsageLimitBannerDismissal as a } from "../useUsageLimitBannerDismissal/useUsageLimitBannerDismissal.js";
|
|
7
|
+
import { useCallback as o, useMemo as s } from "react";
|
|
8
|
+
import { UsageLimitBannerSeverity as c } from "@epam/ai-dial-conversation-input";
|
|
9
|
+
//#region src/usage/useUsageLimitBanner/useUsageLimitBanner.ts
|
|
10
|
+
var l = {
|
|
11
|
+
warningDay: "conversationInput.usageBanner.warningDay",
|
|
12
|
+
warningWeek: "conversationInput.usageBanner.warningWeek",
|
|
13
|
+
warningMonth: "conversationInput.usageBanner.warningMonth",
|
|
14
|
+
reachedDay: "conversationInput.usageBanner.reachedDay",
|
|
15
|
+
reachedWeek: "conversationInput.usageBanner.reachedWeek",
|
|
16
|
+
reachedMonth: "conversationInput.usageBanner.reachedMonth",
|
|
17
|
+
closeLabel: "conversationInput.usageBanner.closeLabel"
|
|
18
|
+
}, u = {
|
|
19
|
+
[c.Warning]: {
|
|
20
|
+
[e.Day]: l.warningDay,
|
|
21
|
+
[e.Week]: l.warningWeek,
|
|
22
|
+
[e.Month]: l.warningMonth
|
|
23
|
+
},
|
|
24
|
+
[c.Reached]: {
|
|
25
|
+
[e.Day]: l.reachedDay,
|
|
26
|
+
[e.Week]: l.reachedWeek,
|
|
27
|
+
[e.Month]: l.reachedMonth
|
|
28
|
+
}
|
|
29
|
+
}, d = ({ deploymentId: e, isGenerationInProgress: c = !1, getDeploymentLimits: d, warningThresholdPercent: f, activeLocale: p, t: m }) => {
|
|
30
|
+
let { limitsDto: h, isLoading: g, refresh: _ } = r(e, d), { isDismissed: v, dismiss: y } = a();
|
|
31
|
+
i({
|
|
32
|
+
isGenerationInProgress: c,
|
|
33
|
+
isLoading: g,
|
|
34
|
+
refresh: _
|
|
35
|
+
});
|
|
36
|
+
let b = s(() => t(h, f), [h, f]), x = s(() => {
|
|
37
|
+
if (!(b == null || !e)) return {
|
|
38
|
+
dismissalKey: `${e}:${b.period}:${b.severity}`,
|
|
39
|
+
limitText: m(u[b.severity][b.period], { percent: b.usedPercent }),
|
|
40
|
+
reset: n(b.resetsAt, b.period, p, m)
|
|
41
|
+
};
|
|
42
|
+
}, [
|
|
43
|
+
b,
|
|
44
|
+
e,
|
|
45
|
+
p,
|
|
46
|
+
m
|
|
47
|
+
]), S = x?.dismissalKey, C = o(() => {
|
|
48
|
+
S != null && y(S);
|
|
49
|
+
}, [y, S]), w = m(l.closeLabel);
|
|
50
|
+
return { banner: s(() => {
|
|
51
|
+
if (!(b == null || x == null || v(x.dismissalKey))) return {
|
|
52
|
+
severity: b.severity,
|
|
53
|
+
limitText: x.limitText,
|
|
54
|
+
reset: x.reset,
|
|
55
|
+
onClose: C,
|
|
56
|
+
closeAriaLabel: w
|
|
57
|
+
};
|
|
58
|
+
}, [
|
|
59
|
+
b,
|
|
60
|
+
x,
|
|
61
|
+
v,
|
|
62
|
+
C,
|
|
63
|
+
w
|
|
64
|
+
]) };
|
|
65
|
+
};
|
|
66
|
+
//#endregion
|
|
67
|
+
export { l as USAGE_BANNER_I18N_KEYS, d as useUsageLimitBanner };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface UseUsageLimitBannerDismissalResult {
|
|
2
|
+
/** `true` when the banner was dismissed for `key` in this tab. */
|
|
3
|
+
isDismissed: (key: string) => boolean;
|
|
4
|
+
/** Records a dismissal for `key`, hiding every banner that shows it. */
|
|
5
|
+
dismiss: (key: string) => void;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Tab-lifetime, in-memory record of dismissed usage-banner keys
|
|
9
|
+
* (`${deploymentId}:${period}:${severity}`), shared by every composer.
|
|
10
|
+
*/
|
|
11
|
+
export declare const useUsageLimitBannerDismissal: () => UseUsageLimitBannerDismissalResult;
|
|
12
|
+
/** Clears every recorded dismissal. Test isolation only. */
|
|
13
|
+
export declare const resetUsageLimitBannerDismissals: () => void;
|
|
14
|
+
//# sourceMappingURL=useUsageLimitBannerDismissal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useUsageLimitBannerDismissal.d.ts","sourceRoot":"","sources":["../../../src/usage/useUsageLimitBannerDismissal/useUsageLimitBannerDismissal.ts"],"names":[],"mappings":"AA4BA,MAAM,WAAW,kCAAkC;IACjD,kEAAkE;IAClE,WAAW,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;IACtC,wEAAwE;IACxE,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CAChC;AAED;;;GAGG;AACH,eAAO,MAAM,4BAA4B,QACnC,kCAWH,CAAC;AAEJ,4DAA4D;AAC5D,eAAO,MAAM,+BAA+B,QAAO,IAElD,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { useCallback as e, useSyncExternalStore as t } from "react";
|
|
2
|
+
//#region src/usage/useUsageLimitBannerDismissal/useUsageLimitBannerDismissal.ts
|
|
3
|
+
var n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), i = (e) => {
|
|
4
|
+
n = e, r.forEach((e) => e());
|
|
5
|
+
}, a = (e) => (r.add(e), () => {
|
|
6
|
+
r.delete(e);
|
|
7
|
+
}), o = () => n, s = () => {
|
|
8
|
+
let r = t(a, o, o);
|
|
9
|
+
return {
|
|
10
|
+
isDismissed: e((e) => r.has(e), [r]),
|
|
11
|
+
dismiss: e((e) => {
|
|
12
|
+
n.has(e) || i(new Set([...n, e]));
|
|
13
|
+
}, [])
|
|
14
|
+
};
|
|
15
|
+
}, c = () => {
|
|
16
|
+
i(/* @__PURE__ */ new Set());
|
|
17
|
+
};
|
|
18
|
+
//#endregion
|
|
19
|
+
export { c as resetUsageLimitBannerDismissals, s as useUsageLimitBannerDismissal };
|
package/usage-limits.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { UsagePeriod as e } from "./usage/usage-period.js";
|
|
2
|
+
import { isCappedStat as t, selectUsageBannerSource as n } from "./usage/usage-banner-source.js";
|
|
3
|
+
import { USAGE_RESET_I18N_KEYS as r, formatUsageResetShort as i, formatUsageResetTime as a } from "./usage/usage-reset-time.js";
|
|
4
|
+
import { useDeploymentUsageLimits as o } from "./usage/useDeploymentUsageLimits/useDeploymentUsageLimits.js";
|
|
5
|
+
import { useRefreshUsageAfterGeneration as s } from "./usage/useRefreshUsageAfterGeneration/useRefreshUsageAfterGeneration.js";
|
|
6
|
+
import { resetUsageLimitBannerDismissals as c, useUsageLimitBannerDismissal as l } from "./usage/useUsageLimitBannerDismissal/useUsageLimitBannerDismissal.js";
|
|
7
|
+
import { USAGE_BANNER_I18N_KEYS as u, useUsageLimitBanner as d } from "./usage/useUsageLimitBanner/useUsageLimitBanner.js";
|
|
8
|
+
export { u as USAGE_BANNER_I18N_KEYS, r as USAGE_RESET_I18N_KEYS, e as UsagePeriod, i as formatUsageResetShort, a as formatUsageResetTime, t as isCappedStat, c as resetUsageLimitBannerDismissals, n as selectUsageBannerSource, o as useDeploymentUsageLimits, s as useRefreshUsageAfterGeneration, d as useUsageLimitBanner, l as useUsageLimitBannerDismissal };
|
package/usage.d.ts
CHANGED
|
@@ -1,125 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { ModelLimitRow } from '@epam/ai-dial-usage-dashboard';
|
|
4
|
-
import { UsageLimitCardData } from '@epam/ai-dial-usage-dashboard';
|
|
5
|
-
import { UserLimitStatsResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
6
|
-
|
|
7
|
-
/** Formats a raw `resetsAt` into display strings, or returns `undefined` when it cannot be formatted. */
|
|
8
|
-
export declare type FormatResetTime = (resetsAt: string | undefined) => ResetTimeDisplay | undefined;
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Maps the same top-level Cost budgets used by the aggregate cards into table-header state.
|
|
12
|
-
*
|
|
13
|
-
* @param formatResetTime - Formats each period's top-level `resetsAt` into the header's reset trio. Omit it to produce statuses with no reset fields.
|
|
14
|
-
*/
|
|
15
|
-
export declare const mapOverallCostLimitsToPeriodStatuses: (usage: UserLimitStatsResponseDto | undefined, activeLocale: string, t: Translate_2, formatResetTime?: FormatResetTime) => ModelLimitPeriodStatuses;
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Maps a `UserLimitStatsResponseDto` into `UsageLimitCardGroup`'s `cards` prop,
|
|
19
|
-
* in Today / This week / This month order. A period is omitted entirely when
|
|
20
|
-
* the response carries no usable stat for it. Each card's reset trio comes from
|
|
21
|
-
* `formatResetTime`, and is absent when that callback returns `undefined`.
|
|
22
|
-
*/
|
|
23
|
-
export declare const mapUsageDataToDashboard: (usage: UserLimitStatsResponseDto | undefined, t: Translate, formatResetTime: FormatResetTime) => UsageLimitCardData[];
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Maps `usage.deployments` into `ModelLimitsSection`'s `rows` prop, joined with model or application
|
|
27
|
-
* identity from `deploymentItems`. Rows are included only when any displayed period stat has nonzero
|
|
28
|
-
* usage (Cost stats only, for an application). Order follows `Object.keys(deployments)` —
|
|
29
|
-
* `deploymentItems` is enrichment-only.
|
|
30
|
-
*
|
|
31
|
-
* @param resolveIconUrl - Resolves a deployment's raw `iconUrl` to the URL the avatar should load.
|
|
32
|
-
* @param resolveDisplayName - Resolves a localized-text map or plain string to the display name for `activeLocale`.
|
|
33
|
-
*/
|
|
34
|
-
export declare const mapUserUsageToModelLimits: (usage: UserLimitStatsResponseDto | undefined, deploymentItems: DeploymentItemDto[], activeLocale: string, t: Translate_2, resolveIconUrl: ResolveIconUrl, resolveDisplayName: ResolveDisplayName) => ModelLimitRow[];
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* One reset time, already parsed and formatted by the host. Declared
|
|
38
|
-
* structurally here so this library never imports an application type; the
|
|
39
|
-
* host passes a value that satisfies this shape (e.g. `apps/chat`'s own
|
|
40
|
-
* `ResetTimeDisplay`).
|
|
41
|
-
*/
|
|
42
|
-
export declare interface ResetTimeDisplay {
|
|
43
|
-
/** Exclusive end of the period as an epoch ms value, for the host's boundary scheduling. */
|
|
44
|
-
resetsAtMs: number;
|
|
45
|
-
/** Machine-readable instant for a `<time dateTime>` attribute. */
|
|
46
|
-
isoValue: string;
|
|
47
|
-
/** Visible reset line. */
|
|
48
|
-
label: string;
|
|
49
|
-
/** Accessible expansion of the reset line. */
|
|
50
|
-
ariaLabel: string;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/** A callback that resolves a display name from a localized-text value. */
|
|
54
|
-
declare type ResolveDisplayName = (name: string | Record<string, string> | undefined | null, locale: string) => string;
|
|
55
|
-
|
|
56
|
-
/** A callback that resolves an icon URL from a deployment's raw `iconUrl` field. */
|
|
57
|
-
declare type ResolveIconUrl = (iconUrl: string | undefined) => string | undefined;
|
|
58
|
-
|
|
59
|
-
/** A translate function compatible with i18next's `TFunction`. */
|
|
60
|
-
declare type Translate = (key: string, options?: Record<string, unknown>) => string;
|
|
61
|
-
|
|
62
|
-
/** A translate function compatible with i18next's `TFunction`. */
|
|
63
|
-
declare type Translate_2 = (key: string, options?: Record<string, unknown>) => string;
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* i18n key strings that the consuming app's translation bundle must define for
|
|
67
|
-
* `mapUsageDataToDashboard` to produce correctly translated strings. The
|
|
68
|
-
* values are the default key paths used by AI DIAL Chat.
|
|
69
|
-
*/
|
|
70
|
-
export declare const USAGE_DATA_I18N_KEYS: {
|
|
71
|
-
/** Title for the current-UTC-day card (e.g. `'Today'`). */
|
|
72
|
-
readonly todayTitle: "usage.todayTitle";
|
|
73
|
-
/** Accessible period description for the current-UTC-day card. */
|
|
74
|
-
readonly todayPeriodDescription: "usage.todayPeriodDescription";
|
|
75
|
-
/** Title for the current-UTC-week card (e.g. `'This week'`). */
|
|
76
|
-
readonly thisWeekTitle: "usage.thisWeekTitle";
|
|
77
|
-
/** Accessible period description for the current-UTC-week card. */
|
|
78
|
-
readonly thisWeekPeriodDescription: "usage.thisWeekPeriodDescription";
|
|
79
|
-
/** Title for the current-UTC-month card (e.g. `'This month'`). */
|
|
80
|
-
readonly thisMonthTitle: "usage.thisMonthTitle";
|
|
81
|
-
/** Accessible period description for the current-UTC-month card. */
|
|
82
|
-
readonly thisMonthPeriodDescription: "usage.thisMonthPeriodDescription";
|
|
83
|
-
/** Aria label when there is no limit. Receives `{ used: string }`. */
|
|
84
|
-
readonly unlimitedProgressAriaLabel: "usage.unlimitedProgressAriaLabel";
|
|
85
|
-
/** Aria label for a progress bar with a finite limit. Receives `{ used: string, total: string, percent: number }`. */
|
|
86
|
-
readonly progressAriaLabel: "usage.progressAriaLabel";
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* i18n key strings that the consuming app's translation bundle must define for
|
|
91
|
-
* `mapUserUsageToModelLimits` and `mapOverallCostLimitsToPeriodStatuses` to produce
|
|
92
|
-
* correctly translated strings. The values are the default key paths used by AI DIAL Chat.
|
|
93
|
-
*/
|
|
94
|
-
export declare const USAGE_MODEL_LIMITS_I18N_KEYS: {
|
|
95
|
-
/** Period label used in tooltip text. Receives no interpolation. */
|
|
96
|
-
readonly todayPeriodDescription: "usage.todayPeriodDescription";
|
|
97
|
-
/** Period label used in tooltip text. Receives no interpolation. */
|
|
98
|
-
readonly thisWeekPeriodDescription: "usage.thisWeekPeriodDescription";
|
|
99
|
-
/** Period label used in tooltip text. Receives no interpolation. */
|
|
100
|
-
readonly thisMonthPeriodDescription: "usage.thisMonthPeriodDescription";
|
|
101
|
-
/** Tooltip when the overall cost limit is running low. Receives `{ period: string }`. */
|
|
102
|
-
readonly overallCostLimitRunningLowTooltip: "usage.overallCostLimitRunningLowTooltip";
|
|
103
|
-
/** Tooltip when the overall cost limit is reached. Receives `{ period: string }`. */
|
|
104
|
-
readonly overallCostLimitReachedTooltip: "usage.overallCostLimitReachedTooltip";
|
|
105
|
-
/** Aria label for a metric cell with no data. */
|
|
106
|
-
readonly unavailableLabel: "usage.unavailableLabel";
|
|
107
|
-
/** Supporting label when a token limit follows the cost limit. */
|
|
108
|
-
readonly followsCostLimitLabel: "usage.followsCostLimitLabel";
|
|
109
|
-
/** Supporting label when there is no per-deployment token limit. */
|
|
110
|
-
readonly noLimitLabel: "usage.noLimitLabel";
|
|
111
|
-
/** Aria label when token usage has no limit but follows the cost limit. Receives `{ used: string }`. */
|
|
112
|
-
readonly followsCostLimitAriaLabel: "usage.followsCostLimitAriaLabel";
|
|
113
|
-
/** Aria label when there is no limit. Receives `{ used: string }`. */
|
|
114
|
-
readonly unlimitedProgressAriaLabel: "usage.unlimitedProgressAriaLabel";
|
|
115
|
-
/** Aria label for a progress bar with a finite limit. Receives `{ used: string, total: string, percent: number }`. */
|
|
116
|
-
readonly progressAriaLabel: "usage.progressAriaLabel";
|
|
117
|
-
/** Label for the spent-cost cell. Receives `{ amount: string }`. */
|
|
118
|
-
readonly spentLabel: "usage.spentLabel";
|
|
119
|
-
/** Type caption for an application (agent) row. Receives no interpolation. */
|
|
120
|
-
readonly applicationTypeLabel: "usage.applicationTypeLabel";
|
|
121
|
-
/** Supporting label on an application row's spent cost. Receives no interpolation. */
|
|
122
|
-
readonly includesCalledModelsLabel: "usage.includesCalledModelsLabel";
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
export { }
|
|
1
|
+
export * from './entry-points/usage.js'
|
|
2
|
+
export {}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { ResponseFormat, Conversation, DeploymentFeatures } from '@epam/ai-dial-chat-shared';
|
|
2
|
+
/** Values emitted by the chat-settings modal when the user clicks Save. */
|
|
3
|
+
export interface ChatSettingsValues {
|
|
4
|
+
/** Updated response format, present when the response-format field was shown. */
|
|
5
|
+
responseFormat?: ResponseFormat;
|
|
6
|
+
/** Updated system prompt, present when the system-prompt field was shown. */
|
|
7
|
+
systemPrompt?: string;
|
|
8
|
+
/** Updated temperature, present when the temperature field was shown. */
|
|
9
|
+
temperature?: number;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Translatable strings the chat-settings form surfaces. Every field defaults
|
|
13
|
+
* to an English fallback inside the hook; pass translated values from the
|
|
14
|
+
* consuming app (e.g. via a `useTranslation`-backed labels hook).
|
|
15
|
+
*/
|
|
16
|
+
export interface ChatSettingsFormLabels {
|
|
17
|
+
/** Dropdown item label and modal title. */
|
|
18
|
+
settings: string;
|
|
19
|
+
/** Toast/message text announced after a successful save. */
|
|
20
|
+
savedNotification: string;
|
|
21
|
+
/** Label for the response-format field. */
|
|
22
|
+
responseFormatLabel: string;
|
|
23
|
+
/** Helper text shown below the response-format field. */
|
|
24
|
+
responseFormatHint: string;
|
|
25
|
+
/** Label for the Markdown radio option. */
|
|
26
|
+
responseFormatMarkdown: string;
|
|
27
|
+
/** Label for the plain-text radio option. */
|
|
28
|
+
responseFormatPlainText: string;
|
|
29
|
+
/** Label for the system-prompt field. */
|
|
30
|
+
systemPromptLabel: string;
|
|
31
|
+
/** Tooltip for the system-prompt field. */
|
|
32
|
+
systemPromptTooltip: string;
|
|
33
|
+
/** Label for the temperature field. */
|
|
34
|
+
temperatureLabel: string;
|
|
35
|
+
/** Label for the precise end of the temperature slider. */
|
|
36
|
+
temperaturePrecise: string;
|
|
37
|
+
/** Label for the neutral midpoint of the temperature slider. */
|
|
38
|
+
temperatureNeutral: string;
|
|
39
|
+
/** Label for the creative end of the temperature slider. */
|
|
40
|
+
temperatureCreative: string;
|
|
41
|
+
/** Hint text shown below the temperature field. */
|
|
42
|
+
temperatureHint: string;
|
|
43
|
+
/** Save button label. */
|
|
44
|
+
saveLabel: string;
|
|
45
|
+
/** Tooltip shown on the disabled Save button. */
|
|
46
|
+
saveDisabledTooltip: string;
|
|
47
|
+
}
|
|
48
|
+
/** Configuration the chat-settings popover/modal consumes. */
|
|
49
|
+
export type UseChatSettingsFormConfigResult = {
|
|
50
|
+
/** Feature flags controlling which fields appear. */
|
|
51
|
+
features: {
|
|
52
|
+
systemPrompt: boolean;
|
|
53
|
+
temperature: boolean;
|
|
54
|
+
responseFormat: boolean;
|
|
55
|
+
};
|
|
56
|
+
/** Current response format pre-selected in the modal. */
|
|
57
|
+
responseFormat: ResponseFormat;
|
|
58
|
+
/** Current system prompt pre-populated in the modal. */
|
|
59
|
+
systemPrompt: string;
|
|
60
|
+
/** Current temperature pre-populated in the modal. */
|
|
61
|
+
temperature: number;
|
|
62
|
+
/** Called with updated values when the user clicks Save. */
|
|
63
|
+
onSave: (values: ChatSettingsValues) => void;
|
|
64
|
+
/** Label for the dropdown menu item. */
|
|
65
|
+
menuItemLabel: string;
|
|
66
|
+
/** Modal title. */
|
|
67
|
+
title: string;
|
|
68
|
+
/** Label for the response-format field. */
|
|
69
|
+
responseFormatLabel: string;
|
|
70
|
+
/** Helper text shown below the response-format field. */
|
|
71
|
+
responseFormatHint: string;
|
|
72
|
+
/** Label for the Markdown radio option. */
|
|
73
|
+
responseFormatMarkdownLabel: string;
|
|
74
|
+
/** Label for the plain-text radio option. */
|
|
75
|
+
responseFormatPlainTextLabel: string;
|
|
76
|
+
/** Label for the system-prompt field. */
|
|
77
|
+
systemPromptLabel: string;
|
|
78
|
+
/** Tooltip for the system-prompt field. */
|
|
79
|
+
systemPromptTooltip: string;
|
|
80
|
+
/** Label for the temperature field. */
|
|
81
|
+
temperatureLabel: string;
|
|
82
|
+
/** Slider endpoint labels, in `[precise, neutral, creative]` order. */
|
|
83
|
+
temperatureLabels: [string, string, string];
|
|
84
|
+
/** Hint text shown below the temperature field. */
|
|
85
|
+
temperatureHint: string;
|
|
86
|
+
/** Save button label. */
|
|
87
|
+
saveLabel: string;
|
|
88
|
+
/** Tooltip shown on the disabled Save button. */
|
|
89
|
+
saveDisabledTooltip: string;
|
|
90
|
+
};
|
|
91
|
+
interface LocalModeValues {
|
|
92
|
+
responseFormat: ResponseFormat;
|
|
93
|
+
systemPrompt: string;
|
|
94
|
+
temperature: number;
|
|
95
|
+
}
|
|
96
|
+
interface LocalModeParams {
|
|
97
|
+
mode: 'local';
|
|
98
|
+
values: LocalModeValues;
|
|
99
|
+
onValuesChange: (values: LocalModeValues) => void;
|
|
100
|
+
deploymentFeatures?: DeploymentFeatures;
|
|
101
|
+
/** True when the selected deployment is a Quick App. Its orchestrator sets its own fixed temperature, so the temperature field is forced off regardless of `deploymentFeatures`. */
|
|
102
|
+
isQuickApp?: boolean;
|
|
103
|
+
}
|
|
104
|
+
interface ConversationModeParams {
|
|
105
|
+
mode: 'conversation';
|
|
106
|
+
conversation: Conversation;
|
|
107
|
+
onConversationChange: (conversation: Conversation) => void;
|
|
108
|
+
deploymentFeatures?: DeploymentFeatures;
|
|
109
|
+
/** True when the conversation's deployment is a Quick App. Its orchestrator sets its own fixed temperature, so the temperature field is forced off regardless of `deploymentFeatures`. */
|
|
110
|
+
isQuickApp?: boolean;
|
|
111
|
+
}
|
|
112
|
+
type Params = LocalModeParams | ConversationModeParams;
|
|
113
|
+
/** Common, host-injected options shared by both modes. */
|
|
114
|
+
interface Options {
|
|
115
|
+
/** Translatable labels. Fields not provided fall back to English defaults. */
|
|
116
|
+
labels?: Partial<ChatSettingsFormLabels>;
|
|
117
|
+
/** Called after a successful save so the host can surface its own toast/notification. */
|
|
118
|
+
onSaved?: () => void;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Assembles the chat-settings form config (feature flags, current values, save
|
|
122
|
+
* handler, labels) for either an in-flight local composer or a persisted
|
|
123
|
+
* conversation. Headless: translation and notifications are the host's
|
|
124
|
+
* responsibility, supplied via `labels` and `onSaved`.
|
|
125
|
+
*/
|
|
126
|
+
export declare const useChatSettingsFormConfig: (params: Params & Options) => UseChatSettingsFormConfigResult;
|
|
127
|
+
export {};
|
|
128
|
+
//# sourceMappingURL=useChatSettingsFormConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useChatSettingsFormConfig.d.ts","sourceRoot":"","sources":["../../src/useChatSettingsFormConfig/useChatSettingsFormConfig.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** Return value of {@link usePageFileDrag}. */
|
|
2
|
+
export interface UsePageFileDragResult {
|
|
3
|
+
/** Whether a file drag is currently over the page. */
|
|
4
|
+
isDragging: boolean;
|
|
5
|
+
/** Files dropped on the page, pending consumption by the caller. */
|
|
6
|
+
pendingFiles: File[];
|
|
7
|
+
/** Clears `pendingFiles` after the caller has processed them. */
|
|
8
|
+
onFilesConsumed: () => void;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Detects files being dragged over the whole page and exposes the dropped
|
|
12
|
+
* files, using only `document`-level drag events with an enter/leave
|
|
13
|
+
* counter to avoid flicker from child-element boundary crossings.
|
|
14
|
+
*/
|
|
15
|
+
export declare const usePageFileDrag: (isAttachmentsAllowed?: boolean, isEnabled?: boolean) => UsePageFileDragResult;
|
|
16
|
+
//# sourceMappingURL=usePageFileDrag.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePageFileDrag.d.ts","sourceRoot":"","sources":["../../src/usePageFileDrag/usePageFileDrag.ts"],"names":[],"mappings":"AAQA,+CAA+C;AAC/C,MAAM,WAAW,qBAAqB;IACpC,sDAAsD;IACtD,UAAU,EAAE,OAAO,CAAC;IACpB,oEAAoE;IACpE,YAAY,EAAE,IAAI,EAAE,CAAC;IACrB,iEAAiE;IACjE,eAAe,EAAE,MAAM,IAAI,CAAC;CAC7B;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAC1B,8BAA2B,EAC3B,mBAAgB,KACf,qBA0EF,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the maximum pixel width a resizable side panel may occupy without
|
|
3
|
+
* collapsing the main content area below `minContentAreaWidth`.
|
|
4
|
+
*/
|
|
5
|
+
export declare const usePanelMaxWidth: (minContentAreaWidth: number) => number;
|
|
6
|
+
//# sourceMappingURL=usePanelMaxWidth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePanelMaxWidth.d.ts","sourceRoot":"","sources":["../../src/usePanelMaxWidth/usePanelMaxWidth.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAAI,qBAAqB,MAAM,KAAG,MAG9D,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ShareApi } from '@epam/ai-dial-chat-api-client';
|
|
2
|
+
import { ShareLinkAccess, ShareLinkData } from '@epam/ai-dial-share';
|
|
3
|
+
/** Result returned by {@link useShareLink}. */
|
|
4
|
+
export interface UseShareLinkResult {
|
|
5
|
+
/** Resolved share-link data, or `undefined` while loading or on error. */
|
|
6
|
+
data: ShareLinkData | undefined;
|
|
7
|
+
/** Whether the share link is still being created. */
|
|
8
|
+
isLoading: boolean;
|
|
9
|
+
/** Set when the share link could not be created. */
|
|
10
|
+
error: Error | null;
|
|
11
|
+
/** Requests a new share link for the given access levels. */
|
|
12
|
+
setAccess: (access: ShareLinkAccess[]) => void;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Resolves and manages share-link data for a DIAL Core resource.
|
|
16
|
+
*
|
|
17
|
+
* Accepts an already-configured `ShareApi` instance — this hook owns only
|
|
18
|
+
* the request lifecycle (loading/error, a stale-response guard, and
|
|
19
|
+
* re-fetch on access change), not the client's base URL, auth, or CSRF
|
|
20
|
+
* setup, which stay the caller's responsibility.
|
|
21
|
+
*/
|
|
22
|
+
export declare const useShareLink: (shareApi: Pick<ShareApi, "createShareLink">, itemId: string, origin?: string) => UseShareLinkResult;
|
|
23
|
+
//# sourceMappingURL=useShareLink.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useShareLink.d.ts","sourceRoot":"","sources":["../../src/useShareLink/useShareLink.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,QAAQ,EACd,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAYrE,+CAA+C;AAC/C,MAAM,WAAW,kBAAkB;IACjC,0EAA0E;IAC1E,IAAI,EAAE,aAAa,GAAG,SAAS,CAAC;IAChC,qDAAqD;IACrD,SAAS,EAAE,OAAO,CAAC;IACnB,oDAAoD;IACpD,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,6DAA6D;IAC7D,SAAS,EAAE,CAAC,MAAM,EAAE,eAAe,EAAE,KAAK,IAAI,CAAC;CAChD;AAcD;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,GACvB,UAAU,IAAI,CAAC,QAAQ,EAAE,iBAAiB,CAAC,EAC3C,QAAQ,MAAM,EACd,SAAQ,MAA+B,KACtC,kBAwDF,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ShareApi } from '@epam/ai-dial-chat-api-client';
|
|
2
|
+
/** Lifecycle of an on-demand recipient-count lookup for one resource. */
|
|
3
|
+
export declare enum RecipientsCountStatus {
|
|
4
|
+
/** Nothing requested yet for this resource. */
|
|
5
|
+
Idle = "idle",
|
|
6
|
+
/** A lookup is in flight. */
|
|
7
|
+
Loading = "loading",
|
|
8
|
+
/** A count came back and is known exactly. */
|
|
9
|
+
Resolved = "resolved",
|
|
10
|
+
/** The lookup failed, so the count is unknown. */
|
|
11
|
+
Unknown = "unknown"
|
|
12
|
+
}
|
|
13
|
+
/** State of one resource's recipient-count lookup. */
|
|
14
|
+
export interface RecipientsCountEntry {
|
|
15
|
+
/** Where the lookup for this resource currently stands. */
|
|
16
|
+
status: RecipientsCountStatus;
|
|
17
|
+
/** Number of users holding access; present only once the status is `Resolved`. */
|
|
18
|
+
count?: number;
|
|
19
|
+
}
|
|
20
|
+
/** Per-resource recipient-count lookups resolved on demand. */
|
|
21
|
+
export interface UseShareRecipientsCountResult {
|
|
22
|
+
/** Starts a lookup for the resource unless one already ran for it. */
|
|
23
|
+
requestRecipientsCount: (itemId: string) => void;
|
|
24
|
+
/** Current lookup state for the resource. */
|
|
25
|
+
getRecipientsCount: (itemId: string) => RecipientsCountEntry;
|
|
26
|
+
/** Drops the resource's cached result so the next request fetches it again. */
|
|
27
|
+
invalidateRecipientsCount: (itemId: string) => void;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Resolves how many users hold shared access to a resource, one resource at
|
|
31
|
+
* a time and only when asked. Accepts an already-configured `ShareApi`
|
|
32
|
+
* instance — this hook owns only the dedup/cache state machine, not the
|
|
33
|
+
* client's base URL, auth, or CSRF setup.
|
|
34
|
+
*/
|
|
35
|
+
export declare const useShareRecipientsCount: (shareApi: Pick<ShareApi, "getShareRecipientsCount">) => UseShareRecipientsCountResult;
|
|
36
|
+
//# sourceMappingURL=useShareRecipientsCount.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useShareRecipientsCount.d.ts","sourceRoot":"","sources":["../../src/useShareRecipientsCount/useShareRecipientsCount.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAG9D,yEAAyE;AACzE,oBAAY,qBAAqB;IAC/B,+CAA+C;IAC/C,IAAI,SAAS;IACb,6BAA6B;IAC7B,OAAO,YAAY;IACnB,8CAA8C;IAC9C,QAAQ,aAAa;IACrB,kDAAkD;IAClD,OAAO,YAAY;CACpB;AAED,sDAAsD;AACtD,MAAM,WAAW,oBAAoB;IACnC,2DAA2D;IAC3D,MAAM,EAAE,qBAAqB,CAAC;IAC9B,kFAAkF;IAClF,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,+DAA+D;AAC/D,MAAM,WAAW,6BAA6B;IAC5C,sEAAsE;IACtE,sBAAsB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,6CAA6C;IAC7C,kBAAkB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,oBAAoB,CAAC;IAC7D,+EAA+E;IAC/E,yBAAyB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CACrD;AAMD;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,GAClC,UAAU,IAAI,CAAC,QAAQ,EAAE,yBAAyB,CAAC,KAClD,6BA0DF,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { DeploymentConfigurationSchema, ToolMenuItem } from '@epam/ai-dial-chat-shared';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
/** Host-supplied inputs to {@link useToolsMenu}. */
|
|
4
|
+
export interface UseToolsMenuParams {
|
|
5
|
+
/** Id of the currently selected deployment, or `null` when none is selected. */
|
|
6
|
+
selectedItemId: string | null;
|
|
7
|
+
/** JSON-schema configuration for the selected deployment, or `null` when none. */
|
|
8
|
+
selectedDeploymentConfiguration: DeploymentConfigurationSchema | null;
|
|
9
|
+
/** Icon element rendered on every tool menu item. Defaults to `null`. */
|
|
10
|
+
toolIcon?: ReactNode;
|
|
11
|
+
}
|
|
12
|
+
/** Result returned by {@link useToolsMenu}. */
|
|
13
|
+
export type UseToolsMenuResult = {
|
|
14
|
+
/** One item per boolean property of the deployment configuration schema, in schema order. */
|
|
15
|
+
toolsMenuItems: ToolMenuItem[];
|
|
16
|
+
/** Toggles the tool with the given id; ignores unknown ids. */
|
|
17
|
+
onToolToggle: (id: string) => void;
|
|
18
|
+
/** Stable record of tool ids to their current on/off state, for completion requests. */
|
|
19
|
+
toolConfigurationValue: Record<string, boolean>;
|
|
20
|
+
/** Restores toggle state from a persisted tool configuration record. */
|
|
21
|
+
restoreToolConfiguration: (configurationValue: Record<string, unknown> | undefined) => void;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Derives the tools submenu from the active deployment's configuration schema:
|
|
25
|
+
* every boolean property becomes a toggle. Manages toggle state locally, resets
|
|
26
|
+
* on deployment change, and exposes a stable `toolConfigurationValue` record for
|
|
27
|
+
* inclusion in completion requests. Headless: the tool icon is the host's
|
|
28
|
+
* responsibility, supplied via `toolIcon`.
|
|
29
|
+
*/
|
|
30
|
+
export declare const useToolsMenu: (params: UseToolsMenuParams) => UseToolsMenuResult;
|
|
31
|
+
//# sourceMappingURL=useToolsMenu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useToolsMenu.d.ts","sourceRoot":"","sources":["../../src/useToolsMenu/useToolsMenu.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,6BAA6B,EAE7B,YAAY,EACb,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;AAEf,oDAAoD;AACpD,MAAM,WAAW,kBAAkB;IACjC,gFAAgF;IAChF,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,kFAAkF;IAClF,+BAA+B,EAAE,6BAA6B,GAAG,IAAI,CAAC;IACtE,yEAAyE;IACzE,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,+CAA+C;AAC/C,MAAM,MAAM,kBAAkB,GAAG;IAC/B,6FAA6F;IAC7F,cAAc,EAAE,YAAY,EAAE,CAAC;IAC/B,+DAA+D;IAC/D,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,wFAAwF;IACxF,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChD,wEAAwE;IACxE,wBAAwB,EAAE,CACxB,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,KACpD,IAAI,CAAC;CACX,CAAC;AAuCF;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,GACvB,QAAQ,kBAAkB,KACzB,kBAuFF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useViewportWidth.d.ts","sourceRoot":"","sources":["../../src/useViewportWidth/useViewportWidth.ts"],"names":[],"mappings":"AAKA,0EAA0E;AAC1E,eAAO,MAAM,gBAAgB,QAAO,MAYnC,CAAC"}
|