@epam/ai-dial-chat-hooks 1.3.0-dev.98 → 1.4.0-dev.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (545) hide show
  1. package/api-error/api-error.d.ts +2 -0
  2. package/api-error/api-error.d.ts.map +1 -1
  3. package/api-error/api-error.js +31 -23
  4. package/api-transport/create-unauthorized-middleware.js +4 -1
  5. package/attachment/attach-constraints.d.ts +31 -0
  6. package/attachment/attach-constraints.d.ts.map +1 -0
  7. package/attachment/attach-constraints.js +18 -0
  8. package/attachment/useAttachmentAction/useAttachmentAction.d.ts +1 -1
  9. package/attachment/useAttachmentAction/useAttachmentAction.d.ts.map +1 -1
  10. package/attachment/useAttachmentAction/useAttachmentAction.js +25 -28
  11. package/attachments.js +2 -1
  12. package/catalog/application-credentials.d.ts +15 -0
  13. package/catalog/application-credentials.d.ts.map +1 -0
  14. package/catalog/application-credentials.js +28 -0
  15. package/catalog/catalog-derivations.d.ts +5 -3
  16. package/catalog/catalog-derivations.d.ts.map +1 -1
  17. package/catalog/catalog-derivations.js +13 -6
  18. package/catalog/catalog-entity-kind.d.ts +31 -0
  19. package/catalog/catalog-entity-kind.d.ts.map +1 -0
  20. package/catalog/catalog-entity-kind.js +21 -0
  21. package/catalog/catalog-preferences.d.ts +8 -0
  22. package/catalog/catalog-preferences.d.ts.map +1 -0
  23. package/catalog/catalog-preferences.js +5 -0
  24. package/catalog/create-publish-api.d.ts +3 -1
  25. package/catalog/create-publish-api.d.ts.map +1 -1
  26. package/catalog/create-publish-api.js +4 -0
  27. package/catalog/deployment-id.d.ts +13 -4
  28. package/catalog/deployment-id.d.ts.map +1 -1
  29. package/catalog/deployment-id.js +17 -3
  30. package/catalog/entity-details.d.ts +2 -0
  31. package/catalog/entity-details.d.ts.map +1 -1
  32. package/catalog/favorite-entity-type.d.ts +5 -0
  33. package/catalog/favorite-entity-type.d.ts.map +1 -0
  34. package/catalog/favorite-entity-type.js +10 -0
  35. package/catalog/map-deployment-limits-to-input.d.ts +4 -3
  36. package/catalog/map-deployment-limits-to-input.d.ts.map +1 -1
  37. package/catalog/map-deployment-limits-to-input.js +3 -4
  38. package/catalog/map-deployment-to-catalog-item.d.ts +12 -1
  39. package/catalog/map-deployment-to-catalog-item.d.ts.map +1 -1
  40. package/catalog/map-deployment-to-catalog-item.js +22 -15
  41. package/catalog/map-entity-details-to-catalog.d.ts.map +1 -1
  42. package/catalog/map-entity-details-to-catalog.js +69 -24
  43. package/catalog/map-skill-to-catalog-item.d.ts +4 -5
  44. package/catalog/map-skill-to-catalog-item.d.ts.map +1 -1
  45. package/catalog/map-skill-to-catalog-item.js +29 -38
  46. package/catalog/publish.d.ts +1 -1
  47. package/catalog/publish.d.ts.map +1 -1
  48. package/catalog/resource-folder.d.ts +8 -0
  49. package/catalog/resource-folder.d.ts.map +1 -0
  50. package/catalog/resource-folder.js +13 -0
  51. package/catalog/resource-name-conflict.d.ts +22 -0
  52. package/catalog/resource-name-conflict.d.ts.map +1 -0
  53. package/catalog/resource-name-conflict.js +32 -0
  54. package/catalog/resource-save-adapter.d.ts +36 -0
  55. package/catalog/resource-save-adapter.d.ts.map +1 -0
  56. package/catalog/resource-save-adapter.js +4 -0
  57. package/catalog/resource-save-adapters.d.ts +93 -0
  58. package/catalog/resource-save-adapters.d.ts.map +1 -0
  59. package/catalog/resource-save-adapters.js +116 -0
  60. package/catalog/resource-save.d.ts +76 -0
  61. package/catalog/resource-save.d.ts.map +1 -0
  62. package/catalog/resource-save.js +52 -0
  63. package/catalog/unpublishable-folders.d.ts +21 -0
  64. package/catalog/unpublishable-folders.d.ts.map +1 -0
  65. package/catalog/unpublishable-folders.js +21 -0
  66. package/catalog/usage-limit-rows.d.ts +14 -0
  67. package/catalog/usage-limit-rows.d.ts.map +1 -0
  68. package/catalog/usage-limit-rows.js +19 -0
  69. package/catalog/use-publish-history.d.ts +19 -0
  70. package/catalog/use-publish-history.d.ts.map +1 -0
  71. package/catalog/use-publish-history.js +25 -0
  72. package/catalog/useApplicationCredentialActions/useApplicationCredentialActions.d.ts +57 -0
  73. package/catalog/useApplicationCredentialActions/useApplicationCredentialActions.d.ts.map +1 -0
  74. package/catalog/useApplicationCredentialActions/useApplicationCredentialActions.js +67 -0
  75. package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.d.ts +15 -5
  76. package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.d.ts.map +1 -1
  77. package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.js +71 -89
  78. package/catalog/useCatalogItemDelete/useCatalogItemDelete.d.ts +41 -0
  79. package/catalog/useCatalogItemDelete/useCatalogItemDelete.d.ts.map +1 -0
  80. package/catalog/useCatalogItemDelete/useCatalogItemDelete.js +37 -0
  81. package/catalog/useCatalogToolsetCredentials/useCatalogToolsetCredentials.d.ts.map +1 -1
  82. package/catalog/useCatalogToolsetCredentials/useCatalogToolsetCredentials.js +72 -77
  83. package/catalog/useFavoriteEntitiesState/useFavoriteEntitiesState.js +1 -1
  84. package/catalog/usePublishFolders/usePublishFolders.d.ts +8 -0
  85. package/catalog/usePublishFolders/usePublishFolders.d.ts.map +1 -1
  86. package/catalog/usePublishFolders/usePublishFolders.js +32 -29
  87. package/catalog/useResourceFolders/useResourceFolders.d.ts +33 -0
  88. package/catalog/useResourceFolders/useResourceFolders.d.ts.map +1 -0
  89. package/catalog/useResourceFolders/useResourceFolders.js +58 -0
  90. package/catalog/useResourceSavePanel/useResourceSavePanel.d.ts +64 -0
  91. package/catalog/useResourceSavePanel/useResourceSavePanel.d.ts.map +1 -0
  92. package/catalog/useResourceSavePanel/useResourceSavePanel.js +173 -0
  93. package/catalog/useSkillItemDetails.js +3 -3
  94. package/catalog/useUnpublishConfirmation/useUnpublishConfirmation.d.ts +43 -0
  95. package/catalog/useUnpublishConfirmation/useUnpublishConfirmation.d.ts.map +1 -0
  96. package/catalog/useUnpublishConfirmation/useUnpublishConfirmation.js +46 -0
  97. package/catalog/useUnpublishableFolders/useUnpublishableFolders.d.ts +22 -0
  98. package/catalog/useUnpublishableFolders/useUnpublishableFolders.d.ts.map +1 -0
  99. package/catalog/useUnpublishableFolders/useUnpublishableFolders.js +53 -0
  100. package/catalog.js +41 -23
  101. package/conversation/conversation-data-source.d.ts +47 -0
  102. package/conversation/conversation-data-source.d.ts.map +1 -0
  103. package/conversation/conversation-data-source.js +11 -0
  104. package/conversation/conversation-draft/conversation-draft-store.js +40 -40
  105. package/conversation/conversation-list.d.ts +6 -0
  106. package/conversation/conversation-list.d.ts.map +1 -0
  107. package/conversation/conversation-list.js +5 -0
  108. package/conversation/conversation-title-stream.d.ts +33 -0
  109. package/conversation/conversation-title-stream.d.ts.map +1 -0
  110. package/conversation/conversation-title-stream.js +103 -0
  111. package/conversation/conversation-transfer/attachment-refs.d.ts +10 -2
  112. package/conversation/conversation-transfer/attachment-refs.d.ts.map +1 -1
  113. package/conversation/conversation-transfer/attachment-refs.js +31 -9
  114. package/conversation/conversation-transfer/export-conversation.d.ts +5 -1
  115. package/conversation/conversation-transfer/export-conversation.d.ts.map +1 -1
  116. package/conversation/conversation-transfer/export-conversation.js +19 -18
  117. package/conversation/conversation-transfer/import-conversation.d.ts +11 -6
  118. package/conversation/conversation-transfer/import-conversation.d.ts.map +1 -1
  119. package/conversation/conversation-transfer/import-conversation.js +65 -69
  120. package/conversation/conversation-transfer/progress.js +1 -1
  121. package/conversation/conversation-transfer/zip-export.js +1 -7
  122. package/conversation/conversation-transfer/zip-import.js +1 -1
  123. package/conversation/create-chat-stream-api.d.ts +19 -4
  124. package/conversation/create-chat-stream-api.d.ts.map +1 -1
  125. package/conversation/create-chat-stream-api.js +67 -61
  126. package/conversation/generation-registry.d.ts +30 -0
  127. package/conversation/generation-registry.d.ts.map +1 -0
  128. package/conversation/generation-registry.js +33 -0
  129. package/conversation/message-utils.d.ts +6 -0
  130. package/conversation/message-utils.d.ts.map +1 -1
  131. package/conversation/message-utils.js +14 -10
  132. package/conversation/scheduled-task-grouping.d.ts +53 -0
  133. package/conversation/scheduled-task-grouping.d.ts.map +1 -0
  134. package/conversation/scheduled-task-grouping.js +45 -0
  135. package/conversation/useActiveConversationSync/useActiveConversationSync.d.ts +4 -2
  136. package/conversation/useActiveConversationSync/useActiveConversationSync.d.ts.map +1 -1
  137. package/conversation/useActiveConversationSync/useActiveConversationSync.js +19 -12
  138. package/conversation/useAttachmentUpload/useAttachmentUpload.d.ts.map +1 -1
  139. package/conversation/useAttachmentUpload/useAttachmentUpload.js +4 -1
  140. package/conversation/useConversationComposerDraft/useConversationComposerDraft.js +1 -5
  141. package/conversation/useConversationDiscovery/useConversationDiscovery.d.ts +22 -0
  142. package/conversation/useConversationDiscovery/useConversationDiscovery.d.ts.map +1 -0
  143. package/conversation/useConversationDiscovery/useConversationDiscovery.js +60 -0
  144. package/conversation/useConversationExport/useConversationExport.d.ts.map +1 -1
  145. package/conversation/useConversationExport/useConversationExport.js +113 -122
  146. package/conversation/useConversationHandlers/message-utils.js +2 -2
  147. package/conversation/useConversationHandlers/useConversationHandlers.js +41 -41
  148. package/conversation/useConversationImport/useConversationImport.js +24 -24
  149. package/conversation/useConversationPanelItems/useConversationPanelItems.d.ts +18 -5
  150. package/conversation/useConversationPanelItems/useConversationPanelItems.d.ts.map +1 -1
  151. package/conversation/useConversationPanelItems/useConversationPanelItems.js +34 -30
  152. package/conversation/useConversationScroll/useConversationScroll.d.ts.map +1 -1
  153. package/conversation/useConversationScroll/useConversationScroll.js +69 -72
  154. package/conversation/useConversationStream/conversation-path.js +2 -2
  155. package/conversation/useConversationStream/conversation-stream.types.d.ts +142 -0
  156. package/conversation/useConversationStream/conversation-stream.types.d.ts.map +1 -0
  157. package/conversation/useConversationStream/frame-scheduler.js +17 -17
  158. package/conversation/useConversationStream/generation-resume.d.ts +32 -2
  159. package/conversation/useConversationStream/generation-resume.d.ts.map +1 -1
  160. package/conversation/useConversationStream/generation-resume.js +114 -121
  161. package/conversation/useConversationStream/stream-errors.d.ts +10 -0
  162. package/conversation/useConversationStream/stream-errors.d.ts.map +1 -0
  163. package/conversation/useConversationStream/stream-errors.js +10 -0
  164. package/conversation/useConversationStream/stream-session.d.ts +51 -0
  165. package/conversation/useConversationStream/stream-session.d.ts.map +1 -0
  166. package/conversation/useConversationStream/stream-session.js +179 -0
  167. package/conversation/useConversationStream/useConversationReloadErrors.d.ts +25 -0
  168. package/conversation/useConversationStream/useConversationReloadErrors.d.ts.map +1 -0
  169. package/conversation/useConversationStream/useConversationReloadErrors.js +38 -0
  170. package/conversation/useConversationStream/useConversationStream.d.ts +3 -136
  171. package/conversation/useConversationStream/useConversationStream.d.ts.map +1 -1
  172. package/conversation/useConversationStream/useConversationStream.js +141 -339
  173. package/conversation/useConversationStream/useStopGeneration.d.ts +29 -0
  174. package/conversation/useConversationStream/useStopGeneration.d.ts.map +1 -0
  175. package/conversation/useConversationStream/useStopGeneration.js +48 -0
  176. package/conversation/useConversationStream/useStreamPathState.d.ts +39 -0
  177. package/conversation/useConversationStream/useStreamPathState.d.ts.map +1 -0
  178. package/conversation/useConversationStream/useStreamPathState.js +55 -0
  179. package/conversation/useConversationTitleEnrichmentController.d.ts +64 -0
  180. package/conversation/useConversationTitleEnrichmentController.d.ts.map +1 -0
  181. package/conversation/useConversationTitleEnrichmentController.js +155 -0
  182. package/conversation/useDeploymentChangeTracking.d.ts +14 -0
  183. package/conversation/useDeploymentChangeTracking.d.ts.map +1 -0
  184. package/conversation/useDeploymentChangeTracking.js +23 -0
  185. package/conversation/useEntityPreselection/useEntityPreselection.d.ts +108 -0
  186. package/conversation/useEntityPreselection/useEntityPreselection.d.ts.map +1 -0
  187. package/conversation/useEntityPreselection/useEntityPreselection.js +78 -0
  188. package/conversation/useMessageSelectionReply/useMessageSelectionReply.js +4 -10
  189. package/conversation/useTranscribeAudio/useTranscribeAudio.d.ts +8 -1
  190. package/conversation/useTranscribeAudio/useTranscribeAudio.d.ts.map +1 -1
  191. package/conversation/useTranscribeAudio/useTranscribeAudio.js +23 -17
  192. package/conversation/useVisibleConversationIdsReporter/useVisibleConversationIdsReporter.d.ts +16 -0
  193. package/conversation/useVisibleConversationIdsReporter/useVisibleConversationIdsReporter.d.ts.map +1 -0
  194. package/conversation/useVisibleConversationIdsReporter/useVisibleConversationIdsReporter.js +17 -0
  195. package/conversation-overlay.js +1 -2
  196. package/conversation-sources/stage-citations.d.ts +9 -0
  197. package/conversation-sources/stage-citations.d.ts.map +1 -0
  198. package/conversation-sources/stage-citations.js +8 -0
  199. package/conversation-sources/useConversationAnnotationPool/useConversationAnnotationPool.d.ts +4 -0
  200. package/conversation-sources/useConversationAnnotationPool/useConversationAnnotationPool.d.ts.map +1 -0
  201. package/conversation-sources/useConversationAnnotationPool/useConversationAnnotationPool.js +5 -0
  202. package/conversation-sources.js +3 -1
  203. package/conversation.js +45 -35
  204. package/entry-points/attachments.d.ts +1 -0
  205. package/entry-points/attachments.d.ts.map +1 -1
  206. package/entry-points/catalog.d.ts +17 -0
  207. package/entry-points/catalog.d.ts.map +1 -1
  208. package/entry-points/conversation-sources.d.ts +2 -0
  209. package/entry-points/conversation-sources.d.ts.map +1 -1
  210. package/entry-points/conversation.d.ts +10 -0
  211. package/entry-points/conversation.d.ts.map +1 -1
  212. package/entry-points/external-services.d.ts +6 -0
  213. package/entry-points/external-services.d.ts.map +1 -0
  214. package/entry-points/file-manager-canvas.d.ts +1 -0
  215. package/entry-points/file-manager-canvas.d.ts.map +1 -1
  216. package/entry-points/file-manager.d.ts +2 -0
  217. package/entry-points/file-manager.d.ts.map +1 -1
  218. package/entry-points/oauth.d.ts +1 -0
  219. package/entry-points/oauth.d.ts.map +1 -1
  220. package/entry-points/offline-credentials.d.ts +2 -0
  221. package/entry-points/offline-credentials.d.ts.map +1 -1
  222. package/entry-points/project.d.ts +20 -0
  223. package/entry-points/project.d.ts.map +1 -0
  224. package/entry-points/scheduled-tasks.d.ts +6 -0
  225. package/entry-points/scheduled-tasks.d.ts.map +1 -1
  226. package/entry-points/sharing.d.ts +4 -0
  227. package/entry-points/sharing.d.ts.map +1 -1
  228. package/entry-points/skill-editor.d.ts +2 -0
  229. package/entry-points/skill-editor.d.ts.map +1 -1
  230. package/entry-points/skills-state.d.ts +1 -0
  231. package/entry-points/skills-state.d.ts.map +1 -1
  232. package/entry-points/usage-limits.d.ts +1 -0
  233. package/entry-points/usage-limits.d.ts.map +1 -1
  234. package/entry-points/utils.d.ts +6 -0
  235. package/entry-points/utils.d.ts.map +1 -1
  236. package/entry-points/viewport-layout.d.ts +1 -0
  237. package/entry-points/viewport-layout.d.ts.map +1 -1
  238. package/external-services/useExternalServiceLogin.d.ts +99 -0
  239. package/external-services/useExternalServiceLogin.d.ts.map +1 -0
  240. package/external-services/useExternalServiceLogin.js +93 -0
  241. package/external-services.d.ts +2 -0
  242. package/external-services.js +5 -0
  243. package/file-manager-canvas.js +3 -2
  244. package/file-manager.js +32 -30
  245. package/files/attachment-canvas.d.ts +12 -0
  246. package/files/attachment-canvas.d.ts.map +1 -1
  247. package/files/attachment-canvas.js +18 -10
  248. package/files/attachment-dto-to-display.d.ts.map +1 -1
  249. package/files/attachment-dto-to-display.js +13 -12
  250. package/files/attachment-types.js +1 -1
  251. package/files/browser-download.d.ts +9 -0
  252. package/files/browser-download.d.ts.map +1 -0
  253. package/files/browser-download.js +23 -0
  254. package/files/create-files-api.d.ts +3 -4
  255. package/files/create-files-api.d.ts.map +1 -1
  256. package/files/create-files-api.js +1 -1
  257. package/files/create-upload-file-with-progress.d.ts +21 -1
  258. package/files/create-upload-file-with-progress.d.ts.map +1 -1
  259. package/files/create-upload-file-with-progress.js +50 -34
  260. package/files/dial-file-manager-copy-move.util.d.ts.map +1 -1
  261. package/files/dial-file-manager-copy-move.util.js +28 -28
  262. package/files/dial-file-manager-mapping.util.d.ts +6 -2
  263. package/files/dial-file-manager-mapping.util.d.ts.map +1 -1
  264. package/files/dial-file-manager-mapping.util.js +85 -72
  265. package/files/dial-file-manager.types.d.ts +15 -5
  266. package/files/dial-file-manager.types.d.ts.map +1 -1
  267. package/files/dial-file-to-attachment.js +3 -3
  268. package/files/dial-file.d.ts +19 -0
  269. package/files/dial-file.d.ts.map +1 -1
  270. package/files/dial-file.js +20 -12
  271. package/files/dial-files-api.d.ts +2 -2
  272. package/files/dial-files-api.d.ts.map +1 -1
  273. package/files/download-progress.d.ts +33 -0
  274. package/files/download-progress.d.ts.map +1 -0
  275. package/files/download-progress.js +28 -0
  276. package/files/source-content.js +1 -1
  277. package/files/useDialFileListing/useDialFileListing.js +51 -66
  278. package/files/useDialFileManager/useDialFileManager.d.ts.map +1 -1
  279. package/files/useDialFileManager/useDialFileManager.js +5 -2
  280. package/files/useDialFileManagerSections/useDialFileManagerSections.d.ts.map +1 -1
  281. package/files/useDialFileManagerSections/useDialFileManagerSections.js +59 -68
  282. package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.js +1 -1
  283. package/files/useDialFileMetadata/useDialFileMetadata.js +3 -3
  284. package/files/useDialFileMutations/useDialFileMutations.d.ts +9 -0
  285. package/files/useDialFileMutations/useDialFileMutations.d.ts.map +1 -1
  286. package/files/useDialFileMutations/useDialFileMutations.js +232 -159
  287. package/files/useDialFilePreview/useDialFilePreview.d.ts +33 -0
  288. package/files/useDialFilePreview/useDialFilePreview.d.ts.map +1 -0
  289. package/files/useDialFilePreview/useDialFilePreview.js +45 -0
  290. package/files/useDialFileUploadBatch/useDialFileUploadBatch.d.ts.map +1 -1
  291. package/files/useDialFileUploadBatch/useDialFileUploadBatch.js +114 -103
  292. package/files/useFileAttachmentModalState/useFileAttachmentModalState.d.ts +25 -0
  293. package/files/useFileAttachmentModalState/useFileAttachmentModalState.d.ts.map +1 -0
  294. package/files/useFileAttachmentModalState/useFileAttachmentModalState.js +19 -0
  295. package/files/useFileAttachmentPicker/useFileAttachmentPicker.js +2 -2
  296. package/files/useUnshareConfirmationState/useUnshareConfirmationState.d.ts +23 -0
  297. package/files/useUnshareConfirmationState/useUnshareConfirmationState.d.ts.map +1 -0
  298. package/files/useUnshareConfirmationState/useUnshareConfirmationState.js +18 -0
  299. package/index.d.ts +81 -0
  300. package/index.d.ts.map +1 -1
  301. package/index.js +244 -163
  302. package/mcp-apps/mcp-apps-api-client.d.ts.map +1 -1
  303. package/mcp-apps/mcp-apps-api-client.js +18 -17
  304. package/mcp-apps/useMcpAppHostContext/useMcpAppHostContext.d.ts +3 -2
  305. package/mcp-apps/useMcpAppHostContext/useMcpAppHostContext.d.ts.map +1 -1
  306. package/mcp-apps/useMcpAppHostContext/useMcpAppHostContext.js +28 -10
  307. package/mcp-apps/useMcpAppTools/useMcpAppTools.d.ts.map +1 -1
  308. package/mcp-apps/useMcpAppTools/useMcpAppTools.js +45 -45
  309. package/oauth/authorize-url.d.ts +7 -1
  310. package/oauth/authorize-url.d.ts.map +1 -1
  311. package/oauth/authorize-url.js +14 -4
  312. package/oauth/callback-exchange.d.ts +49 -0
  313. package/oauth/callback-exchange.d.ts.map +1 -0
  314. package/oauth/callback-exchange.js +29 -0
  315. package/oauth/handshake.js +3 -10
  316. package/oauth/models.d.ts +25 -0
  317. package/oauth/models.d.ts.map +1 -1
  318. package/oauth/toolset-id.d.ts +7 -0
  319. package/oauth/toolset-id.d.ts.map +1 -1
  320. package/oauth/toolset-id.js +9 -2
  321. package/oauth/useOAuthCallbackCompletion/useOAuthCallbackCompletion.js +2 -5
  322. package/oauth/useToolsetLogin/useToolsetLogin.d.ts +7 -1
  323. package/oauth/useToolsetLogin/useToolsetLogin.d.ts.map +1 -1
  324. package/oauth/useToolsetLogin/useToolsetLogin.js +51 -42
  325. package/oauth.js +9 -8
  326. package/offline-credentials/map-offline-credentials-response.d.ts +5 -2
  327. package/offline-credentials/map-offline-credentials-response.d.ts.map +1 -1
  328. package/offline-credentials/map-offline-credentials-response.js +9 -7
  329. package/offline-credentials/scheduled-tasks-login-banner.d.ts +31 -0
  330. package/offline-credentials/scheduled-tasks-login-banner.d.ts.map +1 -0
  331. package/offline-credentials/scheduled-tasks-login-banner.js +17 -0
  332. package/offline-credentials/useOfflineCredentialsGate/useOfflineCredentialsGate.d.ts +5 -1
  333. package/offline-credentials/useOfflineCredentialsGate/useOfflineCredentialsGate.d.ts.map +1 -1
  334. package/offline-credentials/useOfflineCredentialsGate/useOfflineCredentialsGate.js +25 -22
  335. package/offline-credentials/useOfflineCredentialsLogin/useOfflineCredentialsLogin.js +13 -13
  336. package/offline-credentials.js +6 -4
  337. package/package.json +36 -26
  338. package/project/create-project-chat.d.ts +34 -0
  339. package/project/create-project-chat.d.ts.map +1 -0
  340. package/project/create-project-chat.js +27 -0
  341. package/project/project-conversation-data-source.d.ts +36 -0
  342. package/project/project-conversation-data-source.d.ts.map +1 -0
  343. package/project/project-conversation-data-source.js +67 -0
  344. package/project/project-events.d.ts +14 -0
  345. package/project/project-events.d.ts.map +1 -0
  346. package/project/project-events.js +25 -0
  347. package/project/project-file-preview.d.ts +32 -0
  348. package/project/project-file-preview.d.ts.map +1 -0
  349. package/project/project-file-preview.js +25 -0
  350. package/project/project-form-errors.d.ts +23 -0
  351. package/project/project-form-errors.d.ts.map +1 -0
  352. package/project/project-form-errors.js +46 -0
  353. package/project/project-limits.d.ts +17 -0
  354. package/project/project-limits.d.ts.map +1 -0
  355. package/project/project-limits.js +11 -0
  356. package/project/project-mapping.d.ts +16 -0
  357. package/project/project-mapping.d.ts.map +1 -0
  358. package/project/project-mapping.js +43 -0
  359. package/project/project-refresh.d.ts +12 -0
  360. package/project/project-refresh.d.ts.map +1 -0
  361. package/project/project-refresh.js +6 -0
  362. package/project/project-viewed-marks.d.ts +9 -0
  363. package/project/project-viewed-marks.d.ts.map +1 -0
  364. package/project/project-viewed-marks.js +8 -0
  365. package/project/project-watch-stream.d.ts +26 -0
  366. package/project/project-watch-stream.d.ts.map +1 -0
  367. package/project/project-watch-stream.js +39 -0
  368. package/project/projects-api-client.d.ts +179 -0
  369. package/project/projects-api-client.d.ts.map +1 -0
  370. package/project/projects-api-client.js +90 -0
  371. package/project/use-pinned-project-chats.d.ts +58 -0
  372. package/project/use-pinned-project-chats.d.ts.map +1 -0
  373. package/project/use-pinned-project-chats.js +269 -0
  374. package/project/use-project-actions.d.ts +53 -0
  375. package/project/use-project-actions.d.ts.map +1 -0
  376. package/project/use-project-actions.js +92 -0
  377. package/project/use-project-artifacts.d.ts +24 -0
  378. package/project/use-project-artifacts.d.ts.map +1 -0
  379. package/project/use-project-artifacts.js +78 -0
  380. package/project/use-project-conversations.d.ts +32 -0
  381. package/project/use-project-conversations.d.ts.map +1 -0
  382. package/project/use-project-conversations.js +200 -0
  383. package/project/use-project-draft.d.ts +46 -0
  384. package/project/use-project-draft.d.ts.map +1 -0
  385. package/project/use-project-draft.js +54 -0
  386. package/project/use-project-file-preview.d.ts +47 -0
  387. package/project/use-project-file-preview.d.ts.map +1 -0
  388. package/project/use-project-file-preview.js +50 -0
  389. package/project/use-project-submit.d.ts +49 -0
  390. package/project/use-project-submit.d.ts.map +1 -0
  391. package/project/use-project-submit.js +73 -0
  392. package/project/use-project-watch.d.ts +24 -0
  393. package/project/use-project-watch.d.ts.map +1 -0
  394. package/project/use-project-watch.js +41 -0
  395. package/project/use-project.d.ts +23 -0
  396. package/project/use-project.d.ts.map +1 -0
  397. package/project/use-project.js +73 -0
  398. package/project/use-projects.d.ts +27 -0
  399. package/project/use-projects.d.ts.map +1 -0
  400. package/project/use-projects.js +92 -0
  401. package/project.d.ts +2 -0
  402. package/project.js +20 -0
  403. package/prompt/prompt.d.ts +11 -0
  404. package/prompt/prompt.d.ts.map +1 -1
  405. package/prompt/prompt.js +7 -3
  406. package/scheduled-task/active-scheduled-task.d.ts +58 -0
  407. package/scheduled-task/active-scheduled-task.d.ts.map +1 -0
  408. package/scheduled-task/active-scheduled-task.js +18 -0
  409. package/scheduled-task/scheduled-task-description.d.ts +2 -0
  410. package/scheduled-task/scheduled-task-description.d.ts.map +1 -1
  411. package/scheduled-task/scheduled-task-description.js +33 -24
  412. package/scheduled-task/scheduled-task-display.d.ts +106 -0
  413. package/scheduled-task/scheduled-task-display.d.ts.map +1 -0
  414. package/scheduled-task/scheduled-task-display.js +69 -0
  415. package/scheduled-task/scheduled-task-next-occurrence.d.ts +9 -0
  416. package/scheduled-task/scheduled-task-next-occurrence.d.ts.map +1 -0
  417. package/scheduled-task/scheduled-task-next-occurrence.js +20 -0
  418. package/scheduled-task/scheduled-task-preparation.d.ts +1 -1
  419. package/scheduled-task/scheduled-task-trigger.d.ts.map +1 -1
  420. package/scheduled-task/scheduled-task-trigger.js +75 -48
  421. package/scheduled-task/use-scheduled-task-runs.js +19 -31
  422. package/scheduled-task/use-scheduled-tasks.d.ts +2 -2
  423. package/scheduled-task/use-scheduled-tasks.js +1 -1
  424. package/scheduled-task/useActiveScheduledTaskDetails.d.ts +18 -0
  425. package/scheduled-task/useActiveScheduledTaskDetails.d.ts.map +1 -0
  426. package/scheduled-task/useActiveScheduledTaskDetails.js +40 -0
  427. package/scheduled-task/useScheduledTaskSkillDisplayNames/useScheduledTaskSkillDisplayNames.d.ts +17 -0
  428. package/scheduled-task/useScheduledTaskSkillDisplayNames/useScheduledTaskSkillDisplayNames.d.ts.map +1 -0
  429. package/scheduled-task/useScheduledTaskSkillDisplayNames/useScheduledTaskSkillDisplayNames.js +29 -0
  430. package/scheduled-task/useStartScheduledTask.d.ts +41 -0
  431. package/scheduled-task/useStartScheduledTask.d.ts.map +1 -0
  432. package/scheduled-task/useStartScheduledTask.js +169 -0
  433. package/scheduled-tasks.js +13 -7
  434. package/scroll-anchoring.js +1 -2
  435. package/share-invitation/models.d.ts +46 -0
  436. package/share-invitation/models.d.ts.map +1 -0
  437. package/share-invitation/share-invitation-error.d.ts +6 -0
  438. package/share-invitation/share-invitation-error.d.ts.map +1 -0
  439. package/share-invitation/share-invitation-error.js +37 -0
  440. package/share-invitation/types.d.ts +10 -0
  441. package/share-invitation/types.d.ts.map +1 -0
  442. package/share-invitation/types.js +6 -0
  443. package/share-invitation/useAcceptShareInvitation/useAcceptShareInvitation.d.ts +9 -0
  444. package/share-invitation/useAcceptShareInvitation/useAcceptShareInvitation.d.ts.map +1 -0
  445. package/share-invitation/useAcceptShareInvitation/useAcceptShareInvitation.js +26 -0
  446. package/shared/application-schema.js +3 -3
  447. package/shared/client-channel.d.ts +53 -0
  448. package/shared/client-channel.d.ts.map +1 -0
  449. package/shared/client-channel.js +6 -0
  450. package/shared/cron-day-of-month.js +10 -10
  451. package/shared/external-services.d.ts +1 -1
  452. package/shared/locale.d.ts +6 -2
  453. package/shared/locale.d.ts.map +1 -1
  454. package/shared/locale.js +4 -4
  455. package/shared/read-sse-events.d.ts +10 -0
  456. package/shared/read-sse-events.d.ts.map +1 -0
  457. package/shared/read-sse-events.js +33 -0
  458. package/shared/serialized-writer.d.ts +12 -0
  459. package/shared/serialized-writer.d.ts.map +1 -0
  460. package/shared/serialized-writer.js +44 -0
  461. package/shared/sleep.d.ts +3 -0
  462. package/shared/sleep.d.ts.map +1 -0
  463. package/shared/sleep.js +13 -0
  464. package/shared/theme-colors.d.ts +16 -0
  465. package/shared/theme-colors.d.ts.map +1 -0
  466. package/shared/theme-colors.js +14 -0
  467. package/shared/url-cleanup.d.ts +18 -0
  468. package/shared/url-cleanup.d.ts.map +1 -0
  469. package/shared/url-cleanup.js +18 -0
  470. package/shared/usage-stat.d.ts +3 -0
  471. package/shared/usage-stat.d.ts.map +1 -0
  472. package/shared/usage-stat.js +4 -0
  473. package/shared/useAppVersionCheck/useAppVersionCheck.d.ts +22 -0
  474. package/shared/useAppVersionCheck/useAppVersionCheck.d.ts.map +1 -0
  475. package/shared/useAppVersionCheck/useAppVersionCheck.js +36 -0
  476. package/shared/usePersistedState/usePersistedState.d.ts +28 -0
  477. package/shared/usePersistedState/usePersistedState.d.ts.map +1 -0
  478. package/shared/usePersistedState/usePersistedState.js +24 -0
  479. package/sharing.js +5 -2
  480. package/signin-interrupt/models.d.ts +48 -0
  481. package/signin-interrupt/models.d.ts.map +1 -0
  482. package/signin-interrupt/signin-row-info.d.ts +10 -0
  483. package/signin-interrupt/signin-row-info.d.ts.map +1 -0
  484. package/signin-interrupt/signin-row-info.js +21 -0
  485. package/signin-interrupt/types.d.ts +28 -0
  486. package/signin-interrupt/types.d.ts.map +1 -0
  487. package/signin-interrupt/types.js +10 -0
  488. package/signin-interrupt/useSigninInterrupt/useSigninInterrupt.d.ts +52 -0
  489. package/signin-interrupt/useSigninInterrupt/useSigninInterrupt.d.ts.map +1 -0
  490. package/signin-interrupt/useSigninInterrupt/useSigninInterrupt.js +270 -0
  491. package/skill/skill-file-batch-validation.d.ts +4 -0
  492. package/skill/skill-file-batch-validation.d.ts.map +1 -1
  493. package/skill/skill-file-batch-validation.js +34 -33
  494. package/skill/skill-lookup.d.ts +20 -0
  495. package/skill/skill-lookup.d.ts.map +1 -0
  496. package/skill/skill-lookup.js +12 -0
  497. package/skill/skill-types.js +1 -1
  498. package/skill/skill.d.ts +5 -1
  499. package/skill/skill.d.ts.map +1 -1
  500. package/skill/skill.js +27 -28
  501. package/skill/useSkillArchiveImport/useSkillArchiveImport.js +1 -7
  502. package/skill/useSkillEditorSubmit.d.ts +15 -1
  503. package/skill/useSkillEditorSubmit.d.ts.map +1 -1
  504. package/skill/useSkillEditorSubmit.js +164 -87
  505. package/skill/useSkillFileActions.d.ts +2 -0
  506. package/skill/useSkillFileActions.d.ts.map +1 -1
  507. package/skill/useSkillFileActions.js +36 -21
  508. package/skill-editor/useSkillFilePreviewSyncController.d.ts +41 -0
  509. package/skill-editor/useSkillFilePreviewSyncController.d.ts.map +1 -0
  510. package/skill-editor/useSkillFilePreviewSyncController.js +58 -0
  511. package/skill-editor/useSkillFileSystemPicker/useSkillFileSystemPicker.d.ts +23 -0
  512. package/skill-editor/useSkillFileSystemPicker/useSkillFileSystemPicker.d.ts.map +1 -0
  513. package/skill-editor/useSkillFileSystemPicker/useSkillFileSystemPicker.js +43 -0
  514. package/skill-editor.js +11 -9
  515. package/skills-state.js +3 -2
  516. package/source-content.js +1 -2
  517. package/usage/map-user-usage-to-model-limits.d.ts.map +1 -1
  518. package/usage/map-user-usage-to-model-limits.js +24 -24
  519. package/usage/usage-banner-source.d.ts +8 -7
  520. package/usage/usage-banner-source.d.ts.map +1 -1
  521. package/usage/usage-banner-source.js +46 -21
  522. package/usage/usage-gauge.d.ts +3 -0
  523. package/usage/usage-gauge.d.ts.map +1 -0
  524. package/usage/usage-gauge.js +4 -0
  525. package/usage/usage-reset-time.d.ts +12 -3
  526. package/usage/usage-reset-time.d.ts.map +1 -1
  527. package/usage/usage-reset-time.js +48 -38
  528. package/usage/useDeploymentUsageLimits/useDeploymentUsageLimits.d.ts +42 -18
  529. package/usage/useDeploymentUsageLimits/useDeploymentUsageLimits.d.ts.map +1 -1
  530. package/usage/useDeploymentUsageLimits/useDeploymentUsageLimits.js +23 -28
  531. package/usage/useUsageLimitBanner/useUsageLimitBanner.d.ts +10 -8
  532. package/usage/useUsageLimitBanner/useUsageLimitBanner.d.ts.map +1 -1
  533. package/usage/useUsageLimitBanner/useUsageLimitBanner.js +28 -25
  534. package/usage/useUsageLimitBannerDismissal/useUsageLimitBannerDismissal.js +1 -1
  535. package/usage-limits.js +10 -8
  536. package/useChatSettingsFormConfig/useChatSettingsFormConfig.d.ts +2 -0
  537. package/useChatSettingsFormConfig/useChatSettingsFormConfig.d.ts.map +1 -1
  538. package/useChatSettingsFormConfig/useChatSettingsFormConfig.js +25 -21
  539. package/usePageFileDrag/usePageFileDrag.js +3 -3
  540. package/useShareLink/useShareLink.js +18 -18
  541. package/utils.js +23 -17
  542. package/viewport-layout/canvas-width.d.ts +39 -0
  543. package/viewport-layout/canvas-width.d.ts.map +1 -0
  544. package/viewport-layout/canvas-width.js +23 -0
  545. package/viewport-layout.js +2 -1
