@epam/ai-dial-chat-hooks 1.3.0-dev.98 → 1.3.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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 +18 -3
  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 +24 -2
  159. package/conversation/useConversationStream/generation-resume.d.ts.map +1 -1
  160. package/conversation/useConversationStream/generation-resume.js +110 -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
@@ -0,0 +1,173 @@
1
+ import { getApiErrorDetails as e } from "../../api-error/api-error.js";
2
+ import { useResourceFolders as t } from "../useResourceFolders/useResourceFolders.js";
3
+ import { ResourceSaveError as n } from "../resource-save-adapter.js";
4
+ import { ResourceSaveVersionError as r, SaveDestinationRoot as i, createPublishSavedResource as ee, runResourceSave as te } from "../resource-save.js";
5
+ import { useCallback as a, useEffect as ne, useMemo as o, useRef as re, useState as s } from "react";
6
+ import { SaveVersionMode as c, toFolderPathKey as ie } from "@epam/ai-dial-publish-panel";
7
+ //#region src/catalog/useResourceSavePanel/useResourceSavePanel.ts
8
+ var ae = (e) => new Set([...e].map((e) => e.replace(/\/$/, ""))), l = ({ isOpen: l, adapter: u, resourceId: d, currentFolderPath: f, currentVersion: p, versionPattern: m, listPersonalFolders: oe, organizationFolders: h, publishClient: g, ruleSourceOptions: _, labels: v, onSaved: y }) => {
9
+ let b = t({
10
+ listFolders: oe,
11
+ isEnabled: l
12
+ }), { getPublishRules: se } = g, x = o(() => ee(g), [g]), S = o(() => ({
13
+ rootKey: i.Personal,
14
+ path: f
15
+ }), [f]), [C, w] = s(S), [T, ce] = s(c.Keep), [E, D] = s(""), [O, k] = s(!1), [A, j] = s(), [le, M] = s(!1), [ue, N] = s(), [P, F] = s([]), [I, L] = s(!1), [R, z] = s(!1), B = re(void 0), de = a((e) => {
16
+ if (e?.rootKey !== i.Organization) return;
17
+ let t = ie(e.path);
18
+ t !== B.current && (B.current = t, F([]), z(!1), L(!0), (async () => {
19
+ try {
20
+ let n = await se(e.path.join("/"));
21
+ B.current === t && F(n);
22
+ } catch {
23
+ B.current === t && z(!0);
24
+ } finally {
25
+ B.current === t && L(!1);
26
+ }
27
+ })());
28
+ }, [se]);
29
+ ne(() => {
30
+ l && (B.current = void 0, F([]), L(!1), z(!1), w(S), ce(c.Keep), D(""), k(!1), j(void 0), N(void 0));
31
+ }, [l]);
32
+ let V = u.isVersioned && T === c.New, H = E.trim(), U = o(() => {
33
+ if (V) {
34
+ if (!m.test(H)) return r.Invalid;
35
+ if (H === p) return r.Unchanged;
36
+ if (H === A) return r.Exists;
37
+ }
38
+ }, [
39
+ V,
40
+ m,
41
+ H,
42
+ p,
43
+ A
44
+ ]), W = C.rootKey === i.Organization && (I || R), G = a((e) => {
45
+ D(e), N(void 0);
46
+ }, []), K = a(() => k(!0), []), q = h?.rememberPublishFolder, { saveError: J } = v, Y = a(async () => {
47
+ if (k(!0), U || W) return;
48
+ M(!0), N(void 0);
49
+ let t = {
50
+ resourceId: d,
51
+ currentFolderPath: f,
52
+ currentVersion: p,
53
+ destination: C,
54
+ versionMode: T,
55
+ newVersion: H,
56
+ rules: P
57
+ };
58
+ try {
59
+ let e = await te(u, t, x);
60
+ e.isPublished && q?.(C.path), y(e, t);
61
+ } catch (t) {
62
+ if (t instanceof n) {
63
+ N(t.message);
64
+ return;
65
+ }
66
+ let { message: r, status: i } = await e(t);
67
+ if (V && i === 409) {
68
+ j(H);
69
+ return;
70
+ }
71
+ N(r ?? J);
72
+ } finally {
73
+ M(!1);
74
+ }
75
+ }, [
76
+ u,
77
+ f,
78
+ p,
79
+ C,
80
+ V,
81
+ W,
82
+ y,
83
+ x,
84
+ q,
85
+ d,
86
+ P,
87
+ J,
88
+ H,
89
+ T,
90
+ U
91
+ ]), fe = a(() => void Y(), [Y]), X = o(() => h ? ae(h.loadingPaths) : void 0, [h]), { personalRoot: Z, organizationRoot: Q } = v, pe = o(() => {
92
+ let e = {
93
+ key: i.Personal,
94
+ label: Z,
95
+ items: b.folderItems,
96
+ expandedPaths: b.expandedPaths,
97
+ onExpandedPathsChange: b.onExpandedPathsChange,
98
+ loadingPaths: b.loadingPaths
99
+ };
100
+ return h ? [e, {
101
+ key: i.Organization,
102
+ label: Q,
103
+ items: h.folderItems,
104
+ expandedPaths: h.expandedPaths,
105
+ onExpandedPathsChange: h.onExpandedPathsChange,
106
+ loadingPaths: X,
107
+ hasAccessRules: !0
108
+ }] : [e];
109
+ }, [
110
+ h,
111
+ X,
112
+ Q,
113
+ b.expandedPaths,
114
+ b.folderItems,
115
+ b.loadingPaths,
116
+ b.onExpandedPathsChange,
117
+ Z
118
+ ]), { onCreateFolder: $ } = b, me = h?.onCreatePublishFolder, he = a(async (e, t, n) => {
119
+ e === i.Organization ? await me?.(t, n) : await $(t, n);
120
+ }, [$, me]), { getVersionError: ge } = v, _e = o(() => u.isVersioned && p != null ? {
121
+ versionMode: T,
122
+ onVersionModeChange: ce,
123
+ currentVersion: p,
124
+ newVersion: E,
125
+ onNewVersionChange: G,
126
+ onNewVersionBlur: K,
127
+ newVersionError: O && U ? ge(U, H) : void 0
128
+ } : void 0, [
129
+ u.isVersioned,
130
+ p,
131
+ ge,
132
+ O,
133
+ K,
134
+ E,
135
+ G,
136
+ H,
137
+ U,
138
+ T
139
+ ]), { accessRules: ve } = v, ye = o(() => ({
140
+ rules: P,
141
+ onRulesChange: F,
142
+ sourceOptions: _,
143
+ isLoading: I,
144
+ hasLoadError: R,
145
+ labels: ve
146
+ }), [
147
+ ve,
148
+ R,
149
+ I,
150
+ _,
151
+ P
152
+ ]);
153
+ return {
154
+ panelProps: {
155
+ onSubmit: fe,
156
+ isSubmitDisabled: V && !!U || W,
157
+ isSubmitting: le,
158
+ submitError: ue,
159
+ roots: pe,
160
+ destination: C,
161
+ onDestinationChange: w,
162
+ onCreateFolder: he,
163
+ version: _e,
164
+ accessRules: ye,
165
+ onPendingDestinationChange: de,
166
+ foldersError: b.hasError ? v.foldersLoadError : void 0,
167
+ onRetryFolders: b.retry
168
+ },
169
+ submit: Y
170
+ };
171
+ };
172
+ //#endregion
173
+ export { l as useResourceSavePanel };
@@ -22,7 +22,7 @@ var d = ({ api: d, skills: f, skillOverviewLabels: p }) => {
22
22
  }),
