@epam/ai-dial-chat-hooks 1.3.0-dev.13 → 1.3.0-dev.130

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 (513) hide show
  1. package/api-error/api-error.d.ts +30 -0
  2. package/api-error/api-error.d.ts.map +1 -0
  3. package/api-error/api-error.js +2 -2
  4. package/api-transport/create-csrf-middleware.d.ts +15 -0
  5. package/api-transport/create-csrf-middleware.d.ts.map +1 -0
  6. package/api-transport/create-unauthorized-middleware.d.ts +40 -0
  7. package/api-transport/create-unauthorized-middleware.d.ts.map +1 -0
  8. package/api-transport/create-unauthorized-middleware.js +4 -1
  9. package/attachment/useAttachmentAction/useAttachmentAction.d.ts +32 -0
  10. package/attachment/useAttachmentAction/useAttachmentAction.d.ts.map +1 -0
  11. package/attachment/useAttachmentAction/useAttachmentAction.js +5 -8
  12. package/attachment/useAttachmentValidation/useAttachmentValidation.d.ts +50 -0
  13. package/attachment/useAttachmentValidation/useAttachmentValidation.d.ts.map +1 -0
  14. package/attachments.d.ts +2 -94
  15. package/catalog/catalog-derivations.d.ts +27 -0
  16. package/catalog/catalog-derivations.d.ts.map +1 -0
  17. package/catalog/catalog-derivations.js +1 -1
  18. package/catalog/catalog-primary-action.d.ts +47 -0
  19. package/catalog/catalog-primary-action.d.ts.map +1 -0
  20. package/catalog/create-publish-api.d.ts +34 -0
  21. package/catalog/create-publish-api.d.ts.map +1 -0
  22. package/catalog/create-publish-api.js +4 -0
  23. package/catalog/deployment-endpoint-url.d.ts +19 -0
  24. package/catalog/deployment-endpoint-url.d.ts.map +1 -0
  25. package/catalog/deployment-id.d.ts +42 -0
  26. package/catalog/deployment-id.d.ts.map +1 -0
  27. package/catalog/entity-details.d.ts +146 -0
  28. package/catalog/entity-details.d.ts.map +1 -0
  29. package/catalog/map-deployment-limits-to-catalog.d.ts +34 -0
  30. package/catalog/map-deployment-limits-to-catalog.d.ts.map +1 -0
  31. package/catalog/map-deployment-limits-to-input.d.ts +28 -0
  32. package/catalog/map-deployment-limits-to-input.d.ts.map +1 -0
  33. package/catalog/map-deployment-to-catalog-item.d.ts +61 -0
  34. package/catalog/map-deployment-to-catalog-item.d.ts.map +1 -0
  35. package/catalog/map-entity-details-to-catalog.d.ts +81 -0
  36. package/catalog/map-entity-details-to-catalog.d.ts.map +1 -0
  37. package/catalog/map-entity-details-to-catalog.js +1 -1
  38. package/catalog/map-prompt-to-catalog-item.d.ts +43 -0
  39. package/catalog/map-prompt-to-catalog-item.d.ts.map +1 -0
  40. package/catalog/map-skill-to-catalog-item.d.ts +113 -0
  41. package/catalog/map-skill-to-catalog-item.d.ts.map +1 -0
  42. package/catalog/map-skill-to-catalog-item.js +1 -5
  43. package/catalog/mcp-endpoint-url.d.ts +18 -0
  44. package/catalog/mcp-endpoint-url.d.ts.map +1 -0
  45. package/catalog/publish.d.ts +35 -0
  46. package/catalog/publish.d.ts.map +1 -0
  47. package/catalog/useApplicationCredentials/useApplicationCredentials.d.ts +19 -0
  48. package/catalog/useApplicationCredentials/useApplicationCredentials.d.ts.map +1 -0
  49. package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.d.ts +107 -0
  50. package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.d.ts.map +1 -0
  51. package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.js +155 -119
  52. package/catalog/useCatalogItemDetails.d.ts +70 -0
  53. package/catalog/useCatalogItemDetails.d.ts.map +1 -0
  54. package/catalog/useCatalogToolsetCredentials/useCatalogToolsetCredentials.d.ts +76 -0
  55. package/catalog/useCatalogToolsetCredentials/useCatalogToolsetCredentials.d.ts.map +1 -0
  56. package/catalog/useFavoriteEntitiesState/useFavoriteEntitiesState.d.ts +37 -0
  57. package/catalog/useFavoriteEntitiesState/useFavoriteEntitiesState.d.ts.map +1 -0
  58. package/catalog/useFavoriteEntitiesState/useFavoriteEntitiesState.js +1 -1
  59. package/catalog/usePublishFolders/usePublishFolders.d.ts +73 -0
  60. package/catalog/usePublishFolders/usePublishFolders.d.ts.map +1 -0
  61. package/catalog/usePublishFolders/usePublishFolders.js +1 -1
  62. package/catalog/useSkillDetailsPanelData/useSkillDetailsPanelData.d.ts +54 -0
  63. package/catalog/useSkillDetailsPanelData/useSkillDetailsPanelData.d.ts.map +1 -0
  64. package/catalog/useSkillItemDetails.d.ts +64 -0
  65. package/catalog/useSkillItemDetails.d.ts.map +1 -0
  66. package/catalog/useSkillItemDetails.js +3 -3
  67. package/catalog.d.ts +2 -1433
  68. package/conversation/announcement-message.d.ts +61 -0
  69. package/conversation/announcement-message.d.ts.map +1 -0
  70. package/conversation/conversation-draft/conversation-draft-store.d.ts +21 -0
  71. package/conversation/conversation-draft/conversation-draft-store.d.ts.map +1 -0
  72. package/conversation/conversation-draft/conversation-draft-store.js +84 -0
  73. package/conversation/conversation-draft/conversation-draft.d.ts +48 -0
  74. package/conversation/conversation-draft/conversation-draft.d.ts.map +1 -0
  75. package/conversation/conversation-transfer/async.d.ts +10 -0
  76. package/conversation/conversation-transfer/async.d.ts.map +1 -0
  77. package/conversation/conversation-transfer/attachment-refs.d.ts +42 -0
  78. package/conversation/conversation-transfer/attachment-refs.d.ts.map +1 -0
  79. package/conversation/conversation-transfer/build-upload-path.d.ts +42 -0
  80. package/conversation/conversation-transfer/build-upload-path.d.ts.map +1 -0
  81. package/conversation/conversation-transfer/date.d.ts +5 -0
  82. package/conversation/conversation-transfer/date.d.ts.map +1 -0
  83. package/conversation/conversation-transfer/dial-file-resolve.d.ts +10 -0
  84. package/conversation/conversation-transfer/dial-file-resolve.d.ts.map +1 -0
  85. package/conversation/conversation-transfer/export-conversation.d.ts +10 -0
  86. package/conversation/conversation-transfer/export-conversation.d.ts.map +1 -0
  87. package/conversation/conversation-transfer/import-conversation.d.ts +106 -0
  88. package/conversation/conversation-transfer/import-conversation.d.ts.map +1 -0
  89. package/conversation/conversation-transfer/import-conversation.js +7 -8
  90. package/conversation/conversation-transfer/progress.d.ts +60 -0
  91. package/conversation/conversation-transfer/progress.d.ts.map +1 -0
  92. package/conversation/conversation-transfer/progress.js +1 -1
  93. package/conversation/conversation-transfer/queue.d.ts +54 -0
  94. package/conversation/conversation-transfer/queue.d.ts.map +1 -0
  95. package/conversation/conversation-transfer/types.d.ts +36 -0
  96. package/conversation/conversation-transfer/types.d.ts.map +1 -0
  97. package/conversation/conversation-transfer/zip-export.d.ts +31 -0
  98. package/conversation/conversation-transfer/zip-export.d.ts.map +1 -0
  99. package/conversation/conversation-transfer/zip-export.js +1 -7
  100. package/conversation/conversation-transfer/zip-import.d.ts +17 -0
  101. package/conversation/conversation-transfer/zip-import.d.ts.map +1 -0
  102. package/conversation/conversation-transfer/zip-import.js +1 -1
  103. package/conversation/create-chat-stream-api.d.ts +98 -0
  104. package/conversation/create-chat-stream-api.d.ts.map +1 -0
  105. package/conversation/create-chat-stream-api.js +29 -28
  106. package/conversation/deriveConversationRowActionState/deriveConversationRowActionState.d.ts +39 -0
  107. package/conversation/deriveConversationRowActionState/deriveConversationRowActionState.d.ts.map +1 -0
  108. package/conversation/display-name-watch.d.ts +4 -0
  109. package/conversation/display-name-watch.d.ts.map +1 -0
  110. package/conversation/footer-message.d.ts +10 -0
  111. package/conversation/footer-message.d.ts.map +1 -0
  112. package/conversation/get-model-id-from-conversation-id.d.ts +38 -0
  113. package/conversation/get-model-id-from-conversation-id.d.ts.map +1 -0
  114. package/conversation/get-model-id-from-conversation-id.js +1 -1
  115. package/conversation/greeting.d.ts +18 -0
  116. package/conversation/greeting.d.ts.map +1 -0
  117. package/conversation/message-factory.d.ts +7 -0
  118. package/conversation/message-factory.d.ts.map +1 -0
  119. package/conversation/message-utils.d.ts +67 -0
  120. package/conversation/message-utils.d.ts.map +1 -0
  121. package/conversation/overlay-messages.d.ts +5 -0
  122. package/conversation/overlay-messages.d.ts.map +1 -0
  123. package/conversation/quick-app-conversation-starters.d.ts +10 -0
  124. package/conversation/quick-app-conversation-starters.d.ts.map +1 -0
  125. package/conversation/stage.d.ts +77 -0
  126. package/conversation/stage.d.ts.map +1 -0
  127. package/conversation/starter-option.d.ts +21 -0
  128. package/conversation/starter-option.d.ts.map +1 -0
  129. package/conversation/useActiveConversationSync/useActiveConversationSync.d.ts +35 -0
  130. package/conversation/useActiveConversationSync/useActiveConversationSync.d.ts.map +1 -0
  131. package/conversation/useAsyncConfirmDialog/useAsyncConfirmDialog.d.ts +46 -0
  132. package/conversation/useAsyncConfirmDialog/useAsyncConfirmDialog.d.ts.map +1 -0
  133. package/conversation/useAttachmentUpload/useAttachmentUpload.d.ts +27 -0
  134. package/conversation/useAttachmentUpload/useAttachmentUpload.d.ts.map +1 -0
  135. package/conversation/useAttachmentUpload/useAttachmentUpload.js +4 -1
  136. package/conversation/useConversationComposerDraft/useConversationComposerDraft.d.ts +39 -0
  137. package/conversation/useConversationComposerDraft/useConversationComposerDraft.d.ts.map +1 -0
  138. package/conversation/useConversationComposerDraft/useConversationComposerDraft.js +128 -0
  139. package/conversation/useConversationExport/useConversationExport.d.ts +72 -0
  140. package/conversation/useConversationExport/useConversationExport.d.ts.map +1 -0
  141. package/conversation/useConversationExport/useConversationExport.js +11 -12
  142. package/conversation/useConversationHandlers/attachment-to-dto.d.ts +7 -0
  143. package/conversation/useConversationHandlers/attachment-to-dto.d.ts.map +1 -0
  144. package/conversation/useConversationHandlers/message-factory.d.ts +9 -0
  145. package/conversation/useConversationHandlers/message-factory.d.ts.map +1 -0
  146. package/conversation/useConversationHandlers/message-utils.d.ts +38 -0
  147. package/conversation/useConversationHandlers/message-utils.d.ts.map +1 -0
  148. package/conversation/useConversationHandlers/message-utils.js +2 -2
  149. package/conversation/useConversationHandlers/starter-option.d.ts +24 -0
  150. package/conversation/useConversationHandlers/starter-option.d.ts.map +1 -0
  151. package/conversation/useConversationHandlers/useConversationHandlers.d.ts +66 -0
  152. package/conversation/useConversationHandlers/useConversationHandlers.d.ts.map +1 -0
  153. package/conversation/useConversationHandlers/useConversationHandlers.js +2 -2
  154. package/conversation/useConversationImport/useConversationImport.d.ts +54 -0
  155. package/conversation/useConversationImport/useConversationImport.d.ts.map +1 -0
  156. package/conversation/useConversationImport/useConversationImport.js +24 -24
  157. package/conversation/useConversationLookupMaps/useConversationLookupMaps.d.ts +24 -0
  158. package/conversation/useConversationLookupMaps/useConversationLookupMaps.d.ts.map +1 -0
  159. package/conversation/useConversationPanelItems/useConversationPanelItems.d.ts +64 -0
  160. package/conversation/useConversationPanelItems/useConversationPanelItems.d.ts.map +1 -0
  161. package/conversation/useConversationScroll/useConversationScroll.d.ts +46 -0
  162. package/conversation/useConversationScroll/useConversationScroll.d.ts.map +1 -0
  163. package/conversation/useConversationScroll/useConversationScroll.js +2 -6
  164. package/conversation/useConversationStream/apply-chunk.d.ts +35 -0
  165. package/conversation/useConversationStream/apply-chunk.d.ts.map +1 -0
  166. package/conversation/useConversationStream/buffered-generation.d.ts +15 -0
  167. package/conversation/useConversationStream/buffered-generation.d.ts.map +1 -0
  168. package/conversation/useConversationStream/conversation-path.d.ts +7 -0
  169. package/conversation/useConversationStream/conversation-path.d.ts.map +1 -0
  170. package/conversation/useConversationStream/conversation-path.js +2 -2
  171. package/conversation/useConversationStream/frame-scheduler.d.ts +14 -0
  172. package/conversation/useConversationStream/frame-scheduler.d.ts.map +1 -0
  173. package/conversation/useConversationStream/frame-scheduler.js +17 -17
  174. package/conversation/useConversationStream/generation-resume.d.ts +85 -0
  175. package/conversation/useConversationStream/generation-resume.d.ts.map +1 -0
  176. package/conversation/useConversationStream/generation-resume.js +11 -21
  177. package/conversation/useConversationStream/useConversationStream.d.ts +145 -0
  178. package/conversation/useConversationStream/useConversationStream.d.ts.map +1 -0
  179. package/conversation/useConversationStream/useConversationStream.js +241 -248
  180. package/conversation/useImportFilePicker/useImportFilePicker.d.ts +32 -0
  181. package/conversation/useImportFilePicker/useImportFilePicker.d.ts.map +1 -0
  182. package/conversation/useMessageSelectionReply/useMessageSelectionReply.d.ts +42 -0
  183. package/conversation/useMessageSelectionReply/useMessageSelectionReply.d.ts.map +1 -0
  184. package/conversation/useMessageSelectionReply/useMessageSelectionReply.js +4 -10
  185. package/conversation/useTranscribeAudio/audio-transcription-error.d.ts +19 -0
  186. package/conversation/useTranscribeAudio/audio-transcription-error.d.ts.map +1 -0
  187. package/conversation/useTranscribeAudio/transcription-retry.d.ts +2 -0
  188. package/conversation/useTranscribeAudio/transcription-retry.d.ts.map +1 -0
  189. package/conversation/useTranscribeAudio/useTranscribeAudio.d.ts +43 -0
  190. package/conversation/useTranscribeAudio/useTranscribeAudio.d.ts.map +1 -0
  191. package/conversation/useTranscribeAudio/useTranscribeAudio.js +30 -27
  192. package/conversation-overlay.d.ts +2 -7
  193. package/conversation-overlay.js +1 -2
  194. package/conversation-sources/useConversationSources/useConversationSources.d.ts +20 -0
  195. package/conversation-sources/useConversationSources/useConversationSources.d.ts.map +1 -0
  196. package/conversation-sources.d.ts +2 -25
  197. package/conversation-sources.js +1 -2
  198. package/conversation-transfer.d.ts +2 -190
  199. package/conversation.d.ts +2 -1372
  200. package/conversation.js +34 -32
  201. package/entry-points/attachments.d.ts +3 -0
  202. package/entry-points/attachments.d.ts.map +1 -0
  203. package/entry-points/catalog.d.ts +25 -0
  204. package/entry-points/catalog.d.ts.map +1 -0
  205. package/entry-points/conversation-overlay.d.ts +2 -0
  206. package/entry-points/conversation-overlay.d.ts.map +1 -0
  207. package/entry-points/conversation-sources.d.ts +2 -0
  208. package/entry-points/conversation-sources.d.ts.map +1 -0
  209. package/entry-points/conversation-transfer.d.ts +7 -0
  210. package/entry-points/conversation-transfer.d.ts.map +1 -0
  211. package/entry-points/conversation.d.ts +36 -0
  212. package/entry-points/conversation.d.ts.map +1 -0
  213. package/entry-points/file-manager-canvas.d.ts +2 -0
  214. package/entry-points/file-manager-canvas.d.ts.map +1 -0
  215. package/entry-points/file-manager.d.ts +31 -0
  216. package/entry-points/file-manager.d.ts.map +1 -0
  217. package/entry-points/mcp-apps.d.ts +6 -0
  218. package/entry-points/mcp-apps.d.ts.map +1 -0
  219. package/entry-points/oauth.d.ts +10 -0
  220. package/entry-points/oauth.d.ts.map +1 -0
  221. package/entry-points/offline-credentials.d.ts +5 -0
  222. package/entry-points/offline-credentials.d.ts.map +1 -0
  223. package/entry-points/scheduled-tasks.d.ts +9 -0
  224. package/entry-points/scheduled-tasks.d.ts.map +1 -0
  225. package/entry-points/scroll-anchoring.d.ts +2 -0
  226. package/entry-points/scroll-anchoring.d.ts.map +1 -0
  227. package/entry-points/sharing.d.ts +3 -0
  228. package/entry-points/sharing.d.ts.map +1 -0
  229. package/entry-points/skill-editor.d.ts +9 -0
  230. package/entry-points/skill-editor.d.ts.map +1 -0
  231. package/entry-points/skills-state.d.ts +2 -0
  232. package/entry-points/skills-state.d.ts.map +1 -0
  233. package/entry-points/source-content.d.ts +2 -0
  234. package/entry-points/source-content.d.ts.map +1 -0
  235. package/entry-points/usage-limits.d.ts +8 -0
  236. package/entry-points/usage-limits.d.ts.map +1 -0
  237. package/entry-points/usage.d.ts +3 -0
  238. package/entry-points/usage.d.ts.map +1 -0
  239. package/entry-points/utils.d.ts +17 -0
  240. package/entry-points/utils.d.ts.map +1 -0
  241. package/entry-points/viewport-layout.d.ts +4 -0
  242. package/entry-points/viewport-layout.d.ts.map +1 -0
  243. package/file-manager-canvas.d.ts +2 -418
  244. package/file-manager-canvas.js +1 -2
  245. package/file-manager.d.ts +2 -1250
  246. package/file-manager.js +21 -21
  247. package/files/annotation.d.ts +10 -0
  248. package/files/annotation.d.ts.map +1 -0
  249. package/files/attachment-canvas.d.ts +123 -0
  250. package/files/attachment-canvas.d.ts.map +1 -0
  251. package/files/attachment-dto-to-display.d.ts +10 -0
  252. package/files/attachment-dto-to-display.d.ts.map +1 -0
  253. package/files/attachment-types.d.ts +21 -0
  254. package/files/attachment-types.d.ts.map +1 -0
  255. package/files/attachment-types.js +1 -1
  256. package/files/create-files-api.d.ts +52 -0
  257. package/files/create-files-api.d.ts.map +1 -0
  258. package/files/create-files-api.js +1 -1
  259. package/files/create-upload-file-with-progress.d.ts +27 -0
  260. package/files/create-upload-file-with-progress.d.ts.map +1 -0
  261. package/files/create-upload-file-with-progress.js +42 -34
  262. package/files/dial-file-manager-copy-move.util.d.ts +15 -0
  263. package/files/dial-file-manager-copy-move.util.d.ts.map +1 -0
  264. package/files/dial-file-manager-mapping.util.d.ts +55 -0
  265. package/files/dial-file-manager-mapping.util.d.ts.map +1 -0
  266. package/files/dial-file-manager-mapping.util.js +97 -69
  267. package/files/dial-file-manager-path.util.d.ts +48 -0
  268. package/files/dial-file-manager-path.util.d.ts.map +1 -0
  269. package/files/dial-file-manager.model.d.ts +36 -0
  270. package/files/dial-file-manager.model.d.ts.map +1 -0
  271. package/files/dial-file-manager.types.d.ts +335 -0
  272. package/files/dial-file-manager.types.d.ts.map +1 -0
  273. package/files/dial-file-to-attachment.d.ts +26 -0
  274. package/files/dial-file-to-attachment.d.ts.map +1 -0
  275. package/files/dial-file-to-attachment.js +3 -3
  276. package/files/dial-file.d.ts +17 -0
  277. package/files/dial-file.d.ts.map +1 -0
  278. package/files/dial-files-api.d.ts +71 -0
  279. package/files/dial-files-api.d.ts.map +1 -0
  280. package/files/download-destination.d.ts +31 -0
  281. package/files/download-destination.d.ts.map +1 -0
  282. package/files/download-progress.d.ts +33 -0
  283. package/files/download-progress.d.ts.map +1 -0
  284. package/files/download-progress.js +28 -0
  285. package/files/file-manager-variant.d.ts +3 -0
  286. package/files/file-manager-variant.d.ts.map +1 -0
  287. package/files/file-name.d.ts +19 -0
  288. package/files/file-name.d.ts.map +1 -0
  289. package/files/prepare-download-destination.d.ts +8 -0
  290. package/files/prepare-download-destination.d.ts.map +1 -0
  291. package/files/resolve-dial-file-api-path.d.ts +12 -0
  292. package/files/resolve-dial-file-api-path.d.ts.map +1 -0
  293. package/files/source-content.d.ts +28 -0
  294. package/files/source-content.d.ts.map +1 -0
  295. package/files/source-content.js +1 -1
  296. package/files/useDialFileListing/useDialFileListing.d.ts +82 -0
  297. package/files/useDialFileListing/useDialFileListing.d.ts.map +1 -0
  298. package/files/useDialFileListing/useDialFileListing.js +95 -107
  299. package/files/useDialFileManager/useDialFileManager.d.ts +16 -0
  300. package/files/useDialFileManager/useDialFileManager.d.ts.map +1 -0
  301. package/files/useDialFileManager/useDialFileManager.js +5 -2
  302. package/files/useDialFileManagerSections/useDialFileManagerSections.d.ts +25 -0
  303. package/files/useDialFileManagerSections/useDialFileManagerSections.d.ts.map +1 -0
  304. package/files/useDialFileManagerSections/useDialFileManagerSections.js +59 -68
  305. package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.d.ts +15 -0
  306. package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.d.ts.map +1 -0
  307. package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.js +1 -1
  308. package/files/useDialFileMetadata/useDialFileMetadata.d.ts +28 -0
  309. package/files/useDialFileMetadata/useDialFileMetadata.d.ts.map +1 -0
  310. package/files/useDialFileMetadata/useDialFileMetadata.js +3 -3
  311. package/files/useDialFileMutations/useDialFileMutations.d.ts +77 -0
  312. package/files/useDialFileMutations/useDialFileMutations.d.ts.map +1 -0
  313. package/files/useDialFileMutations/useDialFileMutations.js +230 -159
  314. package/files/useDialFileSharing/useDialFileSharing.d.ts +34 -0
  315. package/files/useDialFileSharing/useDialFileSharing.d.ts.map +1 -0
  316. package/files/useDialFileUploadBatch/useDialFileUploadBatch.d.ts +47 -0
  317. package/files/useDialFileUploadBatch/useDialFileUploadBatch.d.ts.map +1 -0
  318. package/files/useDialFileUploadBatch/useDialFileUploadBatch.js +105 -97
  319. package/files/useFileAttachmentPicker/useFileAttachmentPicker.d.ts +59 -0
  320. package/files/useFileAttachmentPicker/useFileAttachmentPicker.d.ts.map +1 -0
  321. package/files/useFileAttachmentPicker/useFileAttachmentPicker.js +2 -2
  322. package/index.d.ts +167 -6987
  323. package/index.d.ts.map +1 -0
  324. package/index.js +115 -101
  325. package/mcp-apps/mcp-apps-api-client.d.ts +28 -0
  326. package/mcp-apps/mcp-apps-api-client.d.ts.map +1 -0
  327. package/mcp-apps/mcp-apps-api-client.js +18 -17
  328. package/mcp-apps/useMcpAppHostAdapter/useMcpAppHostAdapter.d.ts +14 -0
  329. package/mcp-apps/useMcpAppHostAdapter/useMcpAppHostAdapter.d.ts.map +1 -0
  330. package/mcp-apps/useMcpAppHostContext/useMcpAppHostContext.d.ts +29 -0
  331. package/mcp-apps/useMcpAppHostContext/useMcpAppHostContext.d.ts.map +1 -0
  332. package/mcp-apps/useMcpAppTools/useMcpAppTools.d.ts +22 -0
  333. package/mcp-apps/useMcpAppTools/useMcpAppTools.d.ts.map +1 -0
  334. package/mcp-apps/useMcpAppTools/useMcpAppTools.js +28 -31
  335. package/mcp-apps/useOpenMcpAppCanvas/useOpenMcpAppCanvas.d.ts +36 -0
  336. package/mcp-apps/useOpenMcpAppCanvas/useOpenMcpAppCanvas.d.ts.map +1 -0
  337. package/mcp-apps.d.ts +2 -256
  338. package/oauth/authorize-url.d.ts +16 -0
  339. package/oauth/authorize-url.d.ts.map +1 -0
  340. package/oauth/authorize-url.js +1 -1
  341. package/oauth/handshake.d.ts +30 -0
  342. package/oauth/handshake.d.ts.map +1 -0
  343. package/oauth/handshake.js +3 -10
  344. package/oauth/models.d.ts +81 -0
  345. package/oauth/models.d.ts.map +1 -0
  346. package/oauth/popup.d.ts +30 -0
  347. package/oauth/popup.d.ts.map +1 -0
  348. package/oauth/popup.js +19 -17
  349. package/oauth/toolset-id.d.ts +53 -0
  350. package/oauth/toolset-id.d.ts.map +1 -0
  351. package/oauth/types.d.ts +84 -0
  352. package/oauth/types.d.ts.map +1 -0
  353. package/oauth/useOAuthCallbackCompletion/useOAuthCallbackCompletion.d.ts +54 -0
  354. package/oauth/useOAuthCallbackCompletion/useOAuthCallbackCompletion.d.ts.map +1 -0
  355. package/oauth/useOAuthCallbackCompletion/useOAuthCallbackCompletion.js +41 -42
  356. package/oauth/useToolsetLogin/useToolsetLogin.d.ts +79 -0
  357. package/oauth/useToolsetLogin/useToolsetLogin.d.ts.map +1 -0
  358. package/oauth/useToolsetLogin/useToolsetLogin.js +2 -1
  359. package/oauth.d.ts +2 -472
  360. package/offline-credentials/map-offline-credentials-response.d.ts +17 -0
  361. package/offline-credentials/map-offline-credentials-response.d.ts.map +1 -0
  362. package/offline-credentials/map-offline-credentials-response.js +15 -0
  363. package/offline-credentials/useOfflineCredentialsAuth/useOfflineCredentialsAuth.d.ts +58 -0
  364. package/offline-credentials/useOfflineCredentialsAuth/useOfflineCredentialsAuth.d.ts.map +1 -0
  365. package/offline-credentials/useOfflineCredentialsAuth/useOfflineCredentialsAuth.js +37 -0
  366. package/offline-credentials/useOfflineCredentialsGate/useOfflineCredentialsGate.d.ts +57 -0
  367. package/offline-credentials/useOfflineCredentialsGate/useOfflineCredentialsGate.d.ts.map +1 -0
  368. package/offline-credentials/useOfflineCredentialsGate/useOfflineCredentialsGate.js +34 -0
  369. package/offline-credentials/useOfflineCredentialsLogin/useOfflineCredentialsLogin.d.ts +28 -0
  370. package/offline-credentials/useOfflineCredentialsLogin/useOfflineCredentialsLogin.d.ts.map +1 -0
  371. package/offline-credentials/useOfflineCredentialsLogin/useOfflineCredentialsLogin.js +29 -0
  372. package/offline-credentials.d.ts +2 -0
  373. package/offline-credentials.js +5 -0
  374. package/package.json +31 -17
  375. package/prompt/export-prompt.d.ts +31 -0
  376. package/prompt/export-prompt.d.ts.map +1 -0
  377. package/prompt/prompt-resource.d.ts +30 -0
  378. package/prompt/prompt-resource.d.ts.map +1 -0
  379. package/prompt/prompt.d.ts +34 -0
  380. package/prompt/prompt.d.ts.map +1 -0
  381. package/prompt/usePromptsState/usePromptsState.d.ts +34 -0
  382. package/prompt/usePromptsState/usePromptsState.d.ts.map +1 -0
  383. package/scheduled-task/check-scheduled-task-auth-session-error.d.ts +27 -0
  384. package/scheduled-task/check-scheduled-task-auth-session-error.d.ts.map +1 -0
  385. package/scheduled-task/check-scheduled-task-auth-session-error.js +17 -0
  386. package/scheduled-task/scheduled-task-description.d.ts +38 -0
  387. package/scheduled-task/scheduled-task-description.d.ts.map +1 -0
  388. package/scheduled-task/scheduled-task-description.js +1 -1
  389. package/scheduled-task/scheduled-task-mapping.d.ts +19 -0
  390. package/scheduled-task/scheduled-task-mapping.d.ts.map +1 -0
  391. package/scheduled-task/scheduled-task-preparation.d.ts +19 -0
  392. package/scheduled-task/scheduled-task-preparation.d.ts.map +1 -0
  393. package/scheduled-task/scheduled-task-trigger.d.ts +26 -0
  394. package/scheduled-task/scheduled-task-trigger.d.ts.map +1 -0
  395. package/scheduled-task/scheduled-task-trigger.js +1 -1
  396. package/scheduled-task/scheduled-tasks-api-client.d.ts +67 -0
  397. package/scheduled-task/scheduled-tasks-api-client.d.ts.map +1 -0
  398. package/scheduled-task/use-scheduled-task-runs.d.ts +40 -0
  399. package/scheduled-task/use-scheduled-task-runs.d.ts.map +1 -0
  400. package/scheduled-task/use-scheduled-task-runs.js +67 -79
  401. package/scheduled-task/use-scheduled-tasks.d.ts +28 -0
  402. package/scheduled-task/use-scheduled-tasks.d.ts.map +1 -0
  403. package/scheduled-task/use-scheduled-tasks.js +1 -1
  404. package/scheduled-tasks.d.ts +2 -250
  405. package/scheduled-tasks.js +2 -1
  406. package/scroll-anchoring.d.ts +2 -50
  407. package/scroll-anchoring.js +1 -2
  408. package/shared/application-schema.d.ts +16 -0
  409. package/shared/application-schema.d.ts.map +1 -0
  410. package/shared/application-schema.js +3 -3
  411. package/shared/browser-timezone.d.ts +7 -0
  412. package/shared/browser-timezone.d.ts.map +1 -0
  413. package/shared/cron-day-of-month.d.ts +21 -0
  414. package/shared/cron-day-of-month.d.ts.map +1 -0
  415. package/shared/cron-day-of-month.js +10 -10
  416. package/shared/cron-weekday.d.ts +5 -0
  417. package/shared/cron-weekday.d.ts.map +1 -0
  418. package/shared/custom-apps.d.ts +7 -0
  419. package/shared/custom-apps.d.ts.map +1 -0
  420. package/shared/external-services.d.ts +16 -0
  421. package/shared/external-services.d.ts.map +1 -0
  422. package/shared/formatting.d.ts +5 -0
  423. package/shared/formatting.d.ts.map +1 -0
  424. package/shared/locale.d.ts +45 -0
  425. package/shared/locale.d.ts.map +1 -0
  426. package/shared/locale.js +2 -2
  427. package/shared/string-utils.d.ts +11 -0
  428. package/shared/string-utils.d.ts.map +1 -0
  429. package/shared/toolset-login-events.d.ts +15 -0
  430. package/shared/toolset-login-events.d.ts.map +1 -0
  431. package/sharing.d.ts +2 -65
  432. package/skill/skill-archive.d.ts +7 -0
  433. package/skill/skill-archive.d.ts.map +1 -0
  434. package/skill/skill-file-batch-validation.d.ts +70 -0
  435. package/skill/skill-file-batch-validation.d.ts.map +1 -0
  436. package/skill/skill-file-batch-validation.js +18 -17
  437. package/skill/skill-file-preview.d.ts +25 -0
  438. package/skill/skill-file-preview.d.ts.map +1 -0
  439. package/skill/skill-manifest.d.ts +28 -0
  440. package/skill/skill-manifest.d.ts.map +1 -0
  441. package/skill/skill-types.d.ts +46 -0
  442. package/skill/skill-types.d.ts.map +1 -0
  443. package/skill/skill-types.js +1 -1
  444. package/skill/skill.d.ts +160 -0
  445. package/skill/skill.d.ts.map +1 -0
  446. package/skill/skill.js +12 -15
  447. package/skill/useSkillArchiveImport/useSkillArchiveImport.d.ts +65 -0
  448. package/skill/useSkillArchiveImport/useSkillArchiveImport.d.ts.map +1 -0
  449. package/skill/useSkillArchiveImport/useSkillArchiveImport.js +1 -7
  450. package/skill/useSkillEditorLoad.d.ts +74 -0
  451. package/skill/useSkillEditorLoad.d.ts.map +1 -0
  452. package/skill/useSkillEditorSubmit.d.ts +125 -0
  453. package/skill/useSkillEditorSubmit.d.ts.map +1 -0
  454. package/skill/useSkillEditorSubmit.js +1 -5
  455. package/skill/useSkillFileActions.d.ts +60 -0
  456. package/skill/useSkillFileActions.d.ts.map +1 -0
  457. package/skill/useSkillFilePreview.d.ts +38 -0
  458. package/skill/useSkillFilePreview.d.ts.map +1 -0
  459. package/skill/useSkillsState/useSkillsState.d.ts +35 -0
  460. package/skill/useSkillsState/useSkillsState.d.ts.map +1 -0
  461. package/skill-editor.d.ts +2 -655
  462. package/skills-state.d.ts +2 -40
  463. package/skills-state.js +1 -2
  464. package/source-content.d.ts +2 -29
  465. package/source-content.js +1 -2
  466. package/usage/map-usage-data-to-dashboard.d.ts +39 -0
  467. package/usage/map-usage-data-to-dashboard.d.ts.map +1 -0
  468. package/usage/map-user-usage-to-model-limits.d.ts +62 -0
  469. package/usage/map-user-usage-to-model-limits.d.ts.map +1 -0
  470. package/usage/usage-banner-source.d.ts +23 -0
  471. package/usage/usage-banner-source.d.ts.map +1 -0
  472. package/usage/usage-banner-source.js +36 -0
  473. package/usage/usage-period.d.ts +7 -0
  474. package/usage/usage-period.d.ts.map +1 -0
  475. package/usage/usage-period.js +6 -0
  476. package/usage/usage-reset-time.d.ts +69 -0
  477. package/usage/usage-reset-time.d.ts.map +1 -0
  478. package/usage/usage-reset-time.js +72 -0
  479. package/usage/useDeploymentUsageLimits/useDeploymentUsageLimits.d.ts +32 -0
  480. package/usage/useDeploymentUsageLimits/useDeploymentUsageLimits.d.ts.map +1 -0
  481. package/usage/useDeploymentUsageLimits/useDeploymentUsageLimits.js +39 -0
  482. package/usage/useRefreshUsageAfterGeneration/useRefreshUsageAfterGeneration.d.ts +16 -0
  483. package/usage/useRefreshUsageAfterGeneration/useRefreshUsageAfterGeneration.d.ts.map +1 -0
  484. package/usage/useRefreshUsageAfterGeneration/useRefreshUsageAfterGeneration.js +14 -0
  485. package/usage/useUsageData/useUsageData.d.ts +28 -0
  486. package/usage/useUsageData/useUsageData.d.ts.map +1 -0
  487. package/usage/useUsageLimitBanner/useUsageLimitBanner.d.ts +56 -0
  488. package/usage/useUsageLimitBanner/useUsageLimitBanner.d.ts.map +1 -0
  489. package/usage/useUsageLimitBanner/useUsageLimitBanner.js +67 -0
  490. package/usage/useUsageLimitBannerDismissal/useUsageLimitBannerDismissal.d.ts +14 -0
  491. package/usage/useUsageLimitBannerDismissal/useUsageLimitBannerDismissal.d.ts.map +1 -0
  492. package/usage/useUsageLimitBannerDismissal/useUsageLimitBannerDismissal.js +19 -0
  493. package/usage-limits.d.ts +2 -0
  494. package/usage-limits.js +8 -0
  495. package/usage.d.ts +2 -125
  496. package/useChatSettingsFormConfig/useChatSettingsFormConfig.d.ts +128 -0
  497. package/useChatSettingsFormConfig/useChatSettingsFormConfig.d.ts.map +1 -0
  498. package/usePageFileDrag/usePageFileDrag.d.ts +16 -0
  499. package/usePageFileDrag/usePageFileDrag.d.ts.map +1 -0
  500. package/usePageFileDrag/usePageFileDrag.js +3 -3
  501. package/usePanelMaxWidth/usePanelMaxWidth.d.ts +6 -0
  502. package/usePanelMaxWidth/usePanelMaxWidth.d.ts.map +1 -0
  503. package/useShareLink/useShareLink.d.ts +23 -0
  504. package/useShareLink/useShareLink.d.ts.map +1 -0
  505. package/useShareLink/useShareLink.js +1 -0
  506. package/useShareRecipientsCount/useShareRecipientsCount.d.ts +36 -0
  507. package/useShareRecipientsCount/useShareRecipientsCount.d.ts.map +1 -0
  508. package/useToolsMenu/useToolsMenu.d.ts +31 -0
  509. package/useToolsMenu/useToolsMenu.d.ts.map +1 -0
  510. package/useViewportWidth/useViewportWidth.d.ts +3 -0
  511. package/useViewportWidth/useViewportWidth.d.ts.map +1 -0
  512. package/utils.d.ts +2 -404
  513. package/viewport-layout.d.ts +2 -27
