@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 @@
1
+ {"version":3,"file":"useSkillFileSystemPicker.d.ts","sourceRoot":"","sources":["../../../src/skill-editor/useSkillFileSystemPicker/useSkillFileSystemPicker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAIjE,uDAAuD;AACvD,MAAM,WAAW,+BAA+B,CAAC,CAAC;IAChD,6DAA6D;IAC7D,eAAe,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;IACrE,uDAAuD;IACvD,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACnC;AAED,+CAA+C;AAC/C,MAAM,WAAW,8BAA8B,CAAC,CAAC;IAC/C,2CAA2C;IAC3C,MAAM,EAAE,OAAO,CAAC;IAChB,2DAA2D;IAC3D,kBAAkB,EAAE,MAAM,OAAO,CAAC,CAAC,EAAE,GAAG,SAAS,CAAC,CAAC;IACnD,sDAAsD;IACtD,YAAY,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;IAC7C,wDAAwD;IACxD,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB;AAQD,gFAAgF;AAChF,eAAO,MAAM,wBAAwB,GAAI,CAAC,EAAE,+BAGzC,+BAA+B,CAAC,CAAC,CAAC,KAAG,8BAA8B,CAAC,CAAC,CAoDvE,CAAC"}
@@ -0,0 +1,43 @@
1
+ import { useCallback as e, useEffect as t, useRef as n, useState as r } from "react";
2
+ import { DialFileNodeType as i } from "@epam/ai-dial-ui-kit";
3
+ //#region src/skill-editor/useSkillFileSystemPicker/useSkillFileSystemPicker.ts
4
+ var a = ({ materializeFile: a, onError: o }) => {
5
+ let [s, c] = r(!1), l = n(void 0), u = e(() => {
6
+ let e = l.current;
7
+ l.current = void 0, e?.controller.abort(), e?.resolve(void 0);
8
+ }, []);
9
+ t(() => u, [u]);
10
+ let d = e(() => (u(), c(!0), new Promise((e) => {
11
+ l.current = {
12
+ controller: new AbortController(),
13
+ resolve: e,
14
+ attaching: !1
15
+ };
16
+ })), [u]), f = e(() => {
17
+ u(), c(!1);
18
+ }, [u]);
19
+ return {
20
+ isOpen: s,
21
+ pickFromFileSystem: d,
22
+ handleAttach: e((e) => {
23
+ let t = l.current;
24
+ t && !t.attaching && (t.attaching = !0, c(!1), (async () => {
25
+ try {
26
+ let n = await Promise.all(e.files.filter((e) => e.nodeType === i.ITEM).map((e) => a(e, t.controller.signal)));
27
+ if (l.current !== t) return;
28
+ l.current = void 0, t.resolve(n);
29
+ } catch (e) {
30
+ if (l.current !== t) return;
31
+ u(), o(e);
32
+ }
33
+ })());
34
+ }, [
35
+ a,
36
+ o,
37
+ u
38
+ ]),
39
+ handleClose: f
40
+ };
41
+ };
42
+ //#endregion
43
+ export { a as useSkillFileSystemPicker };
package/skill-editor.js CHANGED
@@ -1,9 +1,11 @@
1
- import { SKILL_FILE_UPLOAD_MAX_BYTES as e, SKILL_FOLDER_MARKER as t, SKILL_MANIFEST_FILE as n, SKILL_TEXT_FIELD_MAX_LENGTHS as r, SKILL_UPLOAD_MAX_FILES as i, SKILL_UPLOAD_MAX_TOTAL_BYTES as a, buildSkillFilesPayload as o, buildSkillManifest as s, buildSkillManifestForSubmit as c, buildSkillManifestFromFrontmatter as l, getSkillFieldLengthViolations as u, isSkillFolderMarkerPath as d, isValidSkillRelativePath as f, nameFromPath as p, normalizeSkillName as m, parseSkillManifest as h, skillFileBytesToBlob as g, skillFolderMarkerParent as _, startsWithFrontmatterBlock as v, unpackSkillArchive as y } from "./skill/skill.js";
2
- import { parseSkillManifestDocument as b } from "./skill/skill-manifest.js";
3
- import { validateSkillFileBatch as x } from "./skill/skill-file-batch-validation.js";
4
- import { skillFileToAttachment as S } from "./skill/skill-file-preview.js";
5
- import { SkillEditorLoadState as C, useSkillEditorLoad as w } from "./skill/useSkillEditorLoad.js";
6
- import { useSkillEditorSubmit as T } from "./skill/useSkillEditorSubmit.js";
7
- import { useSkillFileActions as E } from "./skill/useSkillFileActions.js";
8
- import { SkillArchiveImportErrorKind as D, SkillArchiveImportStatus as O, SkillArchiveSelectionRejectionReason as k, classifySkillArchiveImportError as A, useSkillArchiveImport as j } from "./skill/useSkillArchiveImport/useSkillArchiveImport.js";
9
- export { e as SKILL_FILE_UPLOAD_MAX_BYTES, t as SKILL_FOLDER_MARKER, n as SKILL_MANIFEST_FILE, r as SKILL_TEXT_FIELD_MAX_LENGTHS, i as SKILL_UPLOAD_MAX_FILES, a as SKILL_UPLOAD_MAX_TOTAL_BYTES, D as SkillArchiveImportErrorKind, O as SkillArchiveImportStatus, k as SkillArchiveSelectionRejectionReason, C as SkillEditorLoadState, o as buildSkillFilesPayload, s as buildSkillManifest, c as buildSkillManifestForSubmit, l as buildSkillManifestFromFrontmatter, A as classifySkillArchiveImportError, u as getSkillFieldLengthViolations, d as isSkillFolderMarkerPath, f as isValidSkillRelativePath, p as nameFromPath, m as normalizeSkillName, h as parseSkillManifest, b as parseSkillManifestDocument, g as skillFileBytesToBlob, S as skillFileToAttachment, _ as skillFolderMarkerParent, v as startsWithFrontmatterBlock, y as unpackSkillArchive, j as useSkillArchiveImport, w as useSkillEditorLoad, T as useSkillEditorSubmit, E as useSkillFileActions, x as validateSkillFileBatch };
1
+ import { SKILL_FILE_UPLOAD_MAX_BYTES as e, SKILL_FOLDER_MARKER as t, SKILL_MANIFEST_FILE as n, SKILL_TEXT_FIELD_MAX_LENGTHS as r, SKILL_UPLOAD_MAX_FILES as i, SKILL_UPLOAD_MAX_TOTAL_BYTES as a, SkillTextField as o, buildSkillFilesPayload as s, buildSkillManifest as c, buildSkillManifestForSubmit as l, buildSkillManifestFromFrontmatter as u, getSkillFieldLengthViolations as d, isSkillFolderMarkerPath as f, isValidSkillRelativePath as p, nameFromPath as m, normalizeSkillName as h, parseSkillManifest as g, skillFileBytesToBlob as _, skillFolderMarkerParent as v, startsWithFrontmatterBlock as y, unpackSkillArchive as b } from "./skill/skill.js";
2
+ import { parseSkillManifestDocument as x } from "./skill/skill-manifest.js";
3
+ import { validateSkillFileBatch as S } from "./skill/skill-file-batch-validation.js";
4
+ import { skillFileToAttachment as C } from "./skill/skill-file-preview.js";
5
+ import { SkillEditorLoadState as w, useSkillEditorLoad as T } from "./skill/useSkillEditorLoad.js";
6
+ import { useSkillEditorSubmit as E } from "./skill/useSkillEditorSubmit.js";
7
+ import { useSkillFileActions as D } from "./skill/useSkillFileActions.js";
8
+ import { SkillArchiveImportErrorKind as O, SkillArchiveImportStatus as k, SkillArchiveSelectionRejectionReason as A, classifySkillArchiveImportError as j, useSkillArchiveImport as M } from "./skill/useSkillArchiveImport/useSkillArchiveImport.js";
9
+ import { useSkillFileSystemPicker as N } from "./skill-editor/useSkillFileSystemPicker/useSkillFileSystemPicker.js";
10
+ import { SkillFilePreviewState as P, useSkillFilePreviewSyncController as F } from "./skill-editor/useSkillFilePreviewSyncController.js";
11
+ export { e as SKILL_FILE_UPLOAD_MAX_BYTES, t as SKILL_FOLDER_MARKER, n as SKILL_MANIFEST_FILE, r as SKILL_TEXT_FIELD_MAX_LENGTHS, i as SKILL_UPLOAD_MAX_FILES, a as SKILL_UPLOAD_MAX_TOTAL_BYTES, O as SkillArchiveImportErrorKind, k as SkillArchiveImportStatus, A as SkillArchiveSelectionRejectionReason, w as SkillEditorLoadState, P as SkillFilePreviewState, o as SkillTextField, s as buildSkillFilesPayload, c as buildSkillManifest, l as buildSkillManifestForSubmit, u as buildSkillManifestFromFrontmatter, j as classifySkillArchiveImportError, d as getSkillFieldLengthViolations, f as isSkillFolderMarkerPath, p as isValidSkillRelativePath, m as nameFromPath, h as normalizeSkillName, g as parseSkillManifest, x as parseSkillManifestDocument, _ as skillFileBytesToBlob, C as skillFileToAttachment, v as skillFolderMarkerParent, y as startsWithFrontmatterBlock, b as unpackSkillArchive, M as useSkillArchiveImport, T as useSkillEditorLoad, E as useSkillEditorSubmit, D as useSkillFileActions, F as useSkillFilePreviewSyncController, N as useSkillFileSystemPicker, S as validateSkillFileBatch };
package/skills-state.js CHANGED
@@ -1,2 +1,3 @@
1
- import { useSkillsState as e } from "./skill/useSkillsState/useSkillsState.js";
2
- export { e as useSkillsState };
1
+ import { findSkillByUrl as e } from "./skill/skill-lookup.js";
2
+ import { useSkillsState as t } from "./skill/useSkillsState/useSkillsState.js";
3
+ export { e as findSkillByUrl, t as useSkillsState };
package/source-content.js CHANGED
@@ -1,2 +1 @@
1
- import { getUrlFileName as e, isExternalSourcePreviewable as t, resolveExternalSourceContentType as n } from "./files/source-content.js";
2
- export { e as getUrlFileName, t as isExternalSourcePreviewable, n as resolveExternalSourceContentType };
1
+ export { getUrlFileName, isExternalSourcePreviewable, resolveExternalSourceContentType } from "./files/source-content.js";
@@ -1 +1 @@
1
- {"version":3,"file":"map-user-usage-to-model-limits.d.ts","sourceRoot":"","sources":["../../src/usage/map-user-usage-to-model-limits.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EAGjB,yBAAyB,EAC1B,MAAM,+BAA+B,CAAC;AAGvC,OAAO,KAAK,EAIV,wBAAwB,EACxB,aAAa,EACd,MAAM,+BAA+B,CAAC;AAMvC,YAAY,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAErE,kEAAkE;AAClE,KAAK,SAAS,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,MAAM,CAAC;AAE5E,oFAAoF;AACpF,KAAK,cAAc,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,KAAK,MAAM,GAAG,SAAS,CAAC;AAE1E,2EAA2E;AAC3E,KAAK,kBAAkB,GAAG,CACxB,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,GAAG,IAAI,EACxD,MAAM,EAAE,MAAM,KACX,MAAM,CAAC;AAmBZ;;;;GAIG;AACH,eAAO,MAAM,4BAA4B;IACvC,oEAAoE;;IAEpE,oEAAoE;;IAEpE,oEAAoE;;IAEpE,yFAAyF;;IAEzF,qFAAqF;;IAErF,iDAAiD;;IAEjD,kEAAkE;;IAElE,oEAAoE;;IAEpE,wGAAwG;;IAExG,sEAAsE;;IAEtE,sHAAsH;;IAEtH,oEAAoE;;IAEpE,8EAA8E;;IAE9E,sFAAsF;;CAE9E,CAAC;AA6HX;;;;GAIG;AACH,eAAO,MAAM,oCAAoC,GAC/C,OAAO,yBAAyB,GAAG,SAAS,EAC5C,cAAc,MAAM,EACpB,GAAG,SAAS,EACZ,kBAAiB,eAA6B,KAC7C,wBAsBD,CAAC;AAkMH;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB,GACpC,OAAO,yBAAyB,GAAG,SAAS,EAC5C,iBAAiB,iBAAiB,EAAE,EACpC,cAAc,MAAM,EACpB,GAAG,SAAS,EACZ,gBAAgB,cAAc,EAC9B,oBAAoB,kBAAkB,KACrC,aAAa,EAgIf,CAAC"}
1
+ {"version":3,"file":"map-user-usage-to-model-limits.d.ts","sourceRoot":"","sources":["../../src/usage/map-user-usage-to-model-limits.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EAGjB,yBAAyB,EAC1B,MAAM,+BAA+B,CAAC;AAGvC,OAAO,KAAK,EAIV,wBAAwB,EACxB,aAAa,EACd,MAAM,+BAA+B,CAAC;AAMvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAErE,YAAY,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAErE,kEAAkE;AAClE,KAAK,SAAS,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,MAAM,CAAC;AAE5E,oFAAoF;AACpF,KAAK,cAAc,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,KAAK,MAAM,GAAG,SAAS,CAAC;AAE1E,2EAA2E;AAC3E,KAAK,kBAAkB,GAAG,CACxB,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,GAAG,IAAI,EACxD,MAAM,EAAE,MAAM,KACX,MAAM,CAAC;AAmBZ;;;;GAIG;AACH,eAAO,MAAM,4BAA4B;IACvC,oEAAoE;;IAEpE,oEAAoE;;IAEpE,oEAAoE;;IAEpE,yFAAyF;;IAEzF,qFAAqF;;IAErF,iDAAiD;;IAEjD,kEAAkE;;IAElE,oEAAoE;;IAEpE,wGAAwG;;IAExG,sEAAsE;;IAEtE,sHAAsH;;IAEtH,oEAAoE;;IAEpE,8EAA8E;;IAE9E,sFAAsF;;CAE9E,CAAC;AA+HX;;;;GAIG;AACH,eAAO,MAAM,oCAAoC,GAC/C,OAAO,yBAAyB,GAAG,SAAS,EAC5C,cAAc,MAAM,EACpB,GAAG,SAAS,EACZ,kBAAiB,eAA6B,KAC7C,wBAsBD,CAAC;AAkMH;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB,GACpC,OAAO,yBAAyB,GAAG,SAAS,EAC5C,iBAAiB,iBAAiB,EAAE,EACpC,cAAc,MAAM,EACpB,GAAG,SAAS,EACZ,gBAAgB,cAAc,EAC9B,oBAAoB,kBAAkB,KACrC,aAAa,EAgIf,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { normalizeDeploymentId as e } from "../catalog/deployment-id.js";
2
- import { formatCost as t } from "@epam/ai-dial-chat-shared";
3
- import { DeploymentItemDtoTypeEnum as n } from "@epam/ai-dial-chat-api-client";
2
+ import { DeploymentItemDtoTypeEnum as t } from "@epam/ai-dial-chat-api-client";
3
+ import { formatCost as n } from "@epam/ai-dial-chat-shared";
4
4
  import { ModelLimitMetricKind as r, ModelLimitStatus as i } from "@epam/ai-dial-usage-dashboard";
5
5
  //#region src/usage/map-user-usage-to-model-limits.ts
6
6
  var a = 2 ** 53, o = 75, s = new Intl.NumberFormat(void 0, {
@@ -53,10 +53,10 @@ var a = 2 ** 53, o = 75, s = new Intl.NumberFormat(void 0, {
53
53
  let t = Math.max(0, e.used), n = Math.max(0, e.total);
54
54
  return p(n > 0 ? t / n * 100 : 100);
55
55
  }, h = (e) => e === i.WithinLimits || e === i.RunningLow || e === i.LimitReached, g = (e, t, n, r, a) => {
56
- let o = e?.[t.field], s = m(o), c = a(o?.resetsAt), u = r(t.labelKey).toLocaleLowerCase(n);
57
- return {
56
+ let o = e?.[t.field], s = m(o), c = a(o?.resetsAt), u = r(t.labelKey).toLocaleLowerCase(n), d;
57
+ return s === i.LimitReached ? d = r(l.overallCostLimitReachedTooltip, { period: u }) : s === i.RunningLow && (d = r(l.overallCostLimitRunningLowTooltip, { period: u })), {
58
58
  status: s,
59
- tooltipLabel: s === i.LimitReached ? r(l.overallCostLimitReachedTooltip, { period: u }) : s === i.RunningLow ? r(l.overallCostLimitRunningLowTooltip, { period: u }) : void 0,
59
+ tooltipLabel: d,
60
60
  ...c ? {
61
61
  resetLabel: c.label,
62
62
  resetIsoValue: c.isoValue,
@@ -95,9 +95,9 @@ var a = 2 ** 53, o = 75, s = new Intl.NumberFormat(void 0, {
95
95
  percent: Math.round(m)
96
96
  })
97
97
  };
98
- }, x = (e, n) => {
99
- if (!f(e)) return y(n);
100
- let i = Math.max(0, e.used), o = n(l.spentLabel, { amount: t(i) });
98
+ }, x = (e, t) => {
99
+ if (!f(e)) return y(t);
100
+ let i = Math.max(0, e.used), o = t(l.spentLabel, { amount: n(i) });
101
101
  if (e.total >= a) return {
102
102
  kind: r.Unlimited,
103
103
  usedLabel: o,
@@ -107,12 +107,12 @@ var a = 2 ** 53, o = 75, s = new Intl.NumberFormat(void 0, {
107
107
  return {
108
108
  kind: r.Finite,
109
109
  usedLabel: o,
110
- totalLabel: t(s),
110
+ totalLabel: n(s),
111
111
  usedPercent: c,
112
112
  status: p(c),
113
- ariaLabel: n(l.progressAriaLabel, {
114
- used: t(i),
115
- total: t(s),
113
+ ariaLabel: t(l.progressAriaLabel, {
114
+ used: n(i),
115
+ total: n(s),
116
116
  percent: Math.round(c)
117
117
  })
118
118
  };
@@ -135,31 +135,31 @@ var a = 2 ** 53, o = 75, s = new Intl.NumberFormat(void 0, {
135
135
  supportingLabel: n(l.includesCalledModelsLabel)
136
136
  } : i
137
137
  };
138
- }, E = (e) => e.some((e) => f(e) && e.used > 0), D = (t, r, i, a, o, s) => {
139
- let c = t?.deployments;
138
+ }, E = (e) => e.some((e) => f(e) && e.used > 0), D = (n, r, i, a, o, s) => {
139
+ let c = n?.deployments;
140
140
  if (c == null) return [];
141
- let d = new Map(r.filter((e) => e.type === n.Model || e.type === n.Application).map((t) => [e(t.id), t])), f = v(t, i, a);
142
- return Object.keys(c).map((t) => {
143
- let r = d.get(e(t)), p = r == null ? t : s(r.displayName, i) || r.id, m = c[t], h = o(r?.iconUrl);
144
- if (r?.type === n.Application) {
145
- let e = T(m, u.day, a), n = T(m, u.week, a), i = T(m, u.month, a);
141
+ let d = new Map(r.filter((e) => e.type === t.Model || e.type === t.Application).map((t) => [e(t.id), t])), f = v(n, i, a);
142
+ return Object.keys(c).map((n) => {
143
+ let r = d.get(e(n)), p = r == null ? n : s(r.displayName, i) || r.id, m = c[n], h = o(r?.iconUrl);
144
+ if (r?.type === t.Application) {
145
+ let e = T(m, u.day, a), t = T(m, u.week, a), i = T(m, u.month, a);
146
146
  return {
147
147
  row: {
148
- id: t,
148
+ id: n,
149
149
  name: p,
150
150
  version: r.displayVersion,
151
151
  avatarSrc: h,
152
152
  typeLabel: a(l.applicationTypeLabel),
153
153
  day: e,
154
- week: n,
154
+ week: t,
155
155
  month: i,
156
156
  status: w([
157
157
  e.tokens,
158
- n.tokens,
158
+ t.tokens,
159
159
  i.tokens
160
160
  ], [
161
161
  e.cost,
162
- n.cost,
162
+ t.cost,
163
163
  i.cost
164
164
  ], [
165
165
  f.day.status,
@@ -173,7 +173,7 @@ var a = 2 ** 53, o = 75, s = new Intl.NumberFormat(void 0, {
173
173
  let g = S(m, u.day, f.day.status, a), _ = S(m, u.week, f.week.status, a), v = S(m, u.month, f.month.status, a), y = Object.values(u).flatMap(({ cost: e, tokens: t }) => [m[e], m[t]]);
174
174
  return {
175
175
  row: {
176
- id: t,
176
+ id: n,
177
177
  name: p,
178
178
  version: r?.displayVersion,
179
179
  avatarSrc: h,
@@ -1,6 +1,8 @@
1
- import { DeploymentLimitsResponseDto } from '@epam/ai-dial-chat-api-client';
2
1
  import { UsageLimitBannerSeverity } from '@epam/ai-dial-conversation-input';
2
+ import { isCappedStat } from '../shared/usage-stat';
3
3
  import { UsagePeriod } from './usage-period';
4
+ import { UsageLimitsSources } from './useDeploymentUsageLimits/useDeploymentUsageLimits';
5
+ export { isCappedStat };
4
6
  /** The day/week/month usage stat the composer banner reports on, and how close it is to its limit. */
5
7
  export interface UsageBannerSource {
6
8
  /** Calendar period of the stat. */
@@ -12,12 +14,11 @@ export interface UsageBannerSource {
12
14
  /** DIAL Core's `resetsAt` for the stat, when it sent one. */
13
15
  resetsAt: string | undefined;
14
16
  }
15
- /** `true` when `total` is a real cap: finite, positive, and below DIAL Core's unlimited sentinel. */
16
- export declare const isCappedStat: (total: number) => boolean;
17
17
  /**
18
- * Returns the capped day/week/month token or cost stat with the highest
19
- * used/total ratio, classified against `thresholdPercent`, or `undefined` when
20
- * no stat is capped or the worst one is below the threshold.
18
+ * Returns the capped day/week/month token stat of `sources.deployment` or cost
19
+ * stat of `sources.account` with the highest used/total ratio, classified
20
+ * against `thresholdPercent`, or `undefined` when no stat is capped or the
21
+ * worst one is below the threshold.
21
22
  */
22
- export declare const selectUsageBannerSource: (dto: DeploymentLimitsResponseDto | undefined, thresholdPercent: number) => UsageBannerSource | undefined;
23
+ export declare const selectUsageBannerSource: (sources: UsageLimitsSources, thresholdPercent: number) => UsageBannerSource | undefined;
23
24
  //# sourceMappingURL=usage-banner-source.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"usage-banner-source.d.ts","sourceRoot":"","sources":["../../src/usage/usage-banner-source.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,2BAA2B,EAE5B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,sGAAsG;AACtG,MAAM,WAAW,iBAAiB;IAChC,mCAAmC;IACnC,MAAM,EAAE,WAAW,CAAC;IACpB,uDAAuD;IACvD,QAAQ,EAAE,wBAAwB,CAAC;IACnC,wEAAwE;IACxE,WAAW,EAAE,MAAM,CAAC;IACpB,6DAA6D;IAC7D,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B;AAQD,qGAAqG;AACrG,eAAO,MAAM,YAAY,GAAI,OAAO,MAAM,KAAG,OAC4B,CAAC;AA8B1E;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,GAClC,KAAK,2BAA2B,GAAG,SAAS,EAC5C,kBAAkB,MAAM,KACvB,iBAAiB,GAAG,SAoCtB,CAAC"}
1
+ {"version":3,"file":"usage-banner-source.d.ts","sourceRoot":"","sources":["../../src/usage/usage-banner-source.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qDAAqD,CAAC;AAE9F,OAAO,EAAE,YAAY,EAAE,CAAC;AAExB,sGAAsG;AACtG,MAAM,WAAW,iBAAiB;IAChC,mCAAmC;IACnC,MAAM,EAAE,WAAW,CAAC;IACpB,uDAAuD;IACvD,QAAQ,EAAE,wBAAwB,CAAC;IACnC,wEAAwE;IACxE,WAAW,EAAE,MAAM,CAAC;IACpB,6DAA6D;IAC7D,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B;AAsCD;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,GAClC,SAAS,kBAAkB,EAC3B,kBAAkB,MAAM,KACvB,iBAAiB,GAAG,SAsCtB,CAAC"}
@@ -1,29 +1,54 @@
1
- import { UsagePeriod as e } from "./usage-period.js";
2
- import { UsageLimitBannerSeverity as t } from "@epam/ai-dial-conversation-input";
1
+ import { isCappedStat as e } from "../shared/usage-stat.js";
2
+ import { UsagePeriod as t } from "./usage-period.js";
3
+ import { UsageLimitBannerSeverity as n } from "@epam/ai-dial-conversation-input";
3
4
  //#region src/usage/usage-banner-source.ts
4
- var n = 2 ** 53 - 1, r = (e) => Number.isFinite(e) && e > 0 && e < n, i = [
5
- ["monthTokenStats", e.Month],
6
- ["monthCostStats", e.Month],
7
- ["weekTokenStats", e.Week],
8
- ["weekCostStats", e.Week],
9
- ["dayTokenStats", e.Day],
10
- ["dayCostStats", e.Day]
11
- ], a = (e, n) => {
5
+ var r = [
6
+ [
7
+ "deployment",
8
+ "monthTokenStats",
9
+ t.Month
10
+ ],
11
+ [
12
+ "account",
13
+ "monthCostStats",
14
+ t.Month
15
+ ],
16
+ [
17
+ "deployment",
18
+ "weekTokenStats",
19
+ t.Week
20
+ ],
21
+ [
22
+ "account",
23
+ "weekCostStats",
24
+ t.Week
25
+ ],
26
+ [
27
+ "deployment",
28
+ "dayTokenStats",
29
+ t.Day
30
+ ],
31
+ [
32
+ "account",
33
+ "dayCostStats",
34
+ t.Day
35
+ ]
36
+ ], i = (t, i) => {
12
37
  let a;
13
- for (let [t, n] of i) {
14
- let i = e?.[t];
15
- if (i == null || !r(i.total)) continue;
16
- let o = Math.max(i.used, 0) / i.total;
17
- (a == null || o > a.ratio) && (a = {
18
- stat: i,
19
- period: n,
20
- ratio: o
38
+ for (let [n, i, o] of r) {
39
+ let r = t[n]?.[i];
40
+ if (r == null || !e(r.total)) continue;
41
+ let s = Math.max(r.used, 0) / r.total;
42
+ (a == null || s > a.ratio) && (a = {
43
+ stat: r,
44
+ period: o,
45
+ ratio: s
21
46
  });
22
47
  }
23
48
  if (a == null) return;
24
49
  let o = Math.min(100, Math.round(a.ratio * 100)), s;
25
- if (a.ratio >= 1) s = t.Reached;
26
- else if (o >= n) s = t.Warning;
50
+ if (a.ratio >= 1) s = n.Reached;
51
+ else if (o >= i) s = n.Warning;
27
52
  else return;
28
53
  return {
29
54
  period: a.period,
@@ -33,4 +58,4 @@ var n = 2 ** 53 - 1, r = (e) => Number.isFinite(e) && e > 0 && e < n, i = [
33
58
  };
34
59
  };
35
60
  //#endregion
36
- export { r as isCappedStat, a as selectUsageBannerSource };
61
+ export { e as isCappedStat, i as selectUsageBannerSource };
@@ -0,0 +1,3 @@
1
+ /** Angle, in degrees clockwise from 12 o'clock, at which the usage dial's needle points for `usedPercent`. */
2
+ export declare const getGaugeNeedleAngle: (usedPercent: number) => number;
3
+ //# sourceMappingURL=usage-gauge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usage-gauge.d.ts","sourceRoot":"","sources":["../../src/usage/usage-gauge.ts"],"names":[],"mappings":"AASA,8GAA8G;AAC9G,eAAO,MAAM,mBAAmB,GAAI,aAAa,MAAM,KAAG,MAIzD,CAAC"}
@@ -0,0 +1,4 @@
1
+ //#region src/usage/usage-gauge.ts
2
+ var e = (e) => -135 + Math.min(100, Math.max(0, e)) / 100 * 270;
3
+ //#endregion
4
+ export { e as getGaugeNeedleAngle };
@@ -32,10 +32,19 @@ export interface ResetTimeDisplay {
32
32
  }
33
33
  /** A translate function compatible with i18next's `TFunction`. */
34
34
  export type TranslateFn = (key: string, options?: Record<string, unknown>) => string;
35
+ /** Offset reference used to format an unchanged reset boundary. */
36
+ export declare enum UsageResetOffsetPolicy {
37
+ CurrentOffset = "current-offset",
38
+ ResetInstant = "reset-instant"
39
+ }
40
+ /** Optional host reset-display policy. */
41
+ export interface UsageResetTimeOptions {
42
+ /** Defaults to current-offset. */ offsetPolicy?: UsageResetOffsetPolicy;
43
+ }
35
44
  /**
36
45
  * Formats DIAL Core's `resetsAt` for display in the viewer's locale and
37
- * timezone, always stating the zone so a UTC boundary shown in local time is
38
- * never ambiguous.
46
+ * timezone, at the viewer's current UTC offset, always stating that offset so
47
+ * a UTC boundary shown in local time is never ambiguous.
39
48
  *
40
49
  * Returns `undefined` on every failure path — an absent, empty, or
41
50
  * unparseable value, or an `Intl` implementation that throws (embedded and
@@ -47,7 +56,7 @@ export type TranslateFn = (key: string, options?: Record<string, unknown>) => st
47
56
  * The boundary is never derived from the browser's own calendar — no local
48
57
  * midnight, no start-of-week, no arithmetic on `new Date()`.
49
58
  */
50
- export declare const formatUsageResetTime: (resetsAt: string | undefined, activeLocale: string, t: TranslateFn) => ResetTimeDisplay | undefined;
59
+ export declare const formatUsageResetTime: (resetsAt: string | undefined, activeLocale: string, t: TranslateFn, options?: UsageResetTimeOptions) => ResetTimeDisplay | undefined;
51
60
  /** A `resetsAt` instant as the one-sentence reset notice the composer usage banner renders. */
52
61
  export interface ShortResetTimeDisplay {
53
62
  /** Machine-readable instant for a `<time dateTime>` attribute, e.g. '2026-10-13T00:00:00Z'. */
@@ -1 +1 @@
1
- {"version":3,"file":"usage-reset-time.d.ts","sourceRoot":"","sources":["../../src/usage/usage-reset-time.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;;;GAIG;AACH,eAAO,MAAM,qBAAqB;IAChC,4EAA4E;;IAE5E,2EAA2E;;IAE3E,+DAA+D;;IAE/D,wEAAwE;;CAEhE,CAAC;AAEX;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,kFAAkF;IAClF,UAAU,EAAE,MAAM,CAAC;IACnB,+FAA+F;IAC/F,QAAQ,EAAE,MAAM,CAAC;IACjB,8DAA8D;IAC9D,KAAK,EAAE,MAAM,CAAC;IACd,kIAAkI;IAClI,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,kEAAkE;AAClE,MAAM,MAAM,WAAW,GAAG,CACxB,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC9B,MAAM,CAAC;AAEZ;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,oBAAoB,GAC/B,UAAU,MAAM,GAAG,SAAS,EAC5B,cAAc,MAAM,EACpB,GAAG,WAAW,KACb,gBAAgB,GAAG,SA+DrB,CAAC;AAEF,+FAA+F;AAC/F,MAAM,WAAW,qBAAqB;IACpC,+FAA+F;IAC/F,QAAQ,EAAE,MAAM,CAAC;IACjB,gFAAgF;IAChF,KAAK,EAAE,MAAM,CAAC;IACd,gGAAgG;IAChG,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,GAChC,UAAU,MAAM,GAAG,SAAS,EAC5B,QAAQ,WAAW,EACnB,cAAc,MAAM,EACpB,GAAG,WAAW,KACb,qBAAqB,GAAG,SAiD1B,CAAC"}
1
+ {"version":3,"file":"usage-reset-time.d.ts","sourceRoot":"","sources":["../../src/usage/usage-reset-time.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;;;GAIG;AACH,eAAO,MAAM,qBAAqB;IAChC,4EAA4E;;IAE5E,2EAA2E;;IAE3E,+DAA+D;;IAE/D,wEAAwE;;CAEhE,CAAC;AAEX;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,kFAAkF;IAClF,UAAU,EAAE,MAAM,CAAC;IACnB,+FAA+F;IAC/F,QAAQ,EAAE,MAAM,CAAC;IACjB,8DAA8D;IAC9D,KAAK,EAAE,MAAM,CAAC;IACd,kIAAkI;IAClI,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,kEAAkE;AAClE,MAAM,MAAM,WAAW,GAAG,CACxB,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC9B,MAAM,CAAC;AAmEZ,mEAAmE;AACnE,oBAAY,sBAAsB;IAChC,aAAa,mBAAmB;IAChC,YAAY,kBAAkB;CAC/B;AACD,0CAA0C;AAC1C,MAAM,WAAW,qBAAqB;IACpC,kCAAkC,CAAC,YAAY,CAAC,EAAE,sBAAsB,CAAC;CAC1E;AACD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,oBAAoB,GAC/B,UAAU,MAAM,GAAG,SAAS,EAC5B,cAAc,MAAM,EACpB,GAAG,WAAW,EACd,UAAS,qBAA0B,KAClC,gBAAgB,GAAG,SAmErB,CAAC;AAEF,+FAA+F;AAC/F,MAAM,WAAW,qBAAqB;IACpC,+FAA+F;IAC/F,QAAQ,EAAE,MAAM,CAAC;IACjB,gFAAgF;IAChF,KAAK,EAAE,MAAM,CAAC;IACd,gGAAgG;IAChG,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,GAChC,UAAU,MAAM,GAAG,SAAS,EAC5B,QAAQ,WAAW,EACnB,cAAc,MAAM,EACpB,GAAG,WAAW,KACb,qBAAqB,GAAG,SAiD1B,CAAC"}
@@ -5,68 +5,78 @@ var t = {
5
5
  resetsAtAriaLabel: "usage.resetsAtAriaLabel",
6
6
  resetsAtTime: "conversationInput.usageBanner.resetsAtTime",
7
7
  resetsOnDate: "conversationInput.usageBanner.resetsOnDate"
8
- }, n = (e, n, r) => {
8
+ }, n = {
9
+ year: "numeric",
10
+ month: "short",
11
+ day: "numeric",
12
+ hour: "numeric",
13
+ minute: "2-digit"
14
+ }, r = /GMT([+-])(\d{2}):(\d{2})/, i = /* @__PURE__ */ RegExp("\\u202f", "g"), a = (e, t) => {
15
+ let n = new Intl.DateTimeFormat("en-US", {
16
+ timeZoneName: "longOffset",
17
+ ...t
18
+ }).formatToParts(e).find((e) => e.type === "timeZoneName")?.value, i = r.exec(n ?? "");
19
+ return i == null ? 0 : (i[1] === "-" ? -1 : 1) * (Number(i[2]) * 60 + Number(i[3]));
20
+ }, o = (e, t, r, o, s) => {
21
+ let c = new Intl.DateTimeFormat(r, {
22
+ timeZoneName: o,
23
+ ...s
24
+ }).formatToParts(t).find((e) => e.type === "timeZoneName")?.value ?? "", l = new Date(e + a(t, s) * 6e4);
25
+ return new Intl.DateTimeFormat(r, {
26
+ ...n,
27
+ timeZoneName: o,
28
+ timeZone: "UTC"
29
+ }).formatToParts(l).map((e) => e.type === "timeZoneName" ? c : e.value).join("").replace(i, " ");
30
+ }, s = /* @__PURE__ */ function(e) {
31
+ return e.CurrentOffset = "current-offset", e.ResetInstant = "reset-instant", e;
32
+ }({}), c = (e, n, r, i = {}) => {
9
33
  if (!e) return;
10
- let i = Date.parse(e);
11
- if (!Number.isNaN(i)) try {
12
- let a = Intl.DateTimeFormat().resolvedOptions().timeZone, o = new Date(i), s = a ? { timeZone: a } : {}, c = {
13
- year: "numeric",
14
- month: "short",
15
- day: "numeric",
16
- hour: "numeric",
17
- minute: "2-digit"
18
- }, l = new Intl.DateTimeFormat(n, {
19
- ...c,
20
- timeZoneName: "shortOffset",
21
- ...s
22
- }).format(o), u = new Intl.DateTimeFormat(n, {
23
- ...c,
24
- timeZoneName: "long",
25
- ...s
26
- }).format(o);
34
+ let a = Date.parse(e);
35
+ if (!Number.isNaN(a)) try {
36
+ let s = Intl.DateTimeFormat().resolvedOptions().timeZone, c = s ? { timeZone: s } : {}, l = i.offsetPolicy === "reset-instant" ? new Date(a) : /* @__PURE__ */ new Date(), u = o(a, l, n, "shortOffset", c), d = o(a, l, n, "long", c);
27
37
  return {
28
- resetsAtMs: i,
38
+ resetsAtMs: a,
29
39
  isoValue: e,
30
- label: r(t.resetsAtLabel, { dateTime: l }),
31
- ariaLabel: r(t.resetsAtAriaLabel, { dateTime: u })
40
+ label: r(t.resetsAtLabel, { dateTime: u }),
41
+ ariaLabel: r(t.resetsAtAriaLabel, { dateTime: d })
32
42
  };
33
43
  } catch {
34
44
  return;
35
45
  }
36
- }, r = (r, i, a, o) => {
37
- let s = n(r, a, o);
38
- if (s != null) try {
39
- let n = Intl.DateTimeFormat().resolvedOptions().timeZone, r = n ? { timeZone: n } : {}, c = new Date(s.resetsAtMs);
40
- if (i === e.Day) {
41
- let e = new Intl.DateTimeFormat(a, {
46
+ }, l = (n, r, i, a) => {
47
+ let o = c(n, i, a);
48
+ if (o != null) try {
49
+ let n = Intl.DateTimeFormat().resolvedOptions().timeZone, s = n ? { timeZone: n } : {}, c = new Date(o.resetsAtMs);
50
+ if (r === e.Day) {
51
+ let e = new Intl.DateTimeFormat(i, {
42
52
  hour: "numeric",
43
53
  minute: "2-digit",
44
54
  timeZoneName: "shortOffset",
45
- ...r
55
+ ...s
46
56
  }).format(c);
47
57
  return {
48
- isoValue: s.isoValue,
49
- label: o(t.resetsAtTime, { time: e }),
50
- ariaLabel: s.ariaLabel
58
+ isoValue: o.isoValue,
59
+ label: a(t.resetsAtTime, { time: e }),
60
+ ariaLabel: o.ariaLabel
51
61
  };
52
62
  }
53
63
  let l = new Intl.DateTimeFormat("en-US", {
54
64
  year: "numeric",
55
- ...r
56
- }), u = l.format(c) !== l.format(/* @__PURE__ */ new Date()), d = new Intl.DateTimeFormat(a, {
65
+ ...s
66
+ }), u = l.format(c) !== l.format(/* @__PURE__ */ new Date()), d = new Intl.DateTimeFormat(i, {
57
67
  month: "short",
58
68
  day: "numeric",
59
69
  ...u ? { year: "numeric" } : {},
60
- ...r
70
+ ...s
61
71
  }).format(c);
62
72
  return {
63
- isoValue: s.isoValue,
64
- label: o(t.resetsOnDate, { date: d }),
65
- ariaLabel: s.ariaLabel
73
+ isoValue: o.isoValue,
74
+ label: a(t.resetsOnDate, { date: d }),
75
+ ariaLabel: o.ariaLabel
66
76
  };
67
77
  } catch {
68
78
  return;
69
79
  }
70
80
  };
71
81
  //#endregion
72
- export { t as USAGE_RESET_I18N_KEYS, r as formatUsageResetShort, n as formatUsageResetTime };
82
+ export { t as USAGE_RESET_I18N_KEYS, s as UsageResetOffsetPolicy, l as formatUsageResetShort, c as formatUsageResetTime };
@@ -1,32 +1,56 @@
1
- import { DeploymentLimitsResponseDto } from '@epam/ai-dial-chat-api-client';
2
- /** Host-configured call that fetches the limits of one deployment. */
3
- export type GetDeploymentLimits = (deploymentId: string) => Promise<DeploymentLimitsResponseDto>;
1
+ import { DeploymentLimitsResponseDto, UserLimitStatsResponseDto } from '@epam/ai-dial-chat-api-client';
2
+ /** The caller's account-wide cost budget and spend: the top level of a user-usage response. */
3
+ export type AccountUsage = Pick<UserLimitStatsResponseDto, 'dayCostStats' | 'weekCostStats' | 'monthCostStats'>;
4
+ /**
5
+ * What the usage dial and the usage banner are mapped from. Each field has a
6
+ * single scope, so a deployment's figures are never read as the account's or
7
+ * the other way round.
8
+ */
9
+ export interface UsageLimitsSources {
10
+ /** The selected deployment's own stats (its deployment-usage response). Only its token stats are read. */
11
+ deployment: DeploymentLimitsResponseDto | undefined;
12
+ /** The caller's account budget and spend. Only its cost stats are read. */
13
+ account: AccountUsage | undefined;
14
+ }
15
+ /** Host-configured calls that fetch the two usage sources. */
16
+ export interface UsageLimitsApi {
17
+ /** Fetches one deployment's own usage, every stat scoped to that deployment. */
18
+ getDeploymentUsage: (deploymentId: string) => Promise<DeploymentLimitsResponseDto>;
19
+ /** Fetches the caller's account usage; only its top-level cost stats are read. */
20
+ getAccountUsage: () => Promise<AccountUsage>;
21
+ }
4
22
  /** Return shape of {@link useDeploymentUsageLimits}. */
5
23
  export interface UseDeploymentUsageLimitsResult {
6
- /** Raw limits response for the selected deployment, or `undefined` before the first success. */
7
- limitsDto: DeploymentLimitsResponseDto | undefined;
8
- /** `true` while a fetch is in flight. */
24
+ /** The last successfully fetched value of each source. */
25
+ sources: UsageLimitsSources;
26
+ /** `true` until both calls of the current fetch have settled. */
9
27
  isLoading: boolean;
10
- /** `true` after the most recent fetch rejected. */
28
+ /** `true` after either call of the most recent fetch rejected. */
11
29
  hasError: boolean;
12
- /** Re-fetches the current deployment when no request is in flight. */
30
+ /** Re-fetches both sources when no request is in flight. */
13
31
  refresh: () => void;
14
32
  }
15
33
  /**
16
- * Fetches the selected deployment's usage limits via the provided
17
- * `getDeploymentLimits` function. The hook accepts the fetch function as a
18
- * parameter so the caller supplies an already-configured API client — the hook
19
- * never constructs or imports one itself. The function's identity is not a
20
- * re-fetch trigger; only `deploymentId` and `refresh()` are.
34
+ * Fetches the selected deployment's own usage and the caller's account usage
35
+ * through the provided `api`. The hook accepts the calls as a parameter so the
36
+ * caller supplies an already-configured API client; the hook never constructs
37
+ * or imports one itself. The identity of `api` is not a re-fetch trigger; only
38
+ * `deploymentId` and `refresh()` are.
39
+ *
40
+ * Two sources rather than one deployment-limits response: there, the cost
41
+ * stats add an application's aggregated callee cost to the account spend that
42
+ * already contains it, so an agent's spend would be counted twice.
21
43
  *
22
- * A monotonic request ID prevents a slower response for a previous deployment
23
- * from replacing the current value. Refresh failures preserve the last known
24
- * response so the open popover can surface a non-blocking error.
44
+ * Both calls share one monotonic request ID, so a slower response for a
45
+ * previous deployment never replaces the current value. Each source keeps its
46
+ * last known value when its own call fails, so the open popover can surface a
47
+ * non-blocking error while the other source still renders. The account source
48
+ * survives a deployment change, since it does not depend on the selection.
25
49
  *
26
- * The raw response is returned rather than a mapped display model: mapping
50
+ * The raw responses are returned rather than a mapped display model: mapping
27
51
  * needs the caller's translated labels and locale-bound reset formatter, and
28
52
  * holding the mapped value in state here would leave it stale after a language
29
53
  * change until the next fetch.
30
54
  */
31
- export declare const useDeploymentUsageLimits: (deploymentId: string | undefined, getDeploymentLimits: GetDeploymentLimits) => UseDeploymentUsageLimitsResult;
55
+ export declare const useDeploymentUsageLimits: (deploymentId: string | undefined, api: UsageLimitsApi) => UseDeploymentUsageLimitsResult;
32
56
  //# sourceMappingURL=useDeploymentUsageLimits.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useDeploymentUsageLimits.d.ts","sourceRoot":"","sources":["../../../src/usage/useDeploymentUsageLimits/useDeploymentUsageLimits.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAGjF,sEAAsE;AACtE,MAAM,MAAM,mBAAmB,GAAG,CAChC,YAAY,EAAE,MAAM,KACjB,OAAO,CAAC,2BAA2B,CAAC,CAAC;AAE1C,wDAAwD;AACxD,MAAM,WAAW,8BAA8B;IAC7C,gGAAgG;IAChG,SAAS,EAAE,2BAA2B,GAAG,SAAS,CAAC;IACnD,yCAAyC;IACzC,SAAS,EAAE,OAAO,CAAC;IACnB,mDAAmD;IACnD,QAAQ,EAAE,OAAO,CAAC;IAClB,sEAAsE;IACtE,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,wBAAwB,GACnC,cAAc,MAAM,GAAG,SAAS,EAChC,qBAAqB,mBAAmB,KACvC,8BAgEF,CAAC"}
1
+ {"version":3,"file":"useDeploymentUsageLimits.d.ts","sourceRoot":"","sources":["../../../src/usage/useDeploymentUsageLimits/useDeploymentUsageLimits.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,2BAA2B,EAC3B,yBAAyB,EAC1B,MAAM,+BAA+B,CAAC;AAGvC,+FAA+F;AAC/F,MAAM,MAAM,YAAY,GAAG,IAAI,CAC7B,yBAAyB,EACzB,cAAc,GAAG,eAAe,GAAG,gBAAgB,CACpD,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,0GAA0G;IAC1G,UAAU,EAAE,2BAA2B,GAAG,SAAS,CAAC;IACpD,2EAA2E;IAC3E,OAAO,EAAE,YAAY,GAAG,SAAS,CAAC;CACnC;AAED,8DAA8D;AAC9D,MAAM,WAAW,cAAc;IAC7B,gFAAgF;IAChF,kBAAkB,EAAE,CAClB,YAAY,EAAE,MAAM,KACjB,OAAO,CAAC,2BAA2B,CAAC,CAAC;IAC1C,kFAAkF;IAClF,eAAe,EAAE,MAAM,OAAO,CAAC,YAAY,CAAC,CAAC;CAC9C;AAED,wDAAwD;AACxD,MAAM,WAAW,8BAA8B;IAC7C,0DAA0D;IAC1D,OAAO,EAAE,kBAAkB,CAAC;IAC5B,iEAAiE;IACjE,SAAS,EAAE,OAAO,CAAC;IACnB,kEAAkE;IAClE,QAAQ,EAAE,OAAO,CAAC;IAClB,4DAA4D;IAC5D,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,wBAAwB,GACnC,cAAc,MAAM,GAAG,SAAS,EAChC,KAAK,cAAc,KAClB,8BA6EF,CAAC"}