@@ -4,7 +4,10 @@ import { createUploadPathAllocator as n } from "../conversation-transfer/build-u
4
4
  import { AttachmentErrorReason as r } from "@epam/ai-dial-chat-shared";
5
5
  import { useCallback as i, useRef as a } from "react";
6
6
  //#region src/conversation/useAttachmentUpload/useAttachmentUpload.ts
7
- var o = 700, s = 5, c = (e) => t(e.split("/").filter(Boolean).pop() ?? "file").replace(/\.\.+/g, ".").replace(/^\.+/, "") || "file", l = (e) => typeof e == "object" && !!e && "response" in e && e.response?.status === 409, u = ({ filesApi: t, bucket: u, onNetworkError: d, debounceMs: f = o }) => {
7
+ var o = 700, s = 5, c = (e) => {
8
+ let n = e.split("/").filter(Boolean).pop() ?? "file";
9
+ return t(n).replace(/\.\.+/g, ".").replace(/^\.+/, "") || "file";
10
+ }, l = (e) => typeof e == "object" && !!e && "response" in e && e.response?.status === 409, u = ({ filesApi: t, bucket: u, onNetworkError: d, debounceMs: f = o }) => {
8
11
  let p = a([]), m = a(null), h = a(null), g = i((t, r) => {
9
12
  let i = `${t}|${e(r)}`;
10
13
  return h.current?.key !== i && (h.current = {
@@ -54,11 +54,7 @@ var r = 300, i = {
54
54
  }
55
55
  if (!u || !s || (e.isRestored = !0, e.hasUserInput)) return;
56
56
  let t = s.read(c);
57
- if (t) {
58
- e.text = t.text, e.skills = t.skills, g.current(t);
59
- return;
60
- }
61
- m.current && g.current(i);
57
+ t ? (e.text = t.text, e.skills = t.skills, g.current(t)) : m.current && g.current(i);
62
58
  }, [
63
59
  s,
64
60
  c,
@@ -0,0 +1,22 @@
1
+ /** Inputs for a session-scoped discovery retry loop. */
2
+ export interface UseConversationDiscoveryOptions {
3
+ /** Current complete listing. */
4
+ items: readonly {
5
+ id: string;
6
+ }[];
7
+ /** Refreshes the listing. Initial failures propagate to the caller. */
8
+ refresh: () => Promise<void>;
9
+ /** Opaque identity; changing it retires all previous work. */
10
+ sessionKey: unknown;
11
+ /** Converts host IDs to a comparable identity. */
12
+ normalizeId: (id: string) => string;
13
+ /** Receives retry failures for the current session. */
14
+ onError?: (error: unknown) => void;
15
+ /** Additional retries per missing ID. Defaults to five. */
16
+ retryCount?: number;
17
+ /** Delay after settlement, in milliseconds. Defaults to 2000. */
18
+ retryDelayMs?: number;
19
+ }
20
+ /** Refreshes expected conversations using one bounded retry loop per session. */
21
+ export declare const useConversationDiscovery: ({ items: conversations, refresh, sessionKey, normalizeId, onError, retryCount, retryDelayMs, }: UseConversationDiscoveryOptions) => ((expectedIds?: readonly string[]) => Promise<void>);
22
+ //# sourceMappingURL=useConversationDiscovery.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useConversationDiscovery.d.ts","sourceRoot":"","sources":["../../../src/conversation/useConversationDiscovery/useConversationDiscovery.ts"],"names":[],"mappings":"AAYA,wDAAwD;AACxD,MAAM,WAAW,+BAA+B;IAC9C,gCAAgC;IAChC,KAAK,EAAE,SAAS;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACjC,uEAAuE;IACvE,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,8DAA8D;IAC9D,UAAU,EAAE,OAAO,CAAC;IACpB,kDAAkD;IAClD,WAAW,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,CAAC;IACpC,uDAAuD;IACvD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,2DAA2D;IAC3D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iEAAiE;IACjE,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AACD,iFAAiF;AACjF,eAAO,MAAM,wBAAwB,GAAI,gGAQtC,+BAA+B,KAAG,CAAC,CACpC,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,KAC5B,OAAO,CAAC,IAAI,CAAC,CAkFjB,CAAC"}
@@ -0,0 +1,60 @@
1
+ import { useCallback as e, useLayoutEffect as t, useRef as n } from "react";
2
+ //#region src/conversation/useConversationDiscovery/useConversationDiscovery.ts
3
+ var r = 2e3, i = 5, a = ({ items: a, refresh: o, sessionKey: s, normalizeId: c, onError: l, retryCount: u = i, retryDelayMs: d = r }) => {
4
+ let f = n(null), p = n(/* @__PURE__ */ new Set());
5
+ t(() => {
6
+ let e = {
7
+ pending: /* @__PURE__ */ new Map(),
8
+ inFlight: !1,
9
+ retired: !1
10
+ };
11
+ return f.current = e, () => {
12
+ e.retired = !0, clearTimeout(e.timer);
13
+ };
14
+ }, [s]), t(() => {
15
+ p.current = new Set(a.map(({ id: e }) => c(e)));
16
+ }, [a, c]);
17
+ let m = e((e) => {
18
+ let t = () => {
19
+ for (let [t, n] of e.pending) (p.current.has(t) || n === 0) && e.pending.delete(t);
20
+ }, n = () => {
21
+ t(), !(e.retired || e.timer || e.inFlight || e.pending.size === 0) && (e.timer = setTimeout(() => {
22
+ e.timer = void 0, r();
23
+ }, d));
24
+ }, r = async () => {
25
+ if (t(), !(e.retired || e.pending.size === 0)) {
26
+ for (let [t, n] of e.pending) e.pending.set(t, n - 1);
27
+ e.inFlight = !0;
28
+ try {
29
+ await o();
30
+ } catch (t) {
31
+ e.retired || l?.(t);
32
+ } finally {
33
+ e.inFlight = !1, n();
34
+ }
35
+ }
36
+ };
37
+ n();
38
+ }, [
39
+ o,
40
+ l,
41
+ d
42
+ ]);
43
+ return e(async (e = []) => {
44
+ let t = f.current;
45
+ if (t && !t.retired) {
46
+ for (let n of e) {
47
+ let e = c(n);
48
+ !p.current.has(e) && !t.pending.has(e) && t.pending.set(e, u);
49
+ }
50
+ await o(), m(t);
51
+ }
52
+ }, [
53
+ o,
54
+ m,
55
+ c,
56
+ u
57
+ ]);
58
+ };
59
+ //#endregion
60
+ export { a as useConversationDiscovery };
@@ -1 +1 @@
1
- {"version":3,"file":"useConversationExport.d.ts","sourceRoot":"","sources":["../../../src/conversation/useConversationExport/useConversationExport.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,gBAAgB,EACrB,KAAK,QAAQ,EACd,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAGL,KAAK,uBAAuB,EAI7B,MAAM,2BAA2B,CAAC;AAqBnC,OAAO,EACL,sBAAsB,EACtB,KAAK,8BAA8B,EACnC,KAAK,gCAAgC,EAErC,KAAK,gCAAgC,EAEtC,MAAM,gCAAgC,CAAC;AASxC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,yBAAyB,QAAoB,CAAC;AA2E3D,UAAU,yBAAyB;IACjC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAsBD,oDAAoD;AACpD,MAAM,WAAW,2BAA2B;IAC1C,+EAA+E;IAC/E,gBAAgB,EAAE,IAAI,CACpB,gBAAgB,EAChB,iBAAiB,GAAG,mBAAmB,CACxC,CAAC;IACF,iFAAiF;IACjF,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,iBAAiB,CAAC,CAAC;IAC5C,yFAAyF;IACzF,yBAAyB,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,MAAM,CAAC;IAC9D,2GAA2G;IAC3G,qBAAqB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,yBAAyB,CAAC;IACtE,uFAAuF;IACvF,mBAAmB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACtE;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gDAAgD;IAChD,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,gCAAgC,KAAK,IAAI,CAAC;IAC9D,6FAA6F;IAC7F,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,gCAAgC,KAAK,IAAI,CAAC;IAC9D,+BAA+B;IAC/B,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,8BAA8B,KAAK,IAAI,CAAC;CAC3D;AAED,qDAAqD;AACrD,MAAM,WAAW,2BAA2B;IAC1C,4FAA4F;IAC5F,IAAI,EAAE,uBAAuB,EAAE,CAAC;IAChC,2EAA2E;IAC3E,YAAY,EAAE,CACZ,cAAc,EAAE,MAAM,EACtB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,sBAAsB,KACzB,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,4DAA4D;IAC5D,SAAS,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,sFAAsF;IACtF,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,0FAA0F;IAC1F,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,oFAAoF;IACpF,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,+DAA+D;IAC/D,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,GAAI,wJAUnC,2BAA2B,KAAG,2BAuchC,CAAC"}
1
+ {"version":3,"file":"useConversationExport.d.ts","sourceRoot":"","sources":["../../../src/conversation/useConversationExport/useConversationExport.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,gBAAgB,EACrB,KAAK,QAAQ,EACd,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAGL,KAAK,uBAAuB,EAI7B,MAAM,2BAA2B,CAAC;AAsBnC,OAAO,EACL,sBAAsB,EACtB,KAAK,8BAA8B,EACnC,KAAK,gCAAgC,EAErC,KAAK,gCAAgC,EAEtC,MAAM,gCAAgC,CAAC;AASxC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,yBAAyB,QAAoB,CAAC;AAyD3D,UAAU,yBAAyB;IACjC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAsBD,oDAAoD;AACpD,MAAM,WAAW,2BAA2B;IAC1C,+EAA+E;IAC/E,gBAAgB,EAAE,IAAI,CACpB,gBAAgB,EAChB,iBAAiB,GAAG,mBAAmB,CACxC,CAAC;IACF,iFAAiF;IACjF,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,iBAAiB,CAAC,CAAC;IAC5C,yFAAyF;IACzF,yBAAyB,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,MAAM,CAAC;IAC9D,2GAA2G;IAC3G,qBAAqB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,yBAAyB,CAAC;IACtE,uFAAuF;IACvF,mBAAmB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACtE;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gDAAgD;IAChD,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,gCAAgC,KAAK,IAAI,CAAC;IAC9D,6FAA6F;IAC7F,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,gCAAgC,KAAK,IAAI,CAAC;IAC9D,+BAA+B;IAC/B,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,8BAA8B,KAAK,IAAI,CAAC;CAC3D;AAED,qDAAqD;AACrD,MAAM,WAAW,2BAA2B;IAC1C,4FAA4F;IAC5F,IAAI,EAAE,uBAAuB,EAAE,CAAC;IAChC,2EAA2E;IAC3E,YAAY,EAAE,CACZ,cAAc,EAAE,MAAM,EACtB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,sBAAsB,KACzB,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,4DAA4D;IAC5D,SAAS,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,sFAAsF;IACtF,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,0FAA0F;IAC1F,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,oFAAoF;IACpF,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,+DAA+D;IAC/D,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,GAAI,wJAUnC,2BAA2B,KAAG,2BAuchC,CAAC"}
@@ -1,49 +1,38 @@
1
- import { ConversationExportMode as e, ConversationTransferWarningCode as t, ExportFileNameKind as n } from "../conversation-transfer/types.js";
2
- import { EXPORT_APP_NAME as r, buildExportEnvelope as i, buildExportFileName as a, serializeExportEnvelope as o, stripConversationAttachments as s } from "../conversation-transfer/export-conversation.js";
3
- import { collectAttachmentRefs as c } from "../conversation-transfer/attachment-refs.js";
1
+ import { collectAttachmentRefs as e } from "../conversation-transfer/attachment-refs.js";
2
+ import { ConversationExportMode as t, ConversationTransferWarningCode as n, ExportFileNameKind as r } from "../conversation-transfer/types.js";
3
+ import { EXPORT_APP_NAME as i, buildExportEnvelope as a, buildExportFileName as o, serializeExportEnvelope as s, stripConversationAttachments as c } from "../conversation-transfer/export-conversation.js";
4
4
  import { resolveDialFileBucketAndPath as l } from "../conversation-transfer/dial-file-resolve.js";
5
- import { runWithConcurrency as u } from "../conversation-transfer/async.js";
6
- import { ConversationTransferKind as d, ConversationTransferPhase as f, buildTransferProgress as p } from "../conversation-transfer/progress.js";
7
- import { useConversationTransferQueue as m } from "../conversation-transfer/queue.js";
8
- import { buildDialArchive as h } from "../conversation-transfer/zip-export.js";
9
- import { ConversationTransferErrorCode as g, ConversationTransferSubjectKind as _, ConversationTransferUnitKind as v, triggerBlobDownload as y } from "@epam/ai-dial-chat-shared";
10
- import { useCallback as b } from "react";
11
- import { ResponseError as x } from "@epam/ai-dial-chat-api-client";
5
+ import { sleep as u } from "../../shared/sleep.js";
6
+ import { runWithConcurrency as d } from "../conversation-transfer/async.js";
7
+ import { ConversationTransferKind as f, ConversationTransferPhase as p, buildTransferProgress as m } from "../conversation-transfer/progress.js";
8
+ import { useConversationTransferQueue as h } from "../conversation-transfer/queue.js";
9
+ import { buildDialArchive as g } from "../conversation-transfer/zip-export.js";
10
+ import { ResponseError as _ } from "@epam/ai-dial-chat-api-client";
11
+ import { ConversationTransferErrorCode as v, ConversationTransferSubjectKind as y, ConversationTransferUnitKind as b, triggerBlobDownload as x } from "@epam/ai-dial-chat-shared";
12
+ import { useCallback as S } from "react";
12
13
  //#region src/conversation/useConversationExport/useConversationExport.ts
13
- var S = 5, C = 512 * 1024 * 1024, w = 429, T = 5, E = 2e3, D = (e) => e instanceof x && e.response.status === w, O = (e, t) => {
14
+ var C = 5, w = 536870912, T = 429, E = 5, D = 2e3, O = (e) => e instanceof _ && e.response.status === T, k = (e, t) => {
14
15
  let n = Number(e.response.headers.get("Retry-After"));
15
- return Number.isFinite(n) && n > 0 ? n * 1e3 : E * t;
16
- }, k = (e, t) => new Promise((n) => {
17
- if (t.aborted) {
18
- n();
19
- return;
20
- }
21
- let r = setTimeout(n, e);
22
- t.addEventListener("abort", () => {
23
- clearTimeout(r), n();
24
- }, { once: !0 });
25
- }), A = async (e, t, n) => {
16
+ return Number.isFinite(n) && n > 0 ? n * 1e3 : D * t;
17
+ }, A = async (e, t, n) => {
26
18
  for (let r = 1;; r += 1) try {
27
19
  return await e.getConversation({ path: t }, { signal: n });
28
20
  } catch (e) {
29
- if (n.aborted || !D(e) || r >= T) throw e;
30
- await k(O(e, r), n);
21
+ if (n.aborted || !O(e) || r >= E) throw e;
22
+ await u(k(e, r), n);
31
23
  }
32
- }, j = (e) => !e.sharedWithMe && !e.publishedWithMe, M = (e) => e instanceof RangeError, N = (t) => t === e.WithoutAttachments ? d.ExportSingle : d.ExportSingleWithAttachments, P = ({ conversationsApi: x, filesApi: w, normalizeConversationPath: T, classifyTransferError: E = () => ({}), resolveErrorTraceId: D = async () => void 0, maxArchiveBytes: O = C, onSuccess: k, onWarning: P, onError: F }) => {
33
- let I = m(), L = b(async (e, t, n) => {
24
+ }, j = (e) => !e.sharedWithMe && !e.publishedWithMe, M = (e) => e instanceof RangeError, N = (e) => e === t.WithoutAttachments ? f.ExportSingle : f.ExportSingleWithAttachments, P = ({ conversationsApi: u, filesApi: _, normalizeConversationPath: T, classifyTransferError: E = () => ({}), resolveErrorTraceId: D = async () => void 0, maxArchiveBytes: O = w, onSuccess: k, onWarning: P, onError: F }) => {
25
+ let I = h(), L = S(async (e, t, n) => {
34
26
  let r = !1, i = !1, a = 0, o = () => {
35
27
  a += 1, n(a, e.length);
36
28
  };
37
29
  return {
38
- entries: await u(e, S, async (e) => {
30
+ entries: await d(e, C, async (e) => {
39
31
  if (t.aborted || i) return;
40
32
  let n = l(e.fileId);
41
- if (!n) {
42
- r = !0, o();
43
- return;
44
- }
45
- try {
46
- let e = await w.downloadFileRaw({
33
+ if (!n) r = !0, o();
34
+ else try {
35
+ let e = await _.downloadFileRaw({
47
36
  bucket: n.bucket,
48
37
  path: n.path
49
38
  }, { signal: t }), r = new Uint8Array(await e.raw.arrayBuffer());
@@ -64,98 +53,99 @@ var S = 5, C = 512 * 1024 * 1024, w = 429, T = 5, E = 2e3, D = (e) => e instance
64
53
  anySkipped: !t.aborted && !i && r,
65
54
  isUnauthorized: !t.aborted && i
66
55
  };
67
- }, [E, w]), R = b(async (n, r, a, l, u, d) => {
68
- let m = N(l), _;
56
+ }, [E, _]), R = S(async (r, i, o, l, d, f) => {
57
+ let h = N(l), _;
69
58
  try {
70
- _ = await A(x, T(r), d);
59
+ _ = await A(u, T(i), f);
71
60
  } catch (e) {
72
- if (d.aborted) return;
61
+ if (f.aborted) return;
73
62
  if (E(e).isUnauthorized) F?.({
74
- jobId: n,
75
- code: g.Unauthorized
76
- }), I.failJob(n, g.Unauthorized);
63
+ jobId: r,
64
+ code: v.Unauthorized
65
+ }), I.failJob(r, v.Unauthorized);
77
66
  else {
78
67
  let t = await D(e);
79
68
  F?.({
80
- jobId: n,
81
- code: g.Unknown,
82
- titles: [a],
69
+ jobId: r,
70
+ code: v.Unknown,
71
+ titles: [o],
83
72
  traceId: t
84
- }), I.failJob(n, g.Unknown);
73
+ }), I.failJob(r, v.Unknown);
85
74
  }
86
75
  console.error("Failed to fetch conversation for export", e);
87
76
  return;
88
77
  }
89
- if (!d.aborted) {
90
- I.setJobProgress(n, p({
91
- kind: m,
92
- phase: f.Prepare
78
+ if (!f.aborted) {
79
+ I.setJobProgress(r, m({
80
+ kind: h,
81
+ phase: p.Prepare
93
82
  }));
94
83
  try {
95
- if (l === e.WithoutAttachments) {
96
- y(o(i([s(_)], [])), u), k?.({
97
- jobId: n,
98
- titles: [a]
99
- }), I.succeedJob(n);
84
+ if (l === t.WithoutAttachments) {
85
+ let e = a([c(_)], []), t = s(e);
86
+ x(t, d), k?.({
87
+ jobId: r,
88
+ titles: [o]
89
+ }), I.succeedJob(r);
100
90
  return;
101
91
  }
102
- let r = c(_), { entries: b, anySkipped: x, isUnauthorized: S } = await L(r, d, (e, t) => {
103
- I.setJobProgress(n, p({
104
- kind: m,
105
- phase: f.Transfer,
92
+ let i = e(_), { entries: u, anySkipped: y, isUnauthorized: S } = await L(i, f, (e, t) => {
93
+ I.setJobProgress(r, m({
94
+ kind: h,
95
+ phase: p.Transfer,
106
96
  completed: e,
107
97
  total: t
108
98
  }, {
109
99
  completed: e,
110
100
  total: t,
111
- kind: v.Attachment
101
+ kind: b.Attachment
112
102
  }));
113
103
  });
114
- if (d.aborted) return;
104
+ if (f.aborted) return;
115
105
  if (S) {
116
106
  F?.({
117
- jobId: n,
118
- code: g.Unauthorized
119
- }), I.failJob(n, g.Unauthorized);
107
+ jobId: r,
108
+ code: v.Unauthorized
109
+ }), I.failJob(r, v.Unauthorized);
120
110
  return;
121
111
  }
122
- I.setJobProgress(n, p({
123
- kind: m,
124
- phase: f.Transfer,
125
- completed: r.length,
126
- total: r.length
112
+ I.setJobProgress(r, m({
113
+ kind: h,
114
+ phase: p.Transfer,
115
+ completed: i.length,
116
+ total: i.length
127
117
  }));
128
- let C = b.reduce((e, t) => e + t.data.byteLength, 0);
118
+ let C = u.reduce((e, t) => e + t.data.byteLength, 0);
129
119
  if (C > O) {
130
120
  F?.({
131
- jobId: n,
132
- code: g.FileTooLarge,
133
- titles: [a]
134
- }), I.failJob(n, g.FileTooLarge), console.error(`Refused to build an export archive of ${C} bytes: over the ${O}-byte limit`);
121
+ jobId: r,
122
+ code: v.FileTooLarge,
123
+ titles: [o]
124
+ }), I.failJob(r, v.FileTooLarge), console.error(`Refused to build an export archive of ${C} bytes: over the ${O}-byte limit`);
135
125
  return;
136
126
  }
137
- let { blob: w, skippedPaths: T } = h(i([_], []), b), E = x || T.length > 0;
138
- E && P?.({
139
- jobId: n,
140
- code: t.AttachmentSkipped
141
- }), y(w, u), k?.({
142
- jobId: n,
143
- titles: [a]
144
- }), E ? I.warnJob(n, t.AttachmentSkipped) : I.succeedJob(n);
127
+ let w = a([_], []), { blob: T, skippedPaths: E } = g(w, u), D = y || E.length > 0;
128
+ D && P?.({
129
+ jobId: r,
130
+ code: n.AttachmentSkipped
131
+ }), x(T, d), k?.({
132
+ jobId: r,
133
+ titles: [o]
134
+ }), D ? I.warnJob(r, n.AttachmentSkipped) : I.succeedJob(r);
145
135
  } catch (e) {
146
- if (d.aborted) return;
147
- let t = M(e) ? g.FileTooLarge : g.Unknown, r = await D(e);
136
+ if (f.aborted) return;
137
+ let t = M(e) ? v.FileTooLarge : v.Unknown, n = await D(e);
148
138
  F?.({
149
- jobId: n,
139
+ jobId: r,
150
140
  code: t,
151
- titles: [a],
152
- traceId: r
153
- }), I.failJob(n, t), console.error("Failed to build conversation export archive", e);
141
+ titles: [o],
142
+ traceId: n
143
+ }), I.failJob(r, t), console.error("Failed to build conversation export archive", e);
154
144
  }
155
145
  }
156
146
  }, [
157
147
  E,
158
- x,
148
+ u,
159
149
  L,
160
150
  O,
161
151
  T,
@@ -164,50 +154,50 @@ var S = 5, C = 512 * 1024 * 1024, w = 429, T = 5, E = 2e3, D = (e) => e instance
164
154
  P,
165
155
  I,
166
156
  D
167
- ]), z = b((t, i, o) => {
168
- let s = a(o === e.WithoutAttachments ? n.SingleConversation : n.SingleConversationWithAttachments, r), c = I.addJob({
169
- kind: _.Single,
170
- title: i
157
+ ]), z = S((e, n, a) => {
158
+ let s = o(a === t.WithoutAttachments ? r.SingleConversation : r.SingleConversationWithAttachments, i), c = I.addJob({
159
+ kind: y.Single,
160
+ title: n
171
161
  }, s);
172
- return I.startJob(c, (e) => R(c, t, i, o, s, e));
173
- }, [I, R]), B = b(async (e, t, n) => {
174
- let r = d.ExportAll, a = [], c;
162
+ return I.startJob(c, (t) => R(c, e, n, a, s, t));
163
+ }, [I, R]), B = S(async (e, t, n) => {
164
+ let r = f.ExportAll, i = [], o;
175
165
  do {
176
166
  if (n.aborted) return;
177
167
  let t;
178
168
  try {
179
- t = await x.listConversations({ nextToken: c }, { signal: n });
169
+ t = await u.listConversations({ nextToken: o }, { signal: n });
180
170
  } catch (t) {
181
171
  if (n.aborted) return;
182
172
  if (E(t).isUnauthorized) F?.({
183
173
  jobId: e,
184
- code: g.Unauthorized
185
- }), I.failJob(e, g.Unauthorized);
174
+ code: v.Unauthorized
175
+ }), I.failJob(e, v.Unauthorized);
186
176
  else {
187
177
  let n = await D(t);
188
178
  F?.({
189
179
  jobId: e,
190
- code: g.Unknown,
180
+ code: v.Unknown,
191
181
  traceId: n
192
- }), I.failJob(e, g.Unknown);
182
+ }), I.failJob(e, v.Unknown);
193
183
  }
194
184
  console.error("Failed to list conversations for export", t);
195
185
  return;
196
186
  }
197
- a.push(...t.items.filter(j).map((e) => ({
187
+ i.push(...t.items.filter(j).map((e) => ({
198
188
  id: e.id,
199
189
  title: e.title
200
- }))), c = t.nextToken;
201
- } while (c);
202
- I.setJobProgress(e, p({
190
+ }))), o = t.nextToken;
191
+ } while (o);
192
+ I.setJobProgress(e, m({
203
193
  kind: r,
204
- phase: f.Prepare
194
+ phase: p.Prepare
205
195
  }));
206
196
  let l = [];
207
- for (let t of a) {
197
+ for (let t of i) {
208
198
  if (n.aborted) return;
209
199
  try {
210
- let e = await A(x, T(t.id), n);
200
+ let e = await A(u, T(t.id), n);
211
201
  l.push(e);
212
202
  } catch (r) {
213
203
  if (n.aborted) return;
@@ -215,15 +205,15 @@ var S = 5, C = 512 * 1024 * 1024, w = 429, T = 5, E = 2e3, D = (e) => e instance
215
205
  if (i.isUnauthorized) {
216
206
  F?.({
217
207
  jobId: e,
218
- code: g.Unauthorized
219
- }), I.failJob(e, g.Unauthorized);
208
+ code: v.Unauthorized
209
+ }), I.failJob(e, v.Unauthorized);
220
210
  return;
221
211
  }
222
212
  if (i.isNotFound) {
223
213
  let n = await D(r);
224
214
  F?.({
225
215
  jobId: e,
226
- code: g.NotFound,
216
+ code: v.NotFound,
227
217
  titles: [t.title],
228
218
  traceId: n
229
219
  }), console.error("Skipped a conversation during export-all: not found", r);
@@ -232,27 +222,28 @@ var S = 5, C = 512 * 1024 * 1024, w = 429, T = 5, E = 2e3, D = (e) => e instance
232
222
  let a = await D(r);
233
223
  F?.({
234
224
  jobId: e,
235
- code: g.Unknown,
225
+ code: v.Unknown,
236
226
  traceId: a
237
- }), I.failJob(e, g.Unknown), console.error("Aborted export-all: failed to fetch conversation", r);
227
+ }), I.failJob(e, v.Unknown), console.error("Aborted export-all: failed to fetch conversation", r);
238
228
  return;
239
229
  } finally {
240
- I.setJobProgress(e, p({
230
+ I.setJobProgress(e, m({
241
231
  kind: r,
242
- phase: f.Transfer,
232
+ phase: p.Transfer,
243
233
  completed: l.length,
244
- total: a.length
234
+ total: i.length
245
235
  }, {
246
236
  completed: l.length,
247
- total: a.length,
248
- kind: v.Conversation
237
+ total: i.length,
238
+ kind: b.Conversation
249
239
  }));
250
240
  }
251
241
  }
252
242
  if (!n.aborted) try {
253
- y(o(i(l.map(s), [])), t), k?.({ jobId: e }), I.succeedJob(e);
243
+ let n = a(l.map(c), []), r = s(n);
244
+ x(r, t), k?.({ jobId: e }), I.succeedJob(e);
254
245
  } catch (t) {
255
- let n = M(t) ? g.FileTooLarge : g.Unknown, r = await D(t);
246
+ let n = M(t) ? v.FileTooLarge : v.Unknown, r = await D(t);
256
247
  F?.({
257
248
  jobId: e,
258
249
  code: n,
@@ -261,14 +252,14 @@ var S = 5, C = 512 * 1024 * 1024, w = 429, T = 5, E = 2e3, D = (e) => e instance
261
252
  }
262
253
  }, [
263
254
  E,
264
- x,
255
+ u,
265
256
  T,
266
257
  F,
267
258
  k,
268
259
  I,
269
260
  D
270
- ]), V = b(() => {
271
- let e = a(n.AllConversationsHistory, r), t = I.addJob({ kind: _.All }, e);
261
+ ]), V = S(() => {
262
+ let e = o(r.AllConversationsHistory, i), t = I.addJob({ kind: y.All }, e);
272
263
  return I.startJob(t, (n) => B(t, e, n));
273
264
  }, [I, B]);
274
265
  return {
@@ -282,4 +273,4 @@ var S = 5, C = 512 * 1024 * 1024, w = 429, T = 5, E = 2e3, D = (e) => e instance
282
273
  };
283
274
  };
284
275
  //#endregion
285
- export { C as DEFAULT_MAX_ARCHIVE_BYTES, P as useConversationExport };
276
+ export { w as DEFAULT_MAX_ARCHIVE_BYTES, P as useConversationExport };
@@ -3,10 +3,10 @@ import { MessageRole as e } from "@epam/ai-dial-chat-shared";
3
3
  var t = (e) => e != null && Object.keys(e).length > 0, n = (e, n) => t(n) ? {
4
4
  ...e,
5
5
  configuration_value: n
6
- } : e, r = (e, t) => (e?.length ?? 0) === (t?.length ?? 0) ? (e ?? []).some((e, n) => e.url !== t?.[n]?.url) : !0, i = (e, t, n, i, a) => {
6
+ } : e, r = (e, t) => (e?.length ?? 0) !== (t?.length ?? 0) || (e ?? []).some((e, n) => e.url !== t?.[n]?.url), i = (e, t, n, i, a) => {
7
7
  if (t !== e.content || i.length > 0) return !0;
8
8
  let o = e.custom_content?.attachments?.length ?? 0;
9
- return n.length === o ? a != null && r(e.custom_content?.skills, a) : !0;
9
+ return n.length !== o || a != null && r(e.custom_content?.skills, a);
10
10
  }, a = (t) => t == null || t.role !== e.Assistant || !!t.wasStoppedByUser || t.streamErrorMessage != null, o = (e, t, n, r, o, s) => {
11
11
  let c = e[t];
12
12
  return c ? i(c, n, r, o, s) || a(e[t + 1]) : !1;