@@ -1,336 +1,329 @@
1
1
  import { safeDecodeURI as e } from "../../shared/string-utils.js";
2
- import { DEFAULT_GENERATION_CONFLICT_MESSAGE as t, DEFAULT_GENERATION_PERSISTENCE_ERROR_MESSAGE as n, GenerationConflictError as r, GenerationPersistenceError as i, StreamInterruptedError as a, StreamUpstreamError as o } from "../create-chat-stream-api.js";
3
- import { getConversationPath as s } from "./conversation-path.js";
4
- import { applyChunkToMessages as c } from "./apply-chunk.js";
5
- import { restoreBufferedMessage as l } from "./buffered-generation.js";
6
- import { createResumeIfAwaitingGeneration as ee, fetchConversationForRecovery as te, findPendingBackgroundMessageIndex as u, hasGeneratedPayload as ne, isAwaitingGenerationResume as d } from "./generation-resume.js";
2
+ import { DEFAULT_GENERATION_CONFLICT_MESSAGE as t, DEFAULT_GENERATION_PERSISTENCE_ERROR_MESSAGE as n, GenerationConflictError as r, GenerationPersistenceError as i, StopCompletionError as a, StreamInterruptedError as o, StreamUpstreamError as s } from "../create-chat-stream-api.js";
3
+ import { getConversationPath as c } from "./conversation-path.js";
4
+ import { applyChunkToMessages as l } from "./apply-chunk.js";
5
+ import { restoreBufferedMessage as u } from "./buffered-generation.js";
6
+ import { createResumeIfAwaitingGeneration as ee, fetchConversationForRecovery as te, findPendingBackgroundMessageIndex as d, hasGeneratedPayload as ne, isAwaitingGenerationResume as f } from "./generation-resume.js";
7
7
  import { createFrameScheduler as re } from "./frame-scheduler.js";