23
23
  d.getSkillMetadata(l, u)
24
24
  ]), v = h.status === "fulfilled" && h.value != null ? c(h.value) : void 0, y = _.status === "fulfilled" ? _.value : f.find((e) => e.url === i.id), b = g.status === "fulfilled" ? r(y, g.value.items, v?.about, p) : void 0, x = g.status === "fulfilled" ? n(g.value.items, u) : [], S = g.status === "fulfilled" ? s(g.value.items, u) : e;
25
- if (!(v == null && b == null)) return {
25
+ if (v != null || b != null) return {
26
26
  ...v == null ? {} : { promptContent: {
27
27
  content: v.body,
28
28
  ...v.description == null ? {} : { description: v.description },
@@ -41,8 +41,8 @@ var d = ({ api: d, skills: f, skillOverviewLabels: p }) => {
41
41
  if (t == null) return;
42
42
  let n = o(e, t.path);
43
43
  if (n == null) return;
44
- let r = await a(await d.downloadSkillFile(t.bucket, t.path, n));
45
- if (r != null) return n === "SKILL.md" ? c(r).body : r;
44
+ let r = await d.downloadSkillFile(t.bucket, t.path, n), i = await a(r);
45
+ if (i != null) return n === "SKILL.md" ? c(i).body : i;
46
46
  }, [d]),
47
47
  onLoadSkillDetailsFile: l(async (e) => {
48
48
  let t = m.current;
@@ -0,0 +1,43 @@
1
+ /** The entity an unpublish confirmation is open for. */
2
+ export interface UnpublishConfirmationPayload {
3
+ /** Display name of the entity, interpolated into the confirmation message. */
4
+ name: string;
5
+ /** Folders the entity may be unpublished from, as `/`-joined paths; `''` is the public root. */
6
+ folders: string[];
7
+ }
8
+ /** Props for an unpublish confirmation dialog, shaped to spread into `UnpublishConfirmationDialog` from `@epam/ai-dial-publish-panel`. */
9
+ export interface UnpublishConfirmationDialogState {
10
+ /** Whether the dialog is open. */
11
+ isOpen: boolean;
12
+ /** Name of the pending entity, or `''` when closed. */
13
+ name: string;
14
+ /** Folders of the pending entity, or `[]` when closed. */
15
+ folders: string[];
16
+ /** The picked folder when there are several; `null` until one is picked. */
17
+ selectedFolder: string | null;
18
+ /** Records the folder the user picks. */
19
+ onSelectedFolderChange: (folder: string) => void;
20
+ /** Whether the unpublish request is running. */
21
+ isLoading: boolean;
22
+ /** Runs the request for the picked (or only) folder, then closes the dialog. */
23
+ onConfirm: () => Promise<void>;
24
+ /** Closes the dialog unless the request is running. */
25
+ onClose: () => void;
26
+ }
27
+ /** What `useUnpublishConfirmation` returns. */
28
+ export interface UnpublishConfirmationControls<T extends UnpublishConfirmationPayload> {
29
+ /** Opens the dialog for `payload` with no folder picked; `returnFocusTo` names the element focused after it closes. */
30
+ open: (payload: T, returnFocusTo?: HTMLElement | null) => void;
31
+ /** The entity the dialog is open for, or `null`. */
32
+ pending: T | null;
33
+ /** Dialog props. */
34
+ dialog: UnpublishConfirmationDialogState;
35
+ }
36
+ /**
37
+ * Owns an unpublish confirmation: the pending entity, the folder pick when it
38
+ * is published to several folders, and the request run on confirm.
39
+ *
40
+ * @param runUnpublish - Sends the request for `folderPath` and reports success or failure itself; a rejection keeps the dialog open.
41
+ */
42
+ export declare const useUnpublishConfirmation: <T extends UnpublishConfirmationPayload>(runUnpublish: (payload: T, folderPath: string) => Promise<void>) => UnpublishConfirmationControls<T>;
43
+ //# sourceMappingURL=useUnpublishConfirmation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useUnpublishConfirmation.d.ts","sourceRoot":"","sources":["../../../src/catalog/useUnpublishConfirmation/useUnpublishConfirmation.ts"],"names":[],"mappings":"AAGA,wDAAwD;AACxD,MAAM,WAAW,4BAA4B;IAC3C,8EAA8E;IAC9E,IAAI,EAAE,MAAM,CAAC;IACb,gGAAgG;IAChG,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,0IAA0I;AAC1I,MAAM,WAAW,gCAAgC;IAC/C,kCAAkC;IAClC,MAAM,EAAE,OAAO,CAAC;IAChB,uDAAuD;IACvD,IAAI,EAAE,MAAM,CAAC;IACb,0DAA0D;IAC1D,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,4EAA4E;IAC5E,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,yCAAyC;IACzC,sBAAsB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,gDAAgD;IAChD,SAAS,EAAE,OAAO,CAAC;IACnB,gFAAgF;IAChF,SAAS,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,uDAAuD;IACvD,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,+CAA+C;AAC/C,MAAM,WAAW,6BAA6B,CAC5C,CAAC,SAAS,4BAA4B;IAEtC,uHAAuH;IACvH,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC,EAAE,aAAa,CAAC,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAC;IAC/D,oDAAoD;IACpD,OAAO,EAAE,CAAC,GAAG,IAAI,CAAC;IAClB,oBAAoB;IACpB,MAAM,EAAE,gCAAgC,CAAC;CAC1C;AAED;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,GACnC,CAAC,SAAS,4BAA4B,EAEtC,cAAc,CAAC,OAAO,EAAE,CAAC,EAAE,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,KAC9D,6BAA6B,CAAC,CAAC,CAyDjC,CAAC"}
@@ -0,0 +1,46 @@
1
+ import { useAsyncConfirmDialog as e } from "../../conversation/useAsyncConfirmDialog/useAsyncConfirmDialog.js";
2
+ import { useCallback as t, useMemo as n, useState as r } from "react";
3
+ //#region src/catalog/useUnpublishConfirmation/useUnpublishConfirmation.ts
4
+ var i = (i) => {
5
+ let { pending: a, isPending: o, isRunning: s, open: c, close: l, confirm: u } = e(), [d, f] = r(null), p = t((e, t) => {
6
+ f(null), c(e, t);
7
+ }, [c]), m = t(() => {
8
+ s || (l(), f(null));
9
+ }, [l, s]), h = t(async () => {
10
+ await u(async (e) => {
11
+ let t = d == null ? e.folders[0] : e.folders.find((e) => e === d);
12
+ t != null && await i(e, t);
13
+ }, () => ""), f(null);
14
+ }, [
15
+ u,
16
+ i,
17
+ d
18
+ ]), g = n(() => ({
19
+ isOpen: o,
20
+ name: a?.name ?? "",
21
+ folders: a?.folders ?? [],
22
+ selectedFolder: d,
23
+ onSelectedFolderChange: f,
24
+ isLoading: s,
25
+ onConfirm: h,
26
+ onClose: m
27
+ }), [
28
+ m,
29
+ h,
30
+ o,
31
+ s,
32
+ a,
33
+ d
34
+ ]);
35
+ return n(() => ({
36
+ open: p,
37
+ pending: a,
38
+ dialog: g
39
+ }), [
40
+ g,
41
+ p,
42
+ a
43
+ ]);
44
+ };
45
+ //#endregion
46
+ export { i as useUnpublishConfirmation };
@@ -0,0 +1,22 @@
1
+ import { UnpublishableFoldersClient, UnpublishTarget } from '../unpublishable-folders';
2
+ /** What `useUnpublishableFolders` reports. */
3
+ export interface UnpublishableFoldersState {
4
+ /** `false` while the lookup for the current entity is in flight. */
5
+ isResolved: boolean;
6
+ /** Folders the caller may unpublish the entity from, as path segments, newest first; empty until resolved. */
7
+ folders: string[][];
8
+ /** Re-runs the lookup, keeping the folders already reported until it succeeds; a failed re-run keeps them. */
9
+ refresh: () => void;
10
+ }
11
+ /**
12
+ * Tracks the folders the caller may unpublish one entity from, through
13
+ * `resolveUnpublishableFolders`. A failed first lookup settles as no folders,
14
+ * a failed `refresh` keeps the folders already reported, and a response for an
15
+ * entity the host has moved away from is dropped.
16
+ *
17
+ * @param client - Configured publish requests, from `createPublishApiClient`; it must be referentially stable.
18
+ * @param target - The entity to check, or `null` while none is loaded.
19
+ * @param isAdmin - Whether the session user is a DIAL administrator.
20
+ */
21
+ export declare const useUnpublishableFolders: (client: UnpublishableFoldersClient, target: UnpublishTarget | null, isAdmin: boolean) => UnpublishableFoldersState;
22
+ //# sourceMappingURL=useUnpublishableFolders.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useUnpublishableFolders.d.ts","sourceRoot":"","sources":["../../../src/catalog/useUnpublishableFolders/useUnpublishableFolders.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,0BAA0B,EAC/B,KAAK,eAAe,EACrB,MAAM,0BAA0B,CAAC;AAElC,8CAA8C;AAC9C,MAAM,WAAW,yBAAyB;IACxC,oEAAoE;IACpE,UAAU,EAAE,OAAO,CAAC;IACpB,8GAA8G;IAC9G,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC;IACpB,8GAA8G;IAC9G,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAaD;;;;;;;;;GASG;AACH,eAAO,MAAM,uBAAuB,GAClC,QAAQ,0BAA0B,EAClC,QAAQ,eAAe,GAAG,IAAI,EAC9B,SAAS,OAAO,KACf,yBAwDF,CAAC"}
@@ -0,0 +1,53 @@
1
+ import { resolveUnpublishableFolders as e } from "../unpublishable-folders.js";
2
+ import { useCallback as t, useEffect as n, useMemo as r, useState as i } from "react";
3
+ //#region src/catalog/useUnpublishableFolders/useUnpublishableFolders.ts
4
+ var a = [], o = (e) => e == null ? null : `${e.entityType}:${e.entityId}`, s = (s, c, l) => {
5
+ let u = c?.entityType ?? null, d = c?.entityId ?? null, f = c?.isOwner ?? !1, p = o(c), [m, h] = i({
6
+ key: null,
7
+ folders: []
8
+ }), [g, _] = i(0);
9
+ n(() => {
10
+ if (u == null || d == null) return;
11
+ let t = `${u}:${d}`, n = !1;
12
+ return (async () => {
13
+ try {
14
+ let r = await e(s, {
15
+ entityType: u,
16
+ entityId: d,
17
+ isOwner: f
18
+ }, l);
19
+ n || h({
20
+ key: t,
21
+ folders: r
22
+ });
23
+ } catch {
24
+ if (n) return;
25
+ h((e) => e.key === t ? e : {
26
+ key: t,
27
+ folders: []
28
+ });
29
+ }
30
+ })(), () => {
31
+ n = !0;
32
+ };
33
+ }, [
34
+ s,
35
+ u,
36
+ d,
37
+ f,
38
+ l,
39
+ g
40
+ ]);
41
+ let v = t(() => _((e) => e + 1), []), y = p != null && m.key === p, b = y ? m.folders : a;
42
+ return r(() => ({
43
+ isResolved: y,
44
+ folders: b,
45
+ refresh: v
46
+ }), [
47
+ b,
48
+ y,
49
+ v
50
+ ]);
51
+ };
52
+ //#endregion
53
+ export { s as useUnpublishableFolders };
package/catalog.js CHANGED
@@ -1,25 +1,43 @@
1
1
  import { createPublishApiClient as e, toPublishRuleDto as t } from "./catalog/create-publish-api.js";
2
2
  import { buildChatCompletionsUrl as n, buildDeploymentConnectApi as r, buildResponsesUrl as i } from "./catalog/deployment-endpoint-url.js";
3
- import { decodeDeploymentId as a, encodeDeploymentId as o, findDeploymentByIdOrReference as s, normalizeDeploymentId as c } from "./catalog/deployment-id.js";
4
- import { AuthenticationType as l } from "./catalog/entity-details.js";
5
- import { buildResetFields as u, mapDeploymentLimitsToInput as d } from "./catalog/map-deployment-limits-to-input.js";
6
- import { mapDeploymentLimitsDtoToCatalogLimits as f } from "./catalog/map-deployment-limits-to-catalog.js";
7
- import { DEFAULT_ENTITY_DETAILS_LABELS as p, mapDeploymentDetailsDtoToEntityDetails as m, mapEntityDetailsToCatalogDetails as h, mapToolsetCredentials as g } from "./catalog/map-entity-details-to-catalog.js";
8
- import { mapDeploymentToCatalogItem as _, mapDeploymentToolsetCredentials as v, mapToolsetToCatalogItem as y, resolveDeploymentFolder as b } from "./catalog/map-deployment-to-catalog-item.js";
9
- import { buildPromptOverview as x, isOrganisationPromptItem as S, mapPromptToCatalogItem as C } from "./catalog/map-prompt-to-catalog-item.js";
10
- import { PUBLIC_SKILL_BUCKET as w, SKILL_LISTING_MAX_PAGES as T, SKILL_LISTING_PAGE_SIZE as E, SKILL_MANIFEST_MAX_BYTES as D, SkillSource as O, parseSkillResourceUrl as k } from "./skill/skill-types.js";
11
- import { buildSkillContentTree as A, buildSkillOverview as j, mapSkillToCatalogItem as M, readSkillFileBytes as N, readSkillFilePreviewBytes as P, readSkillManifest as F, resolveSkillFileDownloadPath as I, resolveSkillManifestFileId as L } from "./catalog/map-skill-to-catalog-item.js";
12
- import { McpResourceKind as R, buildApplicationMcpUrl as z, buildConnectApi as B, buildToolsetMcpUrl as V, resolveMcpResourceKind as H } from "./catalog/mcp-endpoint-url.js";
13
- import { getPublicCatalogEntityFolderPath as U, isPublicCatalogEntityId as W, mapPublishConversationResultDto as G, mapPublishHistoryEntryDto as K, toPublishEntityType as q } from "./catalog/publish.js";
14
- import { deriveAvailableTabIds as J, deriveFavoriteItems as Y, filterCatalogItemsBySelector as X, filterHiddenOwnedItems as Z, reconcileFilterTopics as Q } from "./catalog/catalog-derivations.js";
15
- import { CatalogPrimaryActionType as $, resolveCatalogPrimaryAction as ee } from "./catalog/catalog-primary-action.js";
16
- import { useCatalogEditNavigation as te } from "./catalog/useCatalogEditNavigation/useCatalogEditNavigation.js";
17
- import { useSkillItemDetails as ne } from "./catalog/useSkillItemDetails.js";
18
- import { useCatalogItemDetails as re } from "./catalog/useCatalogItemDetails.js";
19
- import { useCatalogToolsetCredentials as ie } from "./catalog/useCatalogToolsetCredentials/useCatalogToolsetCredentials.js";
20
- import { useApplicationCredentials as ae } from "./catalog/useApplicationCredentials/useApplicationCredentials.js";
21
- import { useSkillDetailsPanelData as oe } from "./catalog/useSkillDetailsPanelData/useSkillDetailsPanelData.js";
22
- import { FavoriteEntityType as se, useFavoriteEntitiesState as ce } from "./catalog/useFavoriteEntitiesState/useFavoriteEntitiesState.js";
23
- import { usePublishFolders as le } from "./catalog/usePublishFolders/usePublishFolders.js";
24
- import { SkillPreviewErrorKind as ue, useSkillFilePreview as de } from "./skill/useSkillFilePreview.js";
25
- export { l as AuthenticationType, $ as CatalogPrimaryActionType, p as DEFAULT_ENTITY_DETAILS_LABELS, se as FavoriteEntityType, R as McpResourceKind, w as PUBLIC_SKILL_BUCKET, T as SKILL_LISTING_MAX_PAGES, E as SKILL_LISTING_PAGE_SIZE, D as SKILL_MANIFEST_MAX_BYTES, ue as SkillPreviewErrorKind, O as SkillSource, z as buildApplicationMcpUrl, n as buildChatCompletionsUrl, B as buildConnectApi, r as buildDeploymentConnectApi, x as buildPromptOverview, u as buildResetFields, i as buildResponsesUrl, A as buildSkillContentTree, j as buildSkillOverview, V as buildToolsetMcpUrl, e as createPublishApiClient, a as decodeDeploymentId, J as deriveAvailableTabIds, Y as deriveFavoriteItems, o as encodeDeploymentId, X as filterCatalogItemsBySelector, Z as filterHiddenOwnedItems, s as findDeploymentByIdOrReference, U as getPublicCatalogEntityFolderPath, S as isOrganisationPromptItem, W as isPublicCatalogEntityId, m as mapDeploymentDetailsDtoToEntityDetails, f as mapDeploymentLimitsDtoToCatalogLimits, d as mapDeploymentLimitsToInput, _ as mapDeploymentToCatalogItem, v as mapDeploymentToolsetCredentials, h as mapEntityDetailsToCatalogDetails, C as mapPromptToCatalogItem, G as mapPublishConversationResultDto, K as mapPublishHistoryEntryDto, M as mapSkillToCatalogItem, g as mapToolsetCredentials, y as mapToolsetToCatalogItem, c as normalizeDeploymentId, k as parseSkillResourceUrl, N as readSkillFileBytes, P as readSkillFilePreviewBytes, F as readSkillManifest, Q as reconcileFilterTopics, ee as resolveCatalogPrimaryAction, b as resolveDeploymentFolder, H as resolveMcpResourceKind, I as resolveSkillFileDownloadPath, L as resolveSkillManifestFileId, q as toPublishEntityType, t as toPublishRuleDto, ae as useApplicationCredentials, te as useCatalogEditNavigation, re as useCatalogItemDetails, ie as useCatalogToolsetCredentials, ce as useFavoriteEntitiesState, le as usePublishFolders, oe as useSkillDetailsPanelData, de as useSkillFilePreview, ne as useSkillItemDetails };
3
+ import { createDeploymentLookup as a, decodeDeploymentId as o, encodeDeploymentId as s, findDeploymentByIdOrReference as c, normalizeDeploymentId as l } from "./catalog/deployment-id.js";
4
+ import { AuthenticationType as u } from "./catalog/entity-details.js";
5
+ import { buildResetFields as d, mapDeploymentLimitsToInput as f } from "./catalog/map-deployment-limits-to-input.js";
6
+ import { mapDeploymentLimitsDtoToCatalogLimits as p } from "./catalog/map-deployment-limits-to-catalog.js";
7
+ import { DEFAULT_ENTITY_DETAILS_LABELS as m, mapDeploymentDetailsDtoToEntityDetails as h, mapEntityDetailsToCatalogDetails as g, mapToolsetCredentials as _ } from "./catalog/map-entity-details-to-catalog.js";
8
+ import { mapDeploymentToCatalogItem as v, mapDeploymentToolsetCredentials as y, mapToolsetToCatalogItem as b, resolveDeploymentFolder as x, supportsChatInterface as S } from "./catalog/map-deployment-to-catalog-item.js";
9
+ import { buildPromptOverview as C, isOrganisationPromptItem as w, mapPromptToCatalogItem as T } from "./catalog/map-prompt-to-catalog-item.js";
10
+ import { PUBLIC_SKILL_BUCKET as E, SKILL_LISTING_MAX_PAGES as D, SKILL_LISTING_PAGE_SIZE as O, SKILL_MANIFEST_MAX_BYTES as k, SkillSource as A, parseSkillResourceUrl as j } from "./skill/skill-types.js";
11
+ import { buildSkillContentTree as M, buildSkillOverview as N, mapSkillToCatalogItem as P, readSkillFileBytes as F, readSkillFilePreviewBytes as I, readSkillManifest as L, resolveSkillFileDownloadPath as R, resolveSkillManifestFileId as z } from "./catalog/map-skill-to-catalog-item.js";
12
+ import { McpResourceKind as B, buildApplicationMcpUrl as V, buildConnectApi as H, buildToolsetMcpUrl as U, resolveMcpResourceKind as W } from "./catalog/mcp-endpoint-url.js";
13
+ import { getPublicCatalogEntityFolderPath as G, isPublicCatalogEntityId as K, mapPublishConversationResultDto as q, mapPublishHistoryEntryDto as J, toPublishEntityType as Y } from "./catalog/publish.js";
14
+ import { usePublishHistory as X } from "./catalog/use-publish-history.js";
15
+ import { resolveUnpublishableFolders as Z } from "./catalog/unpublishable-folders.js";
16
+ import { useUnpublishableFolders as Q } from "./catalog/useUnpublishableFolders/useUnpublishableFolders.js";
17
+ import { useUnpublishConfirmation as $ } from "./catalog/useUnpublishConfirmation/useUnpublishConfirmation.js";
18
+ import { canEditShareAccess as ee, deriveAvailableTabIds as te, deriveFavoriteItems as ne, filterCatalogItemsBySelector as re, filterHiddenOwnedItems as ie, reconcileFilterTopics as ae } from "./catalog/catalog-derivations.js";
19
+ import { CatalogEntityKind as oe, findSchemaDisplayName as se, resolveCatalogEntityKind as ce } from "./catalog/catalog-entity-kind.js";
20
+ import { FavoriteEntityType as le, useFavoriteEntitiesState as ue } from "./catalog/useFavoriteEntitiesState/useFavoriteEntitiesState.js";
21
+ import { resolveFavoriteEntityType as de } from "./catalog/favorite-entity-type.js";
22
+ import { parseCatalogFilterTopics as fe, resolveCatalogActiveTab as pe, resolveCatalogSortKey as me } from "./catalog/catalog-preferences.js";
23
+ import { findWorstCappedRow as he } from "./catalog/usage-limit-rows.js";
24
+ import { CatalogPrimaryActionType as ge, resolveCatalogPrimaryAction as _e } from "./catalog/catalog-primary-action.js";
25
+ import { useCatalogItemDelete as ve } from "./catalog/useCatalogItemDelete/useCatalogItemDelete.js";
26
+ import { useCatalogEditNavigation as ye } from "./catalog/useCatalogEditNavigation/useCatalogEditNavigation.js";
27
+ import { useSkillItemDetails as be } from "./catalog/useSkillItemDetails.js";
28
+ import { useCatalogItemDetails as xe } from "./catalog/useCatalogItemDetails.js";
29
+ import { useCatalogToolsetCredentials as Se } from "./catalog/useCatalogToolsetCredentials/useCatalogToolsetCredentials.js";
30
+ import { buildApplicationCredentialLoginParams as Ce, mapApplicationCredentials as we } from "./catalog/application-credentials.js";
31
+ import { useApplicationCredentials as Te } from "./catalog/useApplicationCredentials/useApplicationCredentials.js";
32
+ import { DEFAULT_APPLICATION_CREDENTIAL_ACTIONS_LABELS as Ee, useApplicationCredentialActions as De } from "./catalog/useApplicationCredentialActions/useApplicationCredentialActions.js";
33
+ import { useSkillDetailsPanelData as Oe } from "./catalog/useSkillDetailsPanelData/useSkillDetailsPanelData.js";
34
+ import { hasPublishFolderWriteAccess as ke, rememberPublishFolderKey as Ae, usePublishFolders as je } from "./catalog/usePublishFolders/usePublishFolders.js";
35
+ import { useResourceFolders as Me } from "./catalog/useResourceFolders/useResourceFolders.js";
36
+ import { parseResourceFolderPath as Ne } from "./catalog/resource-folder.js";
37
+ import { ResourceSaveError as Pe, isResourceCreateAdapter as Fe } from "./catalog/resource-save-adapter.js";
38
+ import { ResourceNameConflictKind as Ie, getResourceNameConflictKind as Le, withResourceNameConflictMessages as Re } from "./catalog/resource-name-conflict.js";
39
+ import { ResourceSaveOutcome as ze, ResourceSaveVersionError as Be, SaveDestinationRoot as Ve, createPublishSavedResource as He, runResourceSave as Ue } from "./catalog/resource-save.js";
40
+ import { createEmbeddedApplicationSaveAdapter as We, createHostApplicationSaveAdapter as Ge, createPromptCreateAdapter as Ke, createPromptFolderLister as qe, createPromptSaveAdapter as Je, createSkillFolderLister as Ye, createToolsetCreateAdapter as Xe, createToolsetSaveAdapter as Ze } from "./catalog/resource-save-adapters.js";
41
+ import { useResourceSavePanel as Qe } from "./catalog/useResourceSavePanel/useResourceSavePanel.js";
42
+ import { SkillPreviewErrorKind as $e, useSkillFilePreview as et } from "./skill/useSkillFilePreview.js";
43
+ export { u as AuthenticationType, oe as CatalogEntityKind, ge as CatalogPrimaryActionType, Ee as DEFAULT_APPLICATION_CREDENTIAL_ACTIONS_LABELS, m as DEFAULT_ENTITY_DETAILS_LABELS, le as FavoriteEntityType, B as McpResourceKind, E as PUBLIC_SKILL_BUCKET, Ie as ResourceNameConflictKind, Pe as ResourceSaveError, ze as ResourceSaveOutcome, Be as ResourceSaveVersionError, D as SKILL_LISTING_MAX_PAGES, O as SKILL_LISTING_PAGE_SIZE, k as SKILL_MANIFEST_MAX_BYTES, Ve as SaveDestinationRoot, $e as SkillPreviewErrorKind, A as SkillSource, Ce as buildApplicationCredentialLoginParams, V as buildApplicationMcpUrl, n as buildChatCompletionsUrl, H as buildConnectApi, r as buildDeploymentConnectApi, C as buildPromptOverview, d as buildResetFields, i as buildResponsesUrl, M as buildSkillContentTree, N as buildSkillOverview, U as buildToolsetMcpUrl, ee as canEditShareAccess, a as createDeploymentLookup, We as createEmbeddedApplicationSaveAdapter, Ge as createHostApplicationSaveAdapter, Ke as createPromptCreateAdapter, qe as createPromptFolderLister, Je as createPromptSaveAdapter, e as createPublishApiClient, He as createPublishSavedResource, Ye as createSkillFolderLister, Xe as createToolsetCreateAdapter, Ze as createToolsetSaveAdapter, o as decodeDeploymentId, te as deriveAvailableTabIds, ne as deriveFavoriteItems, s as encodeDeploymentId, re as filterCatalogItemsBySelector, ie as filterHiddenOwnedItems, c as findDeploymentByIdOrReference, se as findSchemaDisplayName, he as findWorstCappedRow, G as getPublicCatalogEntityFolderPath, Le as getResourceNameConflictKind, ke as hasPublishFolderWriteAccess, w as isOrganisationPromptItem, K as isPublicCatalogEntityId, Fe as isResourceCreateAdapter, we as mapApplicationCredentials, h as mapDeploymentDetailsDtoToEntityDetails, p as mapDeploymentLimitsDtoToCatalogLimits, f as mapDeploymentLimitsToInput, v as mapDeploymentToCatalogItem, y as mapDeploymentToolsetCredentials, g as mapEntityDetailsToCatalogDetails, T as mapPromptToCatalogItem, q as mapPublishConversationResultDto, J as mapPublishHistoryEntryDto, P as mapSkillToCatalogItem, _ as mapToolsetCredentials, b as mapToolsetToCatalogItem, l as normalizeDeploymentId, fe as parseCatalogFilterTopics, Ne as parseResourceFolderPath, j as parseSkillResourceUrl, F as readSkillFileBytes, I as readSkillFilePreviewBytes, L as readSkillManifest, ae as reconcileFilterTopics, Ae as rememberPublishFolderKey, pe as resolveCatalogActiveTab, ce as resolveCatalogEntityKind, _e as resolveCatalogPrimaryAction, me as resolveCatalogSortKey, x as resolveDeploymentFolder, de as resolveFavoriteEntityType, W as resolveMcpResourceKind, R as resolveSkillFileDownloadPath, z as resolveSkillManifestFileId, Z as resolveUnpublishableFolders, Ue as runResourceSave, S as supportsChatInterface, Y as toPublishEntityType, t as toPublishRuleDto, De as useApplicationCredentialActions, Te as useApplicationCredentials, ye as useCatalogEditNavigation, ve as useCatalogItemDelete, xe as useCatalogItemDetails, Se as useCatalogToolsetCredentials, ue as useFavoriteEntitiesState, je as usePublishFolders, X as usePublishHistory, Me as useResourceFolders, Qe as useResourceSavePanel, Oe as useSkillDetailsPanelData, et as useSkillFilePreview, be as useSkillItemDetails, $ as useUnpublishConfirmation, Q as useUnpublishableFolders, Re as withResourceNameConflictMessages };
@@ -0,0 +1,47 @@
1
+ import { ConversationResponseDto, ConversationsApi } from '@epam/ai-dial-chat-api-client';
2
+ import { ConversationStreamTransport } from './useConversationStream/useConversationStream';
3
+ /** The sidebar list side effects of a conversation page; a conversation outside the sidebar has none. */
4
+ export interface ConversationListSync {
5
+ /** Shows a new title on the conversation's row. */
6
+ updateTitle: (id: string, title: string) => void;
7
+ /** Moves the conversation's row up after activity. */
8
+ bumpActivity: (id: string) => void;
9
+ /** Shows the unread indicator until the conversation is viewed. */
10
+ markUnread: (id: string) => void;
11
+ /** Records that the conversation was seen and clears its unread indicator. */
12
+ markViewed: (id: string) => Promise<void>;
13
+ /** Removes the conversation's row. */
14
+ remove: (id: string) => void;
15
+ /** Re-reads the list, optionally waiting until the given ids appear in it. */
16
+ refresh: (expectedIds?: readonly string[]) => Promise<void>;
17
+ /** The open chat is marked viewed without a sidebar row saying it is unread; a project chat has no row. */
18
+ shouldMarkOpenChatViewed?: boolean;
19
+ }
20
+ /** Where a conversation page reads and writes its conversation, and where it navigates. */
21
+ export interface ConversationDataSource {
22
+ /** Stream, stop, attach, get and save for `useConversationStream`. */
23
+ transport: ConversationStreamTransport;
24
+ /** Loads a conversation by its id (also the custom-viewer reload). */
25
+ getConversation: (id: string, signal?: AbortSignal) => Promise<ConversationResponseDto>;
26
+ /** Saves a conversation by its stream path (model changes, status messages). */
27
+ saveConversation: (path: string, conversation: ConversationResponseDto) => Promise<ConversationResponseDto>;
28
+ /** Save and delete for `useConversationHandlers`. */
29
+ handlersApi: Pick<ConversationsApi, 'saveConversation' | 'deleteConversation'>;
30
+ /** Watches for the title the first reply produces; returns a cleanup. */
31
+ watchTitle: (id: string, previousName: string, onUpdated: (title: string) => void) => () => void;
32
+ /** The route of a conversation (after duplicate or a custom-viewer create). */
33
+ getConversationRoute: (id: string) => string;
34
+ /** Where a deleted or missing conversation navigates. */
35
+ getExitRoute: () => string;
36
+ /** Whether the conversation opens read-only. */
37
+ isReadOnly: (id: string) => boolean;
38
+ /** Sidebar list side effects; {@link NO_CONVERSATION_LIST_SYNC} when the conversation is not in the sidebar. */
39
+ listSync: ConversationListSync;
40
+ /** Whether a read-only conversation offers Duplicate. */
41
+ canDuplicate: boolean;
42
+ /** Translation key of the toast shown when the conversation cannot be loaded; the page's own when unset. The host resolves it. */
43
+ notFoundMessageKey?: string;
44
+ }
45
+ /** List side effects of a conversation that is not in the sidebar: each one does nothing. */
46
+ export declare const NO_CONVERSATION_LIST_SYNC: ConversationListSync;
47
+ //# sourceMappingURL=conversation-data-source.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversation-data-source.d.ts","sourceRoot":"","sources":["../../src/conversation/conversation-data-source.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uBAAuB,EACvB,gBAAgB,EACjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+CAA+C,CAAC;AAEjG,yGAAyG;AACzG,MAAM,WAAW,oBAAoB;IACnC,mDAAmD;IACnD,WAAW,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,sDAAsD;IACtD,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,mEAAmE;IACnE,UAAU,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,8EAA8E;IAC9E,UAAU,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1C,sCAAsC;IACtC,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,8EAA8E;IAC9E,OAAO,EAAE,CAAC,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5D,2GAA2G;IAC3G,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACpC;AAED,2FAA2F;AAC3F,MAAM,WAAW,sBAAsB;IACrC,sEAAsE;IACtE,SAAS,EAAE,2BAA2B,CAAC;IACvC,sEAAsE;IACtE,eAAe,EAAE,CACf,EAAE,EAAE,MAAM,EACV,MAAM,CAAC,EAAE,WAAW,KACjB,OAAO,CAAC,uBAAuB,CAAC,CAAC;IACtC,gFAAgF;IAChF,gBAAgB,EAAE,CAChB,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,uBAAuB,KAClC,OAAO,CAAC,uBAAuB,CAAC,CAAC;IACtC,qDAAqD;IACrD,WAAW,EAAE,IAAI,CACf,gBAAgB,EAChB,kBAAkB,GAAG,oBAAoB,CAC1C,CAAC;IACF,yEAAyE;IACzE,UAAU,EAAE,CACV,EAAE,EAAE,MAAM,EACV,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,KAC/B,MAAM,IAAI,CAAC;IAChB,+EAA+E;IAC/E,oBAAoB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,CAAC;IAC7C,yDAAyD;IACzD,YAAY,EAAE,MAAM,MAAM,CAAC;IAC3B,gDAAgD;IAChD,UAAU,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC;IACpC,gHAAgH;IAChH,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,yDAAyD;IACzD,YAAY,EAAE,OAAO,CAAC;IACtB,kIAAkI;IAClI,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,6FAA6F;AAC7F,eAAO,MAAM,yBAAyB,EAAE,oBAOvC,CAAC"}
@@ -0,0 +1,11 @@
1
+ //#region src/conversation/conversation-data-source.ts
2
+ var e = {
3
+ updateTitle: () => void 0,
4
+ bumpActivity: () => void 0,
5
+ markUnread: () => void 0,
6
+ markViewed: async () => void 0,
7
+ remove: () => void 0,
8
+ refresh: async () => void 0
9
+ };
10
+ //#endregion
11
+ export { e as NO_CONVERSATION_LIST_SYNC };
@@ -1,79 +1,79 @@
1
1
  //#region src/conversation/conversation-draft/conversation-draft-store.ts
2
- var e = 50, t = 1, n = (e) => e, r = (e) => e.text.trim() === "" && e.skills.length === 0, i = (e) => {
2
+ var e = (e) => e, t = (e) => e.text.trim() === "" && e.skills.length === 0, n = (e) => {
3
3
  if (typeof e != "object" || !e) return !1;
4
4
  let t = e;
5
5
  return typeof t.text == "string" && Array.isArray(t.skills) && typeof t.updatedAt == "number";
6
- }, a = (e, t) => Object.hasOwn(e, t) ? e[t] : void 0, o = (e) => Object.keys(e).sort((t, n) => e[t].updatedAt - e[n].updatedAt), s = (e, t) => {
7
- let n = o(e), r = n.length - Math.max(t, 0);
6
+ }, r = (e, t) => Object.hasOwn(e, t) ? e[t] : void 0, i = (e) => Object.keys(e).sort((t, n) => e[t].updatedAt - e[n].updatedAt), a = (e, t) => {
7
+ let n = i(e), r = n.length - Math.max(t, 0);
8
8
  if (r <= 0) return e;
9
- let i = { ...e };
10
- return n.slice(0, r).forEach((e) => delete i[e]), i;
11
- }, c = (e, t, n, i) => {
12
9
  let a = { ...e };
13
- return r(n) ? (delete a[t], a) : (a[t] = n, s(a, i));
14
- }, l = (e) => e instanceof DOMException && (e.name === "QuotaExceededError" || e.name === "NS_ERROR_DOM_QUOTA_REACHED"), u = ({ getStorage: r, storageKey: u, maxEntries: d = e, normalizeId: f = n }) => {
15
- let p = () => {
10
+ return n.slice(0, r).forEach((e) => delete a[e]), a;
11
+ }, o = (e, n, r, i) => {
12
+ let o = { ...e };
13
+ return t(r) ? (delete o[n], o) : (o[n] = r, a(o, i));
14
+ }, s = (e) => e instanceof DOMException && (e.name === "QuotaExceededError" || e.name === "NS_ERROR_DOM_QUOTA_REACHED"), c = ({ getStorage: t, storageKey: c, maxEntries: l = 50, normalizeId: u = e }) => {
15
+ let d = () => {
16
16
  try {
17
- return r();
17
+ return t();
18
18
  } catch {
19
19
  return;
20
20
  }
21
- }, m = () => {
21
+ }, f = () => {
22
22
  try {
23
- let e = p()?.getItem(u);
23
+ let e = d()?.getItem(c);
24
24
  if (!e) return {};
25
- let n = JSON.parse(e);
26
- return n == null || n.version !== t || n.drafts == null || typeof n.drafts != "object" ? {} : Object.fromEntries(Object.entries(n.drafts).filter(([, e]) => i(e)));
25
+ let t = JSON.parse(e);
26
+ return t == null || t.version !== 1 || t.drafts == null || typeof t.drafts != "object" ? {} : Object.fromEntries(Object.entries(t.drafts).filter(([, e]) => n(e)));
27
27
  } catch {
28
28
  return {};
29
29
  }
30
- }, h = (e, n) => {
31
- if (Object.keys(n).length === 0) {
32
- e.removeItem(u);
30
+ }, p = (e, t) => {
31
+ if (Object.keys(t).length === 0) {
32
+ e.removeItem(c);
33
33
  return;
34
34
  }
35
- let r = {
36
- version: t,
37
- drafts: n
35
+ let n = {
36
+ version: 1,
37
+ drafts: t
38
38
  };
39
- e.setItem(u, JSON.stringify(r));
40
- }, g = (e) => {
41
- let t = p();
39
+ e.setItem(c, JSON.stringify(n));
40
+ }, m = (e) => {
41
+ let t = d();
42
42
  if (t) try {
43
- h(t, e);
43
+ p(t, e);
44
44
  } catch (n) {
45
- if (!l(n)) return;
45
+ if (!s(n)) return;
46
46
  try {
47
- let n = o(e);
48
- h(t, s(e, Math.floor(n.length / 2)));
47
+ let n = i(e);
48
+ p(t, a(e, Math.floor(n.length / 2)));
49
49
  } catch {}
50
50
  }
51
51
  };
52
52
  return {
53
- read: (e) => a(m(), f(e)),
54
- write: (e, t) => g(c(m(), f(e), t, d)),
53
+ read: (e) => r(f(), u(e)),
54
+ write: (e, t) => m(o(f(), u(e), t, l)),
55
55
  remove: (e) => {
56
- let t = m(), n = f(e);
57
- Object.hasOwn(t, n) && (delete t[n], g(t));
56
+ let t = f(), n = u(e);
57
+ Object.hasOwn(t, n) && (delete t[n], m(t));
58
58
  },
59
59
  clear: () => {
60
60
  try {
61
- p()?.removeItem(u);
61
+ d()?.removeItem(c);
62
62
  } catch {}
63
63
  }
64
64
  };
65
- }, d = ({ maxEntries: t = e, normalizeId: r = n } = {}) => {
65
+ }, l = ({ maxEntries: t = 50, normalizeId: n = e } = {}) => {
66
66
  let i = {};
67
67
  return {
68
- read: (e) => a(i, r(e)),
69
- write: (e, n) => {
70
- i = c(i, r(e), n, t);
68
+ read: (e) => r(i, n(e)),
69
+ write: (e, r) => {
70
+ i = o(i, n(e), r, t);
71
71
  },
72
72
  remove: (e) => {
73
- let t = r(e);
73
+ let t = n(e);
74
74
  if (!Object.hasOwn(i, t)) return;
75
- let n = { ...i };
76
- delete n[t], i = n;
75
+ let r = { ...i };
76
+ delete r[t], i = r;
77
77
  },
78
78
  clear: () => {
79
79
  i = {};
@@ -81,4 +81,4 @@ var e = 50, t = 1, n = (e) => e, r = (e) => e.text.trim() === "" && e.skills.len
81
81
  };
82
82
  };
83
83
  //#endregion
84
- export { d as createMemoryConversationDraftStore, u as createWebStorageConversationDraftStore };
84
+ export { l as createMemoryConversationDraftStore, c as createWebStorageConversationDraftStore };