@vertesia/ui 0.60.0 → 0.62.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 (665) hide show
  1. package/lib/esm/core/components/FormItem.js +9 -0
  2. package/lib/esm/core/components/FormItem.js.map +1 -0
  3. package/lib/esm/core/components/InputList.js +4 -3
  4. package/lib/esm/core/components/InputList.js.map +1 -1
  5. package/lib/esm/core/components/index.js +3 -3
  6. package/lib/esm/core/components/index.js.map +1 -1
  7. package/lib/esm/core/components/shadcn/button.js +37 -7
  8. package/lib/esm/core/components/shadcn/button.js.map +1 -1
  9. package/lib/esm/core/components/shadcn/calendar.js +7 -39
  10. package/lib/esm/core/components/shadcn/calendar.js.map +1 -1
  11. package/lib/esm/core/components/shadcn/dialog.js +3 -3
  12. package/lib/esm/core/components/shadcn/dialog.js.map +1 -1
  13. package/lib/esm/core/components/shadcn/filters/DynamicLabel.js +38 -0
  14. package/lib/esm/core/components/shadcn/filters/DynamicLabel.js.map +1 -0
  15. package/lib/esm/core/components/shadcn/filters/comboBox.js +27 -26
  16. package/lib/esm/core/components/shadcn/filters/comboBox.js.map +1 -1
  17. package/lib/esm/core/components/shadcn/filters/dateFilter.js +19 -14
  18. package/lib/esm/core/components/shadcn/filters/dateFilter.js.map +1 -1
  19. package/lib/esm/core/components/shadcn/filters/filterBar.js +49 -36
  20. package/lib/esm/core/components/shadcn/filters/filterBar.js.map +1 -1
  21. package/lib/esm/core/components/shadcn/filters/filters.js +31 -23
  22. package/lib/esm/core/components/shadcn/filters/filters.js.map +1 -1
  23. package/lib/esm/core/components/shadcn/filters/selectFilter.js +33 -24
  24. package/lib/esm/core/components/shadcn/filters/selectFilter.js.map +1 -1
  25. package/lib/esm/core/components/shadcn/filters/textFilter.js +2 -2
  26. package/lib/esm/core/components/shadcn/filters/textFilter.js.map +1 -1
  27. package/lib/esm/core/components/shadcn/filters/types.js.map +1 -1
  28. package/lib/esm/core/components/shadcn/input.js +4 -4
  29. package/lib/esm/core/components/shadcn/input.js.map +1 -1
  30. package/lib/esm/core/components/shadcn/selectBox.js +72 -6
  31. package/lib/esm/core/components/shadcn/selectBox.js.map +1 -1
  32. package/lib/esm/core/components/styles.js +1 -1
  33. package/lib/esm/core/components/styles.js.map +1 -1
  34. package/lib/esm/core/components/table/index.js +3 -0
  35. package/lib/esm/core/components/table/index.js.map +1 -1
  36. package/lib/esm/core/index.js +2 -1
  37. package/lib/esm/core/index.js.map +1 -1
  38. package/lib/esm/core/utils/cn.js +6 -0
  39. package/lib/esm/core/utils/cn.js.map +1 -0
  40. package/lib/esm/core/utils/index.js +2 -0
  41. package/lib/esm/core/utils/index.js.map +1 -0
  42. package/lib/esm/features/agent/PayloadBuilder.js +174 -0
  43. package/lib/esm/features/agent/PayloadBuilder.js.map +1 -0
  44. package/lib/esm/features/agent/chat/AnimatedThinkingDots.js +207 -0
  45. package/lib/esm/features/agent/chat/AnimatedThinkingDots.js.map +1 -0
  46. package/lib/esm/features/agent/chat/JumpingDots.js +6 -0
  47. package/lib/esm/features/agent/chat/JumpingDots.js.map +1 -0
  48. package/lib/esm/features/agent/chat/ModernAgentConversation.js +409 -0
  49. package/lib/esm/features/agent/chat/ModernAgentConversation.js.map +1 -0
  50. package/lib/esm/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js +129 -0
  51. package/lib/esm/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js.map +1 -0
  52. package/lib/esm/features/agent/chat/ModernAgentOutput/Header.js +66 -0
  53. package/lib/esm/features/agent/chat/ModernAgentOutput/Header.js.map +1 -0
  54. package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlideInPanel.js +29 -0
  55. package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlideInPanel.js.map +1 -0
  56. package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.js +97 -0
  57. package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.js.map +1 -0
  58. package/lib/esm/features/agent/chat/ModernAgentOutput/MessageInput.js +46 -0
  59. package/lib/esm/features/agent/chat/ModernAgentOutput/MessageInput.js.map +1 -0
  60. package/lib/esm/features/agent/chat/ModernAgentOutput/MessageItem.js +352 -0
  61. package/lib/esm/features/agent/chat/ModernAgentOutput/MessageItem.js.map +1 -0
  62. package/lib/esm/features/agent/chat/ModernAgentOutput/MessagesContainer.js +20 -0
  63. package/lib/esm/features/agent/chat/ModernAgentOutput/MessagesContainer.js.map +1 -0
  64. package/lib/esm/features/agent/chat/ModernAgentOutput/PlanPanel.js +62 -0
  65. package/lib/esm/features/agent/chat/ModernAgentOutput/PlanPanel.js.map +1 -0
  66. package/lib/esm/features/agent/chat/ModernAgentOutput/SlideInPanel.js +23 -0
  67. package/lib/esm/features/agent/chat/ModernAgentOutput/SlideInPanel.js.map +1 -0
  68. package/lib/esm/features/agent/chat/ModernAgentOutput/SlidingMessages.js +51 -0
  69. package/lib/esm/features/agent/chat/ModernAgentOutput/SlidingMessages.js.map +1 -0
  70. package/lib/esm/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.js +82 -0
  71. package/lib/esm/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.js.map +1 -0
  72. package/lib/esm/features/agent/chat/ModernAgentOutput/StackedMessages.js +13 -0
  73. package/lib/esm/features/agent/chat/ModernAgentOutput/StackedMessages.js.map +1 -0
  74. package/lib/esm/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js +105 -0
  75. package/lib/esm/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js.map +1 -0
  76. package/lib/esm/features/agent/chat/ModernAgentOutput/utils.js +154 -0
  77. package/lib/esm/features/agent/chat/ModernAgentOutput/utils.js.map +1 -0
  78. package/lib/esm/features/agent/chat/SlidingThinkingIndicator.js +266 -0
  79. package/lib/esm/features/agent/chat/SlidingThinkingIndicator.js.map +1 -0
  80. package/lib/esm/features/agent/chat/WaitingMessages.js +60 -0
  81. package/lib/esm/features/agent/chat/WaitingMessages.js.map +1 -0
  82. package/lib/esm/features/agent/chat/index.js +5 -0
  83. package/lib/esm/features/agent/chat/index.js.map +1 -0
  84. package/lib/esm/features/agent/index.js +3 -0
  85. package/lib/esm/features/agent/index.js.map +1 -0
  86. package/lib/esm/features/errors/PanelErrorBoundary.js +11 -0
  87. package/lib/esm/features/errors/PanelErrorBoundary.js.map +1 -0
  88. package/lib/esm/features/errors/RowErrorBoundary.js +9 -0
  89. package/lib/esm/features/errors/RowErrorBoundary.js.map +1 -0
  90. package/lib/esm/features/errors/VertesiaErrorBoundary.js +15 -0
  91. package/lib/esm/features/errors/VertesiaErrorBoundary.js.map +1 -0
  92. package/lib/esm/features/errors/WidgetErrorBoundary.js +11 -0
  93. package/lib/esm/features/errors/WidgetErrorBoundary.js.map +1 -0
  94. package/lib/esm/features/errors/index.js +5 -0
  95. package/lib/esm/features/errors/index.js.map +1 -0
  96. package/lib/esm/features/facets/EnvironmentFacet.js +39 -0
  97. package/lib/esm/features/facets/EnvironmentFacet.js.map +1 -0
  98. package/lib/esm/features/facets/FacetsNav.js +8 -0
  99. package/lib/esm/features/facets/FacetsNav.js.map +1 -0
  100. package/lib/esm/features/facets/InteractionFacet.js +39 -0
  101. package/lib/esm/features/facets/InteractionFacet.js.map +1 -0
  102. package/lib/esm/features/facets/StringFacet.js +12 -0
  103. package/lib/esm/features/facets/StringFacet.js.map +1 -0
  104. package/lib/esm/features/facets/StringListFacet.js +11 -0
  105. package/lib/esm/features/facets/StringListFacet.js.map +1 -0
  106. package/lib/esm/features/facets/TypeFacet.js +42 -0
  107. package/lib/esm/features/facets/TypeFacet.js.map +1 -0
  108. package/lib/esm/features/facets/TypeOptions.js +19 -0
  109. package/lib/esm/features/facets/TypeOptions.js.map +1 -0
  110. package/lib/esm/features/facets/UserFacet.js +33 -0
  111. package/lib/esm/features/facets/UserFacet.js.map +1 -0
  112. package/lib/esm/features/facets/VFacetsNav.js +114 -0
  113. package/lib/esm/features/facets/VFacetsNav.js.map +1 -0
  114. package/lib/esm/features/facets/VStringFacet.js +17 -0
  115. package/lib/esm/features/facets/VStringFacet.js.map +1 -0
  116. package/lib/esm/features/facets/VTypeFacet.js +56 -0
  117. package/lib/esm/features/facets/VTypeFacet.js.map +1 -0
  118. package/lib/esm/features/facets/VUserFacet.js +31 -0
  119. package/lib/esm/features/facets/VUserFacet.js.map +1 -0
  120. package/lib/esm/features/facets/index.js +12 -0
  121. package/lib/esm/features/facets/index.js.map +1 -0
  122. package/lib/esm/features/facets/utils.js +7 -0
  123. package/lib/esm/features/facets/utils.js.map +1 -0
  124. package/lib/esm/features/index.js +9 -1
  125. package/lib/esm/features/index.js.map +1 -1
  126. package/lib/esm/features/layout/GenericPageNavHeader.js +11 -0
  127. package/lib/esm/features/layout/GenericPageNavHeader.js.map +1 -0
  128. package/lib/esm/features/layout/NotFoundView.js +5 -0
  129. package/lib/esm/features/layout/NotFoundView.js.map +1 -0
  130. package/lib/esm/features/layout/index.js +3 -0
  131. package/lib/esm/features/layout/index.js.map +1 -0
  132. package/lib/esm/features/magic-pdf/DownloadPopover.js +13 -0
  133. package/lib/esm/features/magic-pdf/DownloadPopover.js.map +1 -0
  134. package/lib/esm/features/magic-pdf/MagicPdfView.js +44 -0
  135. package/lib/esm/features/magic-pdf/MagicPdfView.js.map +1 -0
  136. package/lib/esm/features/magic-pdf/PageSlider.js +57 -0
  137. package/lib/esm/features/magic-pdf/PageSlider.js.map +1 -0
  138. package/lib/esm/features/magic-pdf/PdfPageProvider.js +133 -0
  139. package/lib/esm/features/magic-pdf/PdfPageProvider.js.map +1 -0
  140. package/lib/esm/features/magic-pdf/TextPageView.js +45 -0
  141. package/lib/esm/features/magic-pdf/TextPageView.js.map +1 -0
  142. package/lib/esm/features/magic-pdf/index.js +2 -0
  143. package/lib/esm/features/magic-pdf/index.js.map +1 -0
  144. package/lib/esm/features/magic-pdf/types.js +2 -0
  145. package/lib/esm/features/magic-pdf/types.js.map +1 -0
  146. package/lib/esm/features/magic-pdf/useResizeOnDrag.js +34 -0
  147. package/lib/esm/features/magic-pdf/useResizeOnDrag.js.map +1 -0
  148. package/lib/esm/features/store/collections/BrowseCollectionView.js +37 -0
  149. package/lib/esm/features/store/collections/BrowseCollectionView.js.map +1 -0
  150. package/lib/esm/features/store/collections/CollectionView.js +53 -0
  151. package/lib/esm/features/store/collections/CollectionView.js.map +1 -0
  152. package/lib/esm/features/store/collections/CollectionsTable.js +60 -0
  153. package/lib/esm/features/store/collections/CollectionsTable.js.map +1 -0
  154. package/lib/esm/features/store/collections/CollectionsView.js +94 -0
  155. package/lib/esm/features/store/collections/CollectionsView.js.map +1 -0
  156. package/lib/esm/features/store/collections/EditCollectionView.js +161 -0
  157. package/lib/esm/features/store/collections/EditCollectionView.js.map +1 -0
  158. package/lib/esm/features/store/collections/index.js +6 -0
  159. package/lib/esm/features/store/collections/index.js.map +1 -0
  160. package/lib/esm/features/store/index.js +4 -0
  161. package/lib/esm/features/store/index.js.map +1 -0
  162. package/lib/esm/features/store/objects/DocumentPreviewPanel.js +150 -0
  163. package/lib/esm/features/store/objects/DocumentPreviewPanel.js.map +1 -0
  164. package/lib/esm/features/store/objects/DocumentSearchResults.js +123 -0
  165. package/lib/esm/features/store/objects/DocumentSearchResults.js.map +1 -0
  166. package/lib/esm/features/store/objects/DocumentSelectionProvider.js +81 -0
  167. package/lib/esm/features/store/objects/DocumentSelectionProvider.js.map +1 -0
  168. package/lib/esm/features/store/objects/DocumentTable.js +278 -0
  169. package/lib/esm/features/store/objects/DocumentTable.js.map +1 -0
  170. package/lib/esm/features/store/objects/ExportPropertiesModal.js +31 -0
  171. package/lib/esm/features/store/objects/ExportPropertiesModal.js.map +1 -0
  172. package/lib/esm/features/store/objects/components/ContentDispositionButton.js +31 -0
  173. package/lib/esm/features/store/objects/components/ContentDispositionButton.js.map +1 -0
  174. package/lib/esm/features/store/objects/components/ContentOverview.js +195 -0
  175. package/lib/esm/features/store/objects/components/ContentOverview.js.map +1 -0
  176. package/lib/esm/features/store/objects/components/DocumentIcon.js +28 -0
  177. package/lib/esm/features/store/objects/components/DocumentIcon.js.map +1 -0
  178. package/lib/esm/features/store/objects/components/DocumentInput.js +52 -0
  179. package/lib/esm/features/store/objects/components/DocumentInput.js.map +1 -0
  180. package/lib/esm/features/store/objects/components/PropertiesEditorModal.js +169 -0
  181. package/lib/esm/features/store/objects/components/PropertiesEditorModal.js.map +1 -0
  182. package/lib/esm/features/store/objects/components/SaveVersionConfirmModal.js +45 -0
  183. package/lib/esm/features/store/objects/components/SaveVersionConfirmModal.js.map +1 -0
  184. package/lib/esm/features/store/objects/components/SelectDocument.js +39 -0
  185. package/lib/esm/features/store/objects/components/SelectDocument.js.map +1 -0
  186. package/lib/esm/features/store/objects/components/SelectDocumentModal.js +7 -0
  187. package/lib/esm/features/store/objects/components/SelectDocumentModal.js.map +1 -0
  188. package/lib/esm/features/store/objects/components/VectorSearchWidget.js +85 -0
  189. package/lib/esm/features/store/objects/components/VectorSearchWidget.js.map +1 -0
  190. package/lib/esm/features/store/objects/components/index.js +10 -0
  191. package/lib/esm/features/store/objects/components/index.js.map +1 -0
  192. package/lib/esm/features/store/objects/components/useDownloadObject.js +21 -0
  193. package/lib/esm/features/store/objects/components/useDownloadObject.js.map +1 -0
  194. package/lib/esm/features/store/objects/index.js +11 -0
  195. package/lib/esm/features/store/objects/index.js.map +1 -0
  196. package/lib/esm/features/store/objects/layout/DocumentTableColumn.js +74 -0
  197. package/lib/esm/features/store/objects/layout/DocumentTableColumn.js.map +1 -0
  198. package/lib/esm/features/store/objects/layout/documentLayout.js +16 -0
  199. package/lib/esm/features/store/objects/layout/documentLayout.js.map +1 -0
  200. package/lib/esm/features/store/objects/layout/index.js +3 -0
  201. package/lib/esm/features/store/objects/layout/index.js.map +1 -0
  202. package/lib/esm/features/store/objects/layout/renderers.js +128 -0
  203. package/lib/esm/features/store/objects/layout/renderers.js.map +1 -0
  204. package/lib/esm/features/store/objects/search/DocumentSearchContext.js +150 -0
  205. package/lib/esm/features/store/objects/search/DocumentSearchContext.js.map +1 -0
  206. package/lib/esm/features/store/objects/search/DocumentSearchProvider.js +41 -0
  207. package/lib/esm/features/store/objects/search/DocumentSearchProvider.js.map +1 -0
  208. package/lib/esm/features/store/objects/search/index.js +3 -0
  209. package/lib/esm/features/store/objects/search/index.js.map +1 -0
  210. package/lib/esm/features/store/objects/selection/ObjectsActionContext.js +149 -0
  211. package/lib/esm/features/store/objects/selection/ObjectsActionContext.js.map +1 -0
  212. package/lib/esm/features/store/objects/selection/ObjectsActionSpec.js +2 -0
  213. package/lib/esm/features/store/objects/selection/ObjectsActionSpec.js.map +1 -0
  214. package/lib/esm/features/store/objects/selection/SelectionActions.js +75 -0
  215. package/lib/esm/features/store/objects/selection/SelectionActions.js.map +1 -0
  216. package/lib/esm/features/store/objects/selection/actions/AddToCollectionAction.js +64 -0
  217. package/lib/esm/features/store/objects/selection/actions/AddToCollectionAction.js.map +1 -0
  218. package/lib/esm/features/store/objects/selection/actions/ChangeTypeAction.js +53 -0
  219. package/lib/esm/features/store/objects/selection/actions/ChangeTypeAction.js.map +1 -0
  220. package/lib/esm/features/store/objects/selection/actions/ConfirmAction.js +30 -0
  221. package/lib/esm/features/store/objects/selection/actions/ConfirmAction.js.map +1 -0
  222. package/lib/esm/features/store/objects/selection/actions/DeleteObjectsAction.js +66 -0
  223. package/lib/esm/features/store/objects/selection/actions/DeleteObjectsAction.js.map +1 -0
  224. package/lib/esm/features/store/objects/selection/actions/ExportPropertiesAction.js +106 -0
  225. package/lib/esm/features/store/objects/selection/actions/ExportPropertiesAction.js.map +1 -0
  226. package/lib/esm/features/store/objects/selection/actions/RemoveFromCollectionAction.js +64 -0
  227. package/lib/esm/features/store/objects/selection/actions/RemoveFromCollectionAction.js.map +1 -0
  228. package/lib/esm/features/store/objects/selection/actions/StartWorkflowComponent.js +72 -0
  229. package/lib/esm/features/store/objects/selection/actions/StartWorkflowComponent.js.map +1 -0
  230. package/lib/esm/features/store/objects/selection/actions/index.js +8 -0
  231. package/lib/esm/features/store/objects/selection/actions/index.js.map +1 -0
  232. package/lib/esm/features/store/objects/selection/index.js +5 -0
  233. package/lib/esm/features/store/objects/selection/index.js.map +1 -0
  234. package/lib/esm/features/store/objects/upload/DocumentUploadModal.js +476 -0
  235. package/lib/esm/features/store/objects/upload/DocumentUploadModal.js.map +1 -0
  236. package/lib/esm/features/store/objects/upload/index.js +4 -0
  237. package/lib/esm/features/store/objects/upload/index.js.map +1 -0
  238. package/lib/esm/features/store/objects/upload/useSmartFileUploadProcessing.js +201 -0
  239. package/lib/esm/features/store/objects/upload/useSmartFileUploadProcessing.js.map +1 -0
  240. package/lib/esm/features/store/objects/upload/useUploadHandler.js +230 -0
  241. package/lib/esm/features/store/objects/upload/useUploadHandler.js.map +1 -0
  242. package/lib/esm/features/store/types/ContentObjectTypeView.js +158 -0
  243. package/lib/esm/features/store/types/ContentObjectTypeView.js.map +1 -0
  244. package/lib/esm/features/store/types/ContentObjectTypesSearch.js +82 -0
  245. package/lib/esm/features/store/types/ContentObjectTypesSearch.js.map +1 -0
  246. package/lib/esm/features/store/types/ContentObjectTypesTable.js +11 -0
  247. package/lib/esm/features/store/types/ContentObjectTypesTable.js.map +1 -0
  248. package/lib/esm/features/store/types/ContentObjectTypesView.js +55 -0
  249. package/lib/esm/features/store/types/ContentObjectTypesView.js.map +1 -0
  250. package/lib/esm/features/store/types/CreateOrUpdateTypeModal.js +26 -0
  251. package/lib/esm/features/store/types/CreateOrUpdateTypeModal.js.map +1 -0
  252. package/lib/esm/features/store/types/ObjectSchemaEditor.js +89 -0
  253. package/lib/esm/features/store/types/ObjectSchemaEditor.js.map +1 -0
  254. package/lib/esm/features/store/types/SelectContentType.js +43 -0
  255. package/lib/esm/features/store/types/SelectContentType.js.map +1 -0
  256. package/lib/esm/features/store/types/SelectContentTypeModal.js +28 -0
  257. package/lib/esm/features/store/types/SelectContentTypeModal.js.map +1 -0
  258. package/lib/esm/features/store/types/TableLayoutEditor.js +78 -0
  259. package/lib/esm/features/store/types/TableLayoutEditor.js.map +1 -0
  260. package/lib/esm/features/store/types/index.js +11 -0
  261. package/lib/esm/features/store/types/index.js.map +1 -0
  262. package/lib/esm/features/store/types/search/ObjectTypeSearchContext.js +98 -0
  263. package/lib/esm/features/store/types/search/ObjectTypeSearchContext.js.map +1 -0
  264. package/lib/esm/features/store/types/search/ObjectTypeSearchProvider.js +15 -0
  265. package/lib/esm/features/store/types/search/ObjectTypeSearchProvider.js.map +1 -0
  266. package/lib/esm/features/store/types/search/index.js +3 -0
  267. package/lib/esm/features/store/types/search/index.js.map +1 -0
  268. package/lib/esm/features/user/UserAvatar.js +18 -0
  269. package/lib/esm/features/user/UserAvatar.js.map +1 -0
  270. package/lib/esm/features/user/UserInfo.js +88 -0
  271. package/lib/esm/features/user/UserInfo.js.map +1 -0
  272. package/lib/esm/features/user/index.js +3 -0
  273. package/lib/esm/features/user/index.js.map +1 -0
  274. package/lib/esm/features/utils/index.js +4 -0
  275. package/lib/esm/features/utils/index.js.map +1 -0
  276. package/lib/esm/features/utils/mimeType.js +9 -0
  277. package/lib/esm/features/utils/mimeType.js.map +1 -0
  278. package/lib/esm/features/utils/rendition.js +47 -0
  279. package/lib/esm/features/utils/rendition.js.map +1 -0
  280. package/lib/esm/features/utils/text.js +10 -0
  281. package/lib/esm/features/utils/text.js.map +1 -0
  282. package/lib/esm/layout/FullHeightLayout.js +1 -1
  283. package/lib/esm/layout/FullHeightLayout.js.map +1 -1
  284. package/lib/esm/layout/Sidebar.js +12 -2
  285. package/lib/esm/layout/Sidebar.js.map +1 -1
  286. package/lib/esm/widgets/Progress.js +5 -0
  287. package/lib/esm/widgets/Progress.js.map +1 -0
  288. package/lib/esm/widgets/codemirror/CodeMirrorEditor.js +1 -1
  289. package/lib/esm/widgets/codemirror/CodeMirrorEditor.js.map +1 -1
  290. package/lib/esm/widgets/form/Form.js +2 -2
  291. package/lib/esm/widgets/form/Form.js.map +1 -1
  292. package/lib/esm/widgets/form/schema.js +11 -5
  293. package/lib/esm/widgets/form/schema.js.map +1 -1
  294. package/lib/esm/widgets/index.js +4 -0
  295. package/lib/esm/widgets/index.js.map +1 -1
  296. package/lib/esm/widgets/popover/Popover.js +73 -0
  297. package/lib/esm/widgets/popover/Popover.js.map +1 -0
  298. package/lib/esm/widgets/popover/context.js +7 -0
  299. package/lib/esm/widgets/popover/context.js.map +1 -0
  300. package/lib/esm/widgets/popover/index.js +3 -0
  301. package/lib/esm/widgets/popover/index.js.map +1 -0
  302. package/lib/esm/widgets/popover/slots.js +22 -0
  303. package/lib/esm/widgets/popover/slots.js.map +1 -0
  304. package/lib/esm/widgets/properties/PropertiesView.js +6 -0
  305. package/lib/esm/widgets/properties/PropertiesView.js.map +1 -0
  306. package/lib/esm/widgets/properties/index.js +2 -0
  307. package/lib/esm/widgets/properties/index.js.map +1 -0
  308. package/lib/esm/widgets/schema-editor/JSONSchemaEditorModal.js +1 -2
  309. package/lib/esm/widgets/schema-editor/JSONSchemaEditorModal.js.map +1 -1
  310. package/lib/esm/widgets/schema-editor/editor/Editable.js +9 -10
  311. package/lib/esm/widgets/schema-editor/editor/Editable.js.map +1 -1
  312. package/lib/esm/widgets/schema-editor/editor/PropertyViewer.js +1 -1
  313. package/lib/esm/widgets/schema-editor/editor/PropertyViewer.js.map +1 -1
  314. package/lib/esm/widgets/schema-editor/editor/SchemaEditor.js +2 -2
  315. package/lib/esm/widgets/schema-editor/editor/SchemaEditor.js.map +1 -1
  316. package/lib/esm/widgets/upload/DropZone.js +162 -0
  317. package/lib/esm/widgets/upload/DropZone.js.map +1 -0
  318. package/lib/esm/widgets/upload/UploadResultCategory.js +19 -0
  319. package/lib/esm/widgets/upload/UploadResultCategory.js.map +1 -0
  320. package/lib/esm/widgets/upload/UploadSummary.js +30 -0
  321. package/lib/esm/widgets/upload/UploadSummary.js.map +1 -0
  322. package/lib/esm/widgets/upload/index.js +4 -0
  323. package/lib/esm/widgets/upload/index.js.map +1 -0
  324. package/lib/tsconfig.tsbuildinfo +1 -1
  325. package/lib/types/core/components/FormItem.d.ts +11 -0
  326. package/lib/types/core/components/index.d.ts +3 -3
  327. package/lib/types/core/components/shadcn/button.d.ts +13 -2
  328. package/lib/types/core/components/shadcn/calendar.d.ts +3 -3
  329. package/lib/types/core/components/shadcn/command.d.ts +7 -7
  330. package/lib/types/core/components/shadcn/filters/DynamicLabel.d.ts +8 -0
  331. package/lib/types/core/components/shadcn/filters/comboBox.d.ts +5 -5
  332. package/lib/types/core/components/shadcn/filters/dateFilter.d.ts +3 -4
  333. package/lib/types/core/components/shadcn/filters/types.d.ts +7 -1
  334. package/lib/types/core/components/shadcn/input.d.ts +4 -4
  335. package/lib/types/core/components/shadcn/selectBox.d.ts +13 -4
  336. package/lib/types/core/components/table/index.d.ts +1 -0
  337. package/lib/types/core/index.d.ts +2 -1
  338. package/lib/types/core/utils/cn.d.ts +2 -0
  339. package/lib/types/core/utils/index.d.ts +1 -0
  340. package/lib/types/features/agent/PayloadBuilder.d.ts +53 -0
  341. package/lib/types/features/agent/chat/AnimatedThinkingDots.d.ts +37 -0
  342. package/lib/types/features/agent/chat/JumpingDots.d.ts +6 -0
  343. package/lib/types/features/agent/chat/ModernAgentConversation.d.ts +24 -0
  344. package/lib/types/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts +21 -0
  345. package/lib/types/features/agent/chat/ModernAgentOutput/Header.d.ts +18 -0
  346. package/lib/types/features/agent/chat/ModernAgentOutput/InlineSlideInPanel.d.ts +10 -0
  347. package/lib/types/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.d.ts +15 -0
  348. package/lib/types/features/agent/chat/ModernAgentOutput/MessageInput.d.ts +12 -0
  349. package/lib/types/features/agent/chat/ModernAgentOutput/MessageItem.d.ts +7 -0
  350. package/lib/types/features/agent/chat/ModernAgentOutput/MessagesContainer.d.ts +9 -0
  351. package/lib/types/features/agent/chat/ModernAgentOutput/PlanPanel.d.ts +8 -0
  352. package/lib/types/features/agent/chat/ModernAgentOutput/SlideInPanel.d.ts +10 -0
  353. package/lib/types/features/agent/chat/ModernAgentOutput/SlidingMessages.d.ts +7 -0
  354. package/lib/types/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.d.ts +9 -0
  355. package/lib/types/features/agent/chat/ModernAgentOutput/StackedMessages.d.ts +7 -0
  356. package/lib/types/features/agent/chat/ModernAgentOutput/WorkstreamTabs.d.ts +21 -0
  357. package/lib/types/features/agent/chat/ModernAgentOutput/utils.d.ts +23 -0
  358. package/lib/types/features/agent/chat/SlidingThinkingIndicator.d.ts +17 -0
  359. package/lib/types/features/agent/chat/WaitingMessages.d.ts +1 -0
  360. package/lib/types/features/agent/chat/index.d.ts +4 -0
  361. package/lib/types/features/agent/index.d.ts +2 -0
  362. package/lib/types/features/errors/PanelErrorBoundary.d.ts +4 -0
  363. package/lib/types/features/errors/RowErrorBoundary.d.ts +7 -0
  364. package/lib/types/features/errors/VertesiaErrorBoundary.d.ts +11 -0
  365. package/lib/types/features/errors/WidgetErrorBoundary.d.ts +4 -0
  366. package/lib/types/features/errors/index.d.ts +4 -0
  367. package/lib/types/features/facets/EnvironmentFacet.d.ts +9 -0
  368. package/lib/types/features/facets/FacetsNav.d.ts +6 -0
  369. package/lib/types/features/facets/InteractionFacet.d.ts +9 -0
  370. package/lib/types/features/facets/StringFacet.d.ts +10 -0
  371. package/lib/types/features/facets/StringListFacet.d.ts +10 -0
  372. package/lib/types/features/facets/TypeFacet.d.ts +15 -0
  373. package/lib/types/features/facets/TypeOptions.d.ts +3 -0
  374. package/lib/types/features/facets/UserFacet.d.ts +11 -0
  375. package/lib/types/features/facets/VFacetsNav.d.ts +7 -0
  376. package/lib/types/features/facets/VStringFacet.d.ts +15 -0
  377. package/lib/types/features/facets/VTypeFacet.d.ts +8 -0
  378. package/lib/types/features/facets/VUserFacet.d.ts +9 -0
  379. package/lib/types/features/facets/index.d.ts +11 -0
  380. package/lib/types/features/facets/utils.d.ts +3 -0
  381. package/lib/types/features/index.d.ts +9 -1
  382. package/lib/types/features/layout/GenericPageNavHeader.d.ts +12 -0
  383. package/lib/types/features/layout/NotFoundView.d.ts +4 -0
  384. package/lib/types/features/layout/index.d.ts +2 -0
  385. package/lib/types/features/magic-pdf/DownloadPopover.d.ts +6 -0
  386. package/lib/types/features/magic-pdf/MagicPdfView.d.ts +6 -0
  387. package/lib/types/features/magic-pdf/PageSlider.d.ts +7 -0
  388. package/lib/types/features/magic-pdf/PdfPageProvider.d.ts +28 -0
  389. package/lib/types/features/magic-pdf/TextPageView.d.ts +7 -0
  390. package/lib/types/features/magic-pdf/index.d.ts +1 -0
  391. package/lib/types/features/magic-pdf/types.d.ts +1 -0
  392. package/lib/types/features/magic-pdf/useResizeOnDrag.d.ts +8 -0
  393. package/lib/types/features/store/collections/BrowseCollectionView.d.ts +6 -0
  394. package/lib/types/features/store/collections/CollectionView.d.ts +5 -0
  395. package/lib/types/features/store/collections/CollectionsTable.d.ts +5 -0
  396. package/lib/types/features/store/collections/CollectionsView.d.ts +10 -0
  397. package/lib/types/features/store/collections/EditCollectionView.d.ts +7 -0
  398. package/lib/types/features/store/collections/index.d.ts +5 -0
  399. package/lib/types/features/store/index.d.ts +3 -0
  400. package/lib/types/features/store/objects/DocumentPreviewPanel.d.ts +7 -0
  401. package/lib/types/features/store/objects/DocumentSearchResults.d.ts +19 -0
  402. package/lib/types/features/store/objects/DocumentSelectionProvider.d.ts +32 -0
  403. package/lib/types/features/store/objects/DocumentTable.d.ts +20 -0
  404. package/lib/types/features/store/objects/ExportPropertiesModal.d.ts +11 -0
  405. package/lib/types/features/store/objects/components/ContentDispositionButton.d.ts +8 -0
  406. package/lib/types/features/store/objects/components/ContentOverview.d.ts +7 -0
  407. package/lib/types/features/store/objects/components/DocumentIcon.d.ts +10 -0
  408. package/lib/types/features/store/objects/components/DocumentInput.d.ts +7 -0
  409. package/lib/types/features/store/objects/components/PropertiesEditorModal.d.ts +7 -0
  410. package/lib/types/features/store/objects/components/SaveVersionConfirmModal.d.ts +8 -0
  411. package/lib/types/features/store/objects/components/SelectDocument.d.ts +8 -0
  412. package/lib/types/features/store/objects/components/SelectDocumentModal.d.ts +8 -0
  413. package/lib/types/features/store/objects/components/VectorSearchWidget.d.ts +10 -0
  414. package/lib/types/features/store/objects/components/index.d.ts +9 -0
  415. package/lib/types/features/store/objects/components/useDownloadObject.d.ts +3 -0
  416. package/lib/types/features/store/objects/index.d.ts +10 -0
  417. package/lib/types/features/store/objects/layout/DocumentTableColumn.d.ts +16 -0
  418. package/lib/types/features/store/objects/layout/documentLayout.d.ts +17 -0
  419. package/lib/types/features/store/objects/layout/index.d.ts +2 -0
  420. package/lib/types/features/store/objects/layout/renderers.d.ts +2 -0
  421. package/lib/types/features/store/objects/search/DocumentSearchContext.d.ts +48 -0
  422. package/lib/types/features/store/objects/search/DocumentSearchProvider.d.ts +15 -0
  423. package/lib/types/features/store/objects/search/index.d.ts +2 -0
  424. package/lib/types/features/store/objects/selection/ObjectsActionContext.d.ts +25 -0
  425. package/lib/types/features/store/objects/selection/ObjectsActionSpec.d.ts +27 -0
  426. package/lib/types/features/store/objects/selection/SelectionActions.d.ts +4 -0
  427. package/lib/types/features/store/objects/selection/actions/AddToCollectionAction.d.ts +3 -0
  428. package/lib/types/features/store/objects/selection/actions/ChangeTypeAction.d.ts +3 -0
  429. package/lib/types/features/store/objects/selection/actions/ConfirmAction.d.ts +15 -0
  430. package/lib/types/features/store/objects/selection/actions/DeleteObjectsAction.d.ts +2 -0
  431. package/lib/types/features/store/objects/selection/actions/ExportPropertiesAction.d.ts +3 -0
  432. package/lib/types/features/store/objects/selection/actions/RemoveFromCollectionAction.d.ts +2 -0
  433. package/lib/types/features/store/objects/selection/actions/StartWorkflowComponent.d.ts +3 -0
  434. package/lib/types/features/store/objects/selection/actions/index.d.ts +7 -0
  435. package/lib/types/features/store/objects/selection/index.d.ts +4 -0
  436. package/lib/types/features/store/objects/upload/DocumentUploadModal.d.ts +37 -0
  437. package/lib/types/features/store/objects/upload/index.d.ts +3 -0
  438. package/lib/types/features/store/objects/upload/useSmartFileUploadProcessing.d.ts +29 -0
  439. package/lib/types/features/store/objects/upload/useUploadHandler.d.ts +49 -0
  440. package/lib/types/features/store/types/ContentObjectTypeView.d.ts +5 -0
  441. package/lib/types/features/store/types/ContentObjectTypesSearch.d.ts +5 -0
  442. package/lib/types/features/store/types/ContentObjectTypesTable.d.ts +7 -0
  443. package/lib/types/features/store/types/ContentObjectTypesView.d.ts +8 -0
  444. package/lib/types/features/store/types/CreateOrUpdateTypeModal.d.ts +14 -0
  445. package/lib/types/features/store/types/ObjectSchemaEditor.d.ts +7 -0
  446. package/lib/types/features/store/types/SelectContentType.d.ts +10 -0
  447. package/lib/types/features/store/types/SelectContentTypeModal.d.ts +32 -0
  448. package/lib/types/features/store/types/TableLayoutEditor.d.ts +8 -0
  449. package/lib/types/features/store/types/index.d.ts +10 -0
  450. package/lib/types/features/store/types/search/ObjectTypeSearchContext.d.ts +35 -0
  451. package/lib/types/features/store/types/search/ObjectTypeSearchProvider.d.ts +10 -0
  452. package/lib/types/features/store/types/search/index.d.ts +2 -0
  453. package/lib/types/features/user/UserAvatar.d.ts +8 -0
  454. package/lib/types/features/user/UserInfo.d.ts +36 -0
  455. package/lib/types/features/user/index.d.ts +2 -0
  456. package/lib/types/features/utils/index.d.ts +3 -0
  457. package/lib/types/features/utils/mimeType.d.ts +4 -0
  458. package/lib/types/features/utils/rendition.d.ts +3 -0
  459. package/lib/types/features/utils/text.d.ts +2 -0
  460. package/lib/types/layout/Sidebar.d.ts +2 -1
  461. package/lib/types/widgets/Progress.d.ts +5 -0
  462. package/lib/types/widgets/form/schema.d.ts +4 -3
  463. package/lib/types/widgets/index.d.ts +4 -0
  464. package/lib/types/widgets/popover/Popover.d.ts +37 -0
  465. package/lib/types/widgets/popover/context.d.ts +7 -0
  466. package/lib/types/widgets/popover/index.d.ts +2 -0
  467. package/lib/types/widgets/popover/slots.d.ts +4 -0
  468. package/lib/types/widgets/properties/PropertiesView.d.ts +10 -0
  469. package/lib/types/widgets/properties/index.d.ts +1 -0
  470. package/lib/types/widgets/upload/DropZone.d.ts +40 -0
  471. package/lib/types/widgets/upload/UploadResultCategory.d.ts +25 -0
  472. package/lib/types/widgets/upload/UploadSummary.d.ts +37 -0
  473. package/lib/types/widgets/upload/index.d.ts +3 -0
  474. package/lib/vertesia-ui-core.js +1 -1
  475. package/lib/vertesia-ui-core.js.map +1 -1
  476. package/lib/vertesia-ui-features.js +1 -1
  477. package/lib/vertesia-ui-features.js.map +1 -1
  478. package/lib/vertesia-ui-layout.js +1 -1
  479. package/lib/vertesia-ui-layout.js.map +1 -1
  480. package/lib/vertesia-ui-router.js.map +1 -1
  481. package/lib/vertesia-ui-session.js.map +1 -1
  482. package/lib/vertesia-ui-widgets.js +1 -1
  483. package/lib/vertesia-ui-widgets.js.map +1 -1
  484. package/package.json +14 -6
  485. package/src/core/components/FormItem.tsx +35 -0
  486. package/src/core/components/InputList.tsx +4 -3
  487. package/src/core/components/index.ts +3 -3
  488. package/src/core/components/shadcn/button.tsx +68 -8
  489. package/src/core/components/shadcn/calendar.tsx +9 -65
  490. package/src/core/components/shadcn/dialog.tsx +3 -3
  491. package/src/core/components/shadcn/filters/DynamicLabel.tsx +45 -0
  492. package/src/core/components/shadcn/filters/comboBox.tsx +57 -52
  493. package/src/core/components/shadcn/filters/dateFilter.tsx +46 -29
  494. package/src/core/components/shadcn/filters/filterBar.tsx +53 -47
  495. package/src/core/components/shadcn/filters/filters.tsx +43 -30
  496. package/src/core/components/shadcn/filters/selectFilter.tsx +53 -34
  497. package/src/core/components/shadcn/filters/textFilter.tsx +6 -3
  498. package/src/core/components/shadcn/filters/types.ts +8 -1
  499. package/src/core/components/shadcn/input.tsx +5 -5
  500. package/src/core/components/shadcn/selectBox.tsx +138 -33
  501. package/src/core/components/styles.ts +1 -1
  502. package/src/core/components/table/index.tsx +8 -0
  503. package/src/core/index.ts +2 -1
  504. package/src/core/utils/cn.ts +6 -0
  505. package/src/core/utils/index.ts +1 -0
  506. package/src/features/agent/PayloadBuilder.tsx +208 -0
  507. package/src/features/agent/chat/AnimatedThinkingDots.tsx +350 -0
  508. package/src/features/agent/chat/JumpingDots.tsx +16 -0
  509. package/src/features/agent/chat/ModernAgentConversation.tsx +708 -0
  510. package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.tsx +246 -0
  511. package/src/features/agent/chat/ModernAgentOutput/Header.tsx +231 -0
  512. package/src/features/agent/chat/ModernAgentOutput/InlineSlideInPanel.tsx +66 -0
  513. package/src/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.tsx +282 -0
  514. package/src/features/agent/chat/ModernAgentOutput/MessageInput.tsx +125 -0
  515. package/src/features/agent/chat/ModernAgentOutput/MessageItem.tsx +562 -0
  516. package/src/features/agent/chat/ModernAgentOutput/MessagesContainer.tsx +51 -0
  517. package/src/features/agent/chat/ModernAgentOutput/PlanPanel.tsx +123 -0
  518. package/src/features/agent/chat/ModernAgentOutput/README-image-support.md +43 -0
  519. package/src/features/agent/chat/ModernAgentOutput/SlideInPanel.tsx +72 -0
  520. package/src/features/agent/chat/ModernAgentOutput/SlidingMessages.tsx +96 -0
  521. package/src/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.tsx +185 -0
  522. package/src/features/agent/chat/ModernAgentOutput/StackedMessages.tsx +33 -0
  523. package/src/features/agent/chat/ModernAgentOutput/WorkstreamTabs.tsx +167 -0
  524. package/src/features/agent/chat/ModernAgentOutput/utils.ts +195 -0
  525. package/src/features/agent/chat/ModernAgentOutput/with-types.d.ts +15 -0
  526. package/src/features/agent/chat/SlidingThinkingIndicator.tsx +459 -0
  527. package/src/features/agent/chat/WaitingMessages.ts +66 -0
  528. package/src/features/agent/chat/index.ts +4 -0
  529. package/src/features/agent/index.ts +2 -0
  530. package/src/features/errors/PanelErrorBoundary.tsx +30 -0
  531. package/src/features/errors/RowErrorBoundary.tsx +28 -0
  532. package/src/features/errors/VertesiaErrorBoundary.tsx +28 -0
  533. package/src/features/errors/WidgetErrorBoundary.tsx +27 -0
  534. package/src/features/errors/index.ts +4 -0
  535. package/src/features/facets/EnvironmentFacet.tsx +53 -0
  536. package/src/features/facets/FacetsNav.tsx +19 -0
  537. package/src/features/facets/InteractionFacet.tsx +53 -0
  538. package/src/features/facets/StringFacet.tsx +23 -0
  539. package/src/features/facets/StringListFacet.tsx +22 -0
  540. package/src/features/facets/TypeFacet.tsx +59 -0
  541. package/src/features/facets/TypeOptions.tsx +22 -0
  542. package/src/features/facets/UserFacet.tsx +61 -0
  543. package/src/features/facets/VFacetsNav.tsx +139 -0
  544. package/src/features/facets/VStringFacet.tsx +34 -0
  545. package/src/features/facets/VTypeFacet.tsx +72 -0
  546. package/src/features/facets/VUserFacet.tsx +47 -0
  547. package/src/features/facets/index.ts +11 -0
  548. package/src/features/facets/utils.tsx +9 -0
  549. package/src/features/index.ts +9 -1
  550. package/src/features/layout/GenericPageNavHeader.tsx +48 -0
  551. package/src/features/layout/NotFoundView.tsx +11 -0
  552. package/src/features/layout/index.ts +2 -0
  553. package/src/features/magic-pdf/DownloadPopover.tsx +32 -0
  554. package/src/features/magic-pdf/MagicPdfView.tsx +102 -0
  555. package/src/features/magic-pdf/PageSlider.tsx +112 -0
  556. package/src/features/magic-pdf/PdfPageProvider.tsx +229 -0
  557. package/src/features/magic-pdf/TextPageView.tsx +65 -0
  558. package/src/features/magic-pdf/index.ts +1 -0
  559. package/src/features/magic-pdf/types.ts +1 -0
  560. package/src/features/magic-pdf/useResizeOnDrag.ts +42 -0
  561. package/src/features/store/collections/BrowseCollectionView.tsx +45 -0
  562. package/src/features/store/collections/CollectionView.tsx +94 -0
  563. package/src/features/store/collections/CollectionsTable.tsx +115 -0
  564. package/src/features/store/collections/CollectionsView.tsx +166 -0
  565. package/src/features/store/collections/EditCollectionView.tsx +253 -0
  566. package/src/features/store/collections/index.ts +5 -0
  567. package/src/features/store/index.ts +3 -0
  568. package/src/features/store/objects/DocumentPreviewPanel.tsx +417 -0
  569. package/src/features/store/objects/DocumentSearchResults.tsx +209 -0
  570. package/src/features/store/objects/DocumentSelectionProvider.tsx +99 -0
  571. package/src/features/store/objects/DocumentTable.tsx +409 -0
  572. package/src/features/store/objects/ExportPropertiesModal.tsx +89 -0
  573. package/src/features/store/objects/components/ContentDispositionButton.tsx +45 -0
  574. package/src/features/store/objects/components/ContentOverview.tsx +466 -0
  575. package/src/features/store/objects/components/DocumentIcon.tsx +87 -0
  576. package/src/features/store/objects/components/DocumentInput.tsx +90 -0
  577. package/src/features/store/objects/components/PropertiesEditorModal.tsx +253 -0
  578. package/src/features/store/objects/components/SaveVersionConfirmModal.tsx +136 -0
  579. package/src/features/store/objects/components/SelectDocument.tsx +69 -0
  580. package/src/features/store/objects/components/SelectDocumentModal.tsx +20 -0
  581. package/src/features/store/objects/components/VectorSearchWidget.tsx +115 -0
  582. package/src/features/store/objects/components/index.ts +9 -0
  583. package/src/features/store/objects/components/useDownloadObject.ts +24 -0
  584. package/src/features/store/objects/index.ts +10 -0
  585. package/src/features/store/objects/layout/DocumentTableColumn.tsx +84 -0
  586. package/src/features/store/objects/layout/documentLayout.tsx +69 -0
  587. package/src/features/store/objects/layout/index.ts +2 -0
  588. package/src/features/store/objects/layout/knowledge.md +238 -0
  589. package/src/features/store/objects/layout/renderers.tsx +139 -0
  590. package/src/features/store/objects/search/DocumentSearchContext.ts +181 -0
  591. package/src/features/store/objects/search/DocumentSearchProvider.tsx +54 -0
  592. package/src/features/store/objects/search/index.ts +2 -0
  593. package/src/features/store/objects/selection/ObjectsActionContext.tsx +196 -0
  594. package/src/features/store/objects/selection/ObjectsActionSpec.ts +31 -0
  595. package/src/features/store/objects/selection/SelectionActions.tsx +160 -0
  596. package/src/features/store/objects/selection/actions/AddToCollectionAction.tsx +114 -0
  597. package/src/features/store/objects/selection/actions/ChangeTypeAction.tsx +76 -0
  598. package/src/features/store/objects/selection/actions/ConfirmAction.tsx +46 -0
  599. package/src/features/store/objects/selection/actions/DeleteObjectsAction.tsx +77 -0
  600. package/src/features/store/objects/selection/actions/ExportPropertiesAction.tsx +117 -0
  601. package/src/features/store/objects/selection/actions/RemoveFromCollectionAction.tsx +77 -0
  602. package/src/features/store/objects/selection/actions/StartWorkflowComponent.tsx +122 -0
  603. package/src/features/store/objects/selection/actions/index.ts +7 -0
  604. package/src/features/store/objects/selection/index.ts +4 -0
  605. package/src/features/store/objects/upload/DocumentUploadModal.tsx +970 -0
  606. package/src/features/store/objects/upload/index.ts +3 -0
  607. package/src/features/store/objects/upload/useSmartFileUploadProcessing.ts +250 -0
  608. package/src/features/store/objects/upload/useUploadHandler.ts +325 -0
  609. package/src/features/store/types/ContentObjectTypeView.tsx +244 -0
  610. package/src/features/store/types/ContentObjectTypesSearch.tsx +111 -0
  611. package/src/features/store/types/ContentObjectTypesTable.tsx +38 -0
  612. package/src/features/store/types/ContentObjectTypesView.tsx +71 -0
  613. package/src/features/store/types/CreateOrUpdateTypeModal.tsx +70 -0
  614. package/src/features/store/types/ObjectSchemaEditor.tsx +127 -0
  615. package/src/features/store/types/SelectContentType.tsx +88 -0
  616. package/src/features/store/types/SelectContentTypeModal.tsx +142 -0
  617. package/src/features/store/types/TableLayoutEditor.tsx +104 -0
  618. package/src/features/store/types/index.ts +10 -0
  619. package/src/features/store/types/search/ObjectTypeSearchContext.tsx +119 -0
  620. package/src/features/store/types/search/ObjectTypeSearchProvider.tsx +24 -0
  621. package/src/features/store/types/search/index.ts +2 -0
  622. package/src/features/user/UserAvatar.tsx +34 -0
  623. package/src/features/user/UserInfo.tsx +215 -0
  624. package/src/features/user/index.ts +2 -0
  625. package/src/features/utils/index.ts +3 -0
  626. package/src/features/utils/mimeType.ts +9 -0
  627. package/src/features/utils/rendition.ts +75 -0
  628. package/src/features/utils/text.ts +10 -0
  629. package/src/layout/FullHeightLayout.tsx +1 -1
  630. package/src/layout/Sidebar.tsx +12 -2
  631. package/src/widgets/Progress.tsx +10 -0
  632. package/src/widgets/codemirror/CodeMirrorEditor.tsx +1 -1
  633. package/src/widgets/form/Form.tsx +2 -2
  634. package/src/widgets/form/schema.ts +14 -7
  635. package/src/widgets/index.ts +5 -1
  636. package/src/widgets/popover/Popover.tsx +171 -0
  637. package/src/widgets/popover/context.ts +15 -0
  638. package/src/widgets/popover/index.ts +2 -0
  639. package/src/widgets/popover/slots.ts +24 -0
  640. package/src/widgets/properties/PropertiesView.tsx +26 -0
  641. package/src/widgets/properties/index.ts +1 -0
  642. package/src/widgets/schema-editor/JSONSchemaEditorModal.tsx +1 -2
  643. package/src/widgets/schema-editor/editor/Editable.tsx +12 -13
  644. package/src/widgets/schema-editor/editor/PropertyViewer.tsx +1 -1
  645. package/src/widgets/schema-editor/editor/SchemaEditor.tsx +4 -4
  646. package/src/widgets/upload/DropZone.tsx +257 -0
  647. package/src/widgets/upload/UploadResultCategory.tsx +81 -0
  648. package/src/widgets/upload/UploadSummary.tsx +116 -0
  649. package/src/widgets/upload/index.ts +3 -0
  650. package/lib/esm/code/index.js +0 -3
  651. package/lib/esm/code/index.js.map +0 -1
  652. package/lib/esm/core/components/Input.js +0 -16
  653. package/lib/esm/core/components/Input.js.map +0 -1
  654. package/lib/esm/form/index.js +0 -3
  655. package/lib/esm/form/index.js.map +0 -1
  656. package/lib/types/code/index.d.ts +0 -0
  657. package/lib/types/core/components/Input.d.ts +0 -8
  658. package/lib/types/form/index.d.ts +0 -0
  659. package/lib/vertesia-ui-code.js +0 -2
  660. package/lib/vertesia-ui-code.js.map +0 -1
  661. package/lib/vertesia-ui-form.js +0 -2
  662. package/lib/vertesia-ui-form.js.map +0 -1
  663. package/src/code/index.ts +0 -1
  664. package/src/core/components/Input.tsx +0 -43
  665. package/src/form/index.ts +0 -1