8
- import { MessageRole as ie, generateUUID as ae } from "@epam/ai-dial-chat-shared";
9
- import { useCallback as f, useEffect as p, useMemo as oe, useRef as m, useState as h } from "react";
10
- import { SendCompletionDtoModeEnum as g } from "@epam/ai-dial-chat-api-client";
8
+ import { MessageRole as p, generateUUID as ie } from "@epam/ai-dial-chat-shared";
9
+ import { useCallback as m, useEffect as h, useMemo as g, useRef as _, useState as v } from "react";
10
+ import { SendCompletionDtoModeEnum as y } from "@epam/ai-dial-chat-api-client";
11
11
  //#region src/conversation/useConversationStream/useConversationStream.ts
12
- var se = 2e4, ce = 401, le = (e, t, n) => e instanceof i ? n : e instanceof r ? t : e instanceof o ? e.message : "", _ = (e) => {
12
+ var ae = 2e4, oe = 401, b = 404, x = 2e3, S = 100, se = (e, t, n) => e instanceof i ? n : e instanceof r ? t : e instanceof s ? e.message : "", C = (e) => {
13
13
  if (!e) return;
14
- let t = u(e);
14
+ let t = d(e);
15
15
  return t === -1 ? void 0 : e.messages[t].backgroundGeneration?.generationId;
16
- }, v = ({ conversationId: o, state: { setConversation: v, conversationRef: y }, transport: b, generation: { startGeneration: ue, completeGeneration: x }, channel: S, overlay: C, onStopError: w, generationConflictMessage: de = t, generationPersistenceErrorMessage: T = n, onStreamError: E, batchChunksPerFrame: D = !1 }) => {
17
- let O = m(E);
18
- p(() => {
19
- O.current = E;
20
- }, [E]);
21
- let fe = m(D);
22
- p(() => {
23
- fe.current = D;
24
- }, [D]);
25
- let [k] = h(re), [A, j] = h(() => /* @__PURE__ */ new Set()), [M, N] = h(() => /* @__PURE__ */ new Set()), P = m(/* @__PURE__ */ new Map()), F = m(/* @__PURE__ */ new Set()), I = m(/* @__PURE__ */ new Map()), L = m(/* @__PURE__ */ new Set()), pe = m(/* @__PURE__ */ new Map()), R = m(!0), z = m(/* @__PURE__ */ new Map()), [B, V] = h(z.current), H = m(/* @__PURE__ */ new Set()), [me, U] = h(H.current);
26
- p(() => (R.current = !0, () => {
27
- R.current = !1;
16
+ }, w = ({ conversationId: s, state: { setConversation: w, conversationRef: T }, transport: E, generation: { startGeneration: ce, completeGeneration: le }, channel: D, overlay: O, onStopError: ue, generationConflictMessage: de = t, generationPersistenceErrorMessage: k = n, onStreamError: A, batchChunksPerFrame: j = !1 }) => {
17
+ let fe = _(A);
18
+ h(() => {
19
+ fe.current = A;
20
+ }, [A]);
21
+ let pe = _(j);
22
+ h(() => {
23
+ pe.current = j;
24
+ }, [j]);
25
+ let [M] = v(re), [N, P] = v(() => /* @__PURE__ */ new Set()), F = _(N);
26
+ F.current = N;
27
+ let [I, me] = v(() => /* @__PURE__ */ new Set()), L = _(/* @__PURE__ */ new Map()), R = _(/* @__PURE__ */ new Set()), z = _(/* @__PURE__ */ new Map()), B = _(/* @__PURE__ */ new Set()), V = _(/* @__PURE__ */ new Set()), he = _(/* @__PURE__ */ new Map()), H = _(!0), U = _(/* @__PURE__ */ new Map()), [ge, W] = v(U.current), G = _(/* @__PURE__ */ new Set()), [_e, ve] = v(G.current);
28
+ h(() => (H.current = !0, () => {
29
+ H.current = !1;
28
30
  }), []);
29
- let W = f((e) => {
30
- if (!z.current.has(e)) return;
31
- let t = new Map(z.current);
32
- t.delete(e), z.current = t, R.current && V(t);
33
- }, []), G = f((e, t, n) => {
34
- if (!R.current || !n()) return;
35
- let r = new Map(z.current);
31
+ let K = m((e) => {
32
+ if (!U.current.has(e)) return;
33
+ let t = new Map(U.current);
34
+ t.delete(e), U.current = t, H.current && W(t);
35
+ }, []), q = m((e, t, n) => {
36
+ if (!H.current || !n()) return;
37
+ let r = new Map(U.current);
36
38
  r.set(e, {
37
39
  retry: t,
38
40
  isCurrent: n
39
- }), z.current = r, V(r);
40
- }, []), he = f(async () => {
41
- if (!o) return;
42
- let e = z.current.get(s(o));
43
- if (!(!e || !e.isCurrent() || H.current.has(e))) {
44
- H.current.add(e), U(new Set(H.current));
41
+ }), U.current = r, W(r);
42
+ }, []), ye = m(async () => {
43
+ if (!s) return;
44
+ let e = U.current.get(c(s));
45
+ if (e && e.isCurrent() && !G.current.has(e)) {
46
+ G.current.add(e), ve(new Set(G.current));
45
47
  try {
46
48
  await e.retry();
47
49
  } finally {
48
- H.current.delete(e), R.current && U(new Set(H.current));
50
+ G.current.delete(e), H.current && ve(new Set(G.current));
49
51
  }
50
52
  }
51
- }, [o]), K = m(o);
52
- p(() => (K.current = o, () => k.cancelAll()), [o, k]);
53
- let q = f((e) => R.current && s(K.current ?? "") === e, []), J = f((e) => {
54
- W(e), j((t) => {
53
+ }, [s]), be = _(s);
54
+ h(() => (be.current = s, () => M.cancelAll()), [s, M]);
55
+ let J = m((e) => H.current && c(be.current ?? "") === e, []), Y = m((e) => {
56
+ K(e), P((t) => {
55
57
  if (t.has(e)) return t;
56
58
  let n = new Set(t);
57
59
  return n.add(e), n;
58
60
  });
59
- }, [W]), Y = f((e) => {
60
- j((t) => {
61
+ }, [K]), X = m((e) => {
62
+ P((t) => {
61
63
  if (!t.has(e)) return t;
62
64
  let n = new Set(t);
63
65
  return n.delete(e), n;
64
66
  });
65
- }, []), X = f((e, t) => {
66
- N((n) => {
67
+ }, []), Z = m((e, t) => {
68
+ me((n) => {
67
69
  if (n.has(e) === t) return n;
68
70
  let r = new Set(n);
69
71
  return t ? r.add(e) : r.delete(e), r;
70
72
  });
71
- }, []), Z = f((e, t) => {
72
- P.current.get(e) === t && (P.current.delete(e), X(e, !1));
73
- }, [X]), Q = oe(() => ee({
74
- transport: b,
75
- setConversation: v,
76
- conversationRef: y,
77
- resumingPathsRef: F,
78
- bufferedGenerationsRef: I,
79
- addStreamingPath: J,
80
- removeStreamingPath: Y,
81
- isPathDisplayed: q,
82
- generationPersistenceErrorMessage: T,
83
- frameScheduler: D ? k : void 0,
84
- stoppedGenerationIdsRef: L,
85
- onReloadError: G,
86
- onReloadSuccess: W
73
+ }, []), xe = m((e, t) => {
74
+ L.current.get(e) === t && (L.current.delete(e), Z(e, !1));
75
+ }, [Z]), Q = g(() => ee({
76
+ transport: E,
77
+ setConversation: w,
78
+ conversationRef: T,
79
+ resumingPathsRef: R,
80
+ bufferedGenerationsRef: z,
81
+ addStreamingPath: Y,
82
+ removeStreamingPath: X,
83
+ isPathDisplayed: J,
84
+ generationPersistenceErrorMessage: k,
85
+ frameScheduler: j ? M : void 0,
86
+ stoppedGenerationIdsRef: B,
87
+ onReloadError: q,
88
+ onReloadSuccess: K
87
89
  }), [
88
- J,
89
90
  Y,
90
- q,
91
- b,
92
- T,
93
- D,
91
+ X,
92
+ J,
93
+ E,
94
94
  k,
95
- G,
96
- W
97
- ]), ge = f((t, n, o, ee, re, f, p = g.Append, oe = {}) => {
98
- let m = f ?? ae(), h = s(t);
99
- k.flush(h), F.current.delete(h), P.current.set(h, m), pe.current.set(h, m), X(h, !0);
100
- let _;
101
- p === g.Regenerate ? _ = o : p === g.Edit && (_ = o - 1);
102
- let w = () => pe.current.get(h) !== m, E = ue(h, m), D = y.current?.messages[o];
103
- D ? I.current.set(h, {
104
- generationId: m,
105
- messageIndex: o,
106
- message: D
107
- }) : I.current.delete(h), J(h), C?.notifyGenerationStart?.(), S?.ensureConnected();
108
- let A = () => {
109
- w() || Y(h), Z(h, m), x(h, m), S?.notifyGenerationSettled?.();
110
- }, j = () => {
111
- if (w()) return;
112
- let e = I.current.get(h);
113
- !e || e.generationId !== m || (e.message = {
95
+ j,
96
+ M,
97
+ q,
98
+ K
99
+ ]), Se = m((t, n, a, s, ee, re, m = y.Append, h = {}) => {
100
+ let g = re ?? ie(), _ = c(t);
101
+ M.flush(_), R.current.delete(_), L.current.set(_, g), he.current.set(_, g), Z(_, !0);
102
+ let v;
103
+ m === y.Regenerate ? v = a : m === y.Edit && (v = a - 1);
104
+ let b = () => he.current.get(_) !== g, x = ce(_, g), S = T.current?.messages[a];
105
+ S ? z.current.set(_, {
106
+ generationId: g,
107
+ messageIndex: a,
108
+ message: S
109
+ }) : z.current.delete(_), Y(_), O?.notifyGenerationStart?.(), D?.ensureConnected();
110
+ let C = () => {
111
+ b() || X(_), xe(_, g), le(_, g), D?.notifyGenerationSettled?.();
112
+ }, ue = () => {
113
+ if (b()) return;
114
+ let e = z.current.get(_);
115
+ e && e.generationId === g && (e.message = {
114
116
  ...e.message,
115
- streamErrorMessage: T
116
- }, O.current?.(new i()), q(h) && v((t) => {
117
- if (!t || w() || !q(h)) return t;
118
- let n = l(t, e);
119
- return y.current = n, n;
117
+ streamErrorMessage: k
118
+ }, fe.current?.(new i()), J(_) && w((t) => {
119
+ if (!t || b() || !J(_)) return t;
120
+ let n = u(t, e);
121
+ return T.current = n, n;
120
122
  }));
121
- }, M = I.current.get(h), N = () => R.current && !w() && I.current.get(h) === M, z = async () => {
122
- if (N()) {
123
- if (!q(h)) {
124
- M && I.current.delete(h);
125
- return;
126
- }
127
- try {
128
- let n = await b.getConversation(e(t));
129
- if (!N()) return;
130
- if (W(h), !q(h)) {
131
- M && I.current.delete(h);
123
+ }, A = z.current.get(_), j = () => H.current && !b() && z.current.get(_) === A, N = async () => {
124
+ if (j()) {
125
+ if (!J(_)) A && z.current.delete(_);
126
+ else try {
127
+ let n = await E.getConversation(e(t));
128
+ if (!j()) return;
129
+ if (K(_), !J(_)) {
130
+ A && z.current.delete(_);
132
131
  return;
133
132
  }
134
- if (u(n) !== -1) {
135
- Q(t, n, { seedMessage: M?.message });
133
+ if (d(n) !== -1) {
134
+ Q(t, n, { seedMessage: A?.message });
136
135
  return;
137
136
  }
138
- if (M && M.messageIndex === n.messages.length - 1 && d(n) && ne(M.message)) {
139
- j();
137
+ if (A && A.messageIndex === n.messages.length - 1 && f(n) && ne(A.message)) {
138
+ ue();
140
139
  return;
141
140
  }
142
- M && I.current.delete(h), v(n), y.current = n;
141
+ A && z.current.delete(_), w(n), T.current = n;
143
142
  } catch {
144
- N() && G(h, z, N);
143
+ j() && q(_, N, j);
145
144
  }
146
145
  }
147
- }, B = {
148
- signal: E.signal,
146
+ }, P = {
147
+ signal: x.signal,
149
148
  onChunk: (e) => {
150
- if (w()) return;
151
- let t = I.current.get(h);
152
- if (t?.generationId === m) {
153
- let n = c([t.message], 0, e);
149
+ if (b()) return;
150
+ let t = z.current.get(_);
151
+ if (t?.generationId === g) {
152
+ let n = l([t.message], 0, e);
154
153
  n && (t.message = n[0]);
155
154
  }
156
- if (q(h)) {
157
- if (fe.current && t?.generationId === m) {
158
- k.schedule(h, () => {
159
- let e = I.current.get(h);
160
- if (w() || !q(h) || e?.generationId !== m) return;
161
- let t = { ...e };
162
- v((e) => {
163
- if (!e) return e;
164
- let n = l(e, t);
165
- return y.current = n, n;
166
- });
167
- });
168
- return;
169
- }
170
- v((t) => {
171
- if (!t) return t;
172
- let n = I.current.get(h), r;
173
- if (n?.generationId === m) r = l(t, n);
174
- else {
175
- let n = c(t.messages, o, e);
176
- if (!n) return t;
177
- r = {
178
- ...t,
179
- messages: n
180
- };
181
- }
182
- return y.current = r, r;
155
+ J(_) && (pe.current && t?.generationId === g ? M.schedule(_, () => {
156
+ let e = z.current.get(_);
157
+ if (b() || !J(_) || e?.generationId !== g) return;
158
+ let t = { ...e };
159
+ w((e) => {
160
+ if (!e) return e;
161
+ let n = u(e, t);
162
+ return T.current = n, n;
183
163
  });
184
- }
164
+ }) : w((t) => {
165
+ if (!t) return t;
166
+ let n = z.current.get(_), r;
167
+ if (n?.generationId === g) r = u(t, n);
168
+ else {
169
+ let n = l(t.messages, a, e);
170
+ if (!n) return t;
171
+ r = {
172
+ ...t,
173
+ messages: n
174
+ };
175
+ }
176
+ return T.current = r, r;
177
+ }));
185
178
  },
186
179
  onComplete: async () => {
187
- k.flush(h), A(), L.current.has(m) ? L.current.delete(m) : w() || C?.notifyGenerationEnd?.(), await z();
180
+ M.flush(_), C(), B.current.has(g) ? B.current.delete(g) : b() || O?.notifyGenerationEnd?.(), await N();
188
181
  },
189
182
  onError: (e) => {
190
- if (k.flush(h), O.current?.(e), e instanceof a && !w()) {
191
- he(e);
192
- return;
193
- }
194
- if (e instanceof r && oe.resumeOnConflict && !w()) {
195
- K(e);
196
- return;
197
- }
198
- V(e);
199
- }
200
- }, V = (e) => {
201
- let t = I.current.get(h), n = t?.generationId === m ? t : void 0;
202
- if (n && !(e instanceof i) && I.current.delete(h), A(), n && b.saveConversation && e instanceof i && e.status === ce) {
203
- me(e, n, b.saveConversation.bind(b));
204
- return;
183
+ M.flush(_), fe.current?.(e), e instanceof o && !b() ? U(e) : e instanceof r && h.resumeOnConflict && !b() ? ge(e) : F(e);
205
184
  }
206
- H(e, n);
207
- }, H = (e, t) => {
185
+ }, F = (e) => {
186
+ let t = z.current.get(_), n = t?.generationId === g ? t : void 0;
187
+ n && !(e instanceof i) && z.current.delete(_), C(), n && E.saveConversation && e instanceof i && e.status === oe ? me(e, n, E.saveConversation.bind(E)) : I(e, n);
188
+ }, I = (e, t) => {
208
189
  if (t && e instanceof i && (t.message = {
209
190
  ...t.message,
210
- streamErrorMessage: T
211
- }), w() || !q(h)) return;
212
- let n = le(e, de, T);
213
- v((e) => {
214
- if (!e || w() || !q(h)) return e;
215
- let r = t?.generationId === m ? l(e, t) : e, i = {
191
+ streamErrorMessage: k
192
+ }), b() || !J(_)) return;
193
+ let n = se(e, de, k);
194
+ w((e) => {
195
+ if (!e || b() || !J(_)) return e;
196
+ let r = t?.generationId === g ? u(e, t) : e, i = {
216
197
  ...r,
217
- messages: r.messages.map((e, t) => t === o ? {
198
+ messages: r.messages.map((e, t) => t === a ? {
218
199
  ...e,
219
200
  streamErrorMessage: n
220
201
  } : e)
221
202
  };
222
- return y.current = i, i;
203
+ return T.current = i, i;
223
204
  });
224
205
  }, me = async (n, r, i) => {
225
- let a = () => R.current && !w() && I.current.get(h) === r;
206
+ let a = () => H.current && !b() && z.current.get(_) === r;
226
207
  try {
227
- let o = await b.getConversation(e(t));
208
+ let o = await E.getConversation(e(t));
228
209
  if (!a()) return;
229
- if (r.messageIndex !== o.messages.length - 1 || !d(o)) {
230
- H(n, r);
210
+ if (r.messageIndex !== o.messages.length - 1 || !f(o)) {
211
+ I(n, r);
231
212
  return;
232
213
  }
233
- let s = await i(h, l(o, r));
234
- if (!a() || (I.current.delete(h), !q(h))) return;
235
- v(s), y.current = s;
214
+ let s = await i(_, u(o, r));
215
+ if (!a() || (z.current.delete(_), !J(_))) return;
216
+ w(s), T.current = s;
236
217
  } catch {
237
- a() && H(n, r);
218
+ a() && I(n, r);
238
219
  }
239
- }, U = () => {
240
- A(), L.current.has(m) ? L.current.delete(m) : w() || C?.notifyGenerationEnd?.();
241
- }, he = async (n) => {
242
- F.current.add(h), ge(await te(() => b.getConversation(e(t)), w), n, !1);
243
- }, K = async (n) => {
244
- P.current.get(h) === m && X(h, !1), F.current.add(h), ge(await te(() => b.getConversation(e(t)), w, (e) => e.messages.length === o && e.messages.at(-1)?.role === ie.User), n, !0);
245
- }, ge = (e, n, r) => {
246
- if (w()) {
247
- A();
220
+ }, V = () => {
221
+ C(), B.current.has(g) ? B.current.delete(g) : b() || O?.notifyGenerationEnd?.();
222
+ }, U = async (n) => {
223
+ R.current.add(_);
224
+ let r = await te(() => E.getConversation(e(t)), b);
225
+ W(r, n, !1);
226
+ }, ge = async (n) => {
227
+ L.current.get(_) === g && Z(_, !1), R.current.add(_);
228
+ let r = await te(() => E.getConversation(e(t)), b, (e) => e.messages.length === a && e.messages.at(-1)?.role === p.User);
229
+ W(r, n, !0);
230
+ }, W = (e, n, r) => {
231
+ if (b()) {
232
+ C();
248
233
  return;
249
234
  }
250
- let i = e?.messages[e.messages.length - 1], a = e != null && e.messages.length - 1 === o && i?.role === ie.Assistant, s = r && e != null && u(e) !== -1;
251
- if (!e || !a && !s) {
252
- F.current.delete(h), V(n);
235
+ let i = e?.messages[e.messages.length - 1], o = e != null && e.messages.length - 1 === a && i?.role === p.Assistant, s = r && e != null && d(e) !== -1;
236
+ if (!e || !o && !s) {
237
+ R.current.delete(_), F(n);
253
238
  return;
254
239
  }
255
- let c = I.current.get(h), l = c?.generationId === m ? c : void 0;
256
- if (d(e)) {
257
- Q(t, e, {
258
- seedMessage: a ? l?.message : void 0,
259
- skipDedupe: !0,
260
- onSettled: U
261
- });
262
- return;
263
- }
264
- F.current.delete(h), l && I.current.delete(h), q(h) && (v(e), y.current = e), U();
240
+ let c = z.current.get(_), l = c?.generationId === g ? c : void 0;
241
+ f(e) ? Q(t, e, {
242
+ seedMessage: o ? l?.message : void 0,
243
+ skipDedupe: !0,
244
+ onSettled: V
245
+ }) : (R.current.delete(_), l && z.current.delete(_), J(_) && (w(e), T.current = e), V());
265
246
  };
266
247
  (async () => {
267
248
  try {
268
- let e = S?.channelId ?? await S?.waitForChannel(se) ?? void 0, t = L.current.has(m);
269
- if (E.signal.aborted || w() || t) {
270
- I.current.get(h)?.generationId === m && I.current.delete(h), w() || Y(h), Z(h, m), x(h, m), S?.notifyGenerationSettled?.(), t ? L.current.delete(m) : w() || C?.notifyGenerationEnd?.();
249
+ let e = D?.channelId ?? await D?.waitForChannel(ae) ?? void 0, t = B.current.has(g);
250
+ if (x.signal.aborted || b() || t) {
251
+ z.current.get(_)?.generationId === g && z.current.delete(_), b() || X(_), xe(_, g), le(_, g), D?.notifyGenerationSettled?.(), t ? B.current.delete(g) : b() || O?.notifyGenerationEnd?.();
271
252
  return;
272
253
  }
273
- b.streamCompletion(h, n, ee, B, re, m, p, _, e);
254
+ E.streamCompletion(_, n, s, P, ee, g, m, v, e);
274
255
  } catch (e) {
275
- B.onError(e instanceof Error ? e : Error(String(e)));
256
+ P.onError(e instanceof Error ? e : Error(String(e)));
276
257
  }
277
258
  })();
278
259
  }, [
279
- ue,
280
- x,
281
- J,
260
+ ce,
261
+ le,
282
262
  Y,
283
263
  X,
284
264
  Z,
285
- q,
286
- S?.channelId,
287
- S?.ensureConnected,
288
- S?.waitForChannel,
289
- S?.notifyGenerationSettled,
290
- C,
291
- b,
265
+ xe,
266
+ J,
267
+ D?.channelId,
268
+ D?.ensureConnected,
269
+ D?.waitForChannel,
270
+ D?.notifyGenerationSettled,
271
+ O,
272
+ E,
292
273
  Q,
293
274
  de,
294
- T,
295
275
  k,
296
- G,
297
- W
298
- ]), _e = f((e, t) => {
299
- let n = s(e), r = I.current.get(n);
300
- return z.current.get(n)?.isCurrent() && r && t.messages.length - 1 >= r.messageIndex && t.messages[r.messageIndex].role === ie.Assistant && !d(t) ? (W(n), I.current.delete(n), t) : r ? l(t, r) : t;
301
- }, [W]), ve = f(() => {
302
- if (!o) return;
303
- let e = s(o), t = P.current.get(e) ?? _(y.current);
304
- if (!t) return;
305
- L.current.add(t), k.flush(e), C?.notifyStopGenerating?.();
306
- let n = I.current.get(e)?.message.content;
307
- b.stopCompletion({
308
- generationId: t,
309
- path: e,
310
- content: n
311
- }).catch((e) => {
312
- let t = e instanceof Error ? e : Error(String(e));
313
- w?.(t);
314
- });
276
+ M,
277
+ q,
278
+ K
279
+ ]), Ce = m((e, t) => {
280
+ let n = c(e), r = z.current.get(n);
281
+ return U.current.get(n)?.isCurrent() && r && t.messages.length - 1 >= r.messageIndex && t.messages[r.messageIndex].role === p.Assistant && !f(t) ? (K(n), z.current.delete(n), t) : r ? u(t, r) : t;
282
+ }, [K]), we = m(() => {
283
+ if (!s) return;
284
+ let e = c(s), t = L.current.get(e), n = t ?? C(T.current);
285
+ if (!n || V.current.has(n)) return;
286
+ V.current.add(n), B.current.add(n), M.flush(e), O?.notifyStopGenerating?.();
287
+ let r = z.current.get(e)?.message.content, i = () => L.current.get(e) === n || t == null && F.current.has(e), o = async () => {
288
+ let e = x / S;
289
+ for (let t = 0; t < e; t++) {
290
+ if (!i() || !H.current) return !0;
291
+ await new Promise((e) => setTimeout(e, S));
292
+ }
293
+ return !i();
294
+ };
295
+ (async () => {
296
+ try {
297
+ await E.stopCompletion({
298
+ generationId: n,
299
+ path: e,
300
+ content: r
301
+ });
302
+ } catch (e) {
303
+ let t = e instanceof Error ? e : Error(String(e));
304
+ if (t instanceof a && t.status === b && await o()) return;
305
+ V.current.delete(n), ue?.(t);
306
+ }
307
+ })();
315
308
  }, [
316
- o,
317
- y,
318
- k,
319
- w,
320
- C,
321
- b
322
- ]), ye = f((e, t) => Q(e, t), [Q]), be = o != null && A.has(s(o)), $ = o == null ? null : s(o), xe = $ != null && (M.has($) || be && _(y.current) != null), Se = $ ? B.get($) : void 0, Ce = Se?.isCurrent() ?? !1;
309
+ s,
310
+ T,
311
+ M,
312
+ ue,
313
+ O,
314
+ E
315
+ ]), Te = m((e, t) => Q(e, t), [Q]), Ee = s != null && N.has(c(s)), $ = s == null ? null : c(s), De = $ != null && (I.has($) || Ee && C(T.current) != null), Oe = $ ? ge.get($) : void 0, ke = Oe?.isCurrent() ?? !1;
323
316
  return {
324
- hasConversationReloadError: Ce,
325
- isReloadingConversation: !!Se && Ce && me.has(Se),
326
- retryConversationReload: he,
327
- startStream: ge,
328
- handleStop: ve,
329
- resumeIfAwaitingGeneration: ye,
330
- restoreBufferedGeneration: _e,
331
- isStreaming: be,
332
- canStopStreaming: xe
317
+ hasConversationReloadError: ke,
318
+ isReloadingConversation: !!Oe && ke && _e.has(Oe),
319
+ retryConversationReload: ye,
320
+ startStream: Se,
321
+ handleStop: we,
322
+ resumeIfAwaitingGeneration: Te,
323
+ restoreBufferedGeneration: Ce,
324
+ isStreaming: Ee,
325
+ canStopStreaming: De
333
326
  };
334
327
  };
335
328
  //#endregion
336
- export { v as useConversationStream };
329
+ export { w as useConversationStream };
@@ -0,0 +1,32 @@
1
+ import { ChangeEvent, RefObject } from 'react';
2
+ /** Parameters for `useImportFilePicker`. */
3
+ export interface UseImportFilePickerParams {
4
+ /**
5
+ * MIME types / file-extension filter string passed to the hidden input's
6
+ * `accept` attribute. The host resolves any platform-specific policy before
7
+ * passing this value.
8
+ */
9
+ accept?: string;
10
+ /** Called with the selected `File` after the user confirms their choice. */
11
+ onFileSelected: (file: File) => void;
12
+ }
13
+ /** Controls returned by `useImportFilePicker`. */
14
+ export interface UseImportFilePickerResult {
15
+ /** Ref to attach to the hidden `<input type="file">` element. */
16
+ inputRef: RefObject<HTMLInputElement | null>;
17
+ /** Programmatically opens the native file picker by clicking the hidden input. */
18
+ triggerImport: () => void;
19
+ /** `onChange` handler for the hidden input; calls `onFileSelected` and resets the value. */
20
+ handleFileChange: (event: ChangeEvent<HTMLInputElement>) => void;
21
+ }
22
+ /**
23
+ * Manages the hidden `<input type="file">` pattern used to trigger a native
24
+ * file-picker without a visible control.
25
+ *
26
+ * The host renders `<input ref={inputRef} type="file" onChange={handleFileChange} />`
27
+ * and calls `triggerImport()` when the user initiates an import action. The
28
+ * hook sets the `accept` attribute via a layout effect so re-selecting the
29
+ * same file always fires `onChange` (the value is reset after each selection).
30
+ */
31
+ export declare const useImportFilePicker: ({ accept, onFileSelected, }: UseImportFilePickerParams) => UseImportFilePickerResult;
32
+ //# sourceMappingURL=useImportFilePicker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useImportFilePicker.d.ts","sourceRoot":"","sources":["../../../src/conversation/useImportFilePicker/useImportFilePicker.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,WAAW,EAChB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAEf,4CAA4C;AAC5C,MAAM,WAAW,yBAAyB;IACxC;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,4EAA4E;IAC5E,cAAc,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;CACtC;AAED,kDAAkD;AAClD,MAAM,WAAW,yBAAyB;IACxC,iEAAiE;IACjE,QAAQ,EAAE,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;IAC7C,kFAAkF;IAClF,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,4FAA4F;IAC5F,gBAAgB,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CAClE;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,GAAI,6BAGjC,yBAAyB,KAAG,yBA6B9B,CAAC"}