@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.
- package/lib/esm/core/components/FormItem.js +9 -0
- package/lib/esm/core/components/FormItem.js.map +1 -0
- package/lib/esm/core/components/InputList.js +4 -3
- package/lib/esm/core/components/InputList.js.map +1 -1
- package/lib/esm/core/components/index.js +3 -3
- package/lib/esm/core/components/index.js.map +1 -1
- package/lib/esm/core/components/shadcn/button.js +37 -7
- package/lib/esm/core/components/shadcn/button.js.map +1 -1
- package/lib/esm/core/components/shadcn/calendar.js +7 -39
- package/lib/esm/core/components/shadcn/calendar.js.map +1 -1
- package/lib/esm/core/components/shadcn/dialog.js +3 -3
- package/lib/esm/core/components/shadcn/dialog.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/DynamicLabel.js +38 -0
- package/lib/esm/core/components/shadcn/filters/DynamicLabel.js.map +1 -0
- package/lib/esm/core/components/shadcn/filters/comboBox.js +27 -26
- package/lib/esm/core/components/shadcn/filters/comboBox.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/dateFilter.js +19 -14
- package/lib/esm/core/components/shadcn/filters/dateFilter.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/filterBar.js +49 -36
- package/lib/esm/core/components/shadcn/filters/filterBar.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/filters.js +31 -23
- package/lib/esm/core/components/shadcn/filters/filters.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/selectFilter.js +33 -24
- package/lib/esm/core/components/shadcn/filters/selectFilter.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/textFilter.js +2 -2
- package/lib/esm/core/components/shadcn/filters/textFilter.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/types.js.map +1 -1
- package/lib/esm/core/components/shadcn/input.js +4 -4
- package/lib/esm/core/components/shadcn/input.js.map +1 -1
- package/lib/esm/core/components/shadcn/selectBox.js +72 -6
- package/lib/esm/core/components/shadcn/selectBox.js.map +1 -1
- package/lib/esm/core/components/styles.js +1 -1
- package/lib/esm/core/components/styles.js.map +1 -1
- package/lib/esm/core/components/table/index.js +3 -0
- package/lib/esm/core/components/table/index.js.map +1 -1
- package/lib/esm/core/index.js +2 -1
- package/lib/esm/core/index.js.map +1 -1
- package/lib/esm/core/utils/cn.js +6 -0
- package/lib/esm/core/utils/cn.js.map +1 -0
- package/lib/esm/core/utils/index.js +2 -0
- package/lib/esm/core/utils/index.js.map +1 -0
- package/lib/esm/features/agent/PayloadBuilder.js +174 -0
- package/lib/esm/features/agent/PayloadBuilder.js.map +1 -0
- package/lib/esm/features/agent/chat/AnimatedThinkingDots.js +207 -0
- package/lib/esm/features/agent/chat/AnimatedThinkingDots.js.map +1 -0
- package/lib/esm/features/agent/chat/JumpingDots.js +6 -0
- package/lib/esm/features/agent/chat/JumpingDots.js.map +1 -0
- package/lib/esm/features/agent/chat/ModernAgentConversation.js +409 -0
- package/lib/esm/features/agent/chat/ModernAgentConversation.js.map +1 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js +129 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js.map +1 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/Header.js +66 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/Header.js.map +1 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlideInPanel.js +29 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlideInPanel.js.map +1 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.js +97 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.js.map +1 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/MessageInput.js +46 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/MessageInput.js.map +1 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/MessageItem.js +352 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/MessageItem.js.map +1 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/MessagesContainer.js +20 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/MessagesContainer.js.map +1 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/PlanPanel.js +62 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/PlanPanel.js.map +1 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/SlideInPanel.js +23 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/SlideInPanel.js.map +1 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/SlidingMessages.js +51 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/SlidingMessages.js.map +1 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.js +82 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.js.map +1 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/StackedMessages.js +13 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/StackedMessages.js.map +1 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js +105 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js.map +1 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/utils.js +154 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/utils.js.map +1 -0
- package/lib/esm/features/agent/chat/SlidingThinkingIndicator.js +266 -0
- package/lib/esm/features/agent/chat/SlidingThinkingIndicator.js.map +1 -0
- package/lib/esm/features/agent/chat/WaitingMessages.js +60 -0
- package/lib/esm/features/agent/chat/WaitingMessages.js.map +1 -0
- package/lib/esm/features/agent/chat/index.js +5 -0
- package/lib/esm/features/agent/chat/index.js.map +1 -0
- package/lib/esm/features/agent/index.js +3 -0
- package/lib/esm/features/agent/index.js.map +1 -0
- package/lib/esm/features/errors/PanelErrorBoundary.js +11 -0
- package/lib/esm/features/errors/PanelErrorBoundary.js.map +1 -0
- package/lib/esm/features/errors/RowErrorBoundary.js +9 -0
- package/lib/esm/features/errors/RowErrorBoundary.js.map +1 -0
- package/lib/esm/features/errors/VertesiaErrorBoundary.js +15 -0
- package/lib/esm/features/errors/VertesiaErrorBoundary.js.map +1 -0
- package/lib/esm/features/errors/WidgetErrorBoundary.js +11 -0
- package/lib/esm/features/errors/WidgetErrorBoundary.js.map +1 -0
- package/lib/esm/features/errors/index.js +5 -0
- package/lib/esm/features/errors/index.js.map +1 -0
- package/lib/esm/features/facets/EnvironmentFacet.js +39 -0
- package/lib/esm/features/facets/EnvironmentFacet.js.map +1 -0
- package/lib/esm/features/facets/FacetsNav.js +8 -0
- package/lib/esm/features/facets/FacetsNav.js.map +1 -0
- package/lib/esm/features/facets/InteractionFacet.js +39 -0
- package/lib/esm/features/facets/InteractionFacet.js.map +1 -0
- package/lib/esm/features/facets/StringFacet.js +12 -0
- package/lib/esm/features/facets/StringFacet.js.map +1 -0
- package/lib/esm/features/facets/StringListFacet.js +11 -0
- package/lib/esm/features/facets/StringListFacet.js.map +1 -0
- package/lib/esm/features/facets/TypeFacet.js +42 -0
- package/lib/esm/features/facets/TypeFacet.js.map +1 -0
- package/lib/esm/features/facets/TypeOptions.js +19 -0
- package/lib/esm/features/facets/TypeOptions.js.map +1 -0
- package/lib/esm/features/facets/UserFacet.js +33 -0
- package/lib/esm/features/facets/UserFacet.js.map +1 -0
- package/lib/esm/features/facets/VFacetsNav.js +114 -0
- package/lib/esm/features/facets/VFacetsNav.js.map +1 -0
- package/lib/esm/features/facets/VStringFacet.js +17 -0
- package/lib/esm/features/facets/VStringFacet.js.map +1 -0
- package/lib/esm/features/facets/VTypeFacet.js +56 -0
- package/lib/esm/features/facets/VTypeFacet.js.map +1 -0
- package/lib/esm/features/facets/VUserFacet.js +31 -0
- package/lib/esm/features/facets/VUserFacet.js.map +1 -0
- package/lib/esm/features/facets/index.js +12 -0
- package/lib/esm/features/facets/index.js.map +1 -0
- package/lib/esm/features/facets/utils.js +7 -0
- package/lib/esm/features/facets/utils.js.map +1 -0
- package/lib/esm/features/index.js +9 -1
- package/lib/esm/features/index.js.map +1 -1
- package/lib/esm/features/layout/GenericPageNavHeader.js +11 -0
- package/lib/esm/features/layout/GenericPageNavHeader.js.map +1 -0
- package/lib/esm/features/layout/NotFoundView.js +5 -0
- package/lib/esm/features/layout/NotFoundView.js.map +1 -0
- package/lib/esm/features/layout/index.js +3 -0
- package/lib/esm/features/layout/index.js.map +1 -0
- package/lib/esm/features/magic-pdf/DownloadPopover.js +13 -0
- package/lib/esm/features/magic-pdf/DownloadPopover.js.map +1 -0
- package/lib/esm/features/magic-pdf/MagicPdfView.js +44 -0
- package/lib/esm/features/magic-pdf/MagicPdfView.js.map +1 -0
- package/lib/esm/features/magic-pdf/PageSlider.js +57 -0
- package/lib/esm/features/magic-pdf/PageSlider.js.map +1 -0
- package/lib/esm/features/magic-pdf/PdfPageProvider.js +133 -0
- package/lib/esm/features/magic-pdf/PdfPageProvider.js.map +1 -0
- package/lib/esm/features/magic-pdf/TextPageView.js +45 -0
- package/lib/esm/features/magic-pdf/TextPageView.js.map +1 -0
- package/lib/esm/features/magic-pdf/index.js +2 -0
- package/lib/esm/features/magic-pdf/index.js.map +1 -0
- package/lib/esm/features/magic-pdf/types.js +2 -0
- package/lib/esm/features/magic-pdf/types.js.map +1 -0
- package/lib/esm/features/magic-pdf/useResizeOnDrag.js +34 -0
- package/lib/esm/features/magic-pdf/useResizeOnDrag.js.map +1 -0
- package/lib/esm/features/store/collections/BrowseCollectionView.js +37 -0
- package/lib/esm/features/store/collections/BrowseCollectionView.js.map +1 -0
- package/lib/esm/features/store/collections/CollectionView.js +53 -0
- package/lib/esm/features/store/collections/CollectionView.js.map +1 -0
- package/lib/esm/features/store/collections/CollectionsTable.js +60 -0
- package/lib/esm/features/store/collections/CollectionsTable.js.map +1 -0
- package/lib/esm/features/store/collections/CollectionsView.js +94 -0
- package/lib/esm/features/store/collections/CollectionsView.js.map +1 -0
- package/lib/esm/features/store/collections/EditCollectionView.js +161 -0
- package/lib/esm/features/store/collections/EditCollectionView.js.map +1 -0
- package/lib/esm/features/store/collections/index.js +6 -0
- package/lib/esm/features/store/collections/index.js.map +1 -0
- package/lib/esm/features/store/index.js +4 -0
- package/lib/esm/features/store/index.js.map +1 -0
- package/lib/esm/features/store/objects/DocumentPreviewPanel.js +150 -0
- package/lib/esm/features/store/objects/DocumentPreviewPanel.js.map +1 -0
- package/lib/esm/features/store/objects/DocumentSearchResults.js +123 -0
- package/lib/esm/features/store/objects/DocumentSearchResults.js.map +1 -0
- package/lib/esm/features/store/objects/DocumentSelectionProvider.js +81 -0
- package/lib/esm/features/store/objects/DocumentSelectionProvider.js.map +1 -0
- package/lib/esm/features/store/objects/DocumentTable.js +278 -0
- package/lib/esm/features/store/objects/DocumentTable.js.map +1 -0
- package/lib/esm/features/store/objects/ExportPropertiesModal.js +31 -0
- package/lib/esm/features/store/objects/ExportPropertiesModal.js.map +1 -0
- package/lib/esm/features/store/objects/components/ContentDispositionButton.js +31 -0
- package/lib/esm/features/store/objects/components/ContentDispositionButton.js.map +1 -0
- package/lib/esm/features/store/objects/components/ContentOverview.js +195 -0
- package/lib/esm/features/store/objects/components/ContentOverview.js.map +1 -0
- package/lib/esm/features/store/objects/components/DocumentIcon.js +28 -0
- package/lib/esm/features/store/objects/components/DocumentIcon.js.map +1 -0
- package/lib/esm/features/store/objects/components/DocumentInput.js +52 -0
- package/lib/esm/features/store/objects/components/DocumentInput.js.map +1 -0
- package/lib/esm/features/store/objects/components/PropertiesEditorModal.js +169 -0
- package/lib/esm/features/store/objects/components/PropertiesEditorModal.js.map +1 -0
- package/lib/esm/features/store/objects/components/SaveVersionConfirmModal.js +45 -0
- package/lib/esm/features/store/objects/components/SaveVersionConfirmModal.js.map +1 -0
- package/lib/esm/features/store/objects/components/SelectDocument.js +39 -0
- package/lib/esm/features/store/objects/components/SelectDocument.js.map +1 -0
- package/lib/esm/features/store/objects/components/SelectDocumentModal.js +7 -0
- package/lib/esm/features/store/objects/components/SelectDocumentModal.js.map +1 -0
- package/lib/esm/features/store/objects/components/VectorSearchWidget.js +85 -0
- package/lib/esm/features/store/objects/components/VectorSearchWidget.js.map +1 -0
- package/lib/esm/features/store/objects/components/index.js +10 -0
- package/lib/esm/features/store/objects/components/index.js.map +1 -0
- package/lib/esm/features/store/objects/components/useDownloadObject.js +21 -0
- package/lib/esm/features/store/objects/components/useDownloadObject.js.map +1 -0
- package/lib/esm/features/store/objects/index.js +11 -0
- package/lib/esm/features/store/objects/index.js.map +1 -0
- package/lib/esm/features/store/objects/layout/DocumentTableColumn.js +74 -0
- package/lib/esm/features/store/objects/layout/DocumentTableColumn.js.map +1 -0
- package/lib/esm/features/store/objects/layout/documentLayout.js +16 -0
- package/lib/esm/features/store/objects/layout/documentLayout.js.map +1 -0
- package/lib/esm/features/store/objects/layout/index.js +3 -0
- package/lib/esm/features/store/objects/layout/index.js.map +1 -0
- package/lib/esm/features/store/objects/layout/renderers.js +128 -0
- package/lib/esm/features/store/objects/layout/renderers.js.map +1 -0
- package/lib/esm/features/store/objects/search/DocumentSearchContext.js +150 -0
- package/lib/esm/features/store/objects/search/DocumentSearchContext.js.map +1 -0
- package/lib/esm/features/store/objects/search/DocumentSearchProvider.js +41 -0
- package/lib/esm/features/store/objects/search/DocumentSearchProvider.js.map +1 -0
- package/lib/esm/features/store/objects/search/index.js +3 -0
- package/lib/esm/features/store/objects/search/index.js.map +1 -0
- package/lib/esm/features/store/objects/selection/ObjectsActionContext.js +149 -0
- package/lib/esm/features/store/objects/selection/ObjectsActionContext.js.map +1 -0
- package/lib/esm/features/store/objects/selection/ObjectsActionSpec.js +2 -0
- package/lib/esm/features/store/objects/selection/ObjectsActionSpec.js.map +1 -0
- package/lib/esm/features/store/objects/selection/SelectionActions.js +75 -0
- package/lib/esm/features/store/objects/selection/SelectionActions.js.map +1 -0
- package/lib/esm/features/store/objects/selection/actions/AddToCollectionAction.js +64 -0
- package/lib/esm/features/store/objects/selection/actions/AddToCollectionAction.js.map +1 -0
- package/lib/esm/features/store/objects/selection/actions/ChangeTypeAction.js +53 -0
- package/lib/esm/features/store/objects/selection/actions/ChangeTypeAction.js.map +1 -0
- package/lib/esm/features/store/objects/selection/actions/ConfirmAction.js +30 -0
- package/lib/esm/features/store/objects/selection/actions/ConfirmAction.js.map +1 -0
- package/lib/esm/features/store/objects/selection/actions/DeleteObjectsAction.js +66 -0
- package/lib/esm/features/store/objects/selection/actions/DeleteObjectsAction.js.map +1 -0
- package/lib/esm/features/store/objects/selection/actions/ExportPropertiesAction.js +106 -0
- package/lib/esm/features/store/objects/selection/actions/ExportPropertiesAction.js.map +1 -0
- package/lib/esm/features/store/objects/selection/actions/RemoveFromCollectionAction.js +64 -0
- package/lib/esm/features/store/objects/selection/actions/RemoveFromCollectionAction.js.map +1 -0
- package/lib/esm/features/store/objects/selection/actions/StartWorkflowComponent.js +72 -0
- package/lib/esm/features/store/objects/selection/actions/StartWorkflowComponent.js.map +1 -0
- package/lib/esm/features/store/objects/selection/actions/index.js +8 -0
- package/lib/esm/features/store/objects/selection/actions/index.js.map +1 -0
- package/lib/esm/features/store/objects/selection/index.js +5 -0
- package/lib/esm/features/store/objects/selection/index.js.map +1 -0
- package/lib/esm/features/store/objects/upload/DocumentUploadModal.js +476 -0
- package/lib/esm/features/store/objects/upload/DocumentUploadModal.js.map +1 -0
- package/lib/esm/features/store/objects/upload/index.js +4 -0
- package/lib/esm/features/store/objects/upload/index.js.map +1 -0
- package/lib/esm/features/store/objects/upload/useSmartFileUploadProcessing.js +201 -0
- package/lib/esm/features/store/objects/upload/useSmartFileUploadProcessing.js.map +1 -0
- package/lib/esm/features/store/objects/upload/useUploadHandler.js +230 -0
- package/lib/esm/features/store/objects/upload/useUploadHandler.js.map +1 -0
- package/lib/esm/features/store/types/ContentObjectTypeView.js +158 -0
- package/lib/esm/features/store/types/ContentObjectTypeView.js.map +1 -0
- package/lib/esm/features/store/types/ContentObjectTypesSearch.js +82 -0
- package/lib/esm/features/store/types/ContentObjectTypesSearch.js.map +1 -0
- package/lib/esm/features/store/types/ContentObjectTypesTable.js +11 -0
- package/lib/esm/features/store/types/ContentObjectTypesTable.js.map +1 -0
- package/lib/esm/features/store/types/ContentObjectTypesView.js +55 -0
- package/lib/esm/features/store/types/ContentObjectTypesView.js.map +1 -0
- package/lib/esm/features/store/types/CreateOrUpdateTypeModal.js +26 -0
- package/lib/esm/features/store/types/CreateOrUpdateTypeModal.js.map +1 -0
- package/lib/esm/features/store/types/ObjectSchemaEditor.js +89 -0
- package/lib/esm/features/store/types/ObjectSchemaEditor.js.map +1 -0
- package/lib/esm/features/store/types/SelectContentType.js +43 -0
- package/lib/esm/features/store/types/SelectContentType.js.map +1 -0
- package/lib/esm/features/store/types/SelectContentTypeModal.js +28 -0
- package/lib/esm/features/store/types/SelectContentTypeModal.js.map +1 -0
- package/lib/esm/features/store/types/TableLayoutEditor.js +78 -0
- package/lib/esm/features/store/types/TableLayoutEditor.js.map +1 -0
- package/lib/esm/features/store/types/index.js +11 -0
- package/lib/esm/features/store/types/index.js.map +1 -0
- package/lib/esm/features/store/types/search/ObjectTypeSearchContext.js +98 -0
- package/lib/esm/features/store/types/search/ObjectTypeSearchContext.js.map +1 -0
- package/lib/esm/features/store/types/search/ObjectTypeSearchProvider.js +15 -0
- package/lib/esm/features/store/types/search/ObjectTypeSearchProvider.js.map +1 -0
- package/lib/esm/features/store/types/search/index.js +3 -0
- package/lib/esm/features/store/types/search/index.js.map +1 -0
- package/lib/esm/features/user/UserAvatar.js +18 -0
- package/lib/esm/features/user/UserAvatar.js.map +1 -0
- package/lib/esm/features/user/UserInfo.js +88 -0
- package/lib/esm/features/user/UserInfo.js.map +1 -0
- package/lib/esm/features/user/index.js +3 -0
- package/lib/esm/features/user/index.js.map +1 -0
- package/lib/esm/features/utils/index.js +4 -0
- package/lib/esm/features/utils/index.js.map +1 -0
- package/lib/esm/features/utils/mimeType.js +9 -0
- package/lib/esm/features/utils/mimeType.js.map +1 -0
- package/lib/esm/features/utils/rendition.js +47 -0
- package/lib/esm/features/utils/rendition.js.map +1 -0
- package/lib/esm/features/utils/text.js +10 -0
- package/lib/esm/features/utils/text.js.map +1 -0
- package/lib/esm/layout/FullHeightLayout.js +1 -1
- package/lib/esm/layout/FullHeightLayout.js.map +1 -1
- package/lib/esm/layout/Sidebar.js +12 -2
- package/lib/esm/layout/Sidebar.js.map +1 -1
- package/lib/esm/widgets/Progress.js +5 -0
- package/lib/esm/widgets/Progress.js.map +1 -0
- package/lib/esm/widgets/codemirror/CodeMirrorEditor.js +1 -1
- package/lib/esm/widgets/codemirror/CodeMirrorEditor.js.map +1 -1
- package/lib/esm/widgets/form/Form.js +2 -2
- package/lib/esm/widgets/form/Form.js.map +1 -1
- package/lib/esm/widgets/form/schema.js +11 -5
- package/lib/esm/widgets/form/schema.js.map +1 -1
- package/lib/esm/widgets/index.js +4 -0
- package/lib/esm/widgets/index.js.map +1 -1
- package/lib/esm/widgets/popover/Popover.js +73 -0
- package/lib/esm/widgets/popover/Popover.js.map +1 -0
- package/lib/esm/widgets/popover/context.js +7 -0
- package/lib/esm/widgets/popover/context.js.map +1 -0
- package/lib/esm/widgets/popover/index.js +3 -0
- package/lib/esm/widgets/popover/index.js.map +1 -0
- package/lib/esm/widgets/popover/slots.js +22 -0
- package/lib/esm/widgets/popover/slots.js.map +1 -0
- package/lib/esm/widgets/properties/PropertiesView.js +6 -0
- package/lib/esm/widgets/properties/PropertiesView.js.map +1 -0
- package/lib/esm/widgets/properties/index.js +2 -0
- package/lib/esm/widgets/properties/index.js.map +1 -0
- package/lib/esm/widgets/schema-editor/JSONSchemaEditorModal.js +1 -2
- package/lib/esm/widgets/schema-editor/JSONSchemaEditorModal.js.map +1 -1
- package/lib/esm/widgets/schema-editor/editor/Editable.js +9 -10
- package/lib/esm/widgets/schema-editor/editor/Editable.js.map +1 -1
- package/lib/esm/widgets/schema-editor/editor/PropertyViewer.js +1 -1
- package/lib/esm/widgets/schema-editor/editor/PropertyViewer.js.map +1 -1
- package/lib/esm/widgets/schema-editor/editor/SchemaEditor.js +2 -2
- package/lib/esm/widgets/schema-editor/editor/SchemaEditor.js.map +1 -1
- package/lib/esm/widgets/upload/DropZone.js +162 -0
- package/lib/esm/widgets/upload/DropZone.js.map +1 -0
- package/lib/esm/widgets/upload/UploadResultCategory.js +19 -0
- package/lib/esm/widgets/upload/UploadResultCategory.js.map +1 -0
- package/lib/esm/widgets/upload/UploadSummary.js +30 -0
- package/lib/esm/widgets/upload/UploadSummary.js.map +1 -0
- package/lib/esm/widgets/upload/index.js +4 -0
- package/lib/esm/widgets/upload/index.js.map +1 -0
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/core/components/FormItem.d.ts +11 -0
- package/lib/types/core/components/index.d.ts +3 -3
- package/lib/types/core/components/shadcn/button.d.ts +13 -2
- package/lib/types/core/components/shadcn/calendar.d.ts +3 -3
- package/lib/types/core/components/shadcn/command.d.ts +7 -7
- package/lib/types/core/components/shadcn/filters/DynamicLabel.d.ts +8 -0
- package/lib/types/core/components/shadcn/filters/comboBox.d.ts +5 -5
- package/lib/types/core/components/shadcn/filters/dateFilter.d.ts +3 -4
- package/lib/types/core/components/shadcn/filters/types.d.ts +7 -1
- package/lib/types/core/components/shadcn/input.d.ts +4 -4
- package/lib/types/core/components/shadcn/selectBox.d.ts +13 -4
- package/lib/types/core/components/table/index.d.ts +1 -0
- package/lib/types/core/index.d.ts +2 -1
- package/lib/types/core/utils/cn.d.ts +2 -0
- package/lib/types/core/utils/index.d.ts +1 -0
- package/lib/types/features/agent/PayloadBuilder.d.ts +53 -0
- package/lib/types/features/agent/chat/AnimatedThinkingDots.d.ts +37 -0
- package/lib/types/features/agent/chat/JumpingDots.d.ts +6 -0
- package/lib/types/features/agent/chat/ModernAgentConversation.d.ts +24 -0
- package/lib/types/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts +21 -0
- package/lib/types/features/agent/chat/ModernAgentOutput/Header.d.ts +18 -0
- package/lib/types/features/agent/chat/ModernAgentOutput/InlineSlideInPanel.d.ts +10 -0
- package/lib/types/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.d.ts +15 -0
- package/lib/types/features/agent/chat/ModernAgentOutput/MessageInput.d.ts +12 -0
- package/lib/types/features/agent/chat/ModernAgentOutput/MessageItem.d.ts +7 -0
- package/lib/types/features/agent/chat/ModernAgentOutput/MessagesContainer.d.ts +9 -0
- package/lib/types/features/agent/chat/ModernAgentOutput/PlanPanel.d.ts +8 -0
- package/lib/types/features/agent/chat/ModernAgentOutput/SlideInPanel.d.ts +10 -0
- package/lib/types/features/agent/chat/ModernAgentOutput/SlidingMessages.d.ts +7 -0
- package/lib/types/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.d.ts +9 -0
- package/lib/types/features/agent/chat/ModernAgentOutput/StackedMessages.d.ts +7 -0
- package/lib/types/features/agent/chat/ModernAgentOutput/WorkstreamTabs.d.ts +21 -0
- package/lib/types/features/agent/chat/ModernAgentOutput/utils.d.ts +23 -0
- package/lib/types/features/agent/chat/SlidingThinkingIndicator.d.ts +17 -0
- package/lib/types/features/agent/chat/WaitingMessages.d.ts +1 -0
- package/lib/types/features/agent/chat/index.d.ts +4 -0
- package/lib/types/features/agent/index.d.ts +2 -0
- package/lib/types/features/errors/PanelErrorBoundary.d.ts +4 -0
- package/lib/types/features/errors/RowErrorBoundary.d.ts +7 -0
- package/lib/types/features/errors/VertesiaErrorBoundary.d.ts +11 -0
- package/lib/types/features/errors/WidgetErrorBoundary.d.ts +4 -0
- package/lib/types/features/errors/index.d.ts +4 -0
- package/lib/types/features/facets/EnvironmentFacet.d.ts +9 -0
- package/lib/types/features/facets/FacetsNav.d.ts +6 -0
- package/lib/types/features/facets/InteractionFacet.d.ts +9 -0
- package/lib/types/features/facets/StringFacet.d.ts +10 -0
- package/lib/types/features/facets/StringListFacet.d.ts +10 -0
- package/lib/types/features/facets/TypeFacet.d.ts +15 -0
- package/lib/types/features/facets/TypeOptions.d.ts +3 -0
- package/lib/types/features/facets/UserFacet.d.ts +11 -0
- package/lib/types/features/facets/VFacetsNav.d.ts +7 -0
- package/lib/types/features/facets/VStringFacet.d.ts +15 -0
- package/lib/types/features/facets/VTypeFacet.d.ts +8 -0
- package/lib/types/features/facets/VUserFacet.d.ts +9 -0
- package/lib/types/features/facets/index.d.ts +11 -0
- package/lib/types/features/facets/utils.d.ts +3 -0
- package/lib/types/features/index.d.ts +9 -1
- package/lib/types/features/layout/GenericPageNavHeader.d.ts +12 -0
- package/lib/types/features/layout/NotFoundView.d.ts +4 -0
- package/lib/types/features/layout/index.d.ts +2 -0
- package/lib/types/features/magic-pdf/DownloadPopover.d.ts +6 -0
- package/lib/types/features/magic-pdf/MagicPdfView.d.ts +6 -0
- package/lib/types/features/magic-pdf/PageSlider.d.ts +7 -0
- package/lib/types/features/magic-pdf/PdfPageProvider.d.ts +28 -0
- package/lib/types/features/magic-pdf/TextPageView.d.ts +7 -0
- package/lib/types/features/magic-pdf/index.d.ts +1 -0
- package/lib/types/features/magic-pdf/types.d.ts +1 -0
- package/lib/types/features/magic-pdf/useResizeOnDrag.d.ts +8 -0
- package/lib/types/features/store/collections/BrowseCollectionView.d.ts +6 -0
- package/lib/types/features/store/collections/CollectionView.d.ts +5 -0
- package/lib/types/features/store/collections/CollectionsTable.d.ts +5 -0
- package/lib/types/features/store/collections/CollectionsView.d.ts +10 -0
- package/lib/types/features/store/collections/EditCollectionView.d.ts +7 -0
- package/lib/types/features/store/collections/index.d.ts +5 -0
- package/lib/types/features/store/index.d.ts +3 -0
- package/lib/types/features/store/objects/DocumentPreviewPanel.d.ts +7 -0
- package/lib/types/features/store/objects/DocumentSearchResults.d.ts +19 -0
- package/lib/types/features/store/objects/DocumentSelectionProvider.d.ts +32 -0
- package/lib/types/features/store/objects/DocumentTable.d.ts +20 -0
- package/lib/types/features/store/objects/ExportPropertiesModal.d.ts +11 -0
- package/lib/types/features/store/objects/components/ContentDispositionButton.d.ts +8 -0
- package/lib/types/features/store/objects/components/ContentOverview.d.ts +7 -0
- package/lib/types/features/store/objects/components/DocumentIcon.d.ts +10 -0
- package/lib/types/features/store/objects/components/DocumentInput.d.ts +7 -0
- package/lib/types/features/store/objects/components/PropertiesEditorModal.d.ts +7 -0
- package/lib/types/features/store/objects/components/SaveVersionConfirmModal.d.ts +8 -0
- package/lib/types/features/store/objects/components/SelectDocument.d.ts +8 -0
- package/lib/types/features/store/objects/components/SelectDocumentModal.d.ts +8 -0
- package/lib/types/features/store/objects/components/VectorSearchWidget.d.ts +10 -0
- package/lib/types/features/store/objects/components/index.d.ts +9 -0
- package/lib/types/features/store/objects/components/useDownloadObject.d.ts +3 -0
- package/lib/types/features/store/objects/index.d.ts +10 -0
- package/lib/types/features/store/objects/layout/DocumentTableColumn.d.ts +16 -0
- package/lib/types/features/store/objects/layout/documentLayout.d.ts +17 -0
- package/lib/types/features/store/objects/layout/index.d.ts +2 -0
- package/lib/types/features/store/objects/layout/renderers.d.ts +2 -0
- package/lib/types/features/store/objects/search/DocumentSearchContext.d.ts +48 -0
- package/lib/types/features/store/objects/search/DocumentSearchProvider.d.ts +15 -0
- package/lib/types/features/store/objects/search/index.d.ts +2 -0
- package/lib/types/features/store/objects/selection/ObjectsActionContext.d.ts +25 -0
- package/lib/types/features/store/objects/selection/ObjectsActionSpec.d.ts +27 -0
- package/lib/types/features/store/objects/selection/SelectionActions.d.ts +4 -0
- package/lib/types/features/store/objects/selection/actions/AddToCollectionAction.d.ts +3 -0
- package/lib/types/features/store/objects/selection/actions/ChangeTypeAction.d.ts +3 -0
- package/lib/types/features/store/objects/selection/actions/ConfirmAction.d.ts +15 -0
- package/lib/types/features/store/objects/selection/actions/DeleteObjectsAction.d.ts +2 -0
- package/lib/types/features/store/objects/selection/actions/ExportPropertiesAction.d.ts +3 -0
- package/lib/types/features/store/objects/selection/actions/RemoveFromCollectionAction.d.ts +2 -0
- package/lib/types/features/store/objects/selection/actions/StartWorkflowComponent.d.ts +3 -0
- package/lib/types/features/store/objects/selection/actions/index.d.ts +7 -0
- package/lib/types/features/store/objects/selection/index.d.ts +4 -0
- package/lib/types/features/store/objects/upload/DocumentUploadModal.d.ts +37 -0
- package/lib/types/features/store/objects/upload/index.d.ts +3 -0
- package/lib/types/features/store/objects/upload/useSmartFileUploadProcessing.d.ts +29 -0
- package/lib/types/features/store/objects/upload/useUploadHandler.d.ts +49 -0
- package/lib/types/features/store/types/ContentObjectTypeView.d.ts +5 -0
- package/lib/types/features/store/types/ContentObjectTypesSearch.d.ts +5 -0
- package/lib/types/features/store/types/ContentObjectTypesTable.d.ts +7 -0
- package/lib/types/features/store/types/ContentObjectTypesView.d.ts +8 -0
- package/lib/types/features/store/types/CreateOrUpdateTypeModal.d.ts +14 -0
- package/lib/types/features/store/types/ObjectSchemaEditor.d.ts +7 -0
- package/lib/types/features/store/types/SelectContentType.d.ts +10 -0
- package/lib/types/features/store/types/SelectContentTypeModal.d.ts +32 -0
- package/lib/types/features/store/types/TableLayoutEditor.d.ts +8 -0
- package/lib/types/features/store/types/index.d.ts +10 -0
- package/lib/types/features/store/types/search/ObjectTypeSearchContext.d.ts +35 -0
- package/lib/types/features/store/types/search/ObjectTypeSearchProvider.d.ts +10 -0
- package/lib/types/features/store/types/search/index.d.ts +2 -0
- package/lib/types/features/user/UserAvatar.d.ts +8 -0
- package/lib/types/features/user/UserInfo.d.ts +36 -0
- package/lib/types/features/user/index.d.ts +2 -0
- package/lib/types/features/utils/index.d.ts +3 -0
- package/lib/types/features/utils/mimeType.d.ts +4 -0
- package/lib/types/features/utils/rendition.d.ts +3 -0
- package/lib/types/features/utils/text.d.ts +2 -0
- package/lib/types/layout/Sidebar.d.ts +2 -1
- package/lib/types/widgets/Progress.d.ts +5 -0
- package/lib/types/widgets/form/schema.d.ts +4 -3
- package/lib/types/widgets/index.d.ts +4 -0
- package/lib/types/widgets/popover/Popover.d.ts +37 -0
- package/lib/types/widgets/popover/context.d.ts +7 -0
- package/lib/types/widgets/popover/index.d.ts +2 -0
- package/lib/types/widgets/popover/slots.d.ts +4 -0
- package/lib/types/widgets/properties/PropertiesView.d.ts +10 -0
- package/lib/types/widgets/properties/index.d.ts +1 -0
- package/lib/types/widgets/upload/DropZone.d.ts +40 -0
- package/lib/types/widgets/upload/UploadResultCategory.d.ts +25 -0
- package/lib/types/widgets/upload/UploadSummary.d.ts +37 -0
- package/lib/types/widgets/upload/index.d.ts +3 -0
- package/lib/vertesia-ui-core.js +1 -1
- package/lib/vertesia-ui-core.js.map +1 -1
- package/lib/vertesia-ui-features.js +1 -1
- package/lib/vertesia-ui-features.js.map +1 -1
- package/lib/vertesia-ui-layout.js +1 -1
- package/lib/vertesia-ui-layout.js.map +1 -1
- package/lib/vertesia-ui-router.js.map +1 -1
- package/lib/vertesia-ui-session.js.map +1 -1
- package/lib/vertesia-ui-widgets.js +1 -1
- package/lib/vertesia-ui-widgets.js.map +1 -1
- package/package.json +14 -6
- package/src/core/components/FormItem.tsx +35 -0
- package/src/core/components/InputList.tsx +4 -3
- package/src/core/components/index.ts +3 -3
- package/src/core/components/shadcn/button.tsx +68 -8
- package/src/core/components/shadcn/calendar.tsx +9 -65
- package/src/core/components/shadcn/dialog.tsx +3 -3
- package/src/core/components/shadcn/filters/DynamicLabel.tsx +45 -0
- package/src/core/components/shadcn/filters/comboBox.tsx +57 -52
- package/src/core/components/shadcn/filters/dateFilter.tsx +46 -29
- package/src/core/components/shadcn/filters/filterBar.tsx +53 -47
- package/src/core/components/shadcn/filters/filters.tsx +43 -30
- package/src/core/components/shadcn/filters/selectFilter.tsx +53 -34
- package/src/core/components/shadcn/filters/textFilter.tsx +6 -3
- package/src/core/components/shadcn/filters/types.ts +8 -1
- package/src/core/components/shadcn/input.tsx +5 -5
- package/src/core/components/shadcn/selectBox.tsx +138 -33
- package/src/core/components/styles.ts +1 -1
- package/src/core/components/table/index.tsx +8 -0
- package/src/core/index.ts +2 -1
- package/src/core/utils/cn.ts +6 -0
- package/src/core/utils/index.ts +1 -0
- package/src/features/agent/PayloadBuilder.tsx +208 -0
- package/src/features/agent/chat/AnimatedThinkingDots.tsx +350 -0
- package/src/features/agent/chat/JumpingDots.tsx +16 -0
- package/src/features/agent/chat/ModernAgentConversation.tsx +708 -0
- package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.tsx +246 -0
- package/src/features/agent/chat/ModernAgentOutput/Header.tsx +231 -0
- package/src/features/agent/chat/ModernAgentOutput/InlineSlideInPanel.tsx +66 -0
- package/src/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.tsx +282 -0
- package/src/features/agent/chat/ModernAgentOutput/MessageInput.tsx +125 -0
- package/src/features/agent/chat/ModernAgentOutput/MessageItem.tsx +562 -0
- package/src/features/agent/chat/ModernAgentOutput/MessagesContainer.tsx +51 -0
- package/src/features/agent/chat/ModernAgentOutput/PlanPanel.tsx +123 -0
- package/src/features/agent/chat/ModernAgentOutput/README-image-support.md +43 -0
- package/src/features/agent/chat/ModernAgentOutput/SlideInPanel.tsx +72 -0
- package/src/features/agent/chat/ModernAgentOutput/SlidingMessages.tsx +96 -0
- package/src/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.tsx +185 -0
- package/src/features/agent/chat/ModernAgentOutput/StackedMessages.tsx +33 -0
- package/src/features/agent/chat/ModernAgentOutput/WorkstreamTabs.tsx +167 -0
- package/src/features/agent/chat/ModernAgentOutput/utils.ts +195 -0
- package/src/features/agent/chat/ModernAgentOutput/with-types.d.ts +15 -0
- package/src/features/agent/chat/SlidingThinkingIndicator.tsx +459 -0
- package/src/features/agent/chat/WaitingMessages.ts +66 -0
- package/src/features/agent/chat/index.ts +4 -0
- package/src/features/agent/index.ts +2 -0
- package/src/features/errors/PanelErrorBoundary.tsx +30 -0
- package/src/features/errors/RowErrorBoundary.tsx +28 -0
- package/src/features/errors/VertesiaErrorBoundary.tsx +28 -0
- package/src/features/errors/WidgetErrorBoundary.tsx +27 -0
- package/src/features/errors/index.ts +4 -0
- package/src/features/facets/EnvironmentFacet.tsx +53 -0
- package/src/features/facets/FacetsNav.tsx +19 -0
- package/src/features/facets/InteractionFacet.tsx +53 -0
- package/src/features/facets/StringFacet.tsx +23 -0
- package/src/features/facets/StringListFacet.tsx +22 -0
- package/src/features/facets/TypeFacet.tsx +59 -0
- package/src/features/facets/TypeOptions.tsx +22 -0
- package/src/features/facets/UserFacet.tsx +61 -0
- package/src/features/facets/VFacetsNav.tsx +139 -0
- package/src/features/facets/VStringFacet.tsx +34 -0
- package/src/features/facets/VTypeFacet.tsx +72 -0
- package/src/features/facets/VUserFacet.tsx +47 -0
- package/src/features/facets/index.ts +11 -0
- package/src/features/facets/utils.tsx +9 -0
- package/src/features/index.ts +9 -1
- package/src/features/layout/GenericPageNavHeader.tsx +48 -0
- package/src/features/layout/NotFoundView.tsx +11 -0
- package/src/features/layout/index.ts +2 -0
- package/src/features/magic-pdf/DownloadPopover.tsx +32 -0
- package/src/features/magic-pdf/MagicPdfView.tsx +102 -0
- package/src/features/magic-pdf/PageSlider.tsx +112 -0
- package/src/features/magic-pdf/PdfPageProvider.tsx +229 -0
- package/src/features/magic-pdf/TextPageView.tsx +65 -0
- package/src/features/magic-pdf/index.ts +1 -0
- package/src/features/magic-pdf/types.ts +1 -0
- package/src/features/magic-pdf/useResizeOnDrag.ts +42 -0
- package/src/features/store/collections/BrowseCollectionView.tsx +45 -0
- package/src/features/store/collections/CollectionView.tsx +94 -0
- package/src/features/store/collections/CollectionsTable.tsx +115 -0
- package/src/features/store/collections/CollectionsView.tsx +166 -0
- package/src/features/store/collections/EditCollectionView.tsx +253 -0
- package/src/features/store/collections/index.ts +5 -0
- package/src/features/store/index.ts +3 -0
- package/src/features/store/objects/DocumentPreviewPanel.tsx +417 -0
- package/src/features/store/objects/DocumentSearchResults.tsx +209 -0
- package/src/features/store/objects/DocumentSelectionProvider.tsx +99 -0
- package/src/features/store/objects/DocumentTable.tsx +409 -0
- package/src/features/store/objects/ExportPropertiesModal.tsx +89 -0
- package/src/features/store/objects/components/ContentDispositionButton.tsx +45 -0
- package/src/features/store/objects/components/ContentOverview.tsx +466 -0
- package/src/features/store/objects/components/DocumentIcon.tsx +87 -0
- package/src/features/store/objects/components/DocumentInput.tsx +90 -0
- package/src/features/store/objects/components/PropertiesEditorModal.tsx +253 -0
- package/src/features/store/objects/components/SaveVersionConfirmModal.tsx +136 -0
- package/src/features/store/objects/components/SelectDocument.tsx +69 -0
- package/src/features/store/objects/components/SelectDocumentModal.tsx +20 -0
- package/src/features/store/objects/components/VectorSearchWidget.tsx +115 -0
- package/src/features/store/objects/components/index.ts +9 -0
- package/src/features/store/objects/components/useDownloadObject.ts +24 -0
- package/src/features/store/objects/index.ts +10 -0
- package/src/features/store/objects/layout/DocumentTableColumn.tsx +84 -0
- package/src/features/store/objects/layout/documentLayout.tsx +69 -0
- package/src/features/store/objects/layout/index.ts +2 -0
- package/src/features/store/objects/layout/knowledge.md +238 -0
- package/src/features/store/objects/layout/renderers.tsx +139 -0
- package/src/features/store/objects/search/DocumentSearchContext.ts +181 -0
- package/src/features/store/objects/search/DocumentSearchProvider.tsx +54 -0
- package/src/features/store/objects/search/index.ts +2 -0
- package/src/features/store/objects/selection/ObjectsActionContext.tsx +196 -0
- package/src/features/store/objects/selection/ObjectsActionSpec.ts +31 -0
- package/src/features/store/objects/selection/SelectionActions.tsx +160 -0
- package/src/features/store/objects/selection/actions/AddToCollectionAction.tsx +114 -0
- package/src/features/store/objects/selection/actions/ChangeTypeAction.tsx +76 -0
- package/src/features/store/objects/selection/actions/ConfirmAction.tsx +46 -0
- package/src/features/store/objects/selection/actions/DeleteObjectsAction.tsx +77 -0
- package/src/features/store/objects/selection/actions/ExportPropertiesAction.tsx +117 -0
- package/src/features/store/objects/selection/actions/RemoveFromCollectionAction.tsx +77 -0
- package/src/features/store/objects/selection/actions/StartWorkflowComponent.tsx +122 -0
- package/src/features/store/objects/selection/actions/index.ts +7 -0
- package/src/features/store/objects/selection/index.ts +4 -0
- package/src/features/store/objects/upload/DocumentUploadModal.tsx +970 -0
- package/src/features/store/objects/upload/index.ts +3 -0
- package/src/features/store/objects/upload/useSmartFileUploadProcessing.ts +250 -0
- package/src/features/store/objects/upload/useUploadHandler.ts +325 -0
- package/src/features/store/types/ContentObjectTypeView.tsx +244 -0
- package/src/features/store/types/ContentObjectTypesSearch.tsx +111 -0
- package/src/features/store/types/ContentObjectTypesTable.tsx +38 -0
- package/src/features/store/types/ContentObjectTypesView.tsx +71 -0
- package/src/features/store/types/CreateOrUpdateTypeModal.tsx +70 -0
- package/src/features/store/types/ObjectSchemaEditor.tsx +127 -0
- package/src/features/store/types/SelectContentType.tsx +88 -0
- package/src/features/store/types/SelectContentTypeModal.tsx +142 -0
- package/src/features/store/types/TableLayoutEditor.tsx +104 -0
- package/src/features/store/types/index.ts +10 -0
- package/src/features/store/types/search/ObjectTypeSearchContext.tsx +119 -0
- package/src/features/store/types/search/ObjectTypeSearchProvider.tsx +24 -0
- package/src/features/store/types/search/index.ts +2 -0
- package/src/features/user/UserAvatar.tsx +34 -0
- package/src/features/user/UserInfo.tsx +215 -0
- package/src/features/user/index.ts +2 -0
- package/src/features/utils/index.ts +3 -0
- package/src/features/utils/mimeType.ts +9 -0
- package/src/features/utils/rendition.ts +75 -0
- package/src/features/utils/text.ts +10 -0
- package/src/layout/FullHeightLayout.tsx +1 -1
- package/src/layout/Sidebar.tsx +12 -2
- package/src/widgets/Progress.tsx +10 -0
- package/src/widgets/codemirror/CodeMirrorEditor.tsx +1 -1
- package/src/widgets/form/Form.tsx +2 -2
- package/src/widgets/form/schema.ts +14 -7
- package/src/widgets/index.ts +5 -1
- package/src/widgets/popover/Popover.tsx +171 -0
- package/src/widgets/popover/context.ts +15 -0
- package/src/widgets/popover/index.ts +2 -0
- package/src/widgets/popover/slots.ts +24 -0
- package/src/widgets/properties/PropertiesView.tsx +26 -0
- package/src/widgets/properties/index.ts +1 -0
- package/src/widgets/schema-editor/JSONSchemaEditorModal.tsx +1 -2
- package/src/widgets/schema-editor/editor/Editable.tsx +12 -13
- package/src/widgets/schema-editor/editor/PropertyViewer.tsx +1 -1
- package/src/widgets/schema-editor/editor/SchemaEditor.tsx +4 -4
- package/src/widgets/upload/DropZone.tsx +257 -0
- package/src/widgets/upload/UploadResultCategory.tsx +81 -0
- package/src/widgets/upload/UploadSummary.tsx +116 -0
- package/src/widgets/upload/index.ts +3 -0
- package/lib/esm/code/index.js +0 -3
- package/lib/esm/code/index.js.map +0 -1
- package/lib/esm/core/components/Input.js +0 -16
- package/lib/esm/core/components/Input.js.map +0 -1
- package/lib/esm/form/index.js +0 -3
- package/lib/esm/form/index.js.map +0 -1
- package/lib/types/code/index.d.ts +0 -0
- package/lib/types/core/components/Input.d.ts +0 -8
- package/lib/types/form/index.d.ts +0 -0
- package/lib/vertesia-ui-code.js +0 -2
- package/lib/vertesia-ui-code.js.map +0 -1
- package/lib/vertesia-ui-form.js +0 -2
- package/lib/vertesia-ui-form.js.map +0 -1
- package/src/code/index.ts +0 -1
- package/src/core/components/Input.tsx +0 -43
- package/src/form/index.ts +0 -1
|
@@ -0,0 +1,562 @@
|
|
|
1
|
+
import { AgentMessage, AgentMessageType } from "@vertesia/common";
|
|
2
|
+
import { Button, useToast } from "@vertesia/ui/core";
|
|
3
|
+
import { NavLink } from "@vertesia/ui/router";
|
|
4
|
+
import { useUserSession } from "@vertesia/ui/session";
|
|
5
|
+
import dayjs from "dayjs";
|
|
6
|
+
import { AlertCircle, Bot, CheckCircle, Clock, CopyIcon, Info, MessageSquare, User } from "lucide-react";
|
|
7
|
+
import React, { useEffect, useState } from "react";
|
|
8
|
+
import Markdown from "react-markdown";
|
|
9
|
+
import remarkGfm from "remark-gfm";
|
|
10
|
+
import { AnimatedThinkingDots, PulsatingCircle } from "../AnimatedThinkingDots";
|
|
11
|
+
import { ThinkingMessages } from "../WaitingMessages";
|
|
12
|
+
import { getWorkstreamId } from "./utils";
|
|
13
|
+
|
|
14
|
+
interface MessageItemProps {
|
|
15
|
+
message: AgentMessage;
|
|
16
|
+
showPulsatingCircle?: boolean;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export default function MessageItem({ message, showPulsatingCircle = false }: MessageItemProps) {
|
|
20
|
+
const [showDetails, setShowDetails] = useState(false);
|
|
21
|
+
const [processedContent, setProcessedContent] = useState<string | object>("");
|
|
22
|
+
const [isProcessingImages, setIsProcessingImages] = useState(false);
|
|
23
|
+
const { client } = useUserSession();
|
|
24
|
+
const toast = useToast();
|
|
25
|
+
|
|
26
|
+
// Simplified message styling with minimal distinction between different types
|
|
27
|
+
const getMessageStyles = () => {
|
|
28
|
+
// Common styling for all messages with subtle type indication
|
|
29
|
+
const baseStyle = {
|
|
30
|
+
containerClass: "bg-white border-l-4 border-l-muted/30 shadow-sm",
|
|
31
|
+
iconComponent: <Bot className="size-4 text-muted" />,
|
|
32
|
+
sender: "",
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
// Just add minimal type indicators
|
|
36
|
+
switch (message.type) {
|
|
37
|
+
case AgentMessageType.ANSWER:
|
|
38
|
+
return {
|
|
39
|
+
...baseStyle,
|
|
40
|
+
containerClass: "bg-white border-l-4 border-l-muted/30 shadow-sm",
|
|
41
|
+
iconComponent: <Bot className="size-4 text-muted" />,
|
|
42
|
+
sender: "Agent",
|
|
43
|
+
};
|
|
44
|
+
case AgentMessageType.COMPLETE:
|
|
45
|
+
return {
|
|
46
|
+
...baseStyle,
|
|
47
|
+
containerClass: "bg-white border-l-4 border-l-green-500 shadow-sm",
|
|
48
|
+
iconComponent: <CheckCircle className="size-4 text-success" />,
|
|
49
|
+
sender: "Completed",
|
|
50
|
+
};
|
|
51
|
+
case AgentMessageType.QUESTION:
|
|
52
|
+
return {
|
|
53
|
+
...baseStyle,
|
|
54
|
+
iconComponent: <User className="size-4 text-muted" />,
|
|
55
|
+
sender: "User",
|
|
56
|
+
};
|
|
57
|
+
case AgentMessageType.THOUGHT:
|
|
58
|
+
return {
|
|
59
|
+
...baseStyle,
|
|
60
|
+
iconComponent: showPulsatingCircle ? (
|
|
61
|
+
<PulsatingCircle size="sm" color="blue" />
|
|
62
|
+
) : (
|
|
63
|
+
<Bot className="size-4 text-muted" />
|
|
64
|
+
),
|
|
65
|
+
sender: "Agent",
|
|
66
|
+
};
|
|
67
|
+
case AgentMessageType.ERROR:
|
|
68
|
+
return {
|
|
69
|
+
...baseStyle,
|
|
70
|
+
iconComponent: <AlertCircle className="size-4 text-muted" />,
|
|
71
|
+
sender: "System",
|
|
72
|
+
};
|
|
73
|
+
case AgentMessageType.UPDATE:
|
|
74
|
+
return {
|
|
75
|
+
...baseStyle,
|
|
76
|
+
containerClass: "bg-white border-l-4 border-success shadow-sm",
|
|
77
|
+
iconComponent: <Info className="size-4 text-success" />,
|
|
78
|
+
sender: "Update",
|
|
79
|
+
};
|
|
80
|
+
case AgentMessageType.PLAN:
|
|
81
|
+
return {
|
|
82
|
+
...baseStyle,
|
|
83
|
+
iconComponent: <MessageSquare className="size-4 text-muted" />,
|
|
84
|
+
sender: "Agent",
|
|
85
|
+
};
|
|
86
|
+
default:
|
|
87
|
+
return {
|
|
88
|
+
...baseStyle,
|
|
89
|
+
sender: `Agent`,
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
const messageStyles = getMessageStyles();
|
|
95
|
+
|
|
96
|
+
// Convert links in the content (now async to handle image URLs)
|
|
97
|
+
const convertLinks = async (content: string | object): Promise<string | object> => {
|
|
98
|
+
// If content is not a string, return it as is
|
|
99
|
+
if (typeof content !== "string") {
|
|
100
|
+
return content;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
let processedContent = content;
|
|
104
|
+
|
|
105
|
+
// First, handle store and collection links
|
|
106
|
+
processedContent = processedContent.replace(/\[([^\]]+)\]\((store|collection):([a-f\d]{24})\)/gi, (_, text, type, id) => {
|
|
107
|
+
const path = type === 'store' ? 'objects' : 'collections';
|
|
108
|
+
return `[${text}](/store/${path}/${id})`;
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
// Then, handle image links by finding all image:<gcspath> patterns
|
|
112
|
+
const imageRegex = /!\[([^\]]*)\]\(image:([^)]+)\)/g;
|
|
113
|
+
const imageMatches = Array.from(processedContent.matchAll(imageRegex));
|
|
114
|
+
|
|
115
|
+
// Process all image URLs in parallel
|
|
116
|
+
const imageReplacements = await Promise.all(
|
|
117
|
+
imageMatches.map(async (match) => {
|
|
118
|
+
const [fullMatch, altText, gcsPath] = match;
|
|
119
|
+
try {
|
|
120
|
+
const response = await client.files.getDownloadUrl(gcsPath);
|
|
121
|
+
return { fullMatch, replacement: `` };
|
|
122
|
+
} catch (error) {
|
|
123
|
+
console.error(`Failed to get download URL for image: ${gcsPath}`, error);
|
|
124
|
+
// Return original on error
|
|
125
|
+
return { fullMatch, replacement: fullMatch };
|
|
126
|
+
}
|
|
127
|
+
})
|
|
128
|
+
);
|
|
129
|
+
|
|
130
|
+
// Apply all replacements
|
|
131
|
+
for (const { fullMatch, replacement } of imageReplacements) {
|
|
132
|
+
processedContent = processedContent.replace(fullMatch, replacement);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
return processedContent;
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
// Get the message content to display with thinking message replacement
|
|
139
|
+
const getMessageContent = () => {
|
|
140
|
+
let content = "";
|
|
141
|
+
|
|
142
|
+
if (message.message) {
|
|
143
|
+
// Check if message.message is an object
|
|
144
|
+
if (typeof message.message === "object") {
|
|
145
|
+
// Use JSONView for objects - we'll need to stringify it for now
|
|
146
|
+
// as we don't have direct access to JSONView
|
|
147
|
+
content = JSON.stringify(message.message, null, 2);
|
|
148
|
+
} else if (message.message.trim) {
|
|
149
|
+
content = message.message.trim();
|
|
150
|
+
} else {
|
|
151
|
+
// Fallback for other non-string, non-object cases
|
|
152
|
+
content = String(message.message);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// Replace %thinking_message% placeholder with a thinking message
|
|
157
|
+
if (typeof content === "string" && content.includes("%thinking_message%")) {
|
|
158
|
+
// Get a random thinking message since we don't have access to thinkingMessageIndex here
|
|
159
|
+
const randomIndex = Math.floor(Math.random() * ThinkingMessages.length);
|
|
160
|
+
content = content.replace(/%thinking_message%/g, ThinkingMessages[randomIndex]);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
return content;
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
// Copy message content to clipboard
|
|
167
|
+
const copyToClipboard = () => {
|
|
168
|
+
const messageContent = getMessageContent() || "";
|
|
169
|
+
const detailsContent =
|
|
170
|
+
typeof message.details === "string"
|
|
171
|
+
? message.details
|
|
172
|
+
: message.details
|
|
173
|
+
? JSON.stringify(message.details, null, 2)
|
|
174
|
+
: "";
|
|
175
|
+
|
|
176
|
+
const textToCopy = [messageContent, detailsContent ? "\n\nDetails:\n" + detailsContent : ""].join("").trim();
|
|
177
|
+
|
|
178
|
+
navigator.clipboard.writeText(textToCopy).then(() => {
|
|
179
|
+
toast({
|
|
180
|
+
status: "success",
|
|
181
|
+
title: "Copied to clipboard",
|
|
182
|
+
duration: 2000,
|
|
183
|
+
});
|
|
184
|
+
});
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
// Process content to enhance markdown detection for lists and thinking messages
|
|
188
|
+
const processContentForMarkdown = (content: string | object) => {
|
|
189
|
+
// If content is not a string, return it as is
|
|
190
|
+
if (typeof content !== "string") {
|
|
191
|
+
return content;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
// Special handling for thought messages to ensure proper markdown formatting
|
|
195
|
+
if (
|
|
196
|
+
message.type === AgentMessageType.THOUGHT ||
|
|
197
|
+
(typeof message.message === "string" &&
|
|
198
|
+
(message.message.toLowerCase().includes("thinking about") ||
|
|
199
|
+
message.message.toLowerCase().includes("i'm thinking") ||
|
|
200
|
+
message.message.toLowerCase().includes("💭")))
|
|
201
|
+
) {
|
|
202
|
+
let formattedContent = content;
|
|
203
|
+
|
|
204
|
+
// Check for numbering patterns like "1. First item 2. Second item"
|
|
205
|
+
if (/\d+\.\s+.+/.test(formattedContent)) {
|
|
206
|
+
// Format numbered lists by adding newlines between items
|
|
207
|
+
formattedContent = formattedContent.replace(/(\d+\.\s+.+?)(?=\s+\d+\.\s+|$)/g, "$1\n\n");
|
|
208
|
+
|
|
209
|
+
// Make sure nested content under numbered items is properly indented
|
|
210
|
+
formattedContent = formattedContent.replace(/(\d+\.\s+.+\n)([^\d\n][^:])/g, "$1 $2");
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
// Handle colon-prefixed items that should be on separate lines
|
|
214
|
+
if (formattedContent.includes(":") && !formattedContent.includes("\n\n")) {
|
|
215
|
+
formattedContent = formattedContent.replace(
|
|
216
|
+
/\b(First|Next|Then|Finally|Lastly|Additionally|Step \d+):\s+/gi,
|
|
217
|
+
"\n\n$&",
|
|
218
|
+
);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
// Handle thinking points or list-like structures even without numbers
|
|
222
|
+
if (formattedContent.includes(" - ")) {
|
|
223
|
+
formattedContent = formattedContent.replace(/\s+-\s+/g, "\n- ");
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
return formattedContent;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
// Normal processing for non-thinking messages
|
|
230
|
+
if (/\d+\.\s+.+/.test(content) && !content.includes("\n\n")) {
|
|
231
|
+
// Add proper line breaks for numbered lists that aren't already properly formatted
|
|
232
|
+
return content.replace(/(\d+\.\s+.+?)(?=\s+\d+\.\s+|$)/g, "$1\n\n");
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
return content;
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
// Render content with markdown support - all messages now rendered as markdown
|
|
239
|
+
const renderContent = (content: string | object) => {
|
|
240
|
+
// Handle object content (JSON)
|
|
241
|
+
if (typeof content === "object") {
|
|
242
|
+
return (
|
|
243
|
+
<pre className="text-xs font-mono whitespace-pre-wrap overflow-x-auto bg-gray-100 dark:bg-gray-800 p-2 rounded text-gray-700 ">
|
|
244
|
+
{JSON.stringify(content, null, 2)}
|
|
245
|
+
</pre>
|
|
246
|
+
);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
// Handle string content with markdown - content is already processed
|
|
250
|
+
return (
|
|
251
|
+
<div className="vprose prose-sm">
|
|
252
|
+
<Markdown
|
|
253
|
+
remarkPlugins={[remarkGfm]}
|
|
254
|
+
components={{
|
|
255
|
+
a: ({ node, ...props }: { node?: any; href?: string; children?: React.ReactNode }) => {
|
|
256
|
+
const href = props.href || "";
|
|
257
|
+
if (href.startsWith("/store/")) {
|
|
258
|
+
return (
|
|
259
|
+
<NavLink
|
|
260
|
+
href={href}
|
|
261
|
+
topLevelNav
|
|
262
|
+
>
|
|
263
|
+
{props.children}
|
|
264
|
+
</NavLink>
|
|
265
|
+
);
|
|
266
|
+
}
|
|
267
|
+
return (
|
|
268
|
+
<a
|
|
269
|
+
{...props}
|
|
270
|
+
target="_blank"
|
|
271
|
+
rel="noopener noreferrer"
|
|
272
|
+
/>
|
|
273
|
+
);
|
|
274
|
+
},
|
|
275
|
+
img: ({ node, ...props }: { node?: any; src?: string; alt?: string }) => {
|
|
276
|
+
return (
|
|
277
|
+
<img
|
|
278
|
+
{...props}
|
|
279
|
+
className="max-w-full h-auto rounded-lg shadow-md my-3 cursor-pointer hover:shadow-lg transition-shadow"
|
|
280
|
+
loading="lazy"
|
|
281
|
+
onClick={() => props.src && window.open(props.src, '_blank')}
|
|
282
|
+
/>
|
|
283
|
+
);
|
|
284
|
+
},
|
|
285
|
+
code: ({
|
|
286
|
+
node,
|
|
287
|
+
className,
|
|
288
|
+
children,
|
|
289
|
+
...props
|
|
290
|
+
}: {
|
|
291
|
+
node?: any;
|
|
292
|
+
className?: string;
|
|
293
|
+
children?: React.ReactNode;
|
|
294
|
+
}) => {
|
|
295
|
+
const match = /language-(\w+)/.exec(className || "");
|
|
296
|
+
const isInline = !match;
|
|
297
|
+
const language = match ? match[1] : "";
|
|
298
|
+
|
|
299
|
+
// Keep only the language indicator logic here, styling moved to CSS
|
|
300
|
+
return (
|
|
301
|
+
<>
|
|
302
|
+
{!isInline && language && (
|
|
303
|
+
<div className="code-language-indicator">
|
|
304
|
+
{language}
|
|
305
|
+
</div>
|
|
306
|
+
)}
|
|
307
|
+
<code {...props}>
|
|
308
|
+
{children}
|
|
309
|
+
</code>
|
|
310
|
+
</>
|
|
311
|
+
);
|
|
312
|
+
},
|
|
313
|
+
p: (props) => <p {...props} />,
|
|
314
|
+
strong: (props) => <strong {...props} />,
|
|
315
|
+
em: (props) => <em {...props} />,
|
|
316
|
+
pre: (props) => <pre {...props} />,
|
|
317
|
+
h1: (props) => <h1 {...props} />,
|
|
318
|
+
h2: (props) => <h2 {...props} />,
|
|
319
|
+
h3: (props) => <h3 {...props} />,
|
|
320
|
+
li: (props) => <li {...props} />,
|
|
321
|
+
ul: (props) => <ul {...props} />,
|
|
322
|
+
ol: (props) => <ol {...props} />,
|
|
323
|
+
blockquote: (props) => <blockquote {...props} />,
|
|
324
|
+
hr: (props) => <hr {...props} />,
|
|
325
|
+
table: (props) => <div className="overflow-x-auto"><table {...props} /></div>,
|
|
326
|
+
th: (props) => <th {...props} />,
|
|
327
|
+
td: (props) => <td {...props} />,
|
|
328
|
+
}}
|
|
329
|
+
>
|
|
330
|
+
{content as string}
|
|
331
|
+
</Markdown>
|
|
332
|
+
</div>
|
|
333
|
+
);
|
|
334
|
+
};
|
|
335
|
+
|
|
336
|
+
const messageContent = getMessageContent();
|
|
337
|
+
|
|
338
|
+
// Process content with image URL resolution when component mounts or message changes
|
|
339
|
+
useEffect(() => {
|
|
340
|
+
const processContent = async () => {
|
|
341
|
+
if (messageContent) {
|
|
342
|
+
setIsProcessingImages(true);
|
|
343
|
+
try {
|
|
344
|
+
const processed = await convertLinks(processContentForMarkdown(messageContent));
|
|
345
|
+
setProcessedContent(processed);
|
|
346
|
+
} catch (error) {
|
|
347
|
+
console.error('Error processing message content:', error);
|
|
348
|
+
setProcessedContent(messageContent);
|
|
349
|
+
} finally {
|
|
350
|
+
setIsProcessingImages(false);
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
};
|
|
354
|
+
processContent();
|
|
355
|
+
}, [messageContent, client]);
|
|
356
|
+
|
|
357
|
+
const workstreamId = getWorkstreamId(message);
|
|
358
|
+
|
|
359
|
+
// Different styling based on message type
|
|
360
|
+
const getMessageTypeStyles = () => {
|
|
361
|
+
switch (message.type) {
|
|
362
|
+
case AgentMessageType.ANSWER:
|
|
363
|
+
return "border-l-info bg-info";
|
|
364
|
+
case AgentMessageType.COMPLETE:
|
|
365
|
+
return "border-l-success bg-success";
|
|
366
|
+
case AgentMessageType.IDLE:
|
|
367
|
+
return "border-l-muted bg-muted";
|
|
368
|
+
case AgentMessageType.REQUEST_INPUT:
|
|
369
|
+
return "border-l-attention bg-attention";
|
|
370
|
+
case AgentMessageType.QUESTION:
|
|
371
|
+
return "border-l-muted bg-muted";
|
|
372
|
+
case AgentMessageType.THOUGHT:
|
|
373
|
+
return "border-l-accent dark:border-l-purple-500 bg-purple-50/50 dark:bg-purple-900/10";
|
|
374
|
+
case AgentMessageType.ERROR:
|
|
375
|
+
return "border-l-destructive bg-destructive";
|
|
376
|
+
case AgentMessageType.UPDATE:
|
|
377
|
+
return "border-l-success bg-success";
|
|
378
|
+
case AgentMessageType.PLAN:
|
|
379
|
+
return "border-l-attention bg-attention";
|
|
380
|
+
default:
|
|
381
|
+
return "border-l-indigo-500 dark:border-l-indigo-400 bg-indigo-50/50 dark:bg-indigo-900/10";
|
|
382
|
+
}
|
|
383
|
+
};
|
|
384
|
+
|
|
385
|
+
const messageTypeStyles = getMessageTypeStyles();
|
|
386
|
+
|
|
387
|
+
// Get the color for the icon based on message type
|
|
388
|
+
const getIconColor = () => {
|
|
389
|
+
switch (message.type) {
|
|
390
|
+
case AgentMessageType.ANSWER:
|
|
391
|
+
return "text-info";
|
|
392
|
+
case AgentMessageType.COMPLETE:
|
|
393
|
+
return "text-success";
|
|
394
|
+
case AgentMessageType.IDLE:
|
|
395
|
+
return "text-muted";
|
|
396
|
+
case AgentMessageType.REQUEST_INPUT:
|
|
397
|
+
return "text-attention";
|
|
398
|
+
case AgentMessageType.QUESTION:
|
|
399
|
+
return "text-muted";
|
|
400
|
+
case AgentMessageType.THOUGHT:
|
|
401
|
+
return "text-purple-600 dark:text-purple-400";
|
|
402
|
+
case AgentMessageType.ERROR:
|
|
403
|
+
return "text-destructive";
|
|
404
|
+
case AgentMessageType.UPDATE:
|
|
405
|
+
return "text-success";
|
|
406
|
+
case AgentMessageType.PLAN:
|
|
407
|
+
return "text-attention";
|
|
408
|
+
default:
|
|
409
|
+
return "text-muted";
|
|
410
|
+
}
|
|
411
|
+
};
|
|
412
|
+
|
|
413
|
+
// Get an icon for the message type with enhanced animations
|
|
414
|
+
const getMessageIcon = () => {
|
|
415
|
+
const iconColor = getIconColor();
|
|
416
|
+
|
|
417
|
+
// Choose an animation style for thinking messages
|
|
418
|
+
const getThinkingAnimation = (color: 'blue' | 'purple' | 'teal' | 'green' | 'amber') => {
|
|
419
|
+
// Generate a deterministic but varying number based on the message timestamp
|
|
420
|
+
// This ensures the same message always gets the same animation style
|
|
421
|
+
const timestampNum = typeof message.timestamp === 'number'
|
|
422
|
+
? message.timestamp
|
|
423
|
+
: new Date(message.timestamp).getTime();
|
|
424
|
+
|
|
425
|
+
// Use only PulsatingCircle and AnimatedThinkingDots
|
|
426
|
+
return (timestampNum % 2 === 0)
|
|
427
|
+
? <PulsatingCircle size="sm" color={color} />
|
|
428
|
+
: <AnimatedThinkingDots color={color} />;
|
|
429
|
+
};
|
|
430
|
+
|
|
431
|
+
switch (message.type) {
|
|
432
|
+
case AgentMessageType.ANSWER:
|
|
433
|
+
return showPulsatingCircle ? (
|
|
434
|
+
getThinkingAnimation('blue')
|
|
435
|
+
) : (
|
|
436
|
+
<Bot className={`size-4 ${iconColor}`} />
|
|
437
|
+
);
|
|
438
|
+
case AgentMessageType.COMPLETE:
|
|
439
|
+
return <CheckCircle className={`size-4 ${iconColor}`} />;
|
|
440
|
+
case AgentMessageType.IDLE:
|
|
441
|
+
return <Clock className={`size-4 ${iconColor}`} />;
|
|
442
|
+
case AgentMessageType.REQUEST_INPUT:
|
|
443
|
+
return <User className={`size-4 ${iconColor}`} />;
|
|
444
|
+
case AgentMessageType.QUESTION:
|
|
445
|
+
return <User className={`size-4 ${iconColor}`} />;
|
|
446
|
+
case AgentMessageType.THOUGHT:
|
|
447
|
+
return showPulsatingCircle ? (
|
|
448
|
+
getThinkingAnimation('purple')
|
|
449
|
+
) : (
|
|
450
|
+
<Bot className={`size-4 ${iconColor}`} />
|
|
451
|
+
);
|
|
452
|
+
case AgentMessageType.ERROR:
|
|
453
|
+
return <AlertCircle className={`size-4 ${iconColor}`} />;
|
|
454
|
+
case AgentMessageType.UPDATE:
|
|
455
|
+
return showPulsatingCircle ? (
|
|
456
|
+
getThinkingAnimation('green')
|
|
457
|
+
) : (
|
|
458
|
+
<Info className={`size-4 ${iconColor}`} />
|
|
459
|
+
);
|
|
460
|
+
case AgentMessageType.PLAN:
|
|
461
|
+
return showPulsatingCircle ? (
|
|
462
|
+
getThinkingAnimation('amber')
|
|
463
|
+
) : (
|
|
464
|
+
<MessageSquare className={`size-4 ${iconColor}`} />
|
|
465
|
+
);
|
|
466
|
+
default:
|
|
467
|
+
return showPulsatingCircle ? (
|
|
468
|
+
getThinkingAnimation('blue')
|
|
469
|
+
) : (
|
|
470
|
+
<Bot className={`size-4 ${iconColor}`} />
|
|
471
|
+
);
|
|
472
|
+
}
|
|
473
|
+
};
|
|
474
|
+
|
|
475
|
+
return (
|
|
476
|
+
<div
|
|
477
|
+
className={`border-l-4 shadow-md overflow-hidden bg-white dark:bg-gray-900 mb-5 ${messageTypeStyles}`}
|
|
478
|
+
data-workstream-id={workstreamId}
|
|
479
|
+
>
|
|
480
|
+
{/* Enhanced header with icon and timestamp */}
|
|
481
|
+
<div className="flex items-center justify-between px-4 py-2 border-b border-gray-100/80 dark:border-gray-800/80 bg-white/50 dark:bg-gray-900/50 backdrop-blur-sm">
|
|
482
|
+
<div className="flex items-center gap-2">
|
|
483
|
+
<div className={showPulsatingCircle ? "animate-fadeIn" : ""}>
|
|
484
|
+
{getMessageIcon()}
|
|
485
|
+
</div>
|
|
486
|
+
<span className="text-xs font-medium text-gray-700 ">{messageStyles.sender}</span>
|
|
487
|
+
|
|
488
|
+
{/* Show workstream badge next to sender for better organization */}
|
|
489
|
+
{workstreamId !== "main" && workstreamId !== "all" && (
|
|
490
|
+
<span className="bg-gray-100 dark:bg-gray-800 px-1.5 py-0.5 rounded-full text-[10px] font-mono text-muted dark:text-gray-400 border border-gray-200 dark:border-gray-700">
|
|
491
|
+
{workstreamId}
|
|
492
|
+
</span>
|
|
493
|
+
)}
|
|
494
|
+
</div>
|
|
495
|
+
|
|
496
|
+
<div className="flex items-center gap-2">
|
|
497
|
+
<span className="text-xs text-gray-400 dark:text-muted">
|
|
498
|
+
{dayjs(message.timestamp).format("HH:mm:ss")}
|
|
499
|
+
</span>
|
|
500
|
+
<Button
|
|
501
|
+
variant="ghost"
|
|
502
|
+
size="xs"
|
|
503
|
+
onClick={copyToClipboard}
|
|
504
|
+
className="text-gray-400 hover:text-muted dark:text-muted dark:hover:text-muted/30"
|
|
505
|
+
title="Copy message"
|
|
506
|
+
>
|
|
507
|
+
<CopyIcon className="h-3 w-3" />
|
|
508
|
+
</Button>
|
|
509
|
+
</div>
|
|
510
|
+
</div>
|
|
511
|
+
|
|
512
|
+
{/* Message content */}
|
|
513
|
+
<div className="px-4 py-3 bg-white dark:bg-gray-900">
|
|
514
|
+
{messageContent && (
|
|
515
|
+
<div className="message-content">
|
|
516
|
+
{isProcessingImages ? (
|
|
517
|
+
<div className="flex items-center gap-2 text-sm text-gray-500">
|
|
518
|
+
<AnimatedThinkingDots color="blue" />
|
|
519
|
+
<span>Loading images...</span>
|
|
520
|
+
</div>
|
|
521
|
+
) : (
|
|
522
|
+
renderContent(processedContent || messageContent)
|
|
523
|
+
)}
|
|
524
|
+
</div>
|
|
525
|
+
)}
|
|
526
|
+
|
|
527
|
+
{/* Optional details section */}
|
|
528
|
+
{message.details && (
|
|
529
|
+
<div className="mt-2">
|
|
530
|
+
<button
|
|
531
|
+
onClick={() => setShowDetails(!showDetails)}
|
|
532
|
+
className="text-xs text-muted hover:text-gray-700 dark:text-gray-400 dark:hover:text-muted/30 flex items-center"
|
|
533
|
+
>
|
|
534
|
+
{showDetails ? "Hide" : "Show"} details
|
|
535
|
+
<svg
|
|
536
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
537
|
+
className={`h-3 w-3 ml-1 transition-transform ${showDetails ? "rotate-180" : ""}`}
|
|
538
|
+
fill="none"
|
|
539
|
+
viewBox="0 0 24 24"
|
|
540
|
+
stroke="currentColor"
|
|
541
|
+
>
|
|
542
|
+
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M19 9l-7 7-7-7" />
|
|
543
|
+
</svg>
|
|
544
|
+
</button>
|
|
545
|
+
|
|
546
|
+
{showDetails && (
|
|
547
|
+
<div className="mt-2 p-2 bg-gray-50 dark:bg-gray-800 border border-gray-100 dark:border-gray-700 rounded text-sm">
|
|
548
|
+
{typeof message.details === "string" ? (
|
|
549
|
+
renderContent(message.details)
|
|
550
|
+
) : (
|
|
551
|
+
<pre className="text-xs font-mono whitespace-pre-wrap overflow-x-auto bg-gray-100 dark:bg-gray-800 p-2 rounded text-gray-700 ">
|
|
552
|
+
{JSON.stringify(message.details, null, 2)}
|
|
553
|
+
</pre>
|
|
554
|
+
)}
|
|
555
|
+
</div>
|
|
556
|
+
)}
|
|
557
|
+
</div>
|
|
558
|
+
)}
|
|
559
|
+
</div>
|
|
560
|
+
</div>
|
|
561
|
+
);
|
|
562
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { AgentMessage } from "@vertesia/common";
|
|
2
|
+
import React, { useEffect } from "react";
|
|
3
|
+
import StackedMessages from "./StackedMessages";
|
|
4
|
+
|
|
5
|
+
interface MessagesContainerProps {
|
|
6
|
+
messages: AgentMessage[];
|
|
7
|
+
isCompleted: boolean;
|
|
8
|
+
bottomRef: React.RefObject<HTMLDivElement>;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default function MessagesContainer({ messages, bottomRef }: MessagesContainerProps) {
|
|
12
|
+
const containerRef = React.useRef<HTMLDivElement | null>(null);
|
|
13
|
+
|
|
14
|
+
// Auto-scroll to bottom when messages change
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
if (bottomRef.current) {
|
|
17
|
+
bottomRef.current.scrollIntoView({ behavior: "smooth" });
|
|
18
|
+
}
|
|
19
|
+
}, [messages, bottomRef]);
|
|
20
|
+
|
|
21
|
+
// Sort all messages chronologically
|
|
22
|
+
const sortedMessages = React.useMemo(
|
|
23
|
+
() =>
|
|
24
|
+
[...messages].sort((a, b) => {
|
|
25
|
+
const timeA = typeof a.timestamp === "number" ? a.timestamp : new Date(a.timestamp).getTime();
|
|
26
|
+
const timeB = typeof b.timestamp === "number" ? b.timestamp : new Date(b.timestamp).getTime();
|
|
27
|
+
return timeA - timeB;
|
|
28
|
+
}),
|
|
29
|
+
[messages]
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<div
|
|
34
|
+
ref={containerRef}
|
|
35
|
+
className="flex-1 min-h-0 h-full overflow-y-auto py-4 px-4 sm:px-6 lg:px-8 bg-white flex flex-col"
|
|
36
|
+
data-testid="messages-container"
|
|
37
|
+
>
|
|
38
|
+
{sortedMessages.length === 0 ? (
|
|
39
|
+
<div className="flex items-center justify-center h-full text-center py-8">
|
|
40
|
+
<div className="flex items-center px-4 py-3 text-gray-500">
|
|
41
|
+
Waiting for agent response...
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
) : (
|
|
45
|
+
<div className="flex-1 flex flex-col justify-start h-full min-h-0">
|
|
46
|
+
<StackedMessages messages={sortedMessages} isCompleted={false} />
|
|
47
|
+
</div>
|
|
48
|
+
)}
|
|
49
|
+
</div>
|
|
50
|
+
);
|
|
51
|
+
}
|