@vertesia/ui 1.0.0-dev.20260227.112605Z → 1.0.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/SelectList.js +3 -1
- package/lib/esm/core/components/SelectList.js.map +1 -1
- package/lib/esm/core/components/SidePanel.js +2 -2
- package/lib/esm/core/components/SidePanel.js.map +1 -1
- package/lib/esm/core/components/index.js +0 -5
- package/lib/esm/core/components/index.js.map +1 -1
- package/lib/esm/core/components/shadcn/breadcrumb.js +11 -7
- package/lib/esm/core/components/shadcn/breadcrumb.js.map +1 -1
- package/lib/esm/core/components/shadcn/button.js +5 -3
- package/lib/esm/core/components/shadcn/button.js.map +1 -1
- package/lib/esm/core/components/shadcn/collaspible.js +14 -0
- package/lib/esm/core/components/shadcn/collaspible.js.map +1 -0
- package/lib/esm/core/components/shadcn/dropdown.js +61 -0
- package/lib/esm/core/components/shadcn/dropdown.js.map +1 -0
- package/lib/esm/core/components/shadcn/filters/comboBox/DateCombobox.js +3 -1
- package/lib/esm/core/components/shadcn/filters/comboBox/DateCombobox.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/comboBox/SelectCombobox.js +3 -1
- package/lib/esm/core/components/shadcn/filters/comboBox/SelectCombobox.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/comboBox/StringListCombobox.js +1 -1
- package/lib/esm/core/components/shadcn/filters/comboBox/StringListCombobox.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/filter/StringListFilter.js +1 -1
- package/lib/esm/core/components/shadcn/filters/filter/StringListFilter.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/filter/dateFilter.js +4 -2
- package/lib/esm/core/components/shadcn/filters/filter/dateFilter.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/filterBar.js +7 -4
- package/lib/esm/core/components/shadcn/filters/filterBar.js.map +1 -1
- package/lib/esm/core/components/shadcn/index.js +4 -0
- package/lib/esm/core/components/shadcn/index.js.map +1 -1
- package/lib/esm/core/components/shadcn/modal/ConfirmModal.js +4 -2
- package/lib/esm/core/components/shadcn/modal/ConfirmModal.js.map +1 -1
- package/lib/esm/core/components/shadcn/modal/DeleteModal.js +5 -3
- package/lib/esm/core/components/shadcn/modal/DeleteModal.js.map +1 -1
- package/lib/esm/core/components/shadcn/popover.js +11 -7
- package/lib/esm/core/components/shadcn/popover.js.map +1 -1
- package/lib/esm/core/components/shadcn/radioGroup.js +29 -0
- package/lib/esm/core/components/shadcn/radioGroup.js.map +1 -0
- package/lib/esm/core/components/shadcn/selectBox.js +1 -1
- package/lib/esm/core/components/shadcn/switch.js +19 -0
- package/lib/esm/core/components/shadcn/switch.js.map +1 -0
- package/lib/esm/core/components/shadcn/tabs.js +6 -6
- package/lib/esm/core/components/shadcn/tabs.js.map +1 -1
- package/lib/esm/core/components/shadcn/theme/ThemeSwitcher.js +8 -6
- package/lib/esm/core/components/shadcn/theme/ThemeSwitcher.js.map +1 -1
- package/lib/esm/core/components/shadcn/tooltip.js +1 -1
- package/lib/esm/core/components/shadcn/tooltip.js.map +1 -1
- package/lib/esm/core/components/toast/NotificationPanel.js +3 -3
- package/lib/esm/core/components/toast/NotificationPanel.js.map +1 -1
- package/lib/esm/env/index.js +11 -1
- package/lib/esm/env/index.js.map +1 -1
- package/lib/esm/features/agent/PayloadBuilder.js +87 -15
- package/lib/esm/features/agent/PayloadBuilder.js.map +1 -1
- package/lib/esm/features/agent/chat/AgentRightPanel.js +159 -0
- package/lib/esm/features/agent/chat/AgentRightPanel.js.map +1 -0
- package/lib/esm/features/agent/chat/ArtifactsTab.js +69 -0
- package/lib/esm/features/agent/chat/ArtifactsTab.js.map +1 -0
- package/lib/esm/features/agent/chat/AskUserWidget.js +12 -6
- package/lib/esm/features/agent/chat/AskUserWidget.js.map +1 -1
- package/lib/esm/features/agent/chat/DocumentPanel.js +6 -3
- package/lib/esm/features/agent/chat/DocumentPanel.js.map +1 -1
- package/lib/esm/features/agent/chat/ImageLightbox.js +3 -1
- package/lib/esm/features/agent/chat/ImageLightbox.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentConversation.js +243 -106
- package/lib/esm/features/agent/chat/ModernAgentConversation.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js +122 -52
- package/lib/esm/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/BatchProgressPanel.js +5 -3
- package/lib/esm/features/agent/chat/ModernAgentOutput/BatchProgressPanel.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/Header.js +57 -18
- package/lib/esm/features/agent/chat/ModernAgentOutput/Header.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.js +82 -83
- package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/MessageInput.js +16 -14
- package/lib/esm/features/agent/chat/ModernAgentOutput/MessageInput.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/MessageItem.js +20 -5
- package/lib/esm/features/agent/chat/ModernAgentOutput/MessageItem.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/PlanPanel.js +8 -6
- package/lib/esm/features/agent/chat/ModernAgentOutput/PlanPanel.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.js +12 -10
- package/lib/esm/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/StreamingMessage.js +5 -3
- package/lib/esm/features/agent/chat/ModernAgentOutput/StreamingMessage.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/ToolCallGroup.js +104 -13
- package/lib/esm/features/agent/chat/ModernAgentOutput/ToolCallGroup.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js +9 -5
- package/lib/esm/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/utils.js +160 -76
- package/lib/esm/features/agent/chat/ModernAgentOutput/utils.js.map +1 -1
- package/lib/esm/features/agent/chat/SlidingThinkingIndicator.js +3 -1
- package/lib/esm/features/agent/chat/SlidingThinkingIndicator.js.map +1 -1
- package/lib/esm/features/agent/chat/VegaLiteChart.js +14 -2
- package/lib/esm/features/agent/chat/VegaLiteChart.js.map +1 -1
- package/lib/esm/features/agent/chat/hooks/useAgentPlans.js +3 -8
- package/lib/esm/features/agent/chat/hooks/useAgentPlans.js.map +1 -1
- package/lib/esm/features/agent/chat/hooks/useAgentStream.js +75 -16
- package/lib/esm/features/agent/chat/hooks/useAgentStream.js.map +1 -1
- package/lib/esm/features/agent/chat/hooks/useArtifacts.js +108 -0
- package/lib/esm/features/agent/chat/hooks/useArtifacts.js.map +1 -0
- package/lib/esm/features/agent/chat/hooks/useDocumentPanel.js +56 -5
- package/lib/esm/features/agent/chat/hooks/useDocumentPanel.js.map +1 -1
- package/lib/esm/features/agent/chat/hooks/useFileProcessing.js +12 -10
- package/lib/esm/features/agent/chat/hooks/useFileProcessing.js.map +1 -1
- package/lib/esm/features/errors/PanelErrorBoundary.js +3 -1
- package/lib/esm/features/errors/PanelErrorBoundary.js.map +1 -1
- package/lib/esm/features/facets/AgentRunnerFacetsNav.js +45 -33
- package/lib/esm/features/facets/AgentRunnerFacetsNav.js.map +1 -1
- package/lib/esm/features/facets/RunsFacetsNav.js +1 -1
- package/lib/esm/features/facets/RunsFacetsNav.js.map +1 -1
- package/lib/esm/features/facets/index.js +1 -1
- package/lib/esm/features/facets/index.js.map +1 -1
- package/lib/esm/features/layout/GenericPageNavHeader.js +40 -28
- package/lib/esm/features/layout/GenericPageNavHeader.js.map +1 -1
- package/lib/esm/features/layout/NotFoundView.js +3 -1
- package/lib/esm/features/layout/NotFoundView.js.map +1 -1
- package/lib/esm/features/magic-pdf/AnnotatedImageSlider.js +9 -5
- package/lib/esm/features/magic-pdf/AnnotatedImageSlider.js.map +1 -1
- package/lib/esm/features/magic-pdf/DownloadPopover.js +5 -4
- package/lib/esm/features/magic-pdf/DownloadPopover.js.map +1 -1
- package/lib/esm/features/magic-pdf/MagicPdfView.js +8 -5
- package/lib/esm/features/magic-pdf/MagicPdfView.js.map +1 -1
- package/lib/esm/features/pdf-viewer/PdfPageSlider.js +9 -5
- package/lib/esm/features/pdf-viewer/PdfPageSlider.js.map +1 -1
- package/lib/esm/features/pdf-viewer/SimplePdfViewer.js +5 -3
- package/lib/esm/features/pdf-viewer/SimplePdfViewer.js.map +1 -1
- package/lib/esm/features/permissions/UserPermissionsProvider.js +3 -1
- package/lib/esm/features/permissions/UserPermissionsProvider.js.map +1 -1
- package/lib/esm/features/store/collections/BrowseCollectionView.js +9 -1
- package/lib/esm/features/store/collections/BrowseCollectionView.js.map +1 -1
- package/lib/esm/features/store/collections/CollectionsTable.js +14 -7
- package/lib/esm/features/store/collections/CollectionsTable.js.map +1 -1
- package/lib/esm/features/store/collections/CreateCollection.js +21 -18
- package/lib/esm/features/store/collections/CreateCollection.js.map +1 -1
- package/lib/esm/features/store/collections/EditCollectionView.js +23 -19
- package/lib/esm/features/store/collections/EditCollectionView.js.map +1 -1
- package/lib/esm/features/store/collections/SelectCollection.js +25 -10
- package/lib/esm/features/store/collections/SelectCollection.js.map +1 -1
- package/lib/esm/features/store/collections/SharedPropsEditor.js +5 -3
- package/lib/esm/features/store/collections/SharedPropsEditor.js.map +1 -1
- package/lib/esm/features/store/collections/SyncMemberHeadsToggle.js +5 -3
- package/lib/esm/features/store/collections/SyncMemberHeadsToggle.js.map +1 -1
- package/lib/esm/features/store/objects/DocumentPreviewPanel.js +14 -12
- package/lib/esm/features/store/objects/DocumentPreviewPanel.js.map +1 -1
- package/lib/esm/features/store/objects/DocumentSearchResults.js +15 -5
- package/lib/esm/features/store/objects/DocumentSearchResults.js.map +1 -1
- package/lib/esm/features/store/objects/DocumentTable.js +10 -7
- package/lib/esm/features/store/objects/DocumentTable.js.map +1 -1
- package/lib/esm/features/store/objects/ExportPropertiesModal.js +5 -2
- package/lib/esm/features/store/objects/ExportPropertiesModal.js.map +1 -1
- package/lib/esm/features/store/objects/components/ContentDispositionButton.js +3 -1
- package/lib/esm/features/store/objects/components/ContentDispositionButton.js.map +1 -1
- package/lib/esm/features/store/objects/components/ContentOverview.js +55 -40
- package/lib/esm/features/store/objects/components/ContentOverview.js.map +1 -1
- package/lib/esm/features/store/objects/components/DocumentIcon.js +4 -3
- package/lib/esm/features/store/objects/components/DocumentIcon.js.map +1 -1
- package/lib/esm/features/store/objects/components/PropertiesEditorModal.js +13 -11
- package/lib/esm/features/store/objects/components/PropertiesEditorModal.js.map +1 -1
- package/lib/esm/features/store/objects/components/SaveVersionConfirmModal.js +15 -18
- package/lib/esm/features/store/objects/components/SaveVersionConfirmModal.js.map +1 -1
- package/lib/esm/features/store/objects/components/SelectDocument.js +9 -6
- package/lib/esm/features/store/objects/components/SelectDocument.js.map +1 -1
- package/lib/esm/features/store/objects/components/TextEditorPanel.js +97 -0
- package/lib/esm/features/store/objects/components/TextEditorPanel.js.map +1 -0
- package/lib/esm/features/store/objects/components/VectorSearchWidget.js +3 -1
- package/lib/esm/features/store/objects/components/VectorSearchWidget.js.map +1 -1
- package/lib/esm/features/store/objects/components/useContentPanelHooks.js +4 -2
- package/lib/esm/features/store/objects/components/useContentPanelHooks.js.map +1 -1
- package/lib/esm/features/store/objects/components/useDownloadFile.js +12 -10
- package/lib/esm/features/store/objects/components/useDownloadFile.js.map +1 -1
- package/lib/esm/features/store/objects/layout/documentLayout.js +10 -6
- package/lib/esm/features/store/objects/layout/documentLayout.js.map +1 -1
- package/lib/esm/features/store/objects/layout/renderers.js +10 -1
- package/lib/esm/features/store/objects/layout/renderers.js.map +1 -1
- package/lib/esm/features/store/objects/search/DocumentSearchContext.js +3 -2
- package/lib/esm/features/store/objects/search/DocumentSearchContext.js.map +1 -1
- package/lib/esm/features/store/objects/search/DocumentSearchProvider.js +3 -0
- package/lib/esm/features/store/objects/search/DocumentSearchProvider.js.map +1 -1
- package/lib/esm/features/store/objects/selection/ObjectsActionContext.js +22 -109
- package/lib/esm/features/store/objects/selection/ObjectsActionContext.js.map +1 -1
- package/lib/esm/features/store/objects/selection/ObjectsActionContextClass.js +50 -0
- package/lib/esm/features/store/objects/selection/ObjectsActionContextClass.js.map +1 -0
- package/lib/esm/features/store/objects/selection/ObjectsActionHooks.js +27 -0
- package/lib/esm/features/store/objects/selection/ObjectsActionHooks.js.map +1 -0
- package/lib/esm/features/store/objects/selection/SelectionActions.js +10 -6
- package/lib/esm/features/store/objects/selection/SelectionActions.js.map +1 -1
- package/lib/esm/features/store/objects/selection/actions/AddToCollectionAction.js +17 -12
- package/lib/esm/features/store/objects/selection/actions/AddToCollectionAction.js.map +1 -1
- package/lib/esm/features/store/objects/selection/actions/ChangeTypeAction.js +9 -5
- package/lib/esm/features/store/objects/selection/actions/ChangeTypeAction.js.map +1 -1
- package/lib/esm/features/store/objects/selection/actions/ConfirmAction.js +4 -2
- package/lib/esm/features/store/objects/selection/actions/ConfirmAction.js.map +1 -1
- package/lib/esm/features/store/objects/selection/actions/DeleteObjectsAction.js +24 -23
- package/lib/esm/features/store/objects/selection/actions/DeleteObjectsAction.js.map +1 -1
- package/lib/esm/features/store/objects/selection/actions/ExportPropertiesAction.js +10 -5
- package/lib/esm/features/store/objects/selection/actions/ExportPropertiesAction.js.map +1 -1
- package/lib/esm/features/store/objects/selection/actions/RemoveFromCollectionAction.js +13 -9
- package/lib/esm/features/store/objects/selection/actions/RemoveFromCollectionAction.js.map +1 -1
- package/lib/esm/features/store/objects/selection/actions/StartWorkflowComponent.js +14 -8
- package/lib/esm/features/store/objects/selection/actions/StartWorkflowComponent.js.map +1 -1
- package/lib/esm/features/store/objects/upload/DocumentUploadModal.js +42 -39
- package/lib/esm/features/store/objects/upload/DocumentUploadModal.js.map +1 -1
- package/lib/esm/features/store/objects/upload/useSmartFileUploadProcessing.js +4 -2
- package/lib/esm/features/store/objects/upload/useSmartFileUploadProcessing.js.map +1 -1
- package/lib/esm/features/store/objects/upload/useUploadHandler.js +9 -7
- package/lib/esm/features/store/objects/upload/useUploadHandler.js.map +1 -1
- package/lib/esm/features/store/types/ContentObjectTypesSearch.js +6 -4
- package/lib/esm/features/store/types/ContentObjectTypesSearch.js.map +1 -1
- package/lib/esm/features/store/types/ContentObjectTypesTable.js +3 -1
- package/lib/esm/features/store/types/ContentObjectTypesTable.js.map +1 -1
- package/lib/esm/features/store/types/CreateOrUpdateTypeModal.js +6 -7
- package/lib/esm/features/store/types/CreateOrUpdateTypeModal.js.map +1 -1
- package/lib/esm/features/store/types/ObjectSchemaEditor.js +9 -7
- package/lib/esm/features/store/types/ObjectSchemaEditor.js.map +1 -1
- package/lib/esm/features/store/types/SelectContentType.js +9 -7
- package/lib/esm/features/store/types/SelectContentType.js.map +1 -1
- package/lib/esm/features/store/types/SelectContentTypeModal.js +5 -2
- package/lib/esm/features/store/types/SelectContentTypeModal.js.map +1 -1
- package/lib/esm/features/store/types/TableLayoutEditor.js +6 -4
- package/lib/esm/features/store/types/TableLayoutEditor.js.map +1 -1
- package/lib/esm/features/user/UserInfo.js +40 -50
- package/lib/esm/features/user/UserInfo.js.map +1 -1
- package/lib/esm/i18n/index.js +31 -0
- package/lib/esm/i18n/index.js.map +1 -0
- package/lib/esm/i18n/instance.js +46 -0
- package/lib/esm/i18n/instance.js.map +1 -0
- package/lib/esm/i18n/locales/ar.json +694 -0
- package/lib/esm/i18n/locales/de.json +662 -0
- package/lib/esm/i18n/locales/en.json +663 -0
- package/lib/esm/i18n/locales/es.json +668 -0
- package/lib/esm/i18n/locales/fr.json +670 -0
- package/lib/esm/i18n/locales/it.json +668 -0
- package/lib/esm/i18n/locales/ja.json +662 -0
- package/lib/esm/i18n/locales/ko.json +662 -0
- package/lib/esm/i18n/locales/pt.json +668 -0
- package/lib/esm/i18n/locales/ru.json +678 -0
- package/lib/esm/i18n/locales/tr.json +662 -0
- package/lib/esm/i18n/locales/zh-TW.json +662 -0
- package/lib/esm/i18n/locales/zh.json +662 -0
- package/lib/esm/layout/FullHeightLayout.js +3 -0
- package/lib/esm/layout/FullHeightLayout.js.map +1 -1
- package/lib/esm/layout/Navbar.js +3 -1
- package/lib/esm/layout/Navbar.js.map +1 -1
- package/lib/esm/layout/RegionTag.js +15 -0
- package/lib/esm/layout/RegionTag.js.map +1 -0
- package/lib/esm/layout/Sidebar.js +2 -2
- package/lib/esm/layout/Sidebar.js.map +1 -1
- package/lib/esm/layout/index.js +1 -0
- package/lib/esm/layout/index.js.map +1 -1
- package/lib/esm/router/HistoryNavigator.js +1 -1
- package/lib/esm/router/HistoryNavigator.js.map +1 -1
- package/lib/esm/router/Nav.js +5 -3
- package/lib/esm/router/Nav.js.map +1 -1
- package/lib/esm/router/NestedNavigationContext.js +4 -0
- package/lib/esm/router/NestedNavigationContext.js.map +1 -1
- package/lib/esm/router/NestedRouterProvider.js +3 -1
- package/lib/esm/router/NestedRouterProvider.js.map +1 -1
- package/lib/esm/router/Router.js +21 -6
- package/lib/esm/router/Router.js.map +1 -1
- package/lib/esm/session/UserSession.js +31 -0
- package/lib/esm/session/UserSession.js.map +1 -1
- package/lib/esm/session/UserSessionProvider.js +4 -0
- package/lib/esm/session/UserSessionProvider.js.map +1 -1
- package/lib/esm/session/auth/composable.js +1 -1
- package/lib/esm/session/auth/composable.js.map +1 -1
- package/lib/esm/session/auth/firebase.js +1 -1
- package/lib/esm/session/auth/firebase.js.map +1 -1
- package/lib/esm/session/auth/useCurrentTenant.js +3 -1
- package/lib/esm/session/auth/useCurrentTenant.js.map +1 -1
- package/lib/esm/shell/SplashScreen.js +3 -7
- package/lib/esm/shell/SplashScreen.js.map +1 -1
- package/lib/esm/shell/apps/StandaloneApp.js +5 -2
- package/lib/esm/shell/apps/StandaloneApp.js.map +1 -1
- package/lib/esm/shell/login/EnterpriseSigninButton.js +5 -3
- package/lib/esm/shell/login/EnterpriseSigninButton.js.map +1 -1
- package/lib/esm/shell/login/GitHubSignInButton.js +3 -7
- package/lib/esm/shell/login/GitHubSignInButton.js.map +1 -1
- package/lib/esm/shell/login/GoogleSignInButton.js +3 -1
- package/lib/esm/shell/login/GoogleSignInButton.js.map +1 -1
- package/lib/esm/shell/login/InviteAcceptModal.js +5 -2
- package/lib/esm/shell/login/InviteAcceptModal.js.map +1 -1
- package/lib/esm/shell/login/MicrosoftSigninButton.js +4 -6
- package/lib/esm/shell/login/MicrosoftSigninButton.js.map +1 -1
- package/lib/esm/shell/login/SigninScreen.js +6 -2
- package/lib/esm/shell/login/SigninScreen.js.map +1 -1
- package/lib/esm/shell/login/SignupForm.js +36 -34
- package/lib/esm/shell/login/SignupForm.js.map +1 -1
- package/lib/esm/shell/login/TerminalLogin.js +29 -22
- package/lib/esm/shell/login/TerminalLogin.js.map +1 -1
- package/lib/esm/shell/login/UserInfo.js +6 -4
- package/lib/esm/shell/login/UserInfo.js.map +1 -1
- package/lib/esm/shell/login/UserSessionMenu.js +3 -4
- package/lib/esm/shell/login/UserSessionMenu.js.map +1 -1
- package/lib/esm/widgets/index.js +0 -1
- package/lib/esm/widgets/index.js.map +1 -1
- package/lib/esm/widgets/json-view/JSONCode.js +1 -1
- package/lib/esm/widgets/json-view/JSONCode.js.map +1 -1
- package/lib/esm/widgets/json-view/JSONDisplay.js +6 -2
- package/lib/esm/widgets/json-view/JSONDisplay.js.map +1 -1
- package/lib/esm/widgets/json-view/JSONSwitcher.js +6 -0
- package/lib/esm/widgets/json-view/JSONSwitcher.js.map +1 -0
- package/lib/esm/widgets/json-view/JSONView.js +1 -1
- package/lib/esm/widgets/json-view/JSONView.js.map +1 -1
- package/lib/esm/widgets/json-view/index.js +1 -0
- package/lib/esm/widgets/json-view/index.js.map +1 -1
- package/lib/esm/widgets/markdown/ArtifactContentRenderer.js +6 -5
- package/lib/esm/widgets/markdown/ArtifactContentRenderer.js.map +1 -1
- package/lib/esm/widgets/markdown/CodeBlockContext.js +11 -0
- package/lib/esm/widgets/markdown/CodeBlockContext.js.map +1 -0
- package/lib/esm/widgets/markdown/MarkdownRenderer.js +11 -10
- package/lib/esm/widgets/markdown/MarkdownRenderer.js.map +1 -1
- package/lib/esm/widgets/markdown/codeBlockHandlers.js +11 -12
- package/lib/esm/widgets/markdown/codeBlockHandlers.js.map +1 -1
- package/lib/esm/widgets/markdown/index.js +10 -9
- package/lib/esm/widgets/markdown/index.js.map +1 -1
- package/lib/esm/widgets/markdown/remarkDirectiveHandler.js +0 -1
- package/lib/esm/widgets/markdown/remarkDirectiveHandler.js.map +1 -1
- package/lib/esm/widgets/schema-editor/ManagedSchema.js +6 -5
- package/lib/esm/widgets/schema-editor/ManagedSchema.js.map +1 -1
- package/lib/esm/widgets/schema-editor/editor/PropertyEditor.js +7 -3
- package/lib/esm/widgets/schema-editor/editor/PropertyEditor.js.map +1 -1
- package/lib/esm/widgets/schema-editor/editor/SchemaEditor.js +3 -1
- package/lib/esm/widgets/schema-editor/editor/SchemaEditor.js.map +1 -1
- package/lib/esm/widgets/upload/DropZone.js +9 -11
- package/lib/esm/widgets/upload/DropZone.js.map +1 -1
- package/lib/esm/widgets/upload/UploadResultCategory.js +3 -1
- package/lib/esm/widgets/upload/UploadResultCategory.js.map +1 -1
- package/lib/esm/widgets/upload/UploadSummary.js +3 -1
- package/lib/esm/widgets/upload/UploadSummary.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/core/components/SelectList.d.ts.map +1 -1
- package/lib/types/core/components/SidePanel.d.ts +4 -2
- package/lib/types/core/components/SidePanel.d.ts.map +1 -1
- package/lib/types/core/components/index.d.ts +0 -5
- package/lib/types/core/components/index.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/badge.d.ts +2 -2
- package/lib/types/core/components/shadcn/breadcrumb.d.ts +1 -1
- package/lib/types/core/components/shadcn/breadcrumb.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/button.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/collaspible.d.ts +6 -0
- package/lib/types/core/components/shadcn/collaspible.d.ts.map +1 -0
- package/lib/types/core/components/shadcn/dropdown.d.ts +44 -0
- package/lib/types/core/components/shadcn/dropdown.d.ts.map +1 -0
- package/lib/types/core/components/shadcn/filters/comboBox/DateCombobox.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/filters/comboBox/SelectCombobox.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/filters/filter/dateFilter.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/filters/filterBar.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/index.d.ts +4 -0
- package/lib/types/core/components/shadcn/index.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/input.d.ts +1 -1
- package/lib/types/core/components/shadcn/modal/ConfirmModal.d.ts +2 -1
- package/lib/types/core/components/shadcn/modal/ConfirmModal.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/modal/DeleteModal.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/popover.d.ts +11 -3
- package/lib/types/core/components/shadcn/popover.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/radioGroup.d.ts +26 -0
- package/lib/types/core/components/shadcn/radioGroup.d.ts.map +1 -0
- package/lib/types/core/components/shadcn/switch.d.ts +12 -0
- package/lib/types/core/components/shadcn/switch.d.ts.map +1 -0
- package/lib/types/core/components/shadcn/tabs.d.ts +4 -2
- package/lib/types/core/components/shadcn/tabs.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/theme/ThemeSwitcher.d.ts +8 -2
- package/lib/types/core/components/shadcn/theme/ThemeSwitcher.d.ts.map +1 -1
- package/lib/types/core/components/toast/NotificationPanel.d.ts.map +1 -1
- package/lib/types/env/index.d.ts +8 -1
- package/lib/types/env/index.d.ts.map +1 -1
- package/lib/types/features/agent/PayloadBuilder.d.ts +31 -3
- package/lib/types/features/agent/PayloadBuilder.d.ts.map +1 -1
- package/lib/types/features/agent/chat/AgentRightPanel.d.ts +50 -0
- package/lib/types/features/agent/chat/AgentRightPanel.d.ts.map +1 -0
- package/lib/types/features/agent/chat/ArtifactsTab.d.ts +9 -0
- package/lib/types/features/agent/chat/ArtifactsTab.d.ts.map +1 -0
- package/lib/types/features/agent/chat/AskUserWidget.d.ts.map +1 -1
- package/lib/types/features/agent/chat/DocumentPanel.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ImageLightbox.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentConversation.d.ts +22 -9
- package/lib/types/features/agent/chat/ModernAgentConversation.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts +3 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/BatchProgressPanel.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/Header.d.ts +12 -3
- package/lib/types/features/agent/chat/ModernAgentOutput/Header.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.d.ts +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/MessageInput.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/MessageItem.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/PlanPanel.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/StreamingMessage.d.ts +3 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/StreamingMessage.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/ToolCallGroup.d.ts +5 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/ToolCallGroup.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/WorkstreamTabs.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/utils.d.ts +16 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/utils.d.ts.map +1 -1
- package/lib/types/features/agent/chat/SlidingThinkingIndicator.d.ts.map +1 -1
- package/lib/types/features/agent/chat/VegaLiteChart.d.ts.map +1 -1
- package/lib/types/features/agent/chat/hooks/useAgentPlans.d.ts.map +1 -1
- package/lib/types/features/agent/chat/hooks/useAgentStream.d.ts +3 -3
- package/lib/types/features/agent/chat/hooks/useAgentStream.d.ts.map +1 -1
- package/lib/types/features/agent/chat/hooks/useArtifacts.d.ts +18 -0
- package/lib/types/features/agent/chat/hooks/useArtifacts.d.ts.map +1 -0
- package/lib/types/features/agent/chat/hooks/useDocumentPanel.d.ts.map +1 -1
- package/lib/types/features/agent/chat/hooks/useFileProcessing.d.ts +4 -4
- package/lib/types/features/agent/chat/hooks/useFileProcessing.d.ts.map +1 -1
- package/lib/types/features/agent/chat/types/document.d.ts +2 -0
- package/lib/types/features/agent/chat/types/document.d.ts.map +1 -1
- package/lib/types/features/errors/PanelErrorBoundary.d.ts.map +1 -1
- package/lib/types/features/facets/AgentRunnerFacetsNav.d.ts +2 -1
- package/lib/types/features/facets/AgentRunnerFacetsNav.d.ts.map +1 -1
- package/lib/types/features/facets/index.d.ts +1 -1
- package/lib/types/features/facets/index.d.ts.map +1 -1
- package/lib/types/features/layout/GenericPageNavHeader.d.ts +2 -2
- package/lib/types/features/layout/GenericPageNavHeader.d.ts.map +1 -1
- package/lib/types/features/layout/NotFoundView.d.ts.map +1 -1
- package/lib/types/features/magic-pdf/AnnotatedImageSlider.d.ts.map +1 -1
- package/lib/types/features/magic-pdf/DownloadPopover.d.ts.map +1 -1
- package/lib/types/features/magic-pdf/MagicPdfView.d.ts.map +1 -1
- package/lib/types/features/pdf-viewer/PdfPageSlider.d.ts.map +1 -1
- package/lib/types/features/pdf-viewer/SimplePdfViewer.d.ts.map +1 -1
- package/lib/types/features/permissions/UserPermissionsProvider.d.ts.map +1 -1
- package/lib/types/features/store/collections/BrowseCollectionView.d.ts.map +1 -1
- package/lib/types/features/store/collections/CollectionsTable.d.ts +4 -0
- package/lib/types/features/store/collections/CollectionsTable.d.ts.map +1 -1
- package/lib/types/features/store/collections/CreateCollection.d.ts.map +1 -1
- package/lib/types/features/store/collections/EditCollectionView.d.ts.map +1 -1
- package/lib/types/features/store/collections/SelectCollection.d.ts.map +1 -1
- package/lib/types/features/store/collections/SharedPropsEditor.d.ts.map +1 -1
- package/lib/types/features/store/collections/SyncMemberHeadsToggle.d.ts.map +1 -1
- package/lib/types/features/store/objects/DocumentPreviewPanel.d.ts.map +1 -1
- package/lib/types/features/store/objects/DocumentSearchResults.d.ts.map +1 -1
- package/lib/types/features/store/objects/DocumentTable.d.ts.map +1 -1
- package/lib/types/features/store/objects/ExportPropertiesModal.d.ts.map +1 -1
- package/lib/types/features/store/objects/components/ContentDispositionButton.d.ts.map +1 -1
- package/lib/types/features/store/objects/components/ContentOverview.d.ts.map +1 -1
- package/lib/types/features/store/objects/components/DocumentIcon.d.ts +2 -1
- package/lib/types/features/store/objects/components/DocumentIcon.d.ts.map +1 -1
- package/lib/types/features/store/objects/components/PropertiesEditorModal.d.ts.map +1 -1
- package/lib/types/features/store/objects/components/SaveVersionConfirmModal.d.ts.map +1 -1
- package/lib/types/features/store/objects/components/SelectDocument.d.ts +3 -1
- package/lib/types/features/store/objects/components/SelectDocument.d.ts.map +1 -1
- package/lib/types/features/store/objects/components/TextEditorPanel.d.ts +10 -0
- package/lib/types/features/store/objects/components/TextEditorPanel.d.ts.map +1 -0
- package/lib/types/features/store/objects/components/VectorSearchWidget.d.ts.map +1 -1
- package/lib/types/features/store/objects/components/useContentPanelHooks.d.ts.map +1 -1
- package/lib/types/features/store/objects/components/useDownloadFile.d.ts.map +1 -1
- package/lib/types/features/store/objects/layout/documentLayout.d.ts +3 -2
- package/lib/types/features/store/objects/layout/documentLayout.d.ts.map +1 -1
- package/lib/types/features/store/objects/layout/renderers.d.ts.map +1 -1
- package/lib/types/features/store/objects/search/DocumentSearchContext.d.ts.map +1 -1
- package/lib/types/features/store/objects/search/DocumentSearchProvider.d.ts.map +1 -1
- package/lib/types/features/store/objects/selection/ObjectsActionContext.d.ts +3 -20
- package/lib/types/features/store/objects/selection/ObjectsActionContext.d.ts.map +1 -1
- package/lib/types/features/store/objects/selection/ObjectsActionContextClass.d.ts +16 -0
- package/lib/types/features/store/objects/selection/ObjectsActionContextClass.d.ts.map +1 -0
- package/lib/types/features/store/objects/selection/ObjectsActionHooks.d.ts +7 -0
- package/lib/types/features/store/objects/selection/ObjectsActionHooks.d.ts.map +1 -0
- package/lib/types/features/store/objects/selection/ObjectsActionSpec.d.ts +4 -1
- package/lib/types/features/store/objects/selection/ObjectsActionSpec.d.ts.map +1 -1
- package/lib/types/features/store/objects/selection/SelectionActions.d.ts +6 -1
- package/lib/types/features/store/objects/selection/SelectionActions.d.ts.map +1 -1
- package/lib/types/features/store/objects/selection/actions/AddToCollectionAction.d.ts.map +1 -1
- package/lib/types/features/store/objects/selection/actions/ChangeTypeAction.d.ts.map +1 -1
- package/lib/types/features/store/objects/selection/actions/ConfirmAction.d.ts +1 -1
- package/lib/types/features/store/objects/selection/actions/ConfirmAction.d.ts.map +1 -1
- package/lib/types/features/store/objects/selection/actions/DeleteObjectsAction.d.ts.map +1 -1
- package/lib/types/features/store/objects/selection/actions/ExportPropertiesAction.d.ts.map +1 -1
- package/lib/types/features/store/objects/selection/actions/RemoveFromCollectionAction.d.ts.map +1 -1
- package/lib/types/features/store/objects/selection/actions/StartWorkflowComponent.d.ts.map +1 -1
- package/lib/types/features/store/objects/upload/DocumentUploadModal.d.ts.map +1 -1
- package/lib/types/features/store/objects/upload/useSmartFileUploadProcessing.d.ts.map +1 -1
- package/lib/types/features/store/objects/upload/useUploadHandler.d.ts.map +1 -1
- package/lib/types/features/store/types/ContentObjectTypesSearch.d.ts.map +1 -1
- package/lib/types/features/store/types/ContentObjectTypesTable.d.ts.map +1 -1
- package/lib/types/features/store/types/CreateOrUpdateTypeModal.d.ts +2 -1
- package/lib/types/features/store/types/CreateOrUpdateTypeModal.d.ts.map +1 -1
- package/lib/types/features/store/types/ObjectSchemaEditor.d.ts.map +1 -1
- package/lib/types/features/store/types/SelectContentType.d.ts.map +1 -1
- package/lib/types/features/store/types/SelectContentTypeModal.d.ts.map +1 -1
- package/lib/types/features/store/types/TableLayoutEditor.d.ts.map +1 -1
- package/lib/types/features/user/UserInfo.d.ts +2 -2
- package/lib/types/features/user/UserInfo.d.ts.map +1 -1
- package/lib/types/i18n/index.d.ts +14 -0
- package/lib/types/i18n/index.d.ts.map +1 -0
- package/lib/types/i18n/instance.d.ts +5 -0
- package/lib/types/i18n/instance.d.ts.map +1 -0
- package/lib/types/layout/FullHeightLayout.d.ts +3 -0
- package/lib/types/layout/FullHeightLayout.d.ts.map +1 -1
- package/lib/types/layout/Navbar.d.ts.map +1 -1
- package/lib/types/layout/RegionTag.d.ts +4 -0
- package/lib/types/layout/RegionTag.d.ts.map +1 -0
- package/lib/types/layout/Sidebar.d.ts +2 -1
- package/lib/types/layout/Sidebar.d.ts.map +1 -1
- package/lib/types/layout/index.d.ts +1 -0
- package/lib/types/layout/index.d.ts.map +1 -1
- package/lib/types/router/Nav.d.ts +5 -1
- package/lib/types/router/Nav.d.ts.map +1 -1
- package/lib/types/router/NestedNavigationContext.d.ts.map +1 -1
- package/lib/types/router/NestedRouterProvider.d.ts.map +1 -1
- package/lib/types/router/Router.d.ts +2 -0
- package/lib/types/router/Router.d.ts.map +1 -1
- package/lib/types/session/UserSession.d.ts +1 -0
- package/lib/types/session/UserSession.d.ts.map +1 -1
- package/lib/types/session/UserSessionProvider.d.ts.map +1 -1
- package/lib/types/session/auth/useCurrentTenant.d.ts.map +1 -1
- package/lib/types/shell/SplashScreen.d.ts.map +1 -1
- package/lib/types/shell/apps/StandaloneApp.d.ts.map +1 -1
- package/lib/types/shell/login/EnterpriseSigninButton.d.ts.map +1 -1
- package/lib/types/shell/login/GitHubSignInButton.d.ts.map +1 -1
- package/lib/types/shell/login/GoogleSignInButton.d.ts.map +1 -1
- package/lib/types/shell/login/InviteAcceptModal.d.ts.map +1 -1
- package/lib/types/shell/login/MicrosoftSigninButton.d.ts +1 -1
- package/lib/types/shell/login/MicrosoftSigninButton.d.ts.map +1 -1
- package/lib/types/shell/login/SigninScreen.d.ts.map +1 -1
- package/lib/types/shell/login/SignupForm.d.ts.map +1 -1
- package/lib/types/shell/login/TerminalLogin.d.ts.map +1 -1
- package/lib/types/shell/login/UserInfo.d.ts.map +1 -1
- package/lib/types/shell/login/UserSessionMenu.d.ts.map +1 -1
- package/lib/types/widgets/index.d.ts +0 -1
- package/lib/types/widgets/index.d.ts.map +1 -1
- package/lib/types/widgets/json-view/JSONDisplay.d.ts.map +1 -1
- package/lib/types/widgets/json-view/JSONSwitcher.d.ts +6 -0
- package/lib/types/widgets/json-view/JSONSwitcher.d.ts.map +1 -0
- package/lib/types/widgets/json-view/index.d.ts +1 -0
- package/lib/types/widgets/json-view/index.d.ts.map +1 -1
- package/lib/types/widgets/markdown/ArtifactContentRenderer.d.ts.map +1 -1
- package/lib/types/widgets/markdown/CodeBlockContext.d.ts +21 -0
- package/lib/types/widgets/markdown/CodeBlockContext.d.ts.map +1 -0
- package/lib/types/widgets/markdown/MarkdownRenderer.d.ts.map +1 -1
- package/lib/types/widgets/markdown/codeBlockHandlers.d.ts +0 -12
- package/lib/types/widgets/markdown/codeBlockHandlers.d.ts.map +1 -1
- package/lib/types/widgets/markdown/index.d.ts +10 -9
- package/lib/types/widgets/markdown/index.d.ts.map +1 -1
- package/lib/types/widgets/schema-editor/ManagedSchema.d.ts +1 -1
- package/lib/types/widgets/schema-editor/ManagedSchema.d.ts.map +1 -1
- package/lib/types/widgets/schema-editor/editor/PropertyEditor.d.ts.map +1 -1
- package/lib/types/widgets/schema-editor/editor/SchemaEditor.d.ts.map +1 -1
- package/lib/types/widgets/upload/DropZone.d.ts.map +1 -1
- package/lib/types/widgets/upload/UploadResultCategory.d.ts.map +1 -1
- package/lib/types/widgets/upload/UploadSummary.d.ts.map +1 -1
- package/lib/vertesia-ui-core.js +1 -1
- package/lib/vertesia-ui-core.js.map +1 -1
- package/lib/vertesia-ui-env.js +1 -1
- package/lib/vertesia-ui-env.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-i18n.js +2 -0
- package/lib/vertesia-ui-i18n.js.map +1 -0
- package/lib/vertesia-ui-layout.js +1 -1
- package/lib/vertesia-ui-layout.js.map +1 -1
- package/lib/vertesia-ui-router.js +1 -1
- package/lib/vertesia-ui-router.js.map +1 -1
- package/lib/vertesia-ui-session.js +1 -1
- package/lib/vertesia-ui-session.js.map +1 -1
- package/lib/vertesia-ui-shell.js +1 -1
- package/lib/vertesia-ui-shell.js.map +1 -1
- package/lib/vertesia-ui-widgets.js +1 -1
- package/lib/vertesia-ui-widgets.js.map +1 -1
- package/llms.txt +124 -4
- package/package.json +50 -22
- package/src/core/components/SelectList.tsx +3 -1
- package/src/core/components/SidePanel.tsx +5 -4
- package/src/core/components/index.ts +0 -5
- package/src/core/components/shadcn/breadcrumb.tsx +16 -9
- package/src/core/components/shadcn/button.tsx +5 -3
- package/src/core/components/shadcn/collaspible.tsx +33 -0
- package/src/core/components/shadcn/dropdown.tsx +309 -0
- package/src/core/components/shadcn/filters/comboBox/DateCombobox.tsx +3 -1
- package/src/core/components/shadcn/filters/comboBox/SelectCombobox.tsx +3 -1
- package/src/core/components/shadcn/filters/comboBox/StringListCombobox.tsx +1 -1
- package/src/core/components/shadcn/filters/filter/StringListFilter.tsx +1 -1
- package/src/core/components/shadcn/filters/filter/dateFilter.tsx +5 -3
- package/src/core/components/shadcn/filters/filterBar.tsx +8 -5
- package/src/core/components/shadcn/index.ts +5 -1
- package/src/core/components/shadcn/modal/ConfirmModal.tsx +7 -3
- package/src/core/components/shadcn/modal/DeleteModal.tsx +5 -3
- package/src/core/components/shadcn/popover.tsx +12 -7
- package/src/core/components/shadcn/radioGroup.tsx +100 -0
- package/src/core/components/shadcn/selectBox.tsx +1 -1
- package/src/core/components/shadcn/switch.tsx +60 -0
- package/src/core/components/shadcn/tabs.tsx +29 -27
- package/src/core/components/shadcn/theme/ThemeSwitcher.tsx +19 -10
- package/src/core/components/shadcn/tooltip.tsx +1 -1
- package/src/core/components/toast/NotificationPanel.tsx +38 -44
- package/src/css/base.css +31 -0
- package/src/css/color.css +136 -0
- package/src/css/custom-tooltips.css +64 -0
- package/src/css/index.css +27 -0
- package/src/css/theme.css +86 -0
- package/src/css/typography.css +88 -0
- package/src/css/utilities.css +72 -0
- package/src/env/index.ts +16 -3
- package/src/features/agent/PayloadBuilder.tsx +100 -13
- package/src/features/agent/chat/AgentRightPanel.tsx +424 -0
- package/src/features/agent/chat/ArtifactsTab.tsx +197 -0
- package/src/features/agent/chat/AskUserWidget.tsx +14 -8
- package/src/features/agent/chat/DocumentPanel.tsx +24 -9
- package/src/features/agent/chat/ImageLightbox.tsx +6 -3
- package/src/features/agent/chat/ModernAgentConversation.tsx +539 -356
- package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.tsx +151 -55
- package/src/features/agent/chat/ModernAgentOutput/BatchProgressPanel.tsx +6 -4
- package/src/features/agent/chat/ModernAgentOutput/Header.tsx +126 -46
- package/src/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.tsx +21 -31
- package/src/features/agent/chat/ModernAgentOutput/MessageInput.tsx +119 -114
- package/src/features/agent/chat/ModernAgentOutput/MessageItem.tsx +26 -9
- package/src/features/agent/chat/ModernAgentOutput/PlanPanel.tsx +9 -7
- package/src/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.tsx +15 -13
- package/src/features/agent/chat/ModernAgentOutput/StreamingMessage.tsx +8 -3
- package/src/features/agent/chat/ModernAgentOutput/ToolCallGroup.tsx +149 -49
- package/src/features/agent/chat/ModernAgentOutput/WorkstreamTabs.tsx +9 -5
- package/src/features/agent/chat/ModernAgentOutput/utils.test.ts +229 -0
- package/src/features/agent/chat/ModernAgentOutput/utils.ts +202 -97
- package/src/features/agent/chat/SlidingThinkingIndicator.tsx +5 -3
- package/src/features/agent/chat/VegaLiteChart.tsx +20 -8
- package/src/features/agent/chat/hooks/useAgentPlans.ts +3 -9
- package/src/features/agent/chat/hooks/useAgentStream.ts +80 -19
- package/src/features/agent/chat/hooks/useArtifacts.ts +151 -0
- package/src/features/agent/chat/hooks/useDocumentPanel.ts +65 -5
- package/src/features/agent/chat/hooks/useFileProcessing.ts +14 -13
- package/src/features/agent/chat/types/document.ts +2 -0
- package/src/features/errors/PanelErrorBoundary.tsx +5 -3
- package/src/features/facets/AgentRunnerFacetsNav.tsx +54 -35
- package/src/features/facets/RunsFacetsNav.tsx +6 -6
- package/src/features/facets/index.ts +1 -1
- package/src/features/layout/GenericPageNavHeader.tsx +64 -41
- package/src/features/layout/NotFoundView.tsx +4 -1
- package/src/features/magic-pdf/AnnotatedImageSlider.tsx +12 -8
- package/src/features/magic-pdf/DownloadPopover.tsx +11 -10
- package/src/features/magic-pdf/MagicPdfView.tsx +10 -7
- package/src/features/pdf-viewer/PdfPageSlider.tsx +10 -6
- package/src/features/pdf-viewer/SimplePdfViewer.tsx +5 -3
- package/src/features/permissions/UserPermissionsProvider.tsx +3 -1
- package/src/features/store/collections/BrowseCollectionView.tsx +11 -1
- package/src/features/store/collections/CollectionsTable.tsx +20 -12
- package/src/features/store/collections/CreateCollection.tsx +45 -40
- package/src/features/store/collections/EditCollectionView.tsx +31 -28
- package/src/features/store/collections/SelectCollection.tsx +50 -14
- package/src/features/store/collections/SharedPropsEditor.tsx +7 -5
- package/src/features/store/collections/SyncMemberHeadsToggle.tsx +6 -4
- package/src/features/store/objects/DocumentPreviewPanel.tsx +30 -28
- package/src/features/store/objects/DocumentSearchResults.tsx +31 -21
- package/src/features/store/objects/DocumentTable.tsx +11 -5
- package/src/features/store/objects/ExportPropertiesModal.tsx +8 -5
- package/src/features/store/objects/components/ContentDispositionButton.tsx +3 -1
- package/src/features/store/objects/components/ContentOverview.tsx +96 -50
- package/src/features/store/objects/components/DocumentIcon.tsx +11 -3
- package/src/features/store/objects/components/PropertiesEditorModal.tsx +14 -12
- package/src/features/store/objects/components/SaveVersionConfirmModal.tsx +24 -37
- package/src/features/store/objects/components/SelectDocument.tsx +15 -6
- package/src/features/store/objects/components/TextEditorPanel.tsx +143 -0
- package/src/features/store/objects/components/VectorSearchWidget.tsx +11 -8
- package/src/features/store/objects/components/useContentPanelHooks.ts +4 -2
- package/src/features/store/objects/components/useDownloadFile.ts +12 -10
- package/src/features/store/objects/layout/documentLayout.tsx +16 -6
- package/src/features/store/objects/layout/renderers.tsx +27 -1
- package/src/features/store/objects/search/DocumentSearchContext.ts +3 -2
- package/src/features/store/objects/search/DocumentSearchProvider.tsx +3 -0
- package/src/features/store/objects/selection/ObjectsActionContext.tsx +26 -128
- package/src/features/store/objects/selection/ObjectsActionContextClass.ts +59 -0
- package/src/features/store/objects/selection/ObjectsActionHooks.ts +33 -0
- package/src/features/store/objects/selection/ObjectsActionSpec.ts +4 -1
- package/src/features/store/objects/selection/SelectionActions.tsx +14 -6
- package/src/features/store/objects/selection/actions/AddToCollectionAction.tsx +19 -14
- package/src/features/store/objects/selection/actions/ChangeTypeAction.tsx +9 -5
- package/src/features/store/objects/selection/actions/ConfirmAction.tsx +4 -3
- package/src/features/store/objects/selection/actions/DeleteObjectsAction.tsx +24 -23
- package/src/features/store/objects/selection/actions/ExportPropertiesAction.tsx +10 -5
- package/src/features/store/objects/selection/actions/RemoveFromCollectionAction.tsx +13 -9
- package/src/features/store/objects/selection/actions/StartWorkflowComponent.tsx +14 -8
- package/src/features/store/objects/upload/DocumentUploadModal.tsx +56 -55
- package/src/features/store/objects/upload/useSmartFileUploadProcessing.ts +4 -2
- package/src/features/store/objects/upload/useUploadHandler.ts +9 -7
- package/src/features/store/types/ContentObjectTypesSearch.tsx +10 -8
- package/src/features/store/types/ContentObjectTypesTable.tsx +6 -4
- package/src/features/store/types/CreateOrUpdateTypeModal.tsx +11 -12
- package/src/features/store/types/ObjectSchemaEditor.tsx +11 -9
- package/src/features/store/types/SelectContentType.tsx +15 -13
- package/src/features/store/types/SelectContentTypeModal.tsx +16 -13
- package/src/features/store/types/TableLayoutEditor.tsx +16 -12
- package/src/features/user/UserInfo.tsx +47 -56
- package/src/i18n/index.tsx +45 -0
- package/src/i18n/instance.ts +49 -0
- package/src/i18n/locales/ar.json +694 -0
- package/src/i18n/locales/de.json +662 -0
- package/src/i18n/locales/en.json +663 -0
- package/src/i18n/locales/es.json +668 -0
- package/src/i18n/locales/fr.json +670 -0
- package/src/i18n/locales/it.json +668 -0
- package/src/i18n/locales/ja.json +662 -0
- package/src/i18n/locales/ko.json +662 -0
- package/src/i18n/locales/pt.json +668 -0
- package/src/i18n/locales/ru.json +678 -0
- package/src/i18n/locales/tr.json +662 -0
- package/src/i18n/locales/zh-TW.json +662 -0
- package/src/i18n/locales/zh.json +662 -0
- package/src/layout/FullHeightLayout.tsx +8 -0
- package/src/layout/Navbar.tsx +4 -2
- package/src/layout/RegionTag.tsx +25 -0
- package/src/layout/Sidebar.tsx +4 -3
- package/src/layout/index.ts +2 -1
- package/src/router/HistoryNavigator.ts +10 -10
- package/src/router/Nav.tsx +9 -3
- package/src/router/NestedNavigationContext.tsx +4 -0
- package/src/router/NestedRouterProvider.tsx +3 -1
- package/src/router/Router.tsx +23 -7
- package/src/session/UserSession.ts +32 -0
- package/src/session/UserSessionProvider.tsx +4 -0
- package/src/session/auth/composable.ts +1 -1
- package/src/session/auth/firebase.ts +1 -1
- package/src/session/auth/useCurrentTenant.ts +3 -1
- package/src/shell/SplashScreen.tsx +22 -26
- package/src/shell/apps/StandaloneApp.tsx +9 -6
- package/src/shell/login/EnterpriseSigninButton.tsx +6 -4
- package/src/shell/login/GitHubSignInButton.tsx +3 -7
- package/src/shell/login/GoogleSignInButton.tsx +3 -1
- package/src/shell/login/InviteAcceptModal.tsx +5 -2
- package/src/shell/login/MicrosoftSigninButton.tsx +4 -6
- package/src/shell/login/SigninScreen.tsx +18 -13
- package/src/shell/login/SignupForm.tsx +46 -46
- package/src/shell/login/TerminalLogin.tsx +36 -33
- package/src/shell/login/UserInfo.tsx +15 -13
- package/src/shell/login/UserSessionMenu.tsx +28 -31
- package/src/widgets/index.ts +0 -1
- package/src/widgets/json-view/JSONCode.tsx +1 -1
- package/src/widgets/json-view/JSONDisplay.tsx +8 -3
- package/src/widgets/json-view/JSONSwitcher.tsx +24 -0
- package/src/widgets/json-view/JSONView.tsx +1 -1
- package/src/widgets/json-view/index.ts +1 -0
- package/src/widgets/markdown/ArtifactContentRenderer.tsx +15 -7
- package/src/widgets/markdown/CodeBlockContext.tsx +34 -0
- package/src/widgets/markdown/MarkdownRenderer.tsx +14 -13
- package/src/widgets/markdown/codeBlockHandlers.tsx +17 -36
- package/src/widgets/markdown/index.ts +27 -34
- package/src/widgets/markdown/remarkDirectiveHandler.ts +1 -1
- package/src/widgets/schema-editor/ManagedSchema.ts +6 -5
- package/src/widgets/schema-editor/editor/PropertyEditor.tsx +7 -3
- package/src/widgets/schema-editor/editor/SchemaEditor.tsx +3 -1
- package/src/widgets/upload/DropZone.tsx +10 -13
- package/src/widgets/upload/UploadResultCategory.tsx +3 -1
- package/src/widgets/upload/UploadSummary.tsx +13 -11
- package/tsconfig.dist.json +1 -1
- package/lib/esm/core/components/Dropdown.js +0 -16
- package/lib/esm/core/components/Dropdown.js.map +0 -1
- package/lib/esm/core/components/DropdownList.js +0 -9
- package/lib/esm/core/components/DropdownList.js.map +0 -1
- package/lib/esm/core/components/RadioGroup.js +0 -34
- package/lib/esm/core/components/RadioGroup.js.map +0 -1
- package/lib/esm/core/components/SelectStack.js +0 -8
- package/lib/esm/core/components/SelectStack.js.map +0 -1
- package/lib/esm/core/components/Switch.js +0 -12
- package/lib/esm/core/components/Switch.js.map +0 -1
- package/lib/esm/widgets/popover/Popover.js +0 -73
- package/lib/esm/widgets/popover/Popover.js.map +0 -1
- package/lib/esm/widgets/popover/context.js +0 -7
- package/lib/esm/widgets/popover/context.js.map +0 -1
- package/lib/esm/widgets/popover/index.js +0 -3
- package/lib/esm/widgets/popover/index.js.map +0 -1
- package/lib/esm/widgets/popover/slots.js +0 -22
- package/lib/esm/widgets/popover/slots.js.map +0 -1
- package/lib/types/core/components/Dropdown.d.ts +0 -15
- package/lib/types/core/components/Dropdown.d.ts.map +0 -1
- package/lib/types/core/components/DropdownList.d.ts +0 -13
- package/lib/types/core/components/DropdownList.d.ts.map +0 -1
- package/lib/types/core/components/RadioGroup.d.ts +0 -26
- package/lib/types/core/components/RadioGroup.d.ts.map +0 -1
- package/lib/types/core/components/SelectStack.d.ts +0 -13
- package/lib/types/core/components/SelectStack.d.ts.map +0 -1
- package/lib/types/core/components/Switch.d.ts +0 -11
- package/lib/types/core/components/Switch.d.ts.map +0 -1
- package/lib/types/widgets/popover/Popover.d.ts +0 -38
- package/lib/types/widgets/popover/Popover.d.ts.map +0 -1
- package/lib/types/widgets/popover/context.d.ts +0 -8
- package/lib/types/widgets/popover/context.d.ts.map +0 -1
- package/lib/types/widgets/popover/index.d.ts +0 -3
- package/lib/types/widgets/popover/index.d.ts.map +0 -1
- package/lib/types/widgets/popover/slots.d.ts +0 -5
- package/lib/types/widgets/popover/slots.d.ts.map +0 -1
- package/src/core/components/Dropdown.tsx +0 -63
- package/src/core/components/DropdownList.tsx +0 -72
- package/src/core/components/RadioGroup.tsx +0 -100
- package/src/core/components/SelectStack.tsx +0 -63
- package/src/core/components/Switch.tsx +0 -30
- package/src/widgets/popover/Popover.tsx +0 -171
- package/src/widgets/popover/context.ts +0 -15
- package/src/widgets/popover/index.ts +0 -2
- package/src/widgets/popover/slots.ts +0 -24
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
2
2
|
import { Bot, Cpu, FileTextIcon, SendIcon, UploadIcon, XIcon } from "lucide-react";
|
|
3
3
|
import { useUserSession } from "@vertesia/ui/session";
|
|
4
|
-
import { AsyncExecutionResult, VertesiaClient } from "@vertesia/client";
|
|
5
4
|
import {
|
|
5
|
+
ActiveWorkstreamEntry,
|
|
6
6
|
AgentMessage,
|
|
7
7
|
AgentMessageType,
|
|
8
|
+
AgentRun,
|
|
8
9
|
ConversationFile,
|
|
9
10
|
ConversationFileRef,
|
|
10
11
|
Plan,
|
|
@@ -23,13 +24,13 @@ import { ImageLightboxProvider } from "./ImageLightbox";
|
|
|
23
24
|
import AllMessagesMixed from "./ModernAgentOutput/AllMessagesMixed";
|
|
24
25
|
import Header from "./ModernAgentOutput/Header";
|
|
25
26
|
import MessageInput, { UploadedFile, SelectedDocument } from "./ModernAgentOutput/MessageInput";
|
|
26
|
-
import { getWorkstreamId } from "./ModernAgentOutput/utils";
|
|
27
|
+
import { getConversationUrl, getWorkstreamId } from "./ModernAgentOutput/utils";
|
|
27
28
|
import { ThinkingMessages } from "./WaitingMessages";
|
|
28
|
-
import InlineSlidingPlanPanel from "./ModernAgentOutput/InlineSlidingPlanPanel";
|
|
29
29
|
import { SkillWidgetProvider } from "./SkillWidgetProvider";
|
|
30
30
|
import { ArtifactUrlCacheProvider } from "./useArtifactUrlCache.js";
|
|
31
|
+
import { useUITranslation } from "../../../i18n/index.js";
|
|
31
32
|
import { VegaLiteChart } from "./VegaLiteChart";
|
|
32
|
-
import {
|
|
33
|
+
import { AgentRightPanel, type WorkstreamInfo } from "./AgentRightPanel.js";
|
|
33
34
|
import { useAgentStream } from "./hooks/useAgentStream.js";
|
|
34
35
|
import { useAgentPlans } from "./hooks/useAgentPlans.js";
|
|
35
36
|
import { useDocumentPanel } from "./hooks/useDocumentPanel.js";
|
|
@@ -37,7 +38,7 @@ import { useFileProcessing } from "./hooks/useFileProcessing.js";
|
|
|
37
38
|
|
|
38
39
|
export type StartWorkflowFn = (
|
|
39
40
|
initialMessage?: string,
|
|
40
|
-
) => Promise<{
|
|
41
|
+
) => Promise<{ agent_run_id: string } | undefined>;
|
|
41
42
|
|
|
42
43
|
function printElementToPdf(sourceElement: HTMLElement, title: string): boolean {
|
|
43
44
|
if (typeof window === "undefined" || typeof document === "undefined") {
|
|
@@ -84,7 +85,8 @@ function printElementToPdf(sourceElement: HTMLElement, title: string): boolean {
|
|
|
84
85
|
}
|
|
85
86
|
|
|
86
87
|
interface ModernAgentConversationProps {
|
|
87
|
-
|
|
88
|
+
/** Stable AgentRun ID — the primary identifier for all runtime operations. */
|
|
89
|
+
agentRunId?: string;
|
|
88
90
|
title?: string;
|
|
89
91
|
interactive?: boolean;
|
|
90
92
|
onClose?: () => void;
|
|
@@ -96,6 +98,12 @@ interface ModernAgentConversationProps {
|
|
|
96
98
|
placeholder?: string;
|
|
97
99
|
hideUserInput?: boolean;
|
|
98
100
|
resetWorkflow?: () => void;
|
|
101
|
+
/** Called after a restart succeeds — receives the new AgentRun for navigation */
|
|
102
|
+
onRestart?: (newRun: AgentRun) => void;
|
|
103
|
+
/** Called after a fork succeeds — receives the new AgentRun for navigation */
|
|
104
|
+
onFork?: (newRun: AgentRun) => void;
|
|
105
|
+
/** Called to show run details/internals modal */
|
|
106
|
+
onShowDetails?: () => void;
|
|
99
107
|
|
|
100
108
|
// File upload props - passed through to MessageInput
|
|
101
109
|
/** Called when files are dropped/pasted/selected */
|
|
@@ -113,6 +121,8 @@ interface ModernAgentConversationProps {
|
|
|
113
121
|
fileUploadRef?: React.MutableRefObject<((files: File[]) => void) | null>;
|
|
114
122
|
/** Called when processingFiles state changes (for external progress display) */
|
|
115
123
|
onProcessingFilesChange?: (files: Map<string, ConversationFile>) => void;
|
|
124
|
+
/** Processing files to display in the right panel Uploads tab */
|
|
125
|
+
processingFiles?: Map<string, ConversationFile>;
|
|
116
126
|
/** Called when plans change (for external plan panel) */
|
|
117
127
|
onPlansChange?: (plans: Array<{ plan: Plan; timestamp: number }>, activePlanIndex: number) => void;
|
|
118
128
|
/** Called when workstream status changes (for external plan panel) */
|
|
@@ -151,8 +161,12 @@ interface ModernAgentConversationProps {
|
|
|
151
161
|
hidePlanPanel?: boolean;
|
|
152
162
|
/** Hide workstream tabs */
|
|
153
163
|
hideWorkstreamTabs?: boolean;
|
|
164
|
+
/** Enable or disable the internal right panel (plan/workstreams/documents/uploads) */
|
|
165
|
+
showRightPanel?: boolean;
|
|
154
166
|
/** Hide the default file upload */
|
|
155
167
|
hideFileUpload?: boolean;
|
|
168
|
+
/** Show the Artifacts tab in the right panel (default false) */
|
|
169
|
+
showArtifacts?: boolean;
|
|
156
170
|
/** Hide the document preview panel that auto-opens on create_document */
|
|
157
171
|
hideDocumentPanel?: boolean;
|
|
158
172
|
|
|
@@ -206,29 +220,28 @@ interface ModernAgentConversationProps {
|
|
|
206
220
|
* @example { fundName: "Tech Growth IV", vintage: 2024, totalCommitments: 500000000 }
|
|
207
221
|
*/
|
|
208
222
|
fusionData?: Record<string, unknown>;
|
|
223
|
+
|
|
224
|
+
/** Optional payload content to show as a "Payload" tab in the right panel */
|
|
225
|
+
payloadContent?: React.ReactNode;
|
|
226
|
+
/** Optional conversation content to show as a "Conversation" tab in the right panel */
|
|
227
|
+
conversationContent?: React.ReactNode;
|
|
228
|
+
/** When true, renders the conversation inside the right panel as a "Conversation" tab */
|
|
229
|
+
conversationTab?: boolean;
|
|
209
230
|
}
|
|
210
231
|
|
|
211
232
|
export function ModernAgentConversation(
|
|
212
233
|
props: ModernAgentConversationProps,
|
|
213
234
|
) {
|
|
214
|
-
const {
|
|
215
|
-
|
|
216
|
-
if (
|
|
217
|
-
// If we have a run, convert it to AsyncExecutionResult format if needed
|
|
218
|
-
const execRun: AsyncExecutionResult =
|
|
219
|
-
"runId" in run
|
|
220
|
-
? run
|
|
221
|
-
: {
|
|
222
|
-
runId: run.run_id,
|
|
223
|
-
workflowId: run.workflow_id,
|
|
224
|
-
};
|
|
235
|
+
const { agentRunId, startWorkflow } = props;
|
|
236
|
+
|
|
237
|
+
if (agentRunId) {
|
|
225
238
|
return (
|
|
226
239
|
<SkillWidgetProvider>
|
|
227
|
-
<ModernAgentConversationInner {...props}
|
|
240
|
+
<ModernAgentConversationInner {...props} agentRunId={agentRunId} />
|
|
228
241
|
</SkillWidgetProvider>
|
|
229
242
|
);
|
|
230
243
|
} else if (startWorkflow) {
|
|
231
|
-
// If we have startWorkflow capability but no
|
|
244
|
+
// If we have startWorkflow capability but no agentRunId yet
|
|
232
245
|
return <StartWorkflowView {...props} />;
|
|
233
246
|
} else {
|
|
234
247
|
// Empty state
|
|
@@ -238,16 +251,17 @@ export function ModernAgentConversation(
|
|
|
238
251
|
|
|
239
252
|
// Empty state when no agent is running
|
|
240
253
|
function EmptyState() {
|
|
254
|
+
const { t } = useUITranslation();
|
|
241
255
|
return (
|
|
242
256
|
<MessageBox
|
|
243
257
|
status="info"
|
|
244
258
|
icon={<Bot className="size-16 text-muted mb-4" />}
|
|
245
259
|
>
|
|
246
260
|
<div className="text-base font-medium text-muted">
|
|
247
|
-
|
|
261
|
+
{t('agent.noAgentRunning')}
|
|
248
262
|
</div>
|
|
249
263
|
<div className="mt-3 text-sm text-muted">
|
|
250
|
-
|
|
264
|
+
{t('agent.selectInteraction')}
|
|
251
265
|
</div>
|
|
252
266
|
</MessageBox>
|
|
253
267
|
);
|
|
@@ -261,20 +275,24 @@ function StartWorkflowView({
|
|
|
261
275
|
onClose,
|
|
262
276
|
isModal = false,
|
|
263
277
|
fullWidth = false,
|
|
264
|
-
placeholder
|
|
265
|
-
startButtonText
|
|
266
|
-
title
|
|
278
|
+
placeholder,
|
|
279
|
+
startButtonText,
|
|
280
|
+
title,
|
|
267
281
|
// Attachment callback - used to include existing document attachments in the first message
|
|
268
282
|
getAttachedDocs,
|
|
269
283
|
onAttachmentsSent,
|
|
270
284
|
// File upload props
|
|
271
|
-
acceptedFileTypes
|
|
285
|
+
acceptedFileTypes,
|
|
272
286
|
maxFiles = 5,
|
|
273
287
|
}: ModernAgentConversationProps) {
|
|
288
|
+
const { t } = useUITranslation();
|
|
289
|
+
const resolvedPlaceholder = placeholder ?? t('agent.typeYourMessage');
|
|
290
|
+
const resolvedStartButtonText = startButtonText ?? t('agent.startAgent');
|
|
291
|
+
const resolvedTitle = title ?? t('agent.startNewConversation');
|
|
274
292
|
const { client } = useUserSession();
|
|
275
293
|
const [inputValue, setInputValue] = useState<string>("");
|
|
276
294
|
const [isSending, setIsSending] = useState(false);
|
|
277
|
-
const [
|
|
295
|
+
const [startedAgentRunId, setStartedAgentRunId] = useState<string | null>(null);
|
|
278
296
|
const toast = useToast();
|
|
279
297
|
const inputRef = useRef<HTMLTextAreaElement>(null);
|
|
280
298
|
const fileInputRef = useRef<HTMLInputElement>(null);
|
|
@@ -361,7 +379,7 @@ function StartWorkflowView({
|
|
|
361
379
|
sessionStorage.removeItem("plan-panel-shown");
|
|
362
380
|
|
|
363
381
|
toast({
|
|
364
|
-
title: stagedFiles.length > 0 ?
|
|
382
|
+
title: stagedFiles.length > 0 ? t('agent.startingAgentUploading') : t('agent.startingAgent'),
|
|
365
383
|
status: "info",
|
|
366
384
|
duration: 3000,
|
|
367
385
|
});
|
|
@@ -388,18 +406,19 @@ function StartWorkflowView({
|
|
|
388
406
|
|
|
389
407
|
const newRun = await startWorkflow(messageContent);
|
|
390
408
|
if (newRun) {
|
|
391
|
-
|
|
409
|
+
const agentId = newRun.agent_run_id;
|
|
410
|
+
|
|
411
|
+
// Upload staged files to the new run's artifact space and signal agent
|
|
392
412
|
const uploadedFiles: string[] = [];
|
|
393
413
|
if (stagedFiles.length > 0) {
|
|
394
414
|
for (const file of stagedFiles) {
|
|
395
415
|
try {
|
|
396
416
|
const artifactPath = `files/${file.name}`;
|
|
397
|
-
await client.
|
|
417
|
+
await client.agents.uploadArtifact(agentId, artifactPath, file);
|
|
398
418
|
|
|
399
|
-
// Signal
|
|
400
|
-
await client.
|
|
401
|
-
|
|
402
|
-
newRun.run_id,
|
|
419
|
+
// Signal agent that file was uploaded
|
|
420
|
+
await client.agents.sendSignal(
|
|
421
|
+
agentId,
|
|
403
422
|
"FileUploaded",
|
|
404
423
|
{
|
|
405
424
|
id: `file-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`,
|
|
@@ -419,9 +438,8 @@ function StartWorkflowView({
|
|
|
419
438
|
// Send a follow-up message to notify the agent that all files are ready
|
|
420
439
|
if (uploadedFiles.length > 0) {
|
|
421
440
|
try {
|
|
422
|
-
await client.
|
|
423
|
-
|
|
424
|
-
newRun.run_id,
|
|
441
|
+
await client.agents.sendSignal(
|
|
442
|
+
agentId,
|
|
425
443
|
"UserInput",
|
|
426
444
|
{
|
|
427
445
|
message: `[Files Ready] All ${uploadedFiles.length} file(s) have been uploaded and are now available: ${uploadedFiles.join(', ')}. You can now process them.`,
|
|
@@ -441,23 +459,20 @@ function StartWorkflowView({
|
|
|
441
459
|
|
|
442
460
|
// Clear attachments after successful start
|
|
443
461
|
onAttachmentsSent?.();
|
|
444
|
-
|
|
445
|
-
runId: newRun.run_id,
|
|
446
|
-
workflowId: newRun.workflow_id,
|
|
447
|
-
});
|
|
462
|
+
setStartedAgentRunId(agentId);
|
|
448
463
|
setInputValue("");
|
|
449
464
|
toast({
|
|
450
|
-
title:
|
|
465
|
+
title: t('agent.agentStarted'),
|
|
451
466
|
status: "success",
|
|
452
467
|
duration: 3000,
|
|
453
468
|
});
|
|
454
469
|
}
|
|
455
470
|
} catch (err: any) {
|
|
456
471
|
toast({
|
|
457
|
-
title:
|
|
472
|
+
title: t('agent.errorStarting'),
|
|
458
473
|
status: "error",
|
|
459
474
|
duration: 3000,
|
|
460
|
-
description: err instanceof Error ? err.message :
|
|
475
|
+
description: err instanceof Error ? err.message : t('agent.unknownError'),
|
|
461
476
|
});
|
|
462
477
|
} finally {
|
|
463
478
|
setIsSending(false);
|
|
@@ -486,102 +501,95 @@ function StartWorkflowView({
|
|
|
486
501
|
}, [inputValue, adjustTextareaHeight]);
|
|
487
502
|
|
|
488
503
|
// If a run has been started, show the conversation
|
|
489
|
-
if (
|
|
504
|
+
if (startedAgentRunId) {
|
|
490
505
|
return (
|
|
491
506
|
<ModernAgentConversationInner
|
|
492
507
|
{...{ onClose, isModal, initialMessage, placeholder }}
|
|
493
|
-
|
|
508
|
+
agentRunId={startedAgentRunId}
|
|
494
509
|
title={title}
|
|
495
510
|
/>
|
|
496
511
|
);
|
|
497
512
|
}
|
|
498
513
|
|
|
499
514
|
return (
|
|
500
|
-
<div
|
|
501
|
-
className={`flex flex-col h-full bg-white dark:bg-gray-900 overflow-hidden border-0 relative ${isDragOver ? 'ring-2 ring-blue-400 ring-inset' : ''}`}
|
|
502
|
-
onDragEnter={handleDragEnter}
|
|
503
|
-
onDragOver={handleDragOver}
|
|
504
|
-
onDragLeave={handleDragLeave}
|
|
505
|
-
onDrop={handleDrop}
|
|
506
|
-
>
|
|
507
|
-
{/* Drag overlay for full-panel file drop */}
|
|
508
|
-
{isDragOver && (
|
|
509
|
-
<div className="absolute inset-0 flex items-center justify-center bg-blue-100/80 dark:bg-blue-900/40 z-50 pointer-events-none rounded-lg">
|
|
510
|
-
<div className="text-blue-600 dark:text-blue-400 font-medium flex items-center gap-2 text-lg">
|
|
511
|
-
<UploadIcon className="size-6" />
|
|
512
|
-
Drop files to stage for upload
|
|
513
|
-
</div>
|
|
514
|
-
</div>
|
|
515
|
-
)}
|
|
516
|
-
|
|
517
|
-
{/* Hidden file input */}
|
|
518
|
-
<input
|
|
519
|
-
ref={fileInputRef}
|
|
520
|
-
type="file"
|
|
521
|
-
multiple
|
|
522
|
-
accept={acceptedFileTypes}
|
|
523
|
-
onChange={handleFileInputChange}
|
|
524
|
-
className="hidden"
|
|
525
|
-
/>
|
|
526
|
-
|
|
527
|
-
{/* Header */}
|
|
528
|
-
<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">
|
|
529
|
-
<div className="flex items-center space-x-2">
|
|
530
|
-
<div className="p-1">
|
|
531
|
-
<Cpu className="size-3.5 text-muted" />
|
|
532
|
-
</div>
|
|
533
|
-
<span className="font-medium text-sm text-gray-700 dark:text-gray-300">
|
|
534
|
-
{title}
|
|
535
|
-
</span>
|
|
536
|
-
</div>
|
|
537
|
-
|
|
538
|
-
{/* Close button if needed */}
|
|
539
|
-
{onClose && !isModal && (
|
|
540
|
-
<Button
|
|
541
|
-
size="xs"
|
|
542
|
-
variant="ghost"
|
|
543
|
-
onClick={onClose}
|
|
544
|
-
title="Close"
|
|
545
|
-
className="text-slate-500 hover:text-slate-700"
|
|
546
|
-
>
|
|
547
|
-
<XIcon className="size-4" />
|
|
548
|
-
</Button>
|
|
549
|
-
)}
|
|
550
|
-
</div>
|
|
551
|
-
|
|
552
|
-
{/* Empty conversation area with instructions */}
|
|
515
|
+
<div className="flex flex-col h-full bg-background items-center">
|
|
553
516
|
<div
|
|
554
|
-
className={
|
|
555
|
-
|
|
556
|
-
|
|
517
|
+
className={cn(
|
|
518
|
+
"flex flex-col h-full w-full overflow-hidden border-0 relative",
|
|
519
|
+
fullWidth ? "" : "max-w-4xl"
|
|
520
|
+
)}
|
|
521
|
+
onDragEnter={handleDragEnter}
|
|
522
|
+
onDragOver={handleDragOver}
|
|
523
|
+
onDragLeave={handleDragLeave}
|
|
524
|
+
onDrop={handleDrop}
|
|
557
525
|
>
|
|
558
|
-
{
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
526
|
+
{/* Drag overlay for full-panel file drop */}
|
|
527
|
+
{isDragOver && (
|
|
528
|
+
<div className="absolute inset-0 flex items-center justify-center bg-info-background z-50 pointer-events-none rounded-lg">
|
|
529
|
+
<div className="text-info font-medium flex items-center gap-2 text-lg">
|
|
530
|
+
<UploadIcon className="size-6" />
|
|
531
|
+
Drop files to stage for upload
|
|
532
|
+
</div>
|
|
565
533
|
</div>
|
|
566
534
|
)}
|
|
567
535
|
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
536
|
+
{/* Hidden file input */}
|
|
537
|
+
<input
|
|
538
|
+
ref={fileInputRef}
|
|
539
|
+
type="file"
|
|
540
|
+
multiple
|
|
541
|
+
accept={acceptedFileTypes}
|
|
542
|
+
onChange={handleFileInputChange}
|
|
543
|
+
className="hidden"
|
|
544
|
+
/>
|
|
545
|
+
|
|
546
|
+
{/* Header */}
|
|
547
|
+
<div className="flex items-center justify-between py-2 px-3 border-b border-border bg-background">
|
|
548
|
+
<div className="flex items-center space-x-2">
|
|
549
|
+
<div className="p-1">
|
|
550
|
+
<Cpu className="size-3.5 text-muted" />
|
|
551
|
+
</div>
|
|
552
|
+
<span className="font-medium text-sm text-foreground">
|
|
553
|
+
{resolvedTitle}
|
|
554
|
+
</span>
|
|
575
555
|
</div>
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
556
|
+
|
|
557
|
+
{/* Close button if needed */}
|
|
558
|
+
{onClose && !isModal && (
|
|
559
|
+
<Button
|
|
560
|
+
size="xs"
|
|
561
|
+
variant="ghost"
|
|
562
|
+
onClick={onClose}
|
|
563
|
+
title={t('agent.close')}
|
|
564
|
+
className="text-muted hover:text-foreground"
|
|
565
|
+
>
|
|
566
|
+
<XIcon className="size-4" />
|
|
567
|
+
</Button>
|
|
568
|
+
)}
|
|
569
|
+
</div>
|
|
570
|
+
|
|
571
|
+
{/* Empty conversation area with instructions */}
|
|
572
|
+
<div className="flex-1 overflow-y-auto bg-background flex flex-col items-center justify-end">
|
|
573
|
+
<div className="w-full px-4 py-6">
|
|
574
|
+
{initialMessage && (
|
|
575
|
+
<div className="px-4 py-3 mb-4 bg-info-background border-l-2 border-info text-info">
|
|
576
|
+
{initialMessage}
|
|
577
|
+
</div>
|
|
578
|
+
)}
|
|
579
|
+
|
|
580
|
+
<div className="bg-card p-4 border-l-2 border-info">
|
|
581
|
+
<div className="text-base text-foreground font-medium">
|
|
582
|
+
{t('agent.enterMessage')}
|
|
583
|
+
</div>
|
|
584
|
+
<div className="mt-3 text-sm text-muted">
|
|
585
|
+
{t('agent.typeQuestionBelow', { buttonText: resolvedStartButtonText })}
|
|
586
|
+
</div>
|
|
587
|
+
</div>
|
|
579
588
|
</div>
|
|
580
589
|
</div>
|
|
581
|
-
</div>
|
|
582
590
|
|
|
583
|
-
|
|
584
|
-
|
|
591
|
+
{/* Input Area */}
|
|
592
|
+
<div className="py-3 px-3 border-t border-border bg-background">
|
|
585
593
|
{/* Staged files display */}
|
|
586
594
|
{stagedFiles.length > 0 && (
|
|
587
595
|
<div className="flex flex-wrap gap-2 mb-3">
|
|
@@ -592,7 +600,7 @@ function StartWorkflowView({
|
|
|
592
600
|
>
|
|
593
601
|
<FileTextIcon className="size-3.5" />
|
|
594
602
|
<span className="max-w-[120px] truncate">{file.name}</span>
|
|
595
|
-
<span className="text-xs opacity-70">
|
|
603
|
+
<span className="text-xs opacity-70">{t('agent.staged')}</span>
|
|
596
604
|
<button
|
|
597
605
|
onClick={() => removeStagedFile(index)}
|
|
598
606
|
className="ml-1 p-0.5 hover:bg-attention/20 rounded"
|
|
@@ -614,57 +622,59 @@ function StartWorkflowView({
|
|
|
614
622
|
className="text-xs"
|
|
615
623
|
>
|
|
616
624
|
<UploadIcon className="size-3.5 mr-1.5" />
|
|
617
|
-
|
|
625
|
+
{t('agent.upload')}
|
|
618
626
|
</Button>
|
|
619
627
|
</div>
|
|
620
628
|
|
|
621
629
|
<div className="flex items-end gap-2">
|
|
622
|
-
<
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
/>
|
|
634
|
-
</div>
|
|
630
|
+
<textarea
|
|
631
|
+
ref={inputRef}
|
|
632
|
+
value={inputValue}
|
|
633
|
+
onChange={(e) => setInputValue(e.target.value)}
|
|
634
|
+
onKeyDown={handleKeyDown}
|
|
635
|
+
placeholder={resolvedPlaceholder}
|
|
636
|
+
disabled={isSending}
|
|
637
|
+
rows={2}
|
|
638
|
+
className="flex-1 py-2.5 px-3 text-sm border border-border bg-background text-foreground focus:border-ring focus:outline-none focus:ring-1 focus:ring-ring rounded-md resize-none overflow-hidden"
|
|
639
|
+
style={{ minHeight: '60px', maxHeight: '200px' }}
|
|
640
|
+
/>
|
|
635
641
|
<Button
|
|
636
642
|
onClick={startWorkflowWithMessage}
|
|
637
643
|
disabled={!inputValue.trim() || isSending}
|
|
638
|
-
className="px-3 py-2.5
|
|
644
|
+
className="px-3 py-2.5 text-xs rounded-md transition-colors"
|
|
639
645
|
>
|
|
640
646
|
{isSending ? (
|
|
641
647
|
<Spinner size="sm" className="mr-1.5" />
|
|
642
648
|
) : (
|
|
643
649
|
<SendIcon className="size-3.5 mr-1.5" />
|
|
644
650
|
)}
|
|
645
|
-
{
|
|
651
|
+
{resolvedStartButtonText}
|
|
646
652
|
</Button>
|
|
647
653
|
</div>
|
|
648
|
-
<div className="text-xs text-
|
|
654
|
+
<div className="text-xs text-muted mt-2 text-center">
|
|
649
655
|
{stagedFiles.length > 0
|
|
650
|
-
?
|
|
651
|
-
: '
|
|
656
|
+
? t('agent.filesStagedCount', { count: stagedFiles.length })
|
|
657
|
+
: t('agent.enterToSend')}
|
|
652
658
|
</div>
|
|
653
659
|
</div>
|
|
654
660
|
</div>
|
|
661
|
+
</div>
|
|
655
662
|
);
|
|
656
663
|
}
|
|
657
664
|
|
|
658
665
|
// Inner component that handles the agent conversation - similar to ModernAgentOutput
|
|
659
666
|
function ModernAgentConversationInner({
|
|
660
|
-
|
|
667
|
+
agentRunId,
|
|
661
668
|
title,
|
|
662
669
|
interactive = true,
|
|
663
670
|
onClose,
|
|
664
671
|
isModal = false,
|
|
665
672
|
fullWidth = false,
|
|
666
|
-
placeholder
|
|
673
|
+
placeholder,
|
|
667
674
|
resetWorkflow,
|
|
675
|
+
onRestart,
|
|
676
|
+
onFork,
|
|
677
|
+
onShowDetails,
|
|
668
678
|
// File upload props (onFilesSelected handled internally by handleFileUpload)
|
|
669
679
|
uploadedFiles,
|
|
670
680
|
onRemoveFile,
|
|
@@ -681,8 +691,10 @@ function ModernAgentConversationInner({
|
|
|
681
691
|
hideMessageInput,
|
|
682
692
|
hidePlanPanel,
|
|
683
693
|
hideWorkstreamTabs,
|
|
694
|
+
showRightPanel: showRightPanelProp = true,
|
|
684
695
|
hideFileUpload,
|
|
685
|
-
|
|
696
|
+
showArtifacts = false,
|
|
697
|
+
hideDocumentPanel: _hideDocumentPanel,
|
|
686
698
|
// Attachment callback
|
|
687
699
|
getAttachedDocs,
|
|
688
700
|
onAttachmentsSent,
|
|
@@ -699,6 +711,7 @@ function ModernAgentConversationInner({
|
|
|
699
711
|
// External file upload API
|
|
700
712
|
fileUploadRef,
|
|
701
713
|
onProcessingFilesChange,
|
|
714
|
+
processingFiles: processingFilesProp,
|
|
702
715
|
// External plan panel API
|
|
703
716
|
onPlansChange,
|
|
704
717
|
onWorkstreamStatusChange,
|
|
@@ -725,9 +738,16 @@ function ModernAgentConversationInner({
|
|
|
725
738
|
StoreLinkComponent,
|
|
726
739
|
CollectionLinkComponent,
|
|
727
740
|
prependFriendlyMessage,
|
|
728
|
-
|
|
741
|
+
payloadContent,
|
|
742
|
+
conversationContent,
|
|
743
|
+
conversationTab = false,
|
|
744
|
+
}: ModernAgentConversationProps & { agentRunId: string }) {
|
|
745
|
+
const { t } = useUITranslation();
|
|
729
746
|
const { client } = useUserSession();
|
|
730
747
|
const toast = useToast();
|
|
748
|
+
const instanceIdRef = useRef(
|
|
749
|
+
`mac-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`
|
|
750
|
+
);
|
|
731
751
|
|
|
732
752
|
// ────────────────────────────────────────────
|
|
733
753
|
// Extracted hooks
|
|
@@ -741,7 +761,7 @@ function ModernAgentConversationInner({
|
|
|
741
761
|
removeOptimisticMessages,
|
|
742
762
|
workflowStatus,
|
|
743
763
|
serverFileUpdates,
|
|
744
|
-
} = useAgentStream(client,
|
|
764
|
+
} = useAgentStream(client, agentRunId);
|
|
745
765
|
|
|
746
766
|
const {
|
|
747
767
|
plans,
|
|
@@ -768,13 +788,14 @@ function ModernAgentConversationInner({
|
|
|
768
788
|
processingFiles,
|
|
769
789
|
hasProcessingFiles,
|
|
770
790
|
handleFileUpload,
|
|
771
|
-
} = useFileProcessing(client,
|
|
791
|
+
} = useFileProcessing(client, agentRunId, serverFileUpdates, toast);
|
|
772
792
|
|
|
773
793
|
// ────────────────────────────────────────────
|
|
774
794
|
// Local state (UI-only concerns)
|
|
775
795
|
// ────────────────────────────────────────────
|
|
776
796
|
const bottomRef = useRef<HTMLDivElement | null>(null);
|
|
777
797
|
const conversationRef = useRef<HTMLDivElement | null>(null);
|
|
798
|
+
const conversationLayoutRef = useRef<HTMLDivElement | null>(null);
|
|
778
799
|
const [isSending, setIsSending] = useState(false);
|
|
779
800
|
const [internalViewMode, setInternalViewMode] = useState<AgentConversationViewMode>("sliding");
|
|
780
801
|
const viewMode = controlledViewMode ?? internalViewMode;
|
|
@@ -788,6 +809,8 @@ function ModernAgentConversationInner({
|
|
|
788
809
|
const [isStopping, setIsStopping] = useState(false);
|
|
789
810
|
const [thinkingMessageIndex, setThinkingMessageIndex] = useState(0);
|
|
790
811
|
const [isDragOver, setIsDragOver] = useState(false);
|
|
812
|
+
const [activeWorkstreams, setActiveWorkstreams] = useState<ActiveWorkstreamEntry[]>([]);
|
|
813
|
+
const workstreamFetchFailedRef = useRef(false);
|
|
791
814
|
const dragCounterRef = useRef(0);
|
|
792
815
|
|
|
793
816
|
// PERFORMANCE: Refs for values used inside useCallback to avoid re-creating the callback
|
|
@@ -796,13 +819,35 @@ function ModernAgentConversationInner({
|
|
|
796
819
|
const hasProcessingFilesRef = useRef(hasProcessingFiles);
|
|
797
820
|
hasProcessingFilesRef.current = hasProcessingFiles;
|
|
798
821
|
|
|
799
|
-
// Derive effective workflow status
|
|
822
|
+
// Derive effective workflow status — only main workstream TERMINATED overrides API status.
|
|
800
823
|
const effectiveWorkflowStatus = useMemo(() => {
|
|
801
|
-
const
|
|
802
|
-
|
|
824
|
+
const mainMessages = messages.filter(m => (m.workstream_id || 'main') === 'main');
|
|
825
|
+
const lastMain = mainMessages[mainMessages.length - 1];
|
|
826
|
+
if (lastMain?.type === AgentMessageType.TERMINATED) return "TERMINATED";
|
|
803
827
|
return workflowStatus;
|
|
804
828
|
}, [messages, workflowStatus]);
|
|
805
829
|
|
|
830
|
+
console.debug("[ModernAgentConversation] render", {
|
|
831
|
+
agentRunId,
|
|
832
|
+
instanceId: instanceIdRef.current,
|
|
833
|
+
messageCount: messages.length,
|
|
834
|
+
activeWorkstreams: activeWorkstreams.length,
|
|
835
|
+
});
|
|
836
|
+
|
|
837
|
+
useEffect(() => {
|
|
838
|
+
console.debug("[ModernAgentConversation] mount", {
|
|
839
|
+
agentRunId,
|
|
840
|
+
instanceId: instanceIdRef.current,
|
|
841
|
+
});
|
|
842
|
+
|
|
843
|
+
return () => {
|
|
844
|
+
console.debug("[ModernAgentConversation] unmount", {
|
|
845
|
+
agentRunId,
|
|
846
|
+
instanceId: instanceIdRef.current,
|
|
847
|
+
});
|
|
848
|
+
};
|
|
849
|
+
}, [agentRunId]);
|
|
850
|
+
|
|
806
851
|
// ────────────────────────────────────────────
|
|
807
852
|
// Computed values
|
|
808
853
|
// ────────────────────────────────────────────
|
|
@@ -819,6 +864,20 @@ function ModernAgentConversationInner({
|
|
|
819
864
|
};
|
|
820
865
|
}, [plans, activePlanIndex, workstreamStatusMap]);
|
|
821
866
|
|
|
867
|
+
const panelWorkstreams = useMemo<WorkstreamInfo[]>(() => {
|
|
868
|
+
return activeWorkstreams.map((ws) => ({
|
|
869
|
+
workstream_id: ws.workstream_id,
|
|
870
|
+
launch_id: ws.launch_id,
|
|
871
|
+
elapsed_ms: ws.elapsed_ms,
|
|
872
|
+
deadline_ms: ws.deadline_ms,
|
|
873
|
+
remaining_ms: Math.max(0, ws.deadline_ms - ws.elapsed_ms),
|
|
874
|
+
status: ws.status,
|
|
875
|
+
phase: ws.latest_progress?.phase,
|
|
876
|
+
child_workflow_id: ws.child_workflow_id,
|
|
877
|
+
child_workflow_run_id: ws.child_workflow_run_id,
|
|
878
|
+
}));
|
|
879
|
+
}, [activeWorkstreams]);
|
|
880
|
+
|
|
822
881
|
// ────────────────────────────────────────────
|
|
823
882
|
// Stable callbacks
|
|
824
883
|
// ────────────────────────────────────────────
|
|
@@ -835,19 +894,79 @@ function ModernAgentConversationInner({
|
|
|
835
894
|
setActivePlanIndex(index);
|
|
836
895
|
}, [setActivePlanIndex]);
|
|
837
896
|
|
|
838
|
-
|
|
897
|
+
// ────────────────────────────────────────────
|
|
898
|
+
// Unified right panel state
|
|
899
|
+
// ────────────────────────────────────────────
|
|
900
|
+
type RightPanelTab = 'plan' | 'workstreams' | 'documents' | 'uploads' | 'artifacts' | 'conversation';
|
|
901
|
+
const [rightPanelTab, _setRightPanelTab] = useState<RightPanelTab>((conversationContent || conversationTab) ? 'conversation' : 'plan');
|
|
902
|
+
const [rightPanelWidth, setRightPanelWidth] = useState(400);
|
|
903
|
+
const [isRightPanelResizing, setIsRightPanelResizing] = useState(false);
|
|
904
|
+
|
|
905
|
+
const isRightPanelVisible = showRightPanelProp && (showSlidingPanel
|
|
906
|
+
|| isDocPanelOpen
|
|
907
|
+
|| (!hideWorkstreamTabs && panelWorkstreams.length > 0)
|
|
908
|
+
|| !!conversationContent
|
|
909
|
+
|| conversationTab);
|
|
910
|
+
|
|
911
|
+
useEffect(() => {
|
|
912
|
+
if (!isRightPanelVisible && isRightPanelResizing) {
|
|
913
|
+
setIsRightPanelResizing(false);
|
|
914
|
+
}
|
|
915
|
+
}, [isRightPanelVisible, isRightPanelResizing]);
|
|
916
|
+
|
|
917
|
+
useEffect(() => {
|
|
918
|
+
if (!isRightPanelResizing) return;
|
|
919
|
+
|
|
920
|
+
const minRightPanelWidth = 300;
|
|
921
|
+
const minConversationWidth = 420;
|
|
922
|
+
|
|
923
|
+
const handleMouseMove = (event: MouseEvent) => {
|
|
924
|
+
const container = conversationLayoutRef.current;
|
|
925
|
+
if (!container) return;
|
|
926
|
+
|
|
927
|
+
const containerRect = container.getBoundingClientRect();
|
|
928
|
+
const maxRightPanelWidth = Math.max(minRightPanelWidth, containerRect.width - minConversationWidth);
|
|
929
|
+
const nextWidth = containerRect.right - event.clientX;
|
|
930
|
+
const clampedWidth = Math.min(Math.max(nextWidth, minRightPanelWidth), maxRightPanelWidth);
|
|
931
|
+
setRightPanelWidth(clampedWidth);
|
|
932
|
+
};
|
|
933
|
+
|
|
934
|
+
const handleMouseUp = () => {
|
|
935
|
+
setIsRightPanelResizing(false);
|
|
936
|
+
};
|
|
937
|
+
|
|
938
|
+
window.addEventListener('mousemove', handleMouseMove);
|
|
939
|
+
window.addEventListener('mouseup', handleMouseUp);
|
|
940
|
+
document.body.style.cursor = 'col-resize';
|
|
941
|
+
document.body.style.userSelect = 'none';
|
|
942
|
+
|
|
943
|
+
return () => {
|
|
944
|
+
window.removeEventListener('mousemove', handleMouseMove);
|
|
945
|
+
window.removeEventListener('mouseup', handleMouseUp);
|
|
946
|
+
document.body.style.cursor = '';
|
|
947
|
+
document.body.style.userSelect = '';
|
|
948
|
+
};
|
|
949
|
+
}, [isRightPanelResizing]);
|
|
950
|
+
|
|
951
|
+
const handleCloseRightPanel = useCallback(() => {
|
|
839
952
|
setShowSlidingPanel(false);
|
|
840
|
-
|
|
953
|
+
handleCloseDocPanel();
|
|
954
|
+
}, [setShowSlidingPanel, handleCloseDocPanel]);
|
|
841
955
|
|
|
842
956
|
// Default StoreLinkComponent that opens documents in the panel
|
|
843
957
|
const internalStoreLinkComponent = useCallback(
|
|
844
|
-
({ documentId, children }: { href: string; documentId: string; children: React.ReactNode }) => (
|
|
845
|
-
<
|
|
958
|
+
({ href, documentId, children }: { href: string; documentId: string; children: React.ReactNode }) => (
|
|
959
|
+
<a
|
|
960
|
+
href={href}
|
|
846
961
|
className="text-info underline cursor-pointer hover:text-info/80"
|
|
847
|
-
onClick={() =>
|
|
962
|
+
onClick={(e) => {
|
|
963
|
+
e.preventDefault();
|
|
964
|
+
e.stopPropagation();
|
|
965
|
+
openDocInPanel(documentId);
|
|
966
|
+
}}
|
|
848
967
|
>
|
|
849
968
|
{children}
|
|
850
|
-
</
|
|
969
|
+
</a>
|
|
851
970
|
),
|
|
852
971
|
[openDocInPanel]
|
|
853
972
|
);
|
|
@@ -891,6 +1010,41 @@ function ModernAgentConversationInner({
|
|
|
891
1010
|
onWorkstreamStatusChange?.(workstreamStatusMap);
|
|
892
1011
|
}, [workstreamStatusMap, onWorkstreamStatusChange]);
|
|
893
1012
|
|
|
1013
|
+
// Poll active workstreams from backend query for right-panel visibility and details.
|
|
1014
|
+
useEffect(() => {
|
|
1015
|
+
const shouldPoll = !isCompleted || activeWorkstreams.length > 0;
|
|
1016
|
+
if (!shouldPoll) {
|
|
1017
|
+
setActiveWorkstreams((prev) => (prev.length === 0 ? prev : []));
|
|
1018
|
+
return;
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
let isCancelled = false;
|
|
1022
|
+
|
|
1023
|
+
const fetchActiveWorkstreams = async () => {
|
|
1024
|
+
try {
|
|
1025
|
+
const result = await client.agents.getActiveWorkstreams(agentRunId);
|
|
1026
|
+
if (isCancelled) return;
|
|
1027
|
+
setActiveWorkstreams(result.running ?? []);
|
|
1028
|
+
workstreamFetchFailedRef.current = false;
|
|
1029
|
+
} catch (error) {
|
|
1030
|
+
if (isCancelled) return;
|
|
1031
|
+
setActiveWorkstreams([]);
|
|
1032
|
+
if (!workstreamFetchFailedRef.current) {
|
|
1033
|
+
console.warn("Failed to fetch active workstreams:", error);
|
|
1034
|
+
workstreamFetchFailedRef.current = true;
|
|
1035
|
+
}
|
|
1036
|
+
}
|
|
1037
|
+
};
|
|
1038
|
+
|
|
1039
|
+
fetchActiveWorkstreams();
|
|
1040
|
+
const pollHandle = window.setInterval(fetchActiveWorkstreams, 10000);
|
|
1041
|
+
|
|
1042
|
+
return () => {
|
|
1043
|
+
isCancelled = true;
|
|
1044
|
+
window.clearInterval(pollHandle);
|
|
1045
|
+
};
|
|
1046
|
+
}, [client.agents, agentRunId, isCompleted, activeWorkstreams.length]);
|
|
1047
|
+
|
|
894
1048
|
// Notify parent when input availability is determined
|
|
895
1049
|
useEffect(() => {
|
|
896
1050
|
if (messages.length === 0) return;
|
|
@@ -920,8 +1074,8 @@ function ModernAgentConversationInner({
|
|
|
920
1074
|
if (hasProcessingFilesRef.current) {
|
|
921
1075
|
toast({
|
|
922
1076
|
status: "warning",
|
|
923
|
-
title:
|
|
924
|
-
description:
|
|
1077
|
+
title: t('agent.filesProcessing'),
|
|
1078
|
+
description: t('agent.waitForFilesProcessing'),
|
|
925
1079
|
duration: 3000,
|
|
926
1080
|
});
|
|
927
1081
|
return;
|
|
@@ -942,7 +1096,7 @@ function ModernAgentConversationInner({
|
|
|
942
1096
|
|
|
943
1097
|
const optimisticMessage: AgentMessage = {
|
|
944
1098
|
timestamp: Date.now(),
|
|
945
|
-
workflow_run_id:
|
|
1099
|
+
workflow_run_id: agentRunId,
|
|
946
1100
|
type: AgentMessageType.QUESTION,
|
|
947
1101
|
message: messageContent,
|
|
948
1102
|
workstream_id: "main",
|
|
@@ -957,8 +1111,8 @@ function ModernAgentConversationInner({
|
|
|
957
1111
|
_messageId: messageId,
|
|
958
1112
|
};
|
|
959
1113
|
|
|
960
|
-
client.
|
|
961
|
-
.sendSignal(
|
|
1114
|
+
client.agents
|
|
1115
|
+
.sendSignal(agentRunId, "UserInput", {
|
|
962
1116
|
message: messageContent,
|
|
963
1117
|
metadata,
|
|
964
1118
|
} as UserInputSignal)
|
|
@@ -971,25 +1125,25 @@ function ModernAgentConversationInner({
|
|
|
971
1125
|
);
|
|
972
1126
|
toast({
|
|
973
1127
|
status: "error",
|
|
974
|
-
title:
|
|
975
|
-
description: err instanceof Error ? err.message :
|
|
1128
|
+
title: t('agent.failedToSend'),
|
|
1129
|
+
description: err instanceof Error ? err.message : t('agent.unknownError'),
|
|
976
1130
|
duration: 3000,
|
|
977
1131
|
});
|
|
978
1132
|
})
|
|
979
1133
|
.finally(() => {
|
|
980
1134
|
setIsSending(false);
|
|
981
1135
|
});
|
|
982
|
-
}, [
|
|
1136
|
+
}, [agentRunId, client, toast, getAttachedDocs, getMessageContext, onAttachmentsSent, addOptimisticMessage, removeOptimisticMessages]);
|
|
983
1137
|
|
|
984
1138
|
// Drag and drop handlers for full-panel file upload
|
|
985
1139
|
const handleDragEnter = useCallback((e: React.DragEvent) => {
|
|
986
1140
|
e.preventDefault();
|
|
987
1141
|
e.stopPropagation();
|
|
988
1142
|
dragCounterRef.current++;
|
|
989
|
-
if (
|
|
1143
|
+
if (e.dataTransfer?.types?.includes('Files')) {
|
|
990
1144
|
setIsDragOver(true);
|
|
991
1145
|
}
|
|
992
|
-
}, [
|
|
1146
|
+
}, []);
|
|
993
1147
|
|
|
994
1148
|
const handleDragOver = useCallback((e: React.DragEvent) => {
|
|
995
1149
|
e.preventDefault();
|
|
@@ -1011,11 +1165,11 @@ function ModernAgentConversationInner({
|
|
|
1011
1165
|
dragCounterRef.current = 0;
|
|
1012
1166
|
setIsDragOver(false);
|
|
1013
1167
|
|
|
1014
|
-
if (
|
|
1168
|
+
if (e.dataTransfer?.files && e.dataTransfer.files.length > 0) {
|
|
1015
1169
|
const filesArray = Array.from(e.dataTransfer.files);
|
|
1016
1170
|
handleFileUpload(filesArray);
|
|
1017
1171
|
}
|
|
1018
|
-
}, [
|
|
1172
|
+
}, [handleFileUpload]);
|
|
1019
1173
|
|
|
1020
1174
|
// Stop/interrupt the active workflow
|
|
1021
1175
|
const handleStopWorkflow = useCallback(async () => {
|
|
@@ -1023,27 +1177,27 @@ function ModernAgentConversationInner({
|
|
|
1023
1177
|
|
|
1024
1178
|
setIsStopping(true);
|
|
1025
1179
|
try {
|
|
1026
|
-
await client.
|
|
1180
|
+
await client.agents.sendSignal(agentRunId, "Stop", {
|
|
1027
1181
|
message: "User requested stop",
|
|
1028
1182
|
});
|
|
1029
1183
|
|
|
1030
1184
|
toast({
|
|
1031
1185
|
status: "info",
|
|
1032
|
-
title:
|
|
1033
|
-
description:
|
|
1186
|
+
title: t('agent.agentInterrupted'),
|
|
1187
|
+
description: t('agent.typeNewInstructions'),
|
|
1034
1188
|
duration: 3000,
|
|
1035
1189
|
});
|
|
1036
1190
|
} catch (err) {
|
|
1037
1191
|
toast({
|
|
1038
1192
|
status: "error",
|
|
1039
|
-
title:
|
|
1040
|
-
description: err instanceof Error ? err.message :
|
|
1193
|
+
title: t('agent.failedToInterrupt'),
|
|
1194
|
+
description: err instanceof Error ? err.message : t('agent.unknownError'),
|
|
1041
1195
|
duration: 3000,
|
|
1042
1196
|
});
|
|
1043
1197
|
} finally {
|
|
1044
1198
|
setIsStopping(false);
|
|
1045
1199
|
}
|
|
1046
|
-
}, [isStopping, client,
|
|
1200
|
+
}, [isStopping, client, agentRunId, toast]);
|
|
1047
1201
|
|
|
1048
1202
|
// Expose stop handler to external callers via ref
|
|
1049
1203
|
useEffect(() => {
|
|
@@ -1058,6 +1212,10 @@ function ModernAgentConversationInner({
|
|
|
1058
1212
|
|
|
1059
1213
|
// Calculate number of active tasks for the status indicator
|
|
1060
1214
|
const getActiveTaskCount = (): number => {
|
|
1215
|
+
if (activeWorkstreams.length > 0) {
|
|
1216
|
+
return activeWorkstreams.filter((ws) => ws.status === "running").length;
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1061
1219
|
if (!messages.length) return 0;
|
|
1062
1220
|
|
|
1063
1221
|
// Group messages by workstream
|
|
@@ -1069,7 +1227,7 @@ function ModernAgentConversationInner({
|
|
|
1069
1227
|
if (!workstreamMessages.has(workstreamId)) {
|
|
1070
1228
|
workstreamMessages.set(workstreamId, []);
|
|
1071
1229
|
}
|
|
1072
|
-
workstreamMessages.get(workstreamId)
|
|
1230
|
+
workstreamMessages.get(workstreamId)?.push(message);
|
|
1073
1231
|
}
|
|
1074
1232
|
});
|
|
1075
1233
|
|
|
@@ -1093,19 +1251,18 @@ function ModernAgentConversationInner({
|
|
|
1093
1251
|
return activeCount;
|
|
1094
1252
|
};
|
|
1095
1253
|
|
|
1096
|
-
const actualTitle =
|
|
1097
|
-
title || run.workflowId.split(":")[2] || "Agent Conversation";
|
|
1254
|
+
const actualTitle = title || t('agent.agentConversation');
|
|
1098
1255
|
|
|
1099
1256
|
// Handle downloading conversation
|
|
1100
1257
|
const downloadConversation = async () => {
|
|
1101
1258
|
try {
|
|
1102
|
-
const url = await getConversationUrl(client,
|
|
1259
|
+
const url = await getConversationUrl(client, agentRunId);
|
|
1103
1260
|
if (url) window.open(url, "_blank");
|
|
1104
1261
|
} catch (err) {
|
|
1105
1262
|
console.error("Failed to download conversation", err);
|
|
1106
1263
|
toast({
|
|
1107
1264
|
status: "error",
|
|
1108
|
-
title:
|
|
1265
|
+
title: t('agent.failedToDownload'),
|
|
1109
1266
|
duration: 3000,
|
|
1110
1267
|
});
|
|
1111
1268
|
}
|
|
@@ -1113,10 +1270,10 @@ function ModernAgentConversationInner({
|
|
|
1113
1270
|
|
|
1114
1271
|
// Handle copying run ID
|
|
1115
1272
|
const copyRunId = () => {
|
|
1116
|
-
navigator.clipboard.writeText(
|
|
1273
|
+
navigator.clipboard.writeText(agentRunId);
|
|
1117
1274
|
toast({
|
|
1118
1275
|
status: "success",
|
|
1119
|
-
title:
|
|
1276
|
+
title: t('agent.runIdCopied'),
|
|
1120
1277
|
duration: 2000,
|
|
1121
1278
|
});
|
|
1122
1279
|
};
|
|
@@ -1127,8 +1284,8 @@ function ModernAgentConversationInner({
|
|
|
1127
1284
|
if (!conversationRef.current) {
|
|
1128
1285
|
toast({
|
|
1129
1286
|
status: "error",
|
|
1130
|
-
title:
|
|
1131
|
-
description:
|
|
1287
|
+
title: t('agent.pdfExportFailed'),
|
|
1288
|
+
description: t('agent.noConversationContent'),
|
|
1132
1289
|
duration: 3000,
|
|
1133
1290
|
});
|
|
1134
1291
|
return;
|
|
@@ -1140,21 +1297,21 @@ function ModernAgentConversationInner({
|
|
|
1140
1297
|
if (!conversationRef.current) {
|
|
1141
1298
|
toast({
|
|
1142
1299
|
status: "error",
|
|
1143
|
-
title:
|
|
1144
|
-
description:
|
|
1300
|
+
title: t('agent.pdfExportFailed'),
|
|
1301
|
+
description: t('agent.noConversationContent'),
|
|
1145
1302
|
duration: 3000,
|
|
1146
1303
|
});
|
|
1147
1304
|
return;
|
|
1148
1305
|
}
|
|
1149
1306
|
|
|
1150
|
-
const pdfTitle = `${actualTitle} - ${
|
|
1307
|
+
const pdfTitle = `${actualTitle} - ${agentRunId}`;
|
|
1151
1308
|
const success = printElementToPdf(conversationRef.current, pdfTitle);
|
|
1152
1309
|
|
|
1153
1310
|
if (!success) {
|
|
1154
1311
|
toast({
|
|
1155
1312
|
status: "error",
|
|
1156
|
-
title:
|
|
1157
|
-
description:
|
|
1313
|
+
title: t('agent.pdfExportFailed'),
|
|
1314
|
+
description: t('agent.unableToOpenPrint'),
|
|
1158
1315
|
duration: 4000,
|
|
1159
1316
|
});
|
|
1160
1317
|
return;
|
|
@@ -1162,13 +1319,26 @@ function ModernAgentConversationInner({
|
|
|
1162
1319
|
|
|
1163
1320
|
toast({
|
|
1164
1321
|
status: "success",
|
|
1165
|
-
title:
|
|
1166
|
-
description:
|
|
1322
|
+
title: t('agent.pdfExportReady'),
|
|
1323
|
+
description: t('agent.printDialogDescription'),
|
|
1167
1324
|
duration: 4000,
|
|
1168
1325
|
});
|
|
1169
1326
|
setIsPdfModalOpen(false);
|
|
1170
1327
|
};
|
|
1171
1328
|
|
|
1329
|
+
// Artifact refresh key — bumps when tool calls complete or conversation finishes,
|
|
1330
|
+
// which is when new artifacts are most likely to appear.
|
|
1331
|
+
const artifactRefreshKey = useMemo(() => {
|
|
1332
|
+
return messages.filter((m) => {
|
|
1333
|
+
if (m.type === AgentMessageType.COMPLETE) return true;
|
|
1334
|
+
if (m.type === AgentMessageType.THOUGHT) {
|
|
1335
|
+
const details = m.details as Record<string, unknown> | undefined;
|
|
1336
|
+
return details?.tool_status === 'completed';
|
|
1337
|
+
}
|
|
1338
|
+
return false;
|
|
1339
|
+
}).length;
|
|
1340
|
+
}, [messages]);
|
|
1341
|
+
|
|
1172
1342
|
// PERFORMANCE: Memoize taskLabels to prevent AllMessagesMixed re-renders
|
|
1173
1343
|
const taskLabels = useMemo(() =>
|
|
1174
1344
|
getActivePlan.plan.plan?.reduce((acc, task) => {
|
|
@@ -1177,12 +1347,143 @@ function ModernAgentConversationInner({
|
|
|
1177
1347
|
}, new Map<string, string>()),
|
|
1178
1348
|
[getActivePlan.plan]);
|
|
1179
1349
|
|
|
1350
|
+
// Conversation area inner content — shared between main layout and conversationTab mode
|
|
1351
|
+
const conversationAreaJsx = (
|
|
1352
|
+
<div
|
|
1353
|
+
ref={conversationRef}
|
|
1354
|
+
className={cn(
|
|
1355
|
+
"flex flex-col min-h-0 min-w-0 border-0",
|
|
1356
|
+
conversationTab
|
|
1357
|
+
? "flex-1 h-full"
|
|
1358
|
+
: isRightPanelVisible
|
|
1359
|
+
? "w-full flex-1 min-h-[50vh]"
|
|
1360
|
+
: fullWidth
|
|
1361
|
+
? "flex-1 w-full"
|
|
1362
|
+
: `flex-1 mx-auto ${!isModal ? "max-w-4xl" : ""}`
|
|
1363
|
+
)}
|
|
1364
|
+
>
|
|
1365
|
+
{!hideHeader && (
|
|
1366
|
+
<div className="flex-shrink-0">
|
|
1367
|
+
<Header
|
|
1368
|
+
title={actualTitle}
|
|
1369
|
+
isCompleted={isCompleted}
|
|
1370
|
+
onClose={onClose}
|
|
1371
|
+
isModal={isModal}
|
|
1372
|
+
agentRunId={agentRunId}
|
|
1373
|
+
viewMode={viewMode}
|
|
1374
|
+
onViewModeChange={handleViewModeChange}
|
|
1375
|
+
showPlanPanel={showRightPanelProp && showSlidingPanel}
|
|
1376
|
+
hasPlan={showRightPanelProp && plans.length > 0}
|
|
1377
|
+
showPlanButton={showRightPanelProp && !conversationTab}
|
|
1378
|
+
onTogglePlanPanel={handleTogglePlanPanel}
|
|
1379
|
+
onDownload={downloadConversation}
|
|
1380
|
+
onCopyRunId={copyRunId}
|
|
1381
|
+
resetWorkflow={resetWorkflow}
|
|
1382
|
+
onRestart={onRestart}
|
|
1383
|
+
onFork={onFork}
|
|
1384
|
+
onShowDetails={onShowDetails}
|
|
1385
|
+
onExportPdf={exportConversationPdf}
|
|
1386
|
+
isReceivingChunks={debugChunkFlash}
|
|
1387
|
+
/>
|
|
1388
|
+
</div>
|
|
1389
|
+
)}
|
|
1390
|
+
|
|
1391
|
+
{messages.length === 0 && !isCompleted ? (
|
|
1392
|
+
<div className="flex-1 flex flex-col items-center justify-center h-full text-center py-6">
|
|
1393
|
+
<div className="p-5 max-w-md border border-info rounded-lg shadow-sm">
|
|
1394
|
+
<div className="flex items-center space-x-3 mb-3">
|
|
1395
|
+
<PulsatingCircle size="sm" color="blue" />
|
|
1396
|
+
<div className="text-sm text-muted font-medium">
|
|
1397
|
+
{ThinkingMessages[thinkingMessageIndex]}
|
|
1398
|
+
</div>
|
|
1399
|
+
</div>
|
|
1400
|
+
<div className="mt-4 flex justify-center">
|
|
1401
|
+
<AnimatedThinkingDots color="blue" className="mt-1" />
|
|
1402
|
+
</div>
|
|
1403
|
+
</div>
|
|
1404
|
+
</div>
|
|
1405
|
+
) : (
|
|
1406
|
+
<AllMessagesMixed
|
|
1407
|
+
messages={messages}
|
|
1408
|
+
bottomRef={bottomRef as React.RefObject<HTMLDivElement>}
|
|
1409
|
+
isCompleted={isCompleted}
|
|
1410
|
+
plan={getActivePlan.plan}
|
|
1411
|
+
workstreamStatus={getActivePlan.workstreamStatus}
|
|
1412
|
+
showPlanPanel={showRightPanelProp && showSlidingPanel}
|
|
1413
|
+
onTogglePlanPanel={handleTogglePlanPanel}
|
|
1414
|
+
plans={plans}
|
|
1415
|
+
activePlanIndex={activePlanIndex}
|
|
1416
|
+
onChangePlan={handleChangePlan}
|
|
1417
|
+
taskLabels={taskLabels}
|
|
1418
|
+
streamingMessages={streamingMessages}
|
|
1419
|
+
onSendMessage={handleSendMessage}
|
|
1420
|
+
thinkingMessageIndex={thinkingMessageIndex}
|
|
1421
|
+
messageItemClassNames={messageItemClassNames}
|
|
1422
|
+
messageStyleOverrides={messageStyleOverrides}
|
|
1423
|
+
toolCallGroupClassNames={toolCallGroupClassNames}
|
|
1424
|
+
hideToolCallsInViewMode={hideToolCallsInViewMode}
|
|
1425
|
+
streamingMessageClassNames={streamingMessageClassNames}
|
|
1426
|
+
batchProgressPanelClassNames={batchProgressPanelClassNames}
|
|
1427
|
+
artifactRunId={agentRunId}
|
|
1428
|
+
viewMode={viewMode}
|
|
1429
|
+
hideWorkstreamTabs={hideWorkstreamTabs}
|
|
1430
|
+
workingIndicatorClassName={workingIndicatorClassName}
|
|
1431
|
+
messageListClassName={messageListClassName}
|
|
1432
|
+
StoreLinkComponent={effectiveStoreLinkComponent}
|
|
1433
|
+
CollectionLinkComponent={CollectionLinkComponent}
|
|
1434
|
+
prependFriendlyMessage={prependFriendlyMessage}
|
|
1435
|
+
/>
|
|
1436
|
+
)}
|
|
1437
|
+
|
|
1438
|
+
{!hideMessageInput && (
|
|
1439
|
+
<div className="flex-shrink-0" style={{ paddingBottom: 'env(safe-area-inset-bottom, 0px)' }}>
|
|
1440
|
+
{effectiveWorkflowStatus && effectiveWorkflowStatus !== "RUNNING" ? (
|
|
1441
|
+
<MessageBox
|
|
1442
|
+
status={effectiveWorkflowStatus === "COMPLETED" ? 'success' : 'done'}
|
|
1443
|
+
icon={null}
|
|
1444
|
+
className="m-2"
|
|
1445
|
+
>
|
|
1446
|
+
This Workflow is {effectiveWorkflowStatus}
|
|
1447
|
+
</MessageBox>
|
|
1448
|
+
) : showInput && (
|
|
1449
|
+
<MessageInput
|
|
1450
|
+
onSend={handleSendMessage}
|
|
1451
|
+
onStop={handleStopWorkflow}
|
|
1452
|
+
disabled={isUploading}
|
|
1453
|
+
isSending={isSending || isUploading}
|
|
1454
|
+
isStopping={isStopping}
|
|
1455
|
+
isStreaming={!isCompleted}
|
|
1456
|
+
isCompleted={isCompleted}
|
|
1457
|
+
activeTaskCount={getActiveTaskCount()}
|
|
1458
|
+
placeholder={placeholder ?? 'Type your message...'}
|
|
1459
|
+
onFilesSelected={handleFileUpload}
|
|
1460
|
+
uploadedFiles={uploadedFiles}
|
|
1461
|
+
onRemoveFile={onRemoveFile}
|
|
1462
|
+
acceptedFileTypes={acceptedFileTypes}
|
|
1463
|
+
maxFiles={maxFiles}
|
|
1464
|
+
processingFiles={processingFiles}
|
|
1465
|
+
hasProcessingFiles={hasProcessingFiles}
|
|
1466
|
+
renderDocumentSearch={renderDocumentSearch}
|
|
1467
|
+
selectedDocuments={selectedDocuments}
|
|
1468
|
+
onRemoveDocument={onRemoveDocument}
|
|
1469
|
+
hideObjectLinking={hideObjectLinking}
|
|
1470
|
+
hideFileUpload={hideFileUpload}
|
|
1471
|
+
className={inputContainerClassName}
|
|
1472
|
+
inputClassName={inputClassName}
|
|
1473
|
+
/>
|
|
1474
|
+
)}
|
|
1475
|
+
</div>
|
|
1476
|
+
)}
|
|
1477
|
+
</div>
|
|
1478
|
+
);
|
|
1479
|
+
|
|
1180
1480
|
// Main content - wrapped with FusionFragmentProvider when fusionData is provided
|
|
1181
1481
|
const mainContent = (
|
|
1182
1482
|
<ArtifactUrlCacheProvider>
|
|
1183
1483
|
<ImageLightboxProvider>
|
|
1184
1484
|
<div
|
|
1185
|
-
|
|
1485
|
+
ref={conversationLayoutRef}
|
|
1486
|
+
className={cn("flex flex-col lg:flex-row gap-2 w-full h-full relative overflow-hidden", isDragOver && "ring-2 ring-blue-400 ring-inset", className)}
|
|
1186
1487
|
onDragEnter={handleDragEnter}
|
|
1187
1488
|
onDragOver={handleDragOver}
|
|
1188
1489
|
onDragLeave={handleDragLeave}
|
|
@@ -1197,170 +1498,62 @@ function ModernAgentConversationInner({
|
|
|
1197
1498
|
</div>
|
|
1198
1499
|
</div>
|
|
1199
1500
|
)}
|
|
1200
|
-
{/* Conversation Area
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
{/* Header - flex-shrink-0 to prevent shrinking */}
|
|
1215
|
-
{!hideHeader && (
|
|
1216
|
-
<div className="flex-shrink-0">
|
|
1217
|
-
<Header
|
|
1218
|
-
title={actualTitle}
|
|
1219
|
-
isCompleted={isCompleted}
|
|
1220
|
-
onClose={onClose}
|
|
1221
|
-
isModal={isModal}
|
|
1222
|
-
run={run}
|
|
1223
|
-
viewMode={viewMode}
|
|
1224
|
-
onViewModeChange={handleViewModeChange}
|
|
1225
|
-
showPlanPanel={showSlidingPanel}
|
|
1226
|
-
hasPlan={plans.length > 0}
|
|
1227
|
-
onTogglePlanPanel={handleTogglePlanPanel}
|
|
1228
|
-
onDownload={downloadConversation}
|
|
1229
|
-
onCopyRunId={copyRunId}
|
|
1230
|
-
resetWorkflow={resetWorkflow}
|
|
1231
|
-
onExportPdf={exportConversationPdf}
|
|
1232
|
-
isReceivingChunks={debugChunkFlash}
|
|
1501
|
+
{/* Conversation Area — hidden when conversationTab moves it into the right panel */}
|
|
1502
|
+
{!conversationTab && conversationAreaJsx}
|
|
1503
|
+
|
|
1504
|
+
{/* Unified Right Panel — Plan | Workstreams | Documents | Uploads */}
|
|
1505
|
+
{isRightPanelVisible && (
|
|
1506
|
+
<>
|
|
1507
|
+
{!conversationTab && (
|
|
1508
|
+
<div
|
|
1509
|
+
className="hidden lg:block lg:w-1 lg:shrink-0 cursor-col-resize bg-border/70 hover:bg-border transition-colors"
|
|
1510
|
+
onMouseDown={() => setIsRightPanelResizing(true)}
|
|
1511
|
+
role="separator"
|
|
1512
|
+
aria-orientation="vertical"
|
|
1513
|
+
aria-label="Resize right panel"
|
|
1233
1514
|
/>
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
{ThinkingMessages[thinkingMessageIndex]}
|
|
1244
|
-
</div>
|
|
1245
|
-
</div>
|
|
1246
|
-
<div className="mt-4 flex justify-center">
|
|
1247
|
-
<AnimatedThinkingDots color="blue" className="mt-1" />
|
|
1248
|
-
</div>
|
|
1249
|
-
</div>
|
|
1250
|
-
</div>
|
|
1251
|
-
) : (
|
|
1252
|
-
<AllMessagesMixed
|
|
1253
|
-
messages={messages}
|
|
1254
|
-
bottomRef={bottomRef as React.RefObject<HTMLDivElement>}
|
|
1255
|
-
isCompleted={isCompleted}
|
|
1256
|
-
plan={getActivePlan.plan}
|
|
1257
|
-
workstreamStatus={getActivePlan.workstreamStatus}
|
|
1258
|
-
showPlanPanel={showSlidingPanel}
|
|
1259
|
-
onTogglePlanPanel={handleTogglePlanPanel}
|
|
1260
|
-
plans={plans}
|
|
1261
|
-
activePlanIndex={activePlanIndex}
|
|
1262
|
-
onChangePlan={handleChangePlan}
|
|
1263
|
-
taskLabels={taskLabels}
|
|
1264
|
-
streamingMessages={streamingMessages}
|
|
1265
|
-
onSendMessage={handleSendMessage}
|
|
1266
|
-
thinkingMessageIndex={thinkingMessageIndex}
|
|
1267
|
-
messageItemClassNames={messageItemClassNames}
|
|
1268
|
-
messageStyleOverrides={messageStyleOverrides}
|
|
1269
|
-
toolCallGroupClassNames={toolCallGroupClassNames}
|
|
1270
|
-
hideToolCallsInViewMode={hideToolCallsInViewMode}
|
|
1271
|
-
streamingMessageClassNames={streamingMessageClassNames}
|
|
1272
|
-
batchProgressPanelClassNames={batchProgressPanelClassNames}
|
|
1273
|
-
viewMode={viewMode}
|
|
1274
|
-
hideWorkstreamTabs={hideWorkstreamTabs}
|
|
1275
|
-
workingIndicatorClassName={workingIndicatorClassName}
|
|
1276
|
-
messageListClassName={messageListClassName}
|
|
1277
|
-
StoreLinkComponent={effectiveStoreLinkComponent}
|
|
1278
|
-
CollectionLinkComponent={CollectionLinkComponent}
|
|
1279
|
-
prependFriendlyMessage={prependFriendlyMessage}
|
|
1280
|
-
/>
|
|
1281
|
-
)}
|
|
1282
|
-
|
|
1283
|
-
{/* Show workflow status message when not running, or show input when running/unknown */}
|
|
1284
|
-
{/* Input area - flex-shrink-0 to stay pinned at bottom, with iOS safe area support */}
|
|
1285
|
-
{!hideMessageInput && (
|
|
1286
|
-
<div className="flex-shrink-0" style={{ paddingBottom: 'env(safe-area-inset-bottom, 0px)' }}>
|
|
1287
|
-
{effectiveWorkflowStatus && effectiveWorkflowStatus !== "RUNNING" ? (
|
|
1288
|
-
<MessageBox
|
|
1289
|
-
status={effectiveWorkflowStatus === "COMPLETED" ? 'success' : 'done'}
|
|
1290
|
-
icon={null}
|
|
1291
|
-
className="m-2"
|
|
1292
|
-
>
|
|
1293
|
-
This Workflow is {effectiveWorkflowStatus}
|
|
1294
|
-
</MessageBox>
|
|
1295
|
-
) : showInput && (
|
|
1296
|
-
<MessageInput
|
|
1297
|
-
onSend={handleSendMessage}
|
|
1298
|
-
onStop={handleStopWorkflow}
|
|
1299
|
-
disabled={isUploading}
|
|
1300
|
-
isSending={isSending || isUploading}
|
|
1301
|
-
isStopping={isStopping}
|
|
1302
|
-
isStreaming={!isCompleted}
|
|
1303
|
-
isCompleted={isCompleted}
|
|
1304
|
-
activeTaskCount={getActiveTaskCount()}
|
|
1305
|
-
placeholder={placeholder}
|
|
1306
|
-
// File upload props - use internal handler that signals workflow
|
|
1307
|
-
onFilesSelected={handleFileUpload}
|
|
1308
|
-
uploadedFiles={uploadedFiles}
|
|
1309
|
-
onRemoveFile={onRemoveFile}
|
|
1310
|
-
acceptedFileTypes={acceptedFileTypes}
|
|
1311
|
-
maxFiles={maxFiles}
|
|
1312
|
-
// File processing state
|
|
1313
|
-
processingFiles={processingFiles}
|
|
1314
|
-
hasProcessingFiles={hasProcessingFiles}
|
|
1315
|
-
// Document search props
|
|
1316
|
-
renderDocumentSearch={renderDocumentSearch}
|
|
1317
|
-
selectedDocuments={selectedDocuments}
|
|
1318
|
-
onRemoveDocument={onRemoveDocument}
|
|
1319
|
-
// Object linking
|
|
1320
|
-
hideObjectLinking={hideObjectLinking}
|
|
1321
|
-
// Files Uploaded
|
|
1322
|
-
hideFileUpload={hideFileUpload}
|
|
1323
|
-
// Styling props
|
|
1324
|
-
className={inputContainerClassName}
|
|
1325
|
-
inputClassName={inputClassName}
|
|
1326
|
-
/>
|
|
1327
|
-
)}
|
|
1328
|
-
</div>
|
|
1329
|
-
)}
|
|
1330
|
-
</div>
|
|
1331
|
-
|
|
1332
|
-
{/* Plan Panel Area - only rendered when panel should be shown */}
|
|
1333
|
-
{!hidePlanPanel && showSlidingPanel && (
|
|
1334
|
-
<div className="w-full lg:w-1/3 min-h-[50vh] lg:h-full border-t lg:border-t-0 lg:border-l">
|
|
1335
|
-
<InlineSlidingPlanPanel
|
|
1515
|
+
)}
|
|
1516
|
+
<div
|
|
1517
|
+
className={conversationTab
|
|
1518
|
+
? "w-full h-full overflow-auto"
|
|
1519
|
+
: "w-full lg:w-[var(--agent-right-panel-width)] lg:shrink-0 min-h-[50vh] lg:h-full border-t lg:border-t-0 lg:border-l"}
|
|
1520
|
+
style={!conversationTab ? ({ ['--agent-right-panel-width' as string]: `${rightPanelWidth}px` } as React.CSSProperties) : undefined}
|
|
1521
|
+
>
|
|
1522
|
+
<AgentRightPanel
|
|
1523
|
+
// Plan
|
|
1336
1524
|
plan={getActivePlan.plan}
|
|
1337
1525
|
workstreamStatus={getActivePlan.workstreamStatus}
|
|
1338
|
-
isOpen={showSlidingPanel}
|
|
1339
|
-
onClose={handleClosePlanPanel}
|
|
1340
1526
|
plans={plans}
|
|
1341
1527
|
activePlanIndex={activePlanIndex}
|
|
1342
1528
|
onChangePlan={handleChangePlan}
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
<div className={cn(
|
|
1350
|
-
"w-full lg:w-2/5 min-h-[50vh] lg:h-full border-t lg:border-t-0 lg:border-l",
|
|
1351
|
-
showSlidingPanel && "lg:w-1/3"
|
|
1352
|
-
)}>
|
|
1353
|
-
<DocumentPanel
|
|
1354
|
-
isOpen={isDocPanelOpen}
|
|
1355
|
-
onClose={handleCloseDocPanel}
|
|
1356
|
-
documents={openDocuments}
|
|
1529
|
+
showPlan={!hidePlanPanel && showSlidingPanel}
|
|
1530
|
+
// Workstreams
|
|
1531
|
+
activeWorkstreams={panelWorkstreams}
|
|
1532
|
+
hideWorkstreams={hideWorkstreamTabs}
|
|
1533
|
+
// Documents
|
|
1534
|
+
openDocuments={openDocuments}
|
|
1357
1535
|
activeDocumentId={activeDocumentId}
|
|
1358
1536
|
onSelectDocument={selectDocument}
|
|
1359
1537
|
onCloseDocument={handleCloseDocument}
|
|
1360
|
-
|
|
1361
|
-
runId={
|
|
1538
|
+
docRefreshKey={docRefreshKey}
|
|
1539
|
+
runId={agentRunId}
|
|
1540
|
+
// Uploads
|
|
1541
|
+
processingFiles={processingFilesProp ?? processingFiles}
|
|
1542
|
+
// Artifacts
|
|
1543
|
+
showArtifacts={showArtifacts}
|
|
1544
|
+
artifactRefreshKey={artifactRefreshKey}
|
|
1545
|
+
// Messages (for workstreams tab context)
|
|
1546
|
+
messages={messages}
|
|
1547
|
+
// Payload content
|
|
1548
|
+
payloadContent={payloadContent}
|
|
1549
|
+
// Conversation content
|
|
1550
|
+
conversationContent={conversationTab ? conversationAreaJsx : conversationContent}
|
|
1551
|
+
// Panel control
|
|
1552
|
+
onClose={handleCloseRightPanel}
|
|
1553
|
+
defaultTab={rightPanelTab}
|
|
1362
1554
|
/>
|
|
1363
|
-
|
|
1555
|
+
</div>
|
|
1556
|
+
</>
|
|
1364
1557
|
)}
|
|
1365
1558
|
<Modal isOpen={isPdfModalOpen} onClose={() => setIsPdfModalOpen(false)}>
|
|
1366
1559
|
<ModalTitle>Export conversation as PDF</ModalTitle>
|
|
@@ -1395,7 +1588,7 @@ function ModernAgentConversationInner({
|
|
|
1395
1588
|
data={fusionData}
|
|
1396
1589
|
sendMessage={handleSendMessage}
|
|
1397
1590
|
ChartComponent={VegaLiteChart}
|
|
1398
|
-
artifactRunId={
|
|
1591
|
+
artifactRunId={agentRunId}
|
|
1399
1592
|
>
|
|
1400
1593
|
{mainContent}
|
|
1401
1594
|
</FusionFragmentProvider>
|
|
@@ -1404,13 +1597,3 @@ function ModernAgentConversationInner({
|
|
|
1404
1597
|
|
|
1405
1598
|
return mainContent;
|
|
1406
1599
|
}
|
|
1407
|
-
|
|
1408
|
-
// Helper function to get conversation URL - used by other components
|
|
1409
|
-
export async function getConversationUrl(
|
|
1410
|
-
vertesia: VertesiaClient,
|
|
1411
|
-
workflowRunId: string,
|
|
1412
|
-
): Promise<string> {
|
|
1413
|
-
return vertesia.files
|
|
1414
|
-
.getDownloadUrl(`agents/${workflowRunId}/conversation.json`)
|
|
1415
|
-
.then((r) => r.url);
|
|
1416
|
-
}
|