@@ -0,0 +1,708 @@
1
+ import { AsyncExecutionResult, VertesiaClient } from "@vertesia/client";
2
+ import {
3
+ AgentMessage,
4
+ AgentMessageType,
5
+ Plan,
6
+ UserInputSignal
7
+ } from "@vertesia/common";
8
+ import { Button, MessageBox, Spinner, useToast } from "@vertesia/ui/core";
9
+ import { useUserSession } from "@vertesia/ui/session";
10
+ import {
11
+ Bot,
12
+ Cpu,
13
+ SendIcon,
14
+ XIcon
15
+ } from "lucide-react";
16
+ import React, { useEffect, useMemo, useRef, useState } from "react";
17
+ import {
18
+ AnimatedThinkingDots,
19
+ PulsatingCircle
20
+ } from "./AnimatedThinkingDots";
21
+ import AllMessagesMixed from "./ModernAgentOutput/AllMessagesMixed";
22
+ import Header from "./ModernAgentOutput/Header";
23
+ import MessageInput from "./ModernAgentOutput/MessageInput";
24
+ import PlanPanel from "./ModernAgentOutput/PlanPanel";
25
+ import {
26
+ getWorkstreamId,
27
+ insertMessageInTimeline,
28
+ isInProgress,
29
+ } from "./ModernAgentOutput/utils";
30
+ import { ThinkingMessages } from "./WaitingMessages";
31
+
32
+ type StartWorkflowFn = (
33
+ initialMessage?: string,
34
+ ) => Promise<{ run_id: string; workflow_id: string } | undefined>;
35
+
36
+ interface ModernAgentConversationProps {
37
+ run?: AsyncExecutionResult | { workflow_id: string; run_id: string };
38
+ title?: string;
39
+ interactive?: boolean;
40
+ onClose?: () => void;
41
+ isModal?: boolean;
42
+ initialMessage?: string;
43
+ startWorkflow?: StartWorkflowFn;
44
+ startButtonText?: string;
45
+ placeholder?: string;
46
+ hideUserInput?: boolean;
47
+ resetWorkflow?: () => void;
48
+ }
49
+
50
+ export function ModernAgentConversation(
51
+ props: ModernAgentConversationProps,
52
+ ) {
53
+ const { run, startWorkflow } = props;
54
+
55
+ if (run) {
56
+ // If we have a run, convert it to AsyncExecutionResult format if needed
57
+ const execRun: AsyncExecutionResult =
58
+ "runId" in run
59
+ ? run
60
+ : {
61
+ runId: run.run_id,
62
+ workflowId: run.workflow_id,
63
+ };
64
+ return <ModernAgentConversationInner {...props} run={execRun} />;
65
+ } else if (startWorkflow) {
66
+ // If we have startWorkflow capability but no run yet
67
+ return <StartWorkflowView {...props} />;
68
+ } else {
69
+ // Empty state
70
+ return <EmptyState />;
71
+ }
72
+ }
73
+
74
+ // Empty state when no agent is running
75
+ function EmptyState() {
76
+ return (
77
+ <MessageBox
78
+ status="info"
79
+ icon={<Bot className="size-16 text-muted mb-4" />}
80
+ >
81
+ <div className="text-base font-medium text-muted">
82
+ No agent currently running
83
+ </div>
84
+ <div className="mt-3 text-sm text-muted">
85
+ Select an interaction and click Start to start an agent
86
+ </div>
87
+ </MessageBox>
88
+ );
89
+ }
90
+
91
+ // Start workflow view - allows initiating a new agent conversation
92
+ function StartWorkflowView({
93
+ initialMessage,
94
+ startWorkflow,
95
+ onClose,
96
+ isModal = false,
97
+ placeholder = "Type your message...",
98
+ startButtonText = "Start Agent",
99
+ title = "Start New Conversation",
100
+ }: ModernAgentConversationProps) {
101
+ const [inputValue, setInputValue] = useState<string>("");
102
+ const [isSending, setIsSending] = useState(false);
103
+ const [run, setRun] = useState<AsyncExecutionResult>();
104
+ const toast = useToast();
105
+ const inputRef = useRef<HTMLInputElement>(null);
106
+
107
+ useEffect(() => {
108
+ // Focus the input field when component mounts
109
+ if (inputRef.current) {
110
+ inputRef.current.focus();
111
+ }
112
+ }, []);
113
+
114
+ // Start a new workflow with the message
115
+ const startWorkflowWithMessage = async () => {
116
+ if (!startWorkflow) return;
117
+
118
+ const message = inputValue.trim();
119
+ if (!message || isSending) return;
120
+
121
+ setIsSending(true);
122
+ try {
123
+ // Reset plan panel state when starting a new agent
124
+ sessionStorage.removeItem("plan-panel-shown");
125
+
126
+ toast({
127
+ title: "Starting agent...",
128
+ status: "info",
129
+ duration: 3000,
130
+ });
131
+ const newRun = await startWorkflow(message);
132
+ if (newRun) {
133
+ setRun({
134
+ runId: newRun.run_id,
135
+ workflowId: newRun.workflow_id,
136
+ });
137
+ setInputValue("");
138
+ toast({
139
+ title: "Agent started",
140
+ status: "success",
141
+ duration: 3000,
142
+ });
143
+ }
144
+ } catch (err: any) {
145
+ toast({
146
+ title: "Error starting workflow",
147
+ status: "error",
148
+ duration: 3000,
149
+ description: err instanceof Error ? err.message : "Unknown error",
150
+ });
151
+ } finally {
152
+ setIsSending(false);
153
+ }
154
+ };
155
+
156
+ const handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {
157
+ if (e.key === "Enter" && !e.shiftKey) {
158
+ e.preventDefault();
159
+ startWorkflowWithMessage();
160
+ }
161
+ };
162
+
163
+ // If a run has been started, show the conversation
164
+ if (run) {
165
+ return (
166
+ <ModernAgentConversationInner
167
+ {...{ onClose, isModal, initialMessage, placeholder }}
168
+ run={run}
169
+ title={title}
170
+ />
171
+ );
172
+ }
173
+
174
+ return (
175
+ <div className="flex flex-col h-full bg-white dark:bg-gray-900 overflow-hidden border-0">
176
+ {/* Header */}
177
+ <div className="flex items-center justify-between py-2 px-3 border-b border-gray-100 dark:border-gray-800 bg-white dark:bg-gray-900">
178
+ <div className="flex items-center space-x-2">
179
+ <div className="p-1">
180
+ <Cpu className="h-3.5 w-3.5 text-gray-400 dark:text-gray-500" />
181
+ </div>
182
+ <span className="font-medium text-sm text-gray-700 dark:text-gray-300">
183
+ {title}
184
+ </span>
185
+ </div>
186
+
187
+ {/* Close button if needed */}
188
+ {onClose && !isModal && (
189
+ <Button
190
+ size="xs"
191
+ variant="ghost"
192
+ onClick={onClose}
193
+ title="Close"
194
+ className="text-slate-500 hover:text-slate-700"
195
+ >
196
+ <XIcon className="h-4 w-4" />
197
+ </Button>
198
+ )}
199
+ </div>
200
+
201
+ {/* Empty conversation area with instructions */}
202
+ <div className="flex-1 overflow-y-auto px-4 py-6 bg-white dark:bg-gray-900 flex flex-col items-center justify-center">
203
+ {initialMessage && (
204
+ <div className="px-4 py-3 mb-4 bg-blue-50/80 dark:bg-blue-900/30 border-l-2 border-blue-400 dark:border-blue-500 text-blue-700 dark:text-blue-300 max-w-md">
205
+ {initialMessage}
206
+ </div>
207
+ )}
208
+
209
+ <div className="bg-white dark:bg-slate-800 p-4 max-w-md border-l-2 border-blue-400 dark:border-blue-500">
210
+ <div className="text-base text-slate-600 dark:text-slate-300 font-medium">
211
+ Enter a message to start a conversation
212
+ </div>
213
+ <div className="mt-3 text-sm text-slate-500 dark:text-slate-400">
214
+ Type your question below and press Enter or click {startButtonText}{" "}
215
+ to begin
216
+ </div>
217
+ </div>
218
+ </div>
219
+
220
+ {/* Input Area */}
221
+ <div className="py-3 px-3 border-t border-gray-100 dark:border-gray-800 bg-white dark:bg-gray-900">
222
+ <div className="flex items-center gap-2">
223
+ <div className="flex-1">
224
+ <input
225
+ ref={inputRef}
226
+ value={inputValue}
227
+ onChange={(e) => setInputValue(e.target.value)}
228
+ onKeyDown={handleKeyDown}
229
+ placeholder={placeholder}
230
+ disabled={isSending}
231
+ className="w-full py-2 px-3 text-sm border border-gray-200 dark:border-gray-700 dark:bg-gray-800 dark:text-white focus:border-gray-300 dark:focus:border-gray-600 focus:ring-0 rounded-md"
232
+ />
233
+ </div>
234
+ <Button
235
+ onClick={startWorkflowWithMessage}
236
+ disabled={!inputValue.trim() || isSending}
237
+ className="px-3 py-2 bg-gray-800 dark:bg-gray-700 hover:bg-gray-700 dark:hover:bg-gray-600 text-white text-xs rounded-md transition-colors"
238
+ >
239
+ {isSending ? (
240
+ <Spinner size="sm" className="mr-1.5" />
241
+ ) : (
242
+ <SendIcon className="h-3.5 w-3.5 mr-1.5" />
243
+ )}
244
+ {startButtonText}
245
+ </Button>
246
+ </div>
247
+ <div className="text-xs text-gray-400 dark:text-gray-500 mt-2 text-center">
248
+ Type a message to start the conversation
249
+ </div>
250
+ </div>
251
+ </div>
252
+ );
253
+ }
254
+
255
+ // Inner component that handles the agent conversation - similar to ModernAgentOutput
256
+ function ModernAgentConversationInner({
257
+ run,
258
+ title,
259
+ interactive = true,
260
+ onClose,
261
+ isModal = false,
262
+ placeholder = "Type your message...",
263
+ resetWorkflow,
264
+ }: ModernAgentConversationProps & { run: AsyncExecutionResult }) {
265
+ const { client } = useUserSession();
266
+ const bottomRef = useRef<HTMLDivElement | null>(null);
267
+ const [messages, setMessages] = useState<AgentMessage[]>([]);
268
+ const [isCompleted, setIsCompleted] = useState(false);
269
+ const [inputValue, setInputValue] = useState<string>("");
270
+ const [isSending, setIsSending] = useState(false);
271
+ const [viewMode, setViewMode] = useState<"stacked" | "sliding">("sliding");
272
+ //TODO _setShowPlanPanel state not used
273
+ const [showPlanPanel, _setShowPlanPanel] = useState<boolean>(false);
274
+ const [showSlidingPanel, setShowSlidingPanel] = useState<boolean>(false);
275
+ // Keep track of multiple plans and their timestamps
276
+ const [plans, setPlans] = useState<Array<{ plan: Plan; timestamp: number }>>(
277
+ [],
278
+ );
279
+ // Track which plan is currently active in the UI
280
+ const [activePlanIndex, setActivePlanIndex] = useState<number>(0);
281
+ // Store workstream status for each plan separately
282
+ const [workstreamStatusMap, setWorkstreamStatusMap] = useState<
283
+ Map<
284
+ number,
285
+ Map<string, "pending" | "in_progress" | "completed" | "skipped">
286
+ >
287
+ >(new Map());
288
+ const [thinkingMessageIndex, setThinkingMessageIndex] = useState(0);
289
+ const toast = useToast();
290
+ const [showInput, setShowInput] = useState(interactive);
291
+ const [workflowStatus, setWorkflowStatus] = useState<string | null>(null);
292
+
293
+ // Helper function to get the current active plan and its workstream status
294
+ const getActivePlan = useMemo(() => {
295
+ const currentPlanData = plans[activePlanIndex] || {
296
+ plan: { plan: [] },
297
+ timestamp: 0,
298
+ };
299
+ const currentWorkstreamStatus =
300
+ workstreamStatusMap.get(currentPlanData.timestamp) || new Map();
301
+ return {
302
+ plan: currentPlanData.plan,
303
+ workstreamStatus: currentWorkstreamStatus,
304
+ };
305
+ }, [plans, activePlanIndex, workstreamStatusMap]);
306
+
307
+ // Show rotating thinking messages
308
+ useEffect(() => {
309
+ if (!isCompleted) {
310
+ const interval = setInterval(() => {
311
+ setThinkingMessageIndex(() =>
312
+ Math.floor(Math.random() * (ThinkingMessages.length - 1)),
313
+ );
314
+ }, 4000);
315
+ return () => clearInterval(interval);
316
+ }
317
+ }, [isCompleted]);
318
+
319
+ const checkWorkflowStatus = async () => {
320
+ try {
321
+ const statusResult = await client.store.workflows.getRunDetails(run.runId, run.workflowId);
322
+ setWorkflowStatus(statusResult.status as string);
323
+ } catch (error) {
324
+ console.error('Failed to check workflow status:', error);
325
+ }
326
+ }
327
+
328
+ // Stream messages from the agent
329
+ useEffect(() => {
330
+ // Reset all state when runId changes (new agent)
331
+ setMessages([]);
332
+ setPlans([]);
333
+ setActivePlanIndex(0);
334
+ setWorkstreamStatusMap(new Map());
335
+ setShowSlidingPanel(false);
336
+ setWorkflowStatus(null);
337
+
338
+ checkWorkflowStatus();
339
+ client.store.workflows.streamMessages(run.runId, (message) => {
340
+ if (message.message) {
341
+ setMessages((prev_messages) => {
342
+ if (!prev_messages.find((m) => m.timestamp === message.timestamp)) {
343
+ insertMessageInTimeline(prev_messages, message);
344
+ return [...prev_messages];
345
+ } else {
346
+ return prev_messages;
347
+ }
348
+ });
349
+ }
350
+ });
351
+
352
+ // Clear messages and unsubscribe when component unmounts or runId changes
353
+ return () => {
354
+ setMessages([]);
355
+ // Client handles unsubscribing from the message stream internally
356
+ };
357
+ }, [run.runId, client.store.workflows]);
358
+
359
+ // Update completion status when messages change
360
+ // This now accounts for multiple workstreams
361
+ useEffect(() => {
362
+ setIsCompleted(!isInProgress(messages));
363
+
364
+ // Only automatically hide the panel when there are no plans
365
+ // But don't auto-show it when plans appear
366
+ if (plans.length === 0) {
367
+ // If there are no plans, make sure the plan panel is hidden
368
+ setShowSlidingPanel(false);
369
+ }
370
+ // We removed the auto-show functionality to allow users to keep the panel closed if they want
371
+ }, [messages, plans.length]);
372
+
373
+ // Update plans and workstream status based on incoming messages
374
+ useEffect(() => {
375
+ // Only show the sliding panel for the very first plan and only once
376
+ if (
377
+ plans.length === 1 &&
378
+ !showSlidingPanel &&
379
+ !sessionStorage.getItem("plan-panel-shown")
380
+ ) {
381
+ // For first-time plan detection only, show the panel with a delay
382
+ const notificationTimeout = setTimeout(() => {
383
+ setShowSlidingPanel(true);
384
+ // Mark that we've shown the panel once
385
+ sessionStorage.setItem("plan-panel-shown", "true");
386
+ }, 500); // Short delay to ensure the UI has fully rendered
387
+
388
+ return () => clearTimeout(notificationTimeout);
389
+ }
390
+
391
+ // Process messages to extract plan information
392
+ messages.forEach((message) => {
393
+ if (message.type === AgentMessageType.PLAN) {
394
+ try {
395
+ // Log message details for debugging
396
+ console.log("PLAN message received:", message.type);
397
+
398
+ let newPlanDetails: Plan | null = null;
399
+
400
+ // Extract the plan from the message details object
401
+ if (message.details && typeof message.details === "object") {
402
+ // For a PLAN type message like the example you provided
403
+ if (message.details.plan && Array.isArray(message.details.plan)) {
404
+ console.log("Valid plan array found in message.details.plan");
405
+ newPlanDetails = { plan: message.details.plan } as Plan;
406
+ }
407
+ }
408
+
409
+ // Only proceed if we have a valid plan
410
+ if (newPlanDetails) {
411
+ const timestamp =
412
+ typeof message.timestamp === "number"
413
+ ? message.timestamp
414
+ : new Date(message.timestamp).getTime();
415
+
416
+ // Check if we already have this plan
417
+ const existingPlanIndex = plans.findIndex(
418
+ (p) => p.timestamp === timestamp,
419
+ );
420
+
421
+ if (existingPlanIndex === -1 && newPlanDetails) {
422
+ console.log("Adding new plan to plans array");
423
+ // This is a new plan - add it to our plans array
424
+ const newPlan = {
425
+ plan: newPlanDetails,
426
+ timestamp,
427
+ };
428
+
429
+ // Add new plan to the beginning of the array (newest first)
430
+ console.log("Adding plan to plans array:", newPlan);
431
+ setPlans((prev) => {
432
+ const newPlans = [newPlan, ...prev];
433
+ console.log("New plans array:", newPlans);
434
+ return newPlans;
435
+ });
436
+ // Set this as the active plan
437
+ setActivePlanIndex(0);
438
+
439
+ // Automatically show sliding plan panel when a plan is detected
440
+ console.log("Setting showSlidingPanel to true");
441
+ setShowSlidingPanel(true);
442
+
443
+ // Initialize workstreams as pending based on the plan tasks
444
+ const newWorkstreamStatus = new Map<
445
+ string,
446
+ "pending" | "in_progress" | "completed" | "skipped"
447
+ >();
448
+
449
+ // Always initialize main workstream
450
+ newWorkstreamStatus.set("main", "in_progress");
451
+
452
+ // Initialize each task in the plan with its status
453
+ if (Array.isArray(newPlanDetails.plan)) {
454
+ newPlanDetails.plan.forEach((task) => {
455
+ if (task && typeof task === "object" && task.id) {
456
+ const taskId = task.id.toString();
457
+ // Use the task's status if available, otherwise default to pending
458
+ newWorkstreamStatus.set(taskId, task.status || "pending");
459
+ }
460
+ });
461
+ }
462
+
463
+ // Update the workstream status map with the new status for this plan
464
+ setWorkstreamStatusMap((prev) => {
465
+ const newMap = new Map(prev);
466
+ newMap.set(timestamp, newWorkstreamStatus);
467
+ return newMap;
468
+ });
469
+ }
470
+ }
471
+ } catch (error) {
472
+ console.error("Failed to parse plan from message:", error);
473
+ }
474
+ }
475
+
476
+ // Handle UPDATE type messages with plan updates
477
+ if (message.type === AgentMessageType.UPDATE && message.details) {
478
+ // We no longer process UPDATE messages with details.updates
479
+ // Instead, we rely on the PLAN message that follows with the complete plan
480
+ if (message.details.updates && Array.isArray(message.details.updates)) {
481
+ console.log(
482
+ "Ignoring UPDATE message with details.updates - waiting for PLAN message with full plan",
483
+ );
484
+ // This is an initial update notification, but we'll wait for the PLAN message that follows
485
+ // with the complete updated plan before making any UI changes
486
+ }
487
+ }
488
+ });
489
+
490
+ const lastMessage = messages[messages.length - 1];
491
+ if (lastMessage) {
492
+ if (interactive) {
493
+ setShowInput(true);
494
+ } else {
495
+ setShowInput(lastMessage.type === AgentMessageType.REQUEST_INPUT);
496
+ }
497
+ }
498
+ }, [messages, plans, activePlanIndex]);
499
+
500
+ // Send a message to the agent
501
+ const handleSendMessage = () => {
502
+ const message = inputValue.trim();
503
+ if (!message || isSending) return;
504
+
505
+ setIsSending(true);
506
+ setInputValue("");
507
+
508
+ client.store.workflows
509
+ .sendSignal(run.workflowId, run.runId, "UserInput", {
510
+ message,
511
+ } as UserInputSignal)
512
+ .then(() => {
513
+ setIsCompleted(false);
514
+ toast({
515
+ status: "success",
516
+ title: "Message Sent",
517
+ duration: 2000,
518
+ });
519
+ })
520
+ .catch((err) => {
521
+ toast({
522
+ status: "error",
523
+ title: "Failed to Send Message",
524
+ description: err instanceof Error ? err.message : "Unknown error",
525
+ duration: 3000,
526
+ });
527
+ })
528
+ .finally(() => {
529
+ setIsSending(false);
530
+ });
531
+ };
532
+
533
+ // Calculate number of active tasks for the status indicator
534
+ const getActiveTaskCount = (): number => {
535
+ if (!messages.length) return 0;
536
+
537
+ // Group messages by workstream
538
+ const workstreamMessages = new Map<string, AgentMessage[]>();
539
+
540
+ messages.forEach((message) => {
541
+ const workstreamId = getWorkstreamId(message);
542
+ if (workstreamId !== "main" && workstreamId !== "all") {
543
+ if (!workstreamMessages.has(workstreamId)) {
544
+ workstreamMessages.set(workstreamId, []);
545
+ }
546
+ workstreamMessages.get(workstreamId)!.push(message);
547
+ }
548
+ });
549
+
550
+ // Count workstreams that don't have completion messages
551
+ let activeCount = 0;
552
+
553
+ for (const [_, msgs] of workstreamMessages.entries()) {
554
+ if (msgs.length > 0) {
555
+ const lastMessage = msgs[msgs.length - 1];
556
+ // If the last message isn't a completion message, the workstream is active
557
+ if (
558
+ ![AgentMessageType.COMPLETE, AgentMessageType.IDLE].includes(
559
+ lastMessage.type,
560
+ )
561
+ ) {
562
+ activeCount++;
563
+ }
564
+ }
565
+ }
566
+
567
+ return activeCount;
568
+ };
569
+
570
+ const actualTitle =
571
+ title || run.workflowId.split(":")[2] || "Agent Conversation";
572
+
573
+ // Handle downloading conversation
574
+ const downloadConversation = async () => {
575
+ try {
576
+ const url = await getConversationUrl(client, run.runId);
577
+ if (url) window.open(url, "_blank");
578
+ } catch (err) {
579
+ console.error("Failed to download conversation", err);
580
+ toast({
581
+ status: "error",
582
+ title: "Failed to download conversation",
583
+ duration: 3000,
584
+ });
585
+ }
586
+ };
587
+
588
+ // Handle copying run ID
589
+ const copyRunId = () => {
590
+ navigator.clipboard.writeText(run.runId);
591
+ toast({
592
+ status: "success",
593
+ title: "Run ID copied",
594
+ duration: 2000,
595
+ });
596
+ };
597
+
598
+ return (
599
+ <div
600
+ className={`flex flex-col h-full min-h-0 ${isModal ? "rounded-lg overflow-hidden" : ""}`}
601
+ >
602
+ <Header
603
+ title={actualTitle}
604
+ isCompleted={isCompleted}
605
+ onClose={onClose}
606
+ isModal={isModal}
607
+ run={run}
608
+ viewMode={viewMode}
609
+ onViewModeChange={setViewMode}
610
+ showPlanPanel={showSlidingPanel}
611
+ hasPlan={plans.length > 0}
612
+ onTogglePlanPanel={() => {
613
+ setShowSlidingPanel(!showSlidingPanel);
614
+ // When opening the plan panel, mark that we've shown it
615
+ if (!showSlidingPanel) {
616
+ sessionStorage.setItem("plan-panel-shown", "true");
617
+ }
618
+ }}
619
+ onDownload={downloadConversation}
620
+ onCopyRunId={copyRunId}
621
+ resetWorkflow={resetWorkflow}
622
+ />
623
+
624
+ {/* Inline Plan Panel - only shown when toggle is clicked */}
625
+ {showPlanPanel && !showSlidingPanel && plans.length > 0 && (
626
+ <PlanPanel
627
+ plan={getActivePlan.plan}
628
+ workstreamStatus={getActivePlan.workstreamStatus}
629
+ isVisible={true}
630
+ />
631
+ )}
632
+
633
+ {messages.length === 0 && !isCompleted ? (
634
+ <div className="flex-1 flex flex-col items-center justify-center h-full text-center py-6 bg-white dark:bg-gray-900">
635
+ <div className="bg-white dark:bg-slate-800 p-5 max-w-md border border-blue-200 dark:border-blue-900/50 rounded-lg shadow-sm">
636
+ <div className="flex items-center space-x-3 mb-3">
637
+ <PulsatingCircle size="sm" color="blue" />
638
+ <div className="text-sm text-slate-600 dark:text-slate-300 font-medium">
639
+ {ThinkingMessages[thinkingMessageIndex]}
640
+ </div>
641
+ </div>
642
+ <div className="mt-4 flex justify-center">
643
+ <AnimatedThinkingDots color="blue" className="mt-1" />
644
+ </div>
645
+ </div>
646
+ </div>
647
+ ) : (
648
+ <AllMessagesMixed
649
+ messages={messages}
650
+ bottomRef={bottomRef as React.RefObject<HTMLDivElement>}
651
+ viewMode={viewMode}
652
+ isCompleted={isCompleted}
653
+ plan={getActivePlan.plan}
654
+ workstreamStatus={getActivePlan.workstreamStatus}
655
+ showPlanPanel={showSlidingPanel}
656
+ onTogglePlanPanel={() => {
657
+ console.log(
658
+ "Toggle plan panel called, current state:",
659
+ showSlidingPanel,
660
+ );
661
+ setShowSlidingPanel(!showSlidingPanel);
662
+ }}
663
+ plans={plans}
664
+ activePlanIndex={activePlanIndex}
665
+ onChangePlan={(index) => setActivePlanIndex(index)}
666
+ taskLabels={getActivePlan.plan.plan?.reduce((acc, task) => {
667
+ if (task.id && task.goal) {
668
+ acc.set(task.id.toString(), task.goal);
669
+ }
670
+ return acc;
671
+ }, new Map<string, string>())}
672
+ />
673
+ )}
674
+
675
+ {workflowStatus && (
676
+ workflowStatus !== "RUNNING" ? (
677
+ <MessageBox
678
+ status={workflowStatus === "COMPLETED" ? 'success' : 'done'}
679
+ icon={null}
680
+ className="flex-shrink-0 m-2"
681
+ >
682
+ This Workflow is {workflowStatus}
683
+ </MessageBox>
684
+ ) : showInput && (
685
+ <MessageInput
686
+ value={inputValue}
687
+ onChange={setInputValue}
688
+ onSend={handleSendMessage}
689
+ disabled={false}
690
+ isSending={isSending}
691
+ isCompleted={isCompleted}
692
+ activeTaskCount={getActiveTaskCount()}
693
+ placeholder={placeholder}
694
+ />
695
+ ))}
696
+ </div>
697
+ );
698
+ }
699
+
700
+ // Helper function to get conversation URL - used by other components
701
+ export async function getConversationUrl(
702
+ vertesia: VertesiaClient,
703
+ workflowRunId: string,
704
+ ): Promise<string> {
705
+ return vertesia.files
706
+ .getDownloadUrl(`agents/${workflowRunId}/conversation.json`)
707
+ .then((r) => r.url);
708
+ }