@vertesia/ui 1.0.0-dev.20260128.144200 → 1.0.0-dev.20260225.024852Z
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/InputList.js +1 -1
- package/lib/esm/core/components/InputList.js.map +1 -1
- package/lib/esm/core/components/Overlay.js +1 -1
- package/lib/esm/core/components/Overlay.js.map +1 -1
- package/lib/esm/core/components/SidePanel.js +8 -2
- package/lib/esm/core/components/SidePanel.js.map +1 -1
- package/lib/esm/core/components/Switch.js +1 -1
- package/lib/esm/core/components/Switch.js.map +1 -1
- package/lib/esm/core/components/index.js +0 -8
- package/lib/esm/core/components/index.js.map +1 -1
- package/lib/esm/core/components/shadcn/MessageBox.js.map +1 -0
- package/lib/esm/core/components/shadcn/Panel.js +13 -0
- package/lib/esm/core/components/shadcn/Panel.js.map +1 -0
- package/lib/esm/core/components/{Badge.js → shadcn/badge.js} +2 -2
- package/lib/esm/core/components/shadcn/badge.js.map +1 -0
- package/lib/esm/core/components/shadcn/command.js +1 -1
- package/lib/esm/core/components/shadcn/command.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/filterBar.js +73 -83
- package/lib/esm/core/components/shadcn/filters/filterBar.js.map +1 -1
- package/lib/esm/core/components/shadcn/index.js +4 -2
- package/lib/esm/core/components/shadcn/index.js.map +1 -1
- package/lib/esm/core/components/shadcn/modal/ConfirmModal.js +10 -0
- package/lib/esm/core/components/shadcn/modal/ConfirmModal.js.map +1 -0
- package/lib/esm/core/components/{DeleteModal.js → shadcn/modal/DeleteModal.js} +1 -1
- package/lib/esm/core/components/shadcn/modal/DeleteModal.js.map +1 -0
- package/lib/esm/core/components/shadcn/{dialog.js → modal/dialog.js} +19 -15
- package/lib/esm/core/components/shadcn/modal/dialog.js.map +1 -0
- package/lib/esm/core/components/shadcn/modal/index.js +4 -0
- package/lib/esm/core/components/shadcn/modal/index.js.map +1 -0
- package/lib/esm/core/components/shadcn/popover.js +4 -2
- package/lib/esm/core/components/shadcn/popover.js.map +1 -1
- package/lib/esm/core/components/shadcn/selectBox.js +19 -15
- package/lib/esm/core/components/shadcn/selectBox.js.map +1 -1
- package/lib/esm/core/components/shadcn/tabs.js +16 -14
- package/lib/esm/core/components/shadcn/tabs.js.map +1 -1
- package/lib/esm/core/components/shadcn/textarea.js +30 -2
- package/lib/esm/core/components/shadcn/textarea.js.map +1 -1
- package/lib/esm/core/components/shadcn/tooltip.js +5 -1
- package/lib/esm/core/components/shadcn/tooltip.js.map +1 -1
- package/lib/esm/features/agent/PayloadBuilder.js +45 -0
- package/lib/esm/features/agent/PayloadBuilder.js.map +1 -1
- package/lib/esm/features/agent/chat/AgentChart.js +12 -232
- package/lib/esm/features/agent/chat/AgentChart.js.map +1 -1
- package/lib/esm/features/agent/chat/AskUserWidget.js +2 -1
- package/lib/esm/features/agent/chat/AskUserWidget.js.map +1 -1
- package/lib/esm/features/agent/chat/DocumentPanel.js +46 -0
- package/lib/esm/features/agent/chat/DocumentPanel.js.map +1 -0
- package/lib/esm/features/agent/chat/DocumentTabBar.js +17 -0
- package/lib/esm/features/agent/chat/DocumentTabBar.js.map +1 -0
- package/lib/esm/features/agent/chat/ModernAgentConversation.js +159 -402
- package/lib/esm/features/agent/chat/ModernAgentConversation.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js +99 -57
- package/lib/esm/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/BatchProgressPanel.js +4 -4
- package/lib/esm/features/agent/chat/ModernAgentOutput/BatchProgressPanel.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/Header.js +4 -4
- package/lib/esm/features/agent/chat/ModernAgentOutput/Header.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.js +3 -3
- package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/MessageInput.js +25 -22
- package/lib/esm/features/agent/chat/ModernAgentOutput/MessageInput.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/MessageItem.js +110 -55
- package/lib/esm/features/agent/chat/ModernAgentOutput/MessageItem.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/StreamingMessage.js +2 -2
- package/lib/esm/features/agent/chat/ModernAgentOutput/StreamingMessage.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/ToolCallGroup.js +146 -55
- package/lib/esm/features/agent/chat/ModernAgentOutput/ToolCallGroup.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js +5 -6
- package/lib/esm/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/utils.js +110 -2
- package/lib/esm/features/agent/chat/ModernAgentOutput/utils.js.map +1 -1
- package/lib/esm/features/agent/chat/SkillWidgetProvider.js +28 -15
- package/lib/esm/features/agent/chat/SkillWidgetProvider.js.map +1 -1
- package/lib/esm/features/agent/chat/hooks/useAgentPlans.js +146 -0
- package/lib/esm/features/agent/chat/hooks/useAgentPlans.js.map +1 -0
- package/lib/esm/features/agent/chat/hooks/useAgentStream.js +180 -0
- package/lib/esm/features/agent/chat/hooks/useAgentStream.js.map +1 -0
- package/lib/esm/features/agent/chat/hooks/useDocumentPanel.js +100 -0
- package/lib/esm/features/agent/chat/hooks/useDocumentPanel.js.map +1 -0
- package/lib/esm/features/agent/chat/hooks/useFileProcessing.js +90 -0
- package/lib/esm/features/agent/chat/hooks/useFileProcessing.js.map +1 -0
- package/lib/esm/features/agent/chat/index.js +6 -5
- package/lib/esm/features/agent/chat/index.js.map +1 -1
- package/lib/esm/features/agent/chat/types/document.js +2 -0
- package/lib/esm/features/agent/chat/types/document.js.map +1 -0
- package/lib/esm/features/agent/index.js +0 -2
- package/lib/esm/features/agent/index.js.map +1 -1
- package/lib/esm/features/store/collections/BrowseCollectionView.js +4 -6
- package/lib/esm/features/store/collections/BrowseCollectionView.js.map +1 -1
- package/lib/esm/features/store/collections/CreateCollection.js +4 -4
- package/lib/esm/features/store/collections/CreateCollection.js.map +1 -1
- package/lib/esm/features/store/collections/EditCollectionView.js +1 -1
- package/lib/esm/features/store/collections/EditCollectionView.js.map +1 -1
- package/lib/esm/features/store/objects/DocumentSearchResults.js +5 -5
- package/lib/esm/features/store/objects/DocumentSearchResults.js.map +1 -1
- package/lib/esm/features/store/objects/ExportPropertiesModal.js +3 -3
- package/lib/esm/features/store/objects/ExportPropertiesModal.js.map +1 -1
- package/lib/esm/features/store/objects/components/ContentOverview.js +19 -120
- package/lib/esm/features/store/objects/components/ContentOverview.js.map +1 -1
- package/lib/esm/features/store/objects/components/PropertiesEditorModal.js +1 -1
- package/lib/esm/features/store/objects/components/PropertiesEditorModal.js.map +1 -1
- package/lib/esm/features/store/objects/components/SelectDocumentModal.js +2 -2
- package/lib/esm/features/store/objects/components/SelectDocumentModal.js.map +1 -1
- package/lib/esm/features/store/objects/components/VectorSearchWidget.js +1 -1
- package/lib/esm/features/store/objects/components/VectorSearchWidget.js.map +1 -1
- package/lib/esm/features/store/objects/components/index.js +1 -1
- package/lib/esm/features/store/objects/components/index.js.map +1 -1
- package/lib/esm/features/store/objects/components/useDownloadFile.js +192 -0
- package/lib/esm/features/store/objects/components/useDownloadFile.js.map +1 -0
- package/lib/esm/features/store/objects/search/DocumentSearchContext.js +1 -2
- package/lib/esm/features/store/objects/search/DocumentSearchContext.js.map +1 -1
- package/lib/esm/features/store/objects/selection/SelectionActions.js +5 -8
- package/lib/esm/features/store/objects/selection/SelectionActions.js.map +1 -1
- package/lib/esm/features/store/objects/selection/actions/AddToCollectionAction.js +4 -4
- package/lib/esm/features/store/objects/selection/actions/AddToCollectionAction.js.map +1 -1
- package/lib/esm/features/store/objects/selection/actions/ChangeTypeAction.js +2 -2
- package/lib/esm/features/store/objects/selection/actions/ChangeTypeAction.js.map +1 -1
- package/lib/esm/features/store/objects/selection/actions/ExportPropertiesAction.js +1 -1
- package/lib/esm/features/store/objects/selection/actions/ExportPropertiesAction.js.map +1 -1
- package/lib/esm/features/store/objects/selection/actions/StartWorkflowComponent.js +3 -3
- package/lib/esm/features/store/objects/selection/actions/StartWorkflowComponent.js.map +1 -1
- package/lib/esm/features/store/objects/upload/DocumentUploadModal.js +13 -13
- package/lib/esm/features/store/objects/upload/DocumentUploadModal.js.map +1 -1
- package/lib/esm/features/store/objects/upload/useSmartFileUploadProcessing.js +15 -8
- package/lib/esm/features/store/objects/upload/useSmartFileUploadProcessing.js.map +1 -1
- package/lib/esm/features/store/types/ObjectSchemaEditor.js +6 -5
- package/lib/esm/features/store/types/ObjectSchemaEditor.js.map +1 -1
- package/lib/esm/features/store/types/SelectContentType.js +3 -3
- package/lib/esm/features/store/types/SelectContentType.js.map +1 -1
- package/lib/esm/features/store/types/SelectContentTypeModal.js +5 -4
- package/lib/esm/features/store/types/SelectContentTypeModal.js.map +1 -1
- package/lib/esm/features/store/types/TableLayoutEditor.js +4 -4
- package/lib/esm/features/store/types/TableLayoutEditor.js.map +1 -1
- package/lib/esm/features/user/UserInfo.js +73 -9
- package/lib/esm/features/user/UserInfo.js.map +1 -1
- package/lib/esm/features/utils/print.js +0 -1
- package/lib/esm/features/utils/print.js.map +1 -1
- package/lib/esm/layout/AppLayout.js +3 -4
- package/lib/esm/layout/AppLayout.js.map +1 -1
- package/lib/esm/layout/Sidebar.js +5 -5
- package/lib/esm/layout/Sidebar.js.map +1 -1
- package/lib/esm/router/HistoryNavigator.js +7 -1
- package/lib/esm/router/HistoryNavigator.js.map +1 -1
- package/lib/esm/router/Nav.js +2 -2
- package/lib/esm/router/Nav.js.map +1 -1
- package/lib/esm/session/UserSession.js +35 -9
- package/lib/esm/session/UserSession.js.map +1 -1
- package/lib/esm/session/UserSessionProvider.js +3 -2
- package/lib/esm/session/UserSessionProvider.js.map +1 -1
- package/lib/esm/shell/apps/AppProjectSelector.js +2 -2
- package/lib/esm/shell/apps/AppProjectSelector.js.map +1 -1
- package/lib/esm/shell/apps/StandaloneApp.js +2 -2
- package/lib/esm/shell/apps/StandaloneApp.js.map +1 -1
- package/lib/esm/shell/login/InviteAcceptModal.js +2 -2
- package/lib/esm/shell/login/InviteAcceptModal.js.map +1 -1
- package/lib/esm/shell/login/SignInModal.js +1 -1
- package/lib/esm/shell/login/SignInModal.js.map +1 -1
- package/lib/esm/shell/login/SignupForm.js +2 -2
- package/lib/esm/shell/login/SignupForm.js.map +1 -1
- package/lib/esm/shell/login/UserInfo.js +2 -2
- package/lib/esm/shell/login/UserInfo.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 +1 -1
- package/lib/esm/widgets/json-view/JSONDisplay.js.map +1 -1
- package/lib/esm/widgets/markdown/ArtifactContentRenderer.js +84 -13
- package/lib/esm/widgets/markdown/ArtifactContentRenderer.js.map +1 -1
- package/lib/esm/widgets/markdown/MarkdownFigure.js +40 -0
- package/lib/esm/widgets/markdown/MarkdownFigure.js.map +1 -0
- package/lib/esm/widgets/markdown/MarkdownRenderer.js +42 -7
- package/lib/esm/widgets/markdown/MarkdownRenderer.js.map +1 -1
- package/lib/esm/widgets/markdown/MermaidDiagram.js +80 -5
- package/lib/esm/widgets/markdown/MermaidDiagram.js.map +1 -1
- package/lib/esm/widgets/markdown/codeBlockHandlers.js +33 -33
- package/lib/esm/widgets/markdown/codeBlockHandlers.js.map +1 -1
- package/lib/esm/widgets/markdown/codeBlockHandlers.test.js +2 -29
- package/lib/esm/widgets/markdown/codeBlockHandlers.test.js.map +1 -1
- package/lib/esm/widgets/markdown/index.js +1 -0
- package/lib/esm/widgets/markdown/index.js.map +1 -1
- package/lib/esm/widgets/markdown/normalizeCustomSchemeLinks.js +77 -0
- package/lib/esm/widgets/markdown/normalizeCustomSchemeLinks.js.map +1 -0
- package/lib/esm/widgets/markdown/normalizeDirectives.js +45 -0
- package/lib/esm/widgets/markdown/normalizeDirectives.js.map +1 -0
- package/lib/esm/widgets/markdown/remarkDirectiveHandler.js +96 -0
- package/lib/esm/widgets/markdown/remarkDirectiveHandler.js.map +1 -0
- package/lib/esm/widgets/monacoEditor/MonacoEditor.js +8 -14
- package/lib/esm/widgets/monacoEditor/MonacoEditor.js.map +1 -1
- package/lib/esm/widgets/schema-editor/ManagedSchema.js.map +1 -1
- package/lib/esm/widgets/schema-editor/editor/PropertyEditor.js +3 -3
- package/lib/esm/widgets/schema-editor/editor/PropertyEditor.js.map +1 -1
- package/lib/esm/widgets/schema-editor/json-schema4-utils.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/core/components/SidePanel.d.ts +4 -1
- package/lib/types/core/components/SidePanel.d.ts.map +1 -1
- package/lib/types/core/components/index.d.ts +0 -8
- package/lib/types/core/components/index.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/MessageBox.d.ts.map +1 -0
- package/lib/types/core/components/{Panel.d.ts → shadcn/Panel.d.ts} +3 -1
- package/lib/types/core/components/shadcn/Panel.d.ts.map +1 -0
- package/lib/types/core/components/{Badge.d.ts → shadcn/badge.d.ts} +4 -4
- package/lib/types/core/components/shadcn/badge.d.ts.map +1 -0
- package/lib/types/core/components/shadcn/button.d.ts +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 -2
- 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.map +1 -0
- package/lib/types/core/components/shadcn/modal/DeleteModal.d.ts.map +1 -0
- package/lib/types/core/components/shadcn/{dialog.d.ts → modal/dialog.d.ts} +7 -4
- package/lib/types/core/components/shadcn/modal/dialog.d.ts.map +1 -0
- package/lib/types/core/components/shadcn/modal/index.d.ts +4 -0
- package/lib/types/core/components/shadcn/modal/index.d.ts.map +1 -0
- package/lib/types/core/components/shadcn/popover.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/selectBox.d.ts +9 -5
- package/lib/types/core/components/shadcn/selectBox.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/tabs.d.ts +14 -5
- package/lib/types/core/components/shadcn/tabs.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/textarea.d.ts +6 -2
- package/lib/types/core/components/shadcn/textarea.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/tooltip.d.ts.map +1 -1
- package/lib/types/features/agent/PayloadBuilder.d.ts +22 -4
- package/lib/types/features/agent/PayloadBuilder.d.ts.map +1 -1
- package/lib/types/features/agent/chat/AgentChart.d.ts +3 -44
- package/lib/types/features/agent/chat/AgentChart.d.ts.map +1 -1
- package/lib/types/features/agent/chat/AskUserWidget.d.ts.map +1 -1
- package/lib/types/features/agent/chat/DocumentPanel.d.ts +16 -0
- package/lib/types/features/agent/chat/DocumentPanel.d.ts.map +1 -0
- package/lib/types/features/agent/chat/DocumentTabBar.d.ts +10 -0
- package/lib/types/features/agent/chat/DocumentTabBar.d.ts.map +1 -0
- package/lib/types/features/agent/chat/ModernAgentConversation.d.ts +69 -1
- package/lib/types/features/agent/chat/ModernAgentConversation.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts +36 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/BatchProgressPanel.d.ts +18 -2
- package/lib/types/features/agent/chat/ModernAgentOutput/BatchProgressPanel.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/Header.d.ts +4 -7
- package/lib/types/features/agent/chat/ModernAgentOutput/Header.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/MessageInput.d.ts +2 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/MessageInput.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/MessageItem.d.ts +35 -7
- package/lib/types/features/agent/chat/ModernAgentOutput/MessageItem.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/StreamingMessage.d.ts +11 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/StreamingMessage.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/ToolCallGroup.d.ts +20 -2
- 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 +18 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/utils.d.ts.map +1 -1
- package/lib/types/features/agent/chat/SkillWidgetProvider.d.ts.map +1 -1
- package/lib/types/features/agent/chat/hooks/useAgentPlans.d.ts +22 -0
- package/lib/types/features/agent/chat/hooks/useAgentPlans.d.ts.map +1 -0
- package/lib/types/features/agent/chat/hooks/useAgentStream.d.ts +42 -0
- package/lib/types/features/agent/chat/hooks/useAgentStream.d.ts.map +1 -0
- package/lib/types/features/agent/chat/hooks/useDocumentPanel.d.ts +22 -0
- package/lib/types/features/agent/chat/hooks/useDocumentPanel.d.ts.map +1 -0
- package/lib/types/features/agent/chat/hooks/useFileProcessing.d.ts +27 -0
- package/lib/types/features/agent/chat/hooks/useFileProcessing.d.ts.map +1 -0
- package/lib/types/features/agent/chat/index.d.ts +12 -8
- package/lib/types/features/agent/chat/index.d.ts.map +1 -1
- package/lib/types/features/agent/chat/types/document.d.ts +5 -0
- package/lib/types/features/agent/chat/types/document.d.ts.map +1 -0
- package/lib/types/features/agent/index.d.ts +0 -2
- package/lib/types/features/agent/index.d.ts.map +1 -1
- package/lib/types/features/store/collections/BrowseCollectionView.d.ts.map +1 -1
- package/lib/types/features/store/objects/ExportPropertiesModal.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/PropertiesEditorModal.d.ts.map +1 -1
- package/lib/types/features/store/objects/components/index.d.ts +1 -1
- package/lib/types/features/store/objects/components/index.d.ts.map +1 -1
- package/lib/types/features/store/objects/components/useDownloadFile.d.ts +35 -0
- package/lib/types/features/store/objects/components/useDownloadFile.d.ts.map +1 -0
- package/lib/types/features/store/objects/search/DocumentSearchContext.d.ts.map +1 -1
- package/lib/types/features/store/objects/selection/SelectionActions.d.ts +1 -1
- package/lib/types/features/store/objects/selection/SelectionActions.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/ExportPropertiesAction.d.ts.map +1 -1
- package/lib/types/features/store/objects/upload/useSmartFileUploadProcessing.d.ts.map +1 -1
- package/lib/types/features/store/types/ObjectSchemaEditor.d.ts +2 -1
- package/lib/types/features/store/types/ObjectSchemaEditor.d.ts.map +1 -1
- package/lib/types/features/store/types/SelectContentTypeModal.d.ts +1 -1
- package/lib/types/features/store/types/SelectContentTypeModal.d.ts.map +1 -1
- package/lib/types/features/store/types/TableLayoutEditor.d.ts +2 -1
- package/lib/types/features/store/types/TableLayoutEditor.d.ts.map +1 -1
- package/lib/types/features/user/UserInfo.d.ts +12 -1
- package/lib/types/features/user/UserInfo.d.ts.map +1 -1
- package/lib/types/features/utils/print.d.ts.map +1 -1
- package/lib/types/layout/AppLayout.d.ts.map +1 -1
- package/lib/types/layout/Sidebar.d.ts +4 -2
- package/lib/types/layout/Sidebar.d.ts.map +1 -1
- package/lib/types/router/HistoryNavigator.d.ts.map +1 -1
- package/lib/types/router/Nav.d.ts +6 -1
- package/lib/types/router/Nav.d.ts.map +1 -1
- package/lib/types/session/UserSession.d.ts.map +1 -1
- package/lib/types/session/UserSessionProvider.d.ts +1 -0
- package/lib/types/session/UserSessionProvider.d.ts.map +1 -1
- package/lib/types/widgets/json-view/JSONCode.d.ts.map +1 -1
- package/lib/types/widgets/markdown/ArtifactContentRenderer.d.ts +10 -1
- package/lib/types/widgets/markdown/ArtifactContentRenderer.d.ts.map +1 -1
- package/lib/types/widgets/markdown/MarkdownFigure.d.ts +15 -0
- package/lib/types/widgets/markdown/MarkdownFigure.d.ts.map +1 -0
- package/lib/types/widgets/markdown/MarkdownRenderer.d.ts.map +1 -1
- package/lib/types/widgets/markdown/MermaidDiagram.d.ts.map +1 -1
- package/lib/types/widgets/markdown/codeBlockHandlers.d.ts +5 -2
- package/lib/types/widgets/markdown/codeBlockHandlers.d.ts.map +1 -1
- package/lib/types/widgets/markdown/index.d.ts +1 -0
- package/lib/types/widgets/markdown/index.d.ts.map +1 -1
- package/lib/types/widgets/markdown/normalizeCustomSchemeLinks.d.ts +9 -0
- package/lib/types/widgets/markdown/normalizeCustomSchemeLinks.d.ts.map +1 -0
- package/lib/types/widgets/markdown/normalizeDirectives.d.ts +20 -0
- package/lib/types/widgets/markdown/normalizeDirectives.d.ts.map +1 -0
- package/lib/types/widgets/markdown/remarkDirectiveHandler.d.ts +2 -0
- package/lib/types/widgets/markdown/remarkDirectiveHandler.d.ts.map +1 -0
- package/lib/types/widgets/monacoEditor/MonacoEditor.d.ts +1 -3
- package/lib/types/widgets/monacoEditor/MonacoEditor.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/vertesia-ui-core.js +1 -1
- package/lib/vertesia-ui-core.js.map +1 -1
- package/lib/vertesia-ui-features.js +1 -1
- package/lib/vertesia-ui-features.js.map +1 -1
- package/lib/vertesia-ui-layout.js +1 -1
- package/lib/vertesia-ui-layout.js.map +1 -1
- package/lib/vertesia-ui-router.js +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/package.json +14 -10
- package/src/core/components/InputList.tsx +1 -1
- package/src/core/components/Overlay.tsx +1 -1
- package/src/core/components/SidePanel.tsx +29 -15
- package/src/core/components/Switch.tsx +1 -1
- package/src/core/components/index.ts +0 -8
- package/src/core/components/shadcn/Panel.tsx +50 -0
- package/src/core/components/{Badge.tsx → shadcn/badge.tsx} +3 -3
- package/src/core/components/shadcn/command.tsx +1 -1
- package/src/core/components/shadcn/filters/filterBar.tsx +76 -87
- package/src/core/components/shadcn/index.ts +5 -3
- package/src/core/components/{ConfirmModal.tsx → shadcn/modal/ConfirmModal.tsx} +8 -8
- package/src/core/components/{DeleteModal.tsx → shadcn/modal/DeleteModal.tsx} +1 -1
- package/src/core/components/shadcn/{dialog.tsx → modal/dialog.tsx} +43 -32
- package/src/core/components/shadcn/modal/index.ts +3 -0
- package/src/core/components/shadcn/popover.tsx +4 -2
- package/src/core/components/shadcn/selectBox.tsx +71 -52
- package/src/core/components/shadcn/tabs.tsx +36 -19
- package/src/core/components/shadcn/textarea.tsx +43 -2
- package/src/core/components/shadcn/tooltip.tsx +23 -17
- package/src/features/agent/PayloadBuilder.tsx +70 -9
- package/src/features/agent/chat/AgentChart.tsx +46 -678
- package/src/features/agent/chat/AskUserWidget.tsx +4 -3
- package/src/features/agent/chat/DocumentPanel.tsx +120 -0
- package/src/features/agent/chat/DocumentTabBar.tsx +49 -0
- package/src/features/agent/chat/ModernAgentConversation.tsx +403 -549
- package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.tsx +162 -55
- package/src/features/agent/chat/ModernAgentOutput/BatchProgressPanel.tsx +40 -10
- package/src/features/agent/chat/ModernAgentOutput/Header.tsx +12 -16
- package/src/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.tsx +3 -3
- package/src/features/agent/chat/ModernAgentOutput/MessageInput.tsx +68 -75
- package/src/features/agent/chat/ModernAgentOutput/MessageItem.tsx +206 -94
- package/src/features/agent/chat/ModernAgentOutput/StreamingMessage.tsx +22 -5
- package/src/features/agent/chat/ModernAgentOutput/ToolCallGroup.tsx +295 -113
- package/src/features/agent/chat/ModernAgentOutput/WorkstreamTabs.tsx +11 -8
- package/src/features/agent/chat/ModernAgentOutput/utils.ts +133 -4
- package/src/features/agent/chat/SkillWidgetProvider.tsx +32 -15
- package/src/features/agent/chat/hooks/useAgentPlans.ts +190 -0
- package/src/features/agent/chat/hooks/useAgentStream.ts +239 -0
- package/src/features/agent/chat/hooks/useDocumentPanel.ts +118 -0
- package/src/features/agent/chat/hooks/useFileProcessing.ts +126 -0
- package/src/features/agent/chat/index.ts +18 -17
- package/src/features/agent/chat/types/document.ts +4 -0
- package/src/features/agent/index.ts +0 -2
- package/src/features/store/collections/BrowseCollectionView.tsx +5 -8
- package/src/features/store/collections/CreateCollection.tsx +8 -8
- package/src/features/store/collections/EditCollectionView.tsx +1 -1
- package/src/features/store/objects/DocumentSearchResults.tsx +9 -13
- package/src/features/store/objects/ExportPropertiesModal.tsx +9 -7
- package/src/features/store/objects/components/ContentOverview.tsx +29 -155
- package/src/features/store/objects/components/PropertiesEditorModal.tsx +0 -1
- package/src/features/store/objects/components/SelectDocumentModal.tsx +6 -6
- package/src/features/store/objects/components/VectorSearchWidget.tsx +2 -2
- package/src/features/store/objects/components/index.ts +1 -1
- package/src/features/store/objects/components/useDownloadFile.ts +237 -0
- package/src/features/store/objects/search/DocumentSearchContext.ts +1 -2
- package/src/features/store/objects/selection/SelectionActions.tsx +0 -4
- package/src/features/store/objects/selection/actions/AddToCollectionAction.tsx +13 -13
- package/src/features/store/objects/selection/actions/ChangeTypeAction.tsx +2 -6
- package/src/features/store/objects/selection/actions/ExportPropertiesAction.tsx +1 -3
- package/src/features/store/objects/selection/actions/StartWorkflowComponent.tsx +8 -8
- package/src/features/store/objects/upload/DocumentUploadModal.tsx +25 -25
- package/src/features/store/objects/upload/useSmartFileUploadProcessing.ts +16 -10
- package/src/features/store/types/ObjectSchemaEditor.tsx +32 -29
- package/src/features/store/types/SelectContentType.tsx +3 -3
- package/src/features/store/types/SelectContentTypeModal.tsx +17 -30
- package/src/features/store/types/TableLayoutEditor.tsx +14 -18
- package/src/features/user/UserInfo.tsx +176 -10
- package/src/features/utils/print.ts +0 -1
- package/src/layout/AppLayout.tsx +16 -44
- package/src/layout/Sidebar.tsx +7 -5
- package/src/router/HistoryNavigator.ts +9 -1
- package/src/router/Nav.tsx +7 -2
- package/src/session/UserSession.ts +38 -9
- package/src/session/UserSessionProvider.tsx +3 -2
- package/src/shell/apps/AppProjectSelector.tsx +2 -2
- package/src/shell/apps/StandaloneApp.tsx +3 -3
- package/src/shell/login/InviteAcceptModal.tsx +6 -6
- package/src/shell/login/SignInModal.tsx +1 -1
- package/src/shell/login/SignupForm.tsx +3 -3
- package/src/shell/login/UserInfo.tsx +5 -5
- package/src/widgets/json-view/JSONCode.tsx +1 -3
- package/src/widgets/json-view/JSONDisplay.tsx +1 -1
- package/src/widgets/markdown/ArtifactContentRenderer.tsx +115 -14
- package/src/widgets/markdown/MarkdownFigure.tsx +100 -0
- package/src/widgets/markdown/MarkdownRenderer.tsx +62 -9
- package/src/widgets/markdown/MermaidDiagram.tsx +97 -5
- package/src/widgets/markdown/codeBlockHandlers.test.tsx +3 -34
- package/src/widgets/markdown/codeBlockHandlers.tsx +47 -42
- package/src/widgets/markdown/index.ts +1 -0
- package/src/widgets/markdown/markdown.css +192 -0
- package/src/widgets/markdown/normalizeCustomSchemeLinks.test.ts +86 -0
- package/src/widgets/markdown/normalizeCustomSchemeLinks.ts +91 -0
- package/src/widgets/markdown/normalizeDirectives.ts +50 -0
- package/src/widgets/markdown/remarkDirectiveHandler.ts +119 -0
- package/src/widgets/monacoEditor/MonacoEditor.tsx +8 -22
- package/src/widgets/schema-editor/ManagedSchema.ts +1 -1
- package/src/widgets/schema-editor/editor/PropertyEditor.tsx +5 -5
- package/src/widgets/schema-editor/json-schema4-utils.ts +1 -1
- package/lib/esm/core/components/Badge.js.map +0 -1
- package/lib/esm/core/components/Button.js +0 -32
- package/lib/esm/core/components/Button.js.map +0 -1
- package/lib/esm/core/components/ConfirmModal.js +0 -10
- package/lib/esm/core/components/ConfirmModal.js.map +0 -1
- package/lib/esm/core/components/DeleteModal.js.map +0 -1
- package/lib/esm/core/components/MessageBox.js.map +0 -1
- package/lib/esm/core/components/Modal.js +0 -26
- package/lib/esm/core/components/Modal.js.map +0 -1
- package/lib/esm/core/components/Panel.js +0 -8
- package/lib/esm/core/components/Panel.js.map +0 -1
- package/lib/esm/core/components/SelectBox.js +0 -67
- package/lib/esm/core/components/SelectBox.js.map +0 -1
- package/lib/esm/core/components/shadcn/dialog.js.map +0 -1
- package/lib/esm/core/components/tabs/Tabs.js +0 -78
- package/lib/esm/core/components/tabs/Tabs.js.map +0 -1
- package/lib/esm/core/components/tabs/TabsContext.js +0 -7
- package/lib/esm/core/components/tabs/TabsContext.js.map +0 -1
- package/lib/esm/core/components/tabs/index.js +0 -3
- package/lib/esm/core/components/tabs/index.js.map +0 -1
- package/lib/esm/features/agent/createChartTool.js +0 -632
- package/lib/esm/features/agent/createChartTool.js.map +0 -1
- package/lib/esm/features/agent/examples.js +0 -295
- package/lib/esm/features/agent/examples.js.map +0 -1
- package/lib/esm/features/agent/visualization.js +0 -165
- package/lib/esm/features/agent/visualization.js.map +0 -1
- package/lib/esm/features/store/objects/components/useDownloadObject.js +0 -21
- package/lib/esm/features/store/objects/components/useDownloadObject.js.map +0 -1
- package/lib/types/core/components/Badge.d.ts.map +0 -1
- package/lib/types/core/components/Button.d.ts +0 -14
- package/lib/types/core/components/Button.d.ts.map +0 -1
- package/lib/types/core/components/ConfirmModal.d.ts.map +0 -1
- package/lib/types/core/components/DeleteModal.d.ts.map +0 -1
- package/lib/types/core/components/MessageBox.d.ts.map +0 -1
- package/lib/types/core/components/Modal.d.ts +0 -30
- package/lib/types/core/components/Modal.d.ts.map +0 -1
- package/lib/types/core/components/Panel.d.ts.map +0 -1
- package/lib/types/core/components/SelectBox.d.ts +0 -36
- package/lib/types/core/components/SelectBox.d.ts.map +0 -1
- package/lib/types/core/components/shadcn/dialog.d.ts.map +0 -1
- package/lib/types/core/components/tabs/Tabs.d.ts +0 -25
- package/lib/types/core/components/tabs/Tabs.d.ts.map +0 -1
- package/lib/types/core/components/tabs/TabsContext.d.ts +0 -17
- package/lib/types/core/components/tabs/TabsContext.d.ts.map +0 -1
- package/lib/types/core/components/tabs/index.d.ts +0 -3
- package/lib/types/core/components/tabs/index.d.ts.map +0 -1
- package/lib/types/features/agent/createChartTool.d.ts +0 -178
- package/lib/types/features/agent/createChartTool.d.ts.map +0 -1
- package/lib/types/features/agent/examples.d.ts +0 -59
- package/lib/types/features/agent/examples.d.ts.map +0 -1
- package/lib/types/features/agent/visualization.d.ts +0 -95
- package/lib/types/features/agent/visualization.d.ts.map +0 -1
- package/lib/types/features/store/objects/components/useDownloadObject.d.ts +0 -4
- package/lib/types/features/store/objects/components/useDownloadObject.d.ts.map +0 -1
- package/src/core/components/Button.tsx +0 -63
- package/src/core/components/Modal.tsx +0 -144
- package/src/core/components/Panel.tsx +0 -34
- package/src/core/components/SelectBox.tsx +0 -188
- package/src/core/components/tabs/Tabs.tsx +0 -132
- package/src/core/components/tabs/TabsContext.ts +0 -25
- package/src/core/components/tabs/index.ts +0 -2
- package/src/features/agent/CHART_INSTRUCTIONS.md +0 -228
- package/src/features/agent/createChartTool.ts +0 -643
- package/src/features/agent/examples.ts +0 -321
- package/src/features/agent/visualization.ts +0 -227
- package/src/features/store/objects/components/useDownloadObject.ts +0 -29
- /package/lib/esm/core/components/{MessageBox.js → shadcn/MessageBox.js} +0 -0
- /package/lib/types/core/components/{MessageBox.d.ts → shadcn/MessageBox.d.ts} +0 -0
- /package/lib/types/core/components/{ConfirmModal.d.ts → shadcn/modal/ConfirmModal.d.ts} +0 -0
- /package/lib/types/core/components/{DeleteModal.d.ts → shadcn/modal/DeleteModal.d.ts} +0 -0
- /package/src/core/components/{MessageBox.tsx → shadcn/MessageBox.tsx} +0 -0
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { AgentMessage, AgentMessageType, BatchProgressDetails, Plan } from "@vertesia/common";
|
|
2
2
|
import React, { useEffect, useMemo, useState, useRef, useCallback, Component, ReactNode } from "react";
|
|
3
|
+
import { cn } from "@vertesia/ui/core";
|
|
3
4
|
import { PulsatingCircle } from "../AnimatedThinkingDots";
|
|
4
|
-
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
5
|
+
export type AgentConversationViewMode = "stacked" | "sliding";
|
|
6
|
+
import BatchProgressPanel, { type BatchProgressPanelClassNames } from "./BatchProgressPanel";
|
|
7
|
+
import MessageItem, { type MessageItemClassNames, type MessageItemProps } from "./MessageItem";
|
|
8
|
+
import StreamingMessage, { type StreamingMessageClassNames } from "./StreamingMessage";
|
|
9
|
+
import ToolCallGroup, { type ToolCallGroupClassNames } from "./ToolCallGroup";
|
|
8
10
|
import WorkstreamTabs, { extractWorkstreams, filterMessagesByWorkstream } from "./WorkstreamTabs";
|
|
9
|
-
import { DONE_STATES, getWorkstreamId, groupMessagesWithStreaming, StreamingData } from "./utils";
|
|
11
|
+
import { DONE_STATES, getWorkstreamId, groupMessagesWithStreaming, mergeConsecutiveToolGroups, StreamingData } from "./utils";
|
|
10
12
|
import { ThinkingMessages } from "../WaitingMessages";
|
|
11
13
|
|
|
12
14
|
// Replace %thinking_message% placeholder with actual thinking message
|
|
@@ -22,15 +24,17 @@ const isBatchProgressMessage = (message: AgentMessage): message is AgentMessage
|
|
|
22
24
|
return message.type === AgentMessageType.BATCH_PROGRESS && !!message.details?.batch_id;
|
|
23
25
|
};
|
|
24
26
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
if (message
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
27
|
+
const shouldDedupeAdjacentMessage = (previous: AgentMessage, current: AgentMessage): boolean => {
|
|
28
|
+
if (previous.type !== current.type) return false;
|
|
29
|
+
if (previous.message !== current.message) return false;
|
|
30
|
+
|
|
31
|
+
const prevDetails = previous.details as { tool_status?: string } | undefined;
|
|
32
|
+
const currDetails = current.details as { tool_status?: string } | undefined;
|
|
33
|
+
if (prevDetails?.tool_status !== "completed" || currDetails?.tool_status !== "completed") return false;
|
|
34
|
+
|
|
35
|
+
const prevTs = typeof previous.timestamp === "number" ? previous.timestamp : new Date(previous.timestamp).getTime();
|
|
36
|
+
const currTs = typeof current.timestamp === "number" ? current.timestamp : new Date(current.timestamp).getTime();
|
|
37
|
+
return currTs - prevTs < 2000;
|
|
34
38
|
};
|
|
35
39
|
|
|
36
40
|
// Error boundary to catch and isolate errors in individual message components
|
|
@@ -91,6 +95,28 @@ interface AllMessagesMixedProps {
|
|
|
91
95
|
onSendMessage?: (message: string) => void;
|
|
92
96
|
/** Stable index for thinking messages (changes on 4s interval) */
|
|
93
97
|
thinkingMessageIndex?: number;
|
|
98
|
+
/** className overrides passed to every MessageItem */
|
|
99
|
+
messageItemClassNames?: MessageItemClassNames;
|
|
100
|
+
/** Sparse MESSAGE_STYLES overrides passed to every MessageItem */
|
|
101
|
+
messageStyleOverrides?: MessageItemProps['messageStyleOverrides'];
|
|
102
|
+
toolCallGroupClassNames?: ToolCallGroupClassNames;
|
|
103
|
+
/** Hide ToolCallGroup in this view mode */
|
|
104
|
+
hideToolCallsInViewMode?: AgentConversationViewMode[];
|
|
105
|
+
streamingMessageClassNames?: StreamingMessageClassNames;
|
|
106
|
+
batchProgressPanelClassNames?: BatchProgressPanelClassNames;
|
|
107
|
+
/** Hide the workstream tabs entirely */
|
|
108
|
+
hideWorkstreamTabs?: boolean;
|
|
109
|
+
/** className override for the working indicator container */
|
|
110
|
+
workingIndicatorClassName?: string;
|
|
111
|
+
/** className override for the message list container (spacing/layout) */
|
|
112
|
+
messageListClassName?: string;
|
|
113
|
+
/** Custom component to render store/document links instead of default NavLink navigation */
|
|
114
|
+
StoreLinkComponent?: React.ComponentType<{ href: string; documentId: string; children: React.ReactNode }>;
|
|
115
|
+
/** Custom component to render store/collection links instead of default NavLink navigation */
|
|
116
|
+
CollectionLinkComponent?: React.ComponentType<{ href: string; collectionId: string; children: React.ReactNode }>;
|
|
117
|
+
/** Optional message to display as the first user message in the conversation.
|
|
118
|
+
* Purely visual/UI — not sent to temporal. Renders as a QUESTION MessageItem before real messages. */
|
|
119
|
+
prependFriendlyMessage?: string;
|
|
94
120
|
}
|
|
95
121
|
|
|
96
122
|
// PERFORMANCE: Throttle interval for auto-scroll (ms)
|
|
@@ -104,6 +130,18 @@ function AllMessagesMixedComponent({
|
|
|
104
130
|
streamingMessages = new Map(),
|
|
105
131
|
onSendMessage,
|
|
106
132
|
thinkingMessageIndex = 0,
|
|
133
|
+
messageItemClassNames,
|
|
134
|
+
messageStyleOverrides,
|
|
135
|
+
toolCallGroupClassNames,
|
|
136
|
+
hideToolCallsInViewMode,
|
|
137
|
+
streamingMessageClassNames,
|
|
138
|
+
batchProgressPanelClassNames,
|
|
139
|
+
hideWorkstreamTabs,
|
|
140
|
+
workingIndicatorClassName,
|
|
141
|
+
messageListClassName,
|
|
142
|
+
StoreLinkComponent,
|
|
143
|
+
CollectionLinkComponent,
|
|
144
|
+
prependFriendlyMessage,
|
|
107
145
|
}: AllMessagesMixedProps) {
|
|
108
146
|
const containerRef = useRef<HTMLDivElement | null>(null);
|
|
109
147
|
const [activeWorkstream, setActiveWorkstream] = useState<string>("all");
|
|
@@ -158,16 +196,26 @@ function AllMessagesMixedComponent({
|
|
|
158
196
|
};
|
|
159
197
|
}, [messages.length, streamingMessages.size, streamingContentBucket, performScroll]);
|
|
160
198
|
|
|
161
|
-
// Sort all messages chronologically and
|
|
199
|
+
// Sort all messages chronologically and dedupe adjacent identical messages
|
|
200
|
+
// Low-signal messages are suppressed at the source (server-side) via shouldSuppressLowSignalMessage
|
|
162
201
|
const sortedMessages = React.useMemo(
|
|
163
|
-
() =>
|
|
164
|
-
[...messages]
|
|
165
|
-
.
|
|
166
|
-
.
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
202
|
+
() => {
|
|
203
|
+
const sorted = [...messages].sort((a, b) => {
|
|
204
|
+
const timeA = typeof a.timestamp === "number" ? a.timestamp : new Date(a.timestamp).getTime();
|
|
205
|
+
const timeB = typeof b.timestamp === "number" ? b.timestamp : new Date(b.timestamp).getTime();
|
|
206
|
+
return timeA - timeB;
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
const deduped: AgentMessage[] = [];
|
|
210
|
+
for (const msg of sorted) {
|
|
211
|
+
const previous = deduped[deduped.length - 1];
|
|
212
|
+
if (previous && shouldDedupeAdjacentMessage(previous, msg)) {
|
|
213
|
+
continue;
|
|
214
|
+
}
|
|
215
|
+
deduped.push(msg);
|
|
216
|
+
}
|
|
217
|
+
return deduped;
|
|
218
|
+
},
|
|
171
219
|
[messages],
|
|
172
220
|
);
|
|
173
221
|
|
|
@@ -224,9 +272,7 @@ function AllMessagesMixedComponent({
|
|
|
224
272
|
msg.type === AgentMessageType.TERMINATED ||
|
|
225
273
|
msg.type === AgentMessageType.ERROR ||
|
|
226
274
|
// Include THOUGHT messages that have tool details (progress from message_to_human or streamed content)
|
|
227
|
-
(msg.type === AgentMessageType.THOUGHT && (msg.details?.tool || msg.details?.tools || msg.details?.streamed))
|
|
228
|
-
// Include toolkit_ready SYSTEM message (shows at conversation start)
|
|
229
|
-
(msg.type === AgentMessageType.SYSTEM && msg.details?.system_type === 'toolkit_ready')
|
|
275
|
+
(msg.type === AgentMessageType.THOUGHT && (msg.details?.tool || msg.details?.tools || msg.details?.streamed))
|
|
230
276
|
);
|
|
231
277
|
|
|
232
278
|
// Latest thinking: show only the most recent generic thinking message (UPDATE/PLAN or THOUGHT without tool)
|
|
@@ -243,11 +289,19 @@ function AllMessagesMixedComponent({
|
|
|
243
289
|
return { importantMessages: important, recentThinking: thinkingMessages };
|
|
244
290
|
}, [displayMessages, isCompleted, streamingMessages.size]);
|
|
245
291
|
|
|
246
|
-
// Split streaming messages:
|
|
247
|
-
//
|
|
292
|
+
// Split streaming messages:
|
|
293
|
+
// - complete (or stale incomplete) ones are interleaved chronologically
|
|
294
|
+
// - actively incomplete ones render at the end
|
|
295
|
+
// This keeps live streaming performant while preventing old incomplete streams
|
|
296
|
+
// from being pinned forever at the bottom.
|
|
248
297
|
const { completeStreaming, incompleteStreaming } = React.useMemo(() => {
|
|
249
298
|
const complete = new Map<string, StreamingData>();
|
|
250
299
|
const incomplete: Array<{ id: string; data: StreamingData }> = [];
|
|
300
|
+
const newestMessageTimestamp = displayMessages.length > 0
|
|
301
|
+
? Math.max(...displayMessages.map(msg =>
|
|
302
|
+
typeof msg.timestamp === "number" ? msg.timestamp : new Date(msg.timestamp).getTime()
|
|
303
|
+
))
|
|
304
|
+
: -Infinity;
|
|
251
305
|
|
|
252
306
|
streamingMessages.forEach((data, id) => {
|
|
253
307
|
// Filter by workstream if specified
|
|
@@ -256,7 +310,10 @@ function AllMessagesMixedComponent({
|
|
|
256
310
|
if (activeWorkstream !== streamWorkstream) return;
|
|
257
311
|
}
|
|
258
312
|
|
|
259
|
-
|
|
313
|
+
// If a newer persisted message exists, this stream is stale and should be
|
|
314
|
+
// treated as complete for ordering purposes.
|
|
315
|
+
const isStale = data.startTimestamp <= newestMessageTimestamp;
|
|
316
|
+
if (data.isComplete || isStale) {
|
|
260
317
|
complete.set(id, data);
|
|
261
318
|
} else if (data.text) {
|
|
262
319
|
incomplete.push({ id, data });
|
|
@@ -264,18 +321,18 @@ function AllMessagesMixedComponent({
|
|
|
264
321
|
});
|
|
265
322
|
|
|
266
323
|
return { completeStreaming: complete, incompleteStreaming: incomplete };
|
|
267
|
-
}, [streamingMessages, activeWorkstream]);
|
|
324
|
+
}, [streamingMessages, activeWorkstream, displayMessages]);
|
|
268
325
|
|
|
269
326
|
// Group messages with ONLY complete streaming interleaved for stacked view
|
|
270
327
|
// Incomplete streaming is rendered separately at the end (avoids re-grouping on every chunk)
|
|
271
328
|
const groupedMessages = React.useMemo(
|
|
272
|
-
() => groupMessagesWithStreaming(displayMessages, completeStreaming, activeWorkstream),
|
|
329
|
+
() => mergeConsecutiveToolGroups(groupMessagesWithStreaming(displayMessages, completeStreaming, activeWorkstream)),
|
|
273
330
|
[displayMessages, completeStreaming, activeWorkstream]
|
|
274
331
|
);
|
|
275
332
|
|
|
276
333
|
// Group important messages with ONLY complete streaming interleaved for sliding view
|
|
277
334
|
const groupedImportantMessages = React.useMemo(
|
|
278
|
-
() => groupMessagesWithStreaming(importantMessages, completeStreaming, activeWorkstream),
|
|
335
|
+
() => mergeConsecutiveToolGroups(groupMessagesWithStreaming(importantMessages, completeStreaming, activeWorkstream)),
|
|
279
336
|
[importantMessages, completeStreaming, activeWorkstream]
|
|
280
337
|
);
|
|
281
338
|
|
|
@@ -325,30 +382,30 @@ function AllMessagesMixedComponent({
|
|
|
325
382
|
<div
|
|
326
383
|
ref={containerRef}
|
|
327
384
|
tabIndex={0}
|
|
328
|
-
className="flex-1 min-h-0 h-full w-full max-w-full overflow-y-auto overflow-x-hidden px-
|
|
385
|
+
className="flex-1 min-h-0 h-full w-full max-w-full overflow-y-auto overflow-x-hidden px-1.5 sm:px-2.5 lg:px-3 flex flex-col relative focus:outline-none"
|
|
329
386
|
data-testid="all-messages-mixed"
|
|
330
387
|
>
|
|
331
388
|
{/* Global styles for vprose markdown content */}
|
|
332
389
|
<style>{`
|
|
333
390
|
/* Better vertical rhythm for markdown */
|
|
334
391
|
.vprose > * + * {
|
|
335
|
-
margin-top: 0.
|
|
392
|
+
margin-top: 0.625rem;
|
|
336
393
|
}
|
|
337
394
|
.vprose > h1 + *,
|
|
338
395
|
.vprose > h2 + *,
|
|
339
396
|
.vprose > h3 + * {
|
|
340
|
-
margin-top: 0.
|
|
397
|
+
margin-top: 0.375rem;
|
|
341
398
|
}
|
|
342
399
|
/* Tables need more separation and better styling */
|
|
343
400
|
.vprose table {
|
|
344
|
-
margin-top:
|
|
345
|
-
margin-bottom:
|
|
401
|
+
margin-top: 0.875rem;
|
|
402
|
+
margin-bottom: 0.875rem;
|
|
346
403
|
border-collapse: collapse;
|
|
347
404
|
width: 100%;
|
|
348
405
|
}
|
|
349
406
|
.vprose th,
|
|
350
407
|
.vprose td {
|
|
351
|
-
padding: 0.
|
|
408
|
+
padding: 0.5rem 0.625rem;
|
|
352
409
|
border: 1px solid var(--gray-6, #e5e7eb);
|
|
353
410
|
text-align: left;
|
|
354
411
|
}
|
|
@@ -377,14 +434,14 @@ function AllMessagesMixedComponent({
|
|
|
377
434
|
}
|
|
378
435
|
/* Horizontal rules as section dividers */
|
|
379
436
|
.vprose hr {
|
|
380
|
-
margin-top:
|
|
381
|
-
margin-bottom:
|
|
437
|
+
margin-top: 1rem;
|
|
438
|
+
margin-bottom: 1rem;
|
|
382
439
|
border-color: var(--gray-5, #d1d5db);
|
|
383
440
|
}
|
|
384
441
|
/* Better blockquote styling */
|
|
385
442
|
.vprose blockquote {
|
|
386
|
-
margin-top:
|
|
387
|
-
margin-bottom:
|
|
443
|
+
margin-top: 0.875rem;
|
|
444
|
+
margin-bottom: 0.875rem;
|
|
388
445
|
padding-left: 1rem;
|
|
389
446
|
border-left-width: 3px;
|
|
390
447
|
border-left-color: var(--gray-6, #d1d5db);
|
|
@@ -392,16 +449,24 @@ function AllMessagesMixedComponent({
|
|
|
392
449
|
}
|
|
393
450
|
/* Code blocks */
|
|
394
451
|
.vprose pre {
|
|
395
|
-
margin-top:
|
|
396
|
-
margin-bottom:
|
|
397
|
-
padding:
|
|
452
|
+
margin-top: 0.75rem;
|
|
453
|
+
margin-bottom: 0.75rem;
|
|
454
|
+
padding: 0.75rem;
|
|
398
455
|
border-radius: 0.5rem;
|
|
399
456
|
overflow-x: auto;
|
|
457
|
+
background-color: var(--color-muted-background, #f3f4f6);
|
|
458
|
+
color: var(--color-foreground, #1f2937);
|
|
459
|
+
}
|
|
460
|
+
.vprose pre code {
|
|
461
|
+
color: inherit;
|
|
462
|
+
}
|
|
463
|
+
.dark .vprose pre {
|
|
464
|
+
color: var(--color-foreground, #f9fafb);
|
|
400
465
|
}
|
|
401
466
|
`}</style>
|
|
402
467
|
|
|
403
468
|
{/* Workstream tabs with completion indicators */}
|
|
404
|
-
<div className="sticky top-0 z-10">
|
|
469
|
+
<div className={cn("sticky top-0 z-10", hideWorkstreamTabs && "hidden")}>
|
|
405
470
|
<WorkstreamTabs
|
|
406
471
|
workstreams={workstreams}
|
|
407
472
|
activeWorkstream={activeWorkstream}
|
|
@@ -413,14 +478,29 @@ function AllMessagesMixedComponent({
|
|
|
413
478
|
|
|
414
479
|
{displayMessages.length === 0 ? (
|
|
415
480
|
<div className="flex items-center justify-center h-full text-center py-8">
|
|
416
|
-
<div className="flex items-center px-
|
|
481
|
+
<div className="flex items-center px-3 py-2 text-sm text-muted">
|
|
417
482
|
{activeWorkstream === "all"
|
|
418
483
|
? "Waiting for agent response..."
|
|
419
484
|
: "No messages in this workstream yet..."}
|
|
420
485
|
</div>
|
|
421
486
|
</div>
|
|
422
487
|
) : (
|
|
423
|
-
<div className="flex-1 flex flex-col justify-start pb-4 space-y-2 w-full max-w-full">
|
|
488
|
+
<div className={cn("flex-1 flex flex-col justify-start pb-4 space-y-2 w-full max-w-full", messageListClassName)}>
|
|
489
|
+
{/* Friendly message — rendered outside the messages array to avoid memo issues/triggering autoscroll */}
|
|
490
|
+
{prependFriendlyMessage && (
|
|
491
|
+
<MessageItem
|
|
492
|
+
key={prependFriendlyMessage}
|
|
493
|
+
{...messageItemClassNames}
|
|
494
|
+
messageStyleOverrides={messageStyleOverrides}
|
|
495
|
+
message={{
|
|
496
|
+
type: AgentMessageType.QUESTION,
|
|
497
|
+
message: prependFriendlyMessage,
|
|
498
|
+
timestamp: displayMessages[0]?.timestamp ?? Date.now(),
|
|
499
|
+
workflow_run_id: "",
|
|
500
|
+
workstream_id: "main",
|
|
501
|
+
}}
|
|
502
|
+
/>
|
|
503
|
+
)}
|
|
424
504
|
{/* Show either all messages or just sliding view depending on viewMode */}
|
|
425
505
|
{viewMode === 'stacked' ? (
|
|
426
506
|
// Details view - show ALL messages with streaming interleaved
|
|
@@ -431,11 +511,16 @@ function AllMessagesMixedComponent({
|
|
|
431
511
|
if (group.type === 'tool_group') {
|
|
432
512
|
// Render grouped tool calls
|
|
433
513
|
const lastMessage = group.messages[group.messages.length - 1];
|
|
514
|
+
const isTerminalToolStatus =
|
|
515
|
+
group.toolStatus === "completed" ||
|
|
516
|
+
group.toolStatus === "error" ||
|
|
517
|
+
group.toolStatus === "warning";
|
|
434
518
|
const isLatest = !isCompleted &&
|
|
435
519
|
isLastGroup &&
|
|
436
520
|
!DONE_STATES.includes(lastMessage.type) &&
|
|
437
|
-
|
|
521
|
+
!isTerminalToolStatus;
|
|
438
522
|
|
|
523
|
+
if (hideToolCallsInViewMode?.includes(viewMode)) return null;
|
|
439
524
|
return (
|
|
440
525
|
<MessageErrorBoundary key={`group-${group.toolRunId || group.firstTimestamp}-${groupIndex}`}>
|
|
441
526
|
<ToolCallGroup
|
|
@@ -443,6 +528,7 @@ function AllMessagesMixedComponent({
|
|
|
443
528
|
showPulsatingCircle={isLatest}
|
|
444
529
|
toolRunId={group.toolRunId}
|
|
445
530
|
toolStatus={group.toolStatus}
|
|
531
|
+
{...toolCallGroupClassNames}
|
|
446
532
|
/>
|
|
447
533
|
</MessageErrorBoundary>
|
|
448
534
|
);
|
|
@@ -455,6 +541,7 @@ function AllMessagesMixedComponent({
|
|
|
455
541
|
workstreamId={group.workstreamId}
|
|
456
542
|
isComplete={group.isComplete}
|
|
457
543
|
timestamp={group.startTimestamp}
|
|
544
|
+
{...streamingMessageClassNames}
|
|
458
545
|
/>
|
|
459
546
|
);
|
|
460
547
|
} else {
|
|
@@ -472,6 +559,7 @@ function AllMessagesMixedComponent({
|
|
|
472
559
|
message={message}
|
|
473
560
|
batchData={message.details}
|
|
474
561
|
isRunning={!message.details.completed_at}
|
|
562
|
+
{...batchProgressPanelClassNames}
|
|
475
563
|
/>
|
|
476
564
|
</MessageErrorBoundary>
|
|
477
565
|
);
|
|
@@ -483,6 +571,10 @@ function AllMessagesMixedComponent({
|
|
|
483
571
|
message={message}
|
|
484
572
|
showPulsatingCircle={isLatestMessage}
|
|
485
573
|
onSendMessage={onSendMessage}
|
|
574
|
+
{...messageItemClassNames}
|
|
575
|
+
messageStyleOverrides={messageStyleOverrides}
|
|
576
|
+
StoreLinkComponent={StoreLinkComponent}
|
|
577
|
+
CollectionLinkComponent={CollectionLinkComponent}
|
|
486
578
|
/>
|
|
487
579
|
</MessageErrorBoundary>
|
|
488
580
|
);
|
|
@@ -496,13 +588,14 @@ function AllMessagesMixedComponent({
|
|
|
496
588
|
workstreamId={data.workstreamId}
|
|
497
589
|
isComplete={false}
|
|
498
590
|
timestamp={data.startTimestamp}
|
|
591
|
+
{...streamingMessageClassNames}
|
|
499
592
|
/>
|
|
500
593
|
))}
|
|
501
594
|
{/* Working indicator - shows agent is actively processing */}
|
|
502
595
|
{isAgentWorking && incompleteStreaming.length === 0 && (
|
|
503
|
-
<div className="flex items-center gap-
|
|
596
|
+
<div className={cn("flex items-center gap-2 pl-3 py-1.5 border-l-2 border-l-purple-500", workingIndicatorClassName)}>
|
|
504
597
|
<PulsatingCircle size="sm" color="blue" />
|
|
505
|
-
<span className="text-
|
|
598
|
+
<span className="text-xs text-muted">Working...</span>
|
|
506
599
|
</div>
|
|
507
600
|
)}
|
|
508
601
|
</>
|
|
@@ -515,12 +608,17 @@ function AllMessagesMixedComponent({
|
|
|
515
608
|
if (group.type === 'tool_group') {
|
|
516
609
|
// Render grouped tool calls
|
|
517
610
|
const lastMessage = group.messages[group.messages.length - 1];
|
|
611
|
+
const isTerminalToolStatus =
|
|
612
|
+
group.toolStatus === "completed" ||
|
|
613
|
+
group.toolStatus === "error" ||
|
|
614
|
+
group.toolStatus === "warning";
|
|
518
615
|
const isLatest = !isCompleted &&
|
|
519
616
|
recentThinking.length === 0 &&
|
|
520
617
|
isLastGroup &&
|
|
521
618
|
!DONE_STATES.includes(lastMessage.type) &&
|
|
522
|
-
|
|
619
|
+
!isTerminalToolStatus;
|
|
523
620
|
|
|
621
|
+
if (hideToolCallsInViewMode?.includes(viewMode)) return null;
|
|
524
622
|
return (
|
|
525
623
|
<MessageErrorBoundary key={`group-${group.toolRunId || group.firstTimestamp}-${groupIndex}`}>
|
|
526
624
|
<ToolCallGroup
|
|
@@ -528,6 +626,7 @@ function AllMessagesMixedComponent({
|
|
|
528
626
|
showPulsatingCircle={isLatest}
|
|
529
627
|
toolRunId={group.toolRunId}
|
|
530
628
|
toolStatus={group.toolStatus}
|
|
629
|
+
{...toolCallGroupClassNames}
|
|
531
630
|
/>
|
|
532
631
|
</MessageErrorBoundary>
|
|
533
632
|
);
|
|
@@ -540,6 +639,7 @@ function AllMessagesMixedComponent({
|
|
|
540
639
|
workstreamId={group.workstreamId}
|
|
541
640
|
isComplete={group.isComplete}
|
|
542
641
|
timestamp={group.startTimestamp}
|
|
642
|
+
{...streamingMessageClassNames}
|
|
543
643
|
/>
|
|
544
644
|
);
|
|
545
645
|
} else {
|
|
@@ -558,6 +658,7 @@ function AllMessagesMixedComponent({
|
|
|
558
658
|
message={message}
|
|
559
659
|
batchData={message.details}
|
|
560
660
|
isRunning={!message.details.completed_at}
|
|
661
|
+
{...batchProgressPanelClassNames}
|
|
561
662
|
/>
|
|
562
663
|
</MessageErrorBoundary>
|
|
563
664
|
);
|
|
@@ -569,6 +670,10 @@ function AllMessagesMixedComponent({
|
|
|
569
670
|
message={message}
|
|
570
671
|
showPulsatingCircle={isLatestMessage}
|
|
571
672
|
onSendMessage={onSendMessage}
|
|
673
|
+
{...messageItemClassNames}
|
|
674
|
+
messageStyleOverrides={messageStyleOverrides}
|
|
675
|
+
StoreLinkComponent={StoreLinkComponent}
|
|
676
|
+
CollectionLinkComponent={CollectionLinkComponent}
|
|
572
677
|
/>
|
|
573
678
|
</MessageErrorBoundary>
|
|
574
679
|
);
|
|
@@ -582,6 +687,7 @@ function AllMessagesMixedComponent({
|
|
|
582
687
|
workstreamId={getWorkstreamId(thinking)}
|
|
583
688
|
isComplete={idx < recentThinking.length - 1} // Only latest is still "streaming"
|
|
584
689
|
timestamp={thinking.timestamp}
|
|
690
|
+
{...streamingMessageClassNames}
|
|
585
691
|
/>
|
|
586
692
|
))}
|
|
587
693
|
{/* Incomplete streaming - no error boundary to avoid interrupting streaming */}
|
|
@@ -592,18 +698,19 @@ function AllMessagesMixedComponent({
|
|
|
592
698
|
workstreamId={data.workstreamId}
|
|
593
699
|
isComplete={false}
|
|
594
700
|
timestamp={data.startTimestamp}
|
|
701
|
+
{...streamingMessageClassNames}
|
|
595
702
|
/>
|
|
596
703
|
))}
|
|
597
704
|
{/* Working indicator - shows agent is actively processing */}
|
|
598
705
|
{isAgentWorking && recentThinking.length === 0 && incompleteStreaming.length === 0 && (
|
|
599
|
-
<div className="flex items-center gap-
|
|
706
|
+
<div className={cn("flex items-center gap-2 pl-3 py-1.5 border-l-2 border-l-purple-500", workingIndicatorClassName)}>
|
|
600
707
|
<PulsatingCircle size="sm" color="blue" />
|
|
601
|
-
<span className="text-
|
|
708
|
+
<span className="text-xs text-muted">Working...</span>
|
|
602
709
|
</div>
|
|
603
710
|
)}
|
|
604
711
|
</>
|
|
605
712
|
)}
|
|
606
|
-
<div ref={bottomRef} className="h-
|
|
713
|
+
<div ref={bottomRef} className="h-2" />
|
|
607
714
|
</div>
|
|
608
715
|
)}
|
|
609
716
|
</div>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AgentMessage, BatchProgressDetails, BatchItemStatus } from "@vertesia/common";
|
|
2
|
-
import { Button, useToast } from "@vertesia/ui/core";
|
|
2
|
+
import { Button, cn, useToast } from "@vertesia/ui/core";
|
|
3
3
|
import dayjs from "dayjs";
|
|
4
4
|
import {
|
|
5
5
|
CheckCircle,
|
|
@@ -13,13 +13,43 @@ import {
|
|
|
13
13
|
import { useState, memo } from "react";
|
|
14
14
|
import { PulsatingCircle } from "../AnimatedThinkingDots";
|
|
15
15
|
|
|
16
|
-
interface BatchProgressPanelProps {
|
|
16
|
+
export interface BatchProgressPanelProps {
|
|
17
17
|
message: AgentMessage;
|
|
18
18
|
batchData: BatchProgressDetails;
|
|
19
19
|
isRunning?: boolean;
|
|
20
|
+
/** Additional className for the root container */
|
|
21
|
+
className?: string;
|
|
22
|
+
/** Additional className for the header row */
|
|
23
|
+
headerClassName?: string;
|
|
24
|
+
/** Additional className for the sender label */
|
|
25
|
+
senderClassName?: string;
|
|
26
|
+
/** Additional className for the progress bar section */
|
|
27
|
+
progressBarClassName?: string;
|
|
28
|
+
/** Additional className for the expanded item list */
|
|
29
|
+
itemListClassName?: string;
|
|
30
|
+
/** Additional className for individual item rows */
|
|
31
|
+
itemClassName?: string;
|
|
32
|
+
/** Additional className for the collapsed summary */
|
|
33
|
+
summaryClassName?: string;
|
|
20
34
|
}
|
|
21
35
|
|
|
22
|
-
|
|
36
|
+
/** className overrides for BatchProgressPanel — subset of BatchProgressPanelProps containing only className props. */
|
|
37
|
+
export type BatchProgressPanelClassNames = Partial<Pick<BatchProgressPanelProps,
|
|
38
|
+
'className' | 'headerClassName' | 'senderClassName' | 'progressBarClassName' |
|
|
39
|
+
'itemListClassName' | 'itemClassName' | 'summaryClassName'>>;
|
|
40
|
+
|
|
41
|
+
function BatchProgressPanelComponent({
|
|
42
|
+
message,
|
|
43
|
+
batchData,
|
|
44
|
+
isRunning = false,
|
|
45
|
+
className,
|
|
46
|
+
headerClassName,
|
|
47
|
+
senderClassName,
|
|
48
|
+
progressBarClassName,
|
|
49
|
+
itemListClassName,
|
|
50
|
+
itemClassName,
|
|
51
|
+
summaryClassName,
|
|
52
|
+
}: BatchProgressPanelProps) {
|
|
23
53
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
24
54
|
const toast = useToast();
|
|
25
55
|
|
|
@@ -85,15 +115,15 @@ function BatchProgressPanelComponent({ message, batchData, isRunning = false }:
|
|
|
85
115
|
const durationSec = (duration / 1000).toFixed(1);
|
|
86
116
|
|
|
87
117
|
return (
|
|
88
|
-
<div className={
|
|
118
|
+
<div className={cn("border-l-4 shadow-md overflow-hidden bg-white dark:bg-gray-900 mb-5", getBorderColor(), className)}>
|
|
89
119
|
{/* Header */}
|
|
90
120
|
<div
|
|
91
|
-
className="flex items-center justify-between px-4 py-2 border-b border-gray-100/80 dark:border-gray-800/80 bg-blue-50/50 dark:bg-blue-900/10 cursor-pointer"
|
|
121
|
+
className={cn("flex items-center justify-between px-4 py-2 border-b border-gray-100/80 dark:border-gray-800/80 bg-blue-50/50 dark:bg-blue-900/10 cursor-pointer", headerClassName)}
|
|
92
122
|
onClick={() => setIsExpanded(!isExpanded)}
|
|
93
123
|
>
|
|
94
124
|
<div className="flex items-center gap-2">
|
|
95
125
|
{renderStatusIndicator()}
|
|
96
|
-
<span className="text-xs font-medium text-muted">Batch</span>
|
|
126
|
+
<span className={cn("text-xs font-medium text-muted", senderClassName)}>Batch</span>
|
|
97
127
|
<span className="text-xs text-blue-600 dark:text-blue-400 font-medium">
|
|
98
128
|
{tool_name}
|
|
99
129
|
</span>
|
|
@@ -130,7 +160,7 @@ function BatchProgressPanelComponent({ message, batchData, isRunning = false }:
|
|
|
130
160
|
</div>
|
|
131
161
|
|
|
132
162
|
{/* Progress bar */}
|
|
133
|
-
<div className="px-4 py-2 bg-gray-50/50 dark:bg-gray-800/30">
|
|
163
|
+
<div className={cn("px-4 py-2 bg-gray-50/50 dark:bg-gray-800/30", progressBarClassName)}>
|
|
134
164
|
<div className="flex items-center gap-3">
|
|
135
165
|
<div className="flex-1 h-2 bg-gray-200 dark:bg-gray-700 rounded-full overflow-hidden">
|
|
136
166
|
<div
|
|
@@ -163,11 +193,11 @@ function BatchProgressPanelComponent({ message, batchData, isRunning = false }:
|
|
|
163
193
|
|
|
164
194
|
{/* Expanded item list */}
|
|
165
195
|
{isExpanded && items.length > 0 && (
|
|
166
|
-
<div className="max-h-64 overflow-y-auto">
|
|
196
|
+
<div className={cn("max-h-64 overflow-y-auto", itemListClassName)}>
|
|
167
197
|
{items.map((item: BatchItemStatus) => (
|
|
168
198
|
<div
|
|
169
199
|
key={item.id}
|
|
170
|
-
className="flex items-center gap-2 px-4 py-1.5 text-xs border-b border-gray-100 dark:border-gray-800 last:border-b-0 hover:bg-gray-50 dark:hover:bg-gray-800/50"
|
|
200
|
+
className={cn("flex items-center gap-2 px-4 py-1.5 text-xs border-b border-gray-100 dark:border-gray-800 last:border-b-0 hover:bg-gray-50 dark:hover:bg-gray-800/50", itemClassName)}
|
|
171
201
|
>
|
|
172
202
|
{/* Status icon */}
|
|
173
203
|
<div className="w-4 flex-shrink-0">
|
|
@@ -208,7 +238,7 @@ function BatchProgressPanelComponent({ message, batchData, isRunning = false }:
|
|
|
208
238
|
|
|
209
239
|
{/* Summary message if collapsed and has message */}
|
|
210
240
|
{!isExpanded && message.message && (
|
|
211
|
-
<div className="px-4 py-2 text-xs text-muted">
|
|
241
|
+
<div className={cn("px-4 py-2 text-xs text-muted", summaryClassName)}>
|
|
212
242
|
{message.message}
|
|
213
243
|
</div>
|
|
214
244
|
)}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { AsyncExecutionResult } from "@vertesia/client";
|
|
2
|
-
import { Button, Command, CommandGroup, CommandItem, CommandList, Popover, PopoverContent, PopoverTrigger, useToast } from "@vertesia/ui/core";
|
|
2
|
+
import { Button, Command, CommandGroup, CommandItem, CommandList, cn, Popover, PopoverContent, PopoverTrigger, useToast } from "@vertesia/ui/core";
|
|
3
3
|
import { useUserSession } from "@vertesia/ui/session";
|
|
4
4
|
import { Bot, ClipboardList, CopyIcon, DownloadCloudIcon, ExternalLink, MoreVertical, XIcon } from "lucide-react";
|
|
5
5
|
import { PayloadBuilderProvider, usePayloadBuilder } from "../../PayloadBuilder";
|
|
6
|
+
import { type AgentConversationViewMode } from "./AllMessagesMixed";
|
|
6
7
|
import { getConversationUrl } from "./utils";
|
|
7
8
|
|
|
8
9
|
export interface HeaderProps {
|
|
@@ -11,8 +12,8 @@ export interface HeaderProps {
|
|
|
11
12
|
onClose?: () => void;
|
|
12
13
|
isModal: boolean;
|
|
13
14
|
run: AsyncExecutionResult;
|
|
14
|
-
viewMode:
|
|
15
|
-
onViewModeChange: (mode:
|
|
15
|
+
viewMode: AgentConversationViewMode;
|
|
16
|
+
onViewModeChange: (mode: AgentConversationViewMode) => void;
|
|
16
17
|
showPlanPanel: boolean;
|
|
17
18
|
hasPlan?: boolean;
|
|
18
19
|
onTogglePlanPanel: () => void;
|
|
@@ -24,10 +25,6 @@ export interface HeaderProps {
|
|
|
24
25
|
isReceivingChunks?: boolean;
|
|
25
26
|
/** Additional className for the outer container */
|
|
26
27
|
className?: string;
|
|
27
|
-
/** Additional className for the title section */
|
|
28
|
-
titleClassName?: string;
|
|
29
|
-
/** Additional className for the actions section */
|
|
30
|
-
actionsClassName?: string;
|
|
31
28
|
}
|
|
32
29
|
|
|
33
30
|
export default function Header({
|
|
@@ -46,13 +43,11 @@ export default function Header({
|
|
|
46
43
|
onExportPdf,
|
|
47
44
|
isReceivingChunks = false,
|
|
48
45
|
className,
|
|
49
|
-
titleClassName,
|
|
50
|
-
actionsClassName,
|
|
51
46
|
}: HeaderProps) {
|
|
52
47
|
return (
|
|
53
48
|
<PayloadBuilderProvider>
|
|
54
|
-
<div className={
|
|
55
|
-
<div className=
|
|
49
|
+
<div className={cn("flex flex-wrap items-end justify-between py-1.5 px-2 border-b shadow-sm flex-shrink-0", className)}>
|
|
50
|
+
<div className="flex flex-wrap items-center space-x-2">
|
|
56
51
|
<div className="flex items-center space-x-1">
|
|
57
52
|
<Bot className="size-5 text-muted" />
|
|
58
53
|
<span className="font-medium">{title}</span>
|
|
@@ -60,14 +55,15 @@ export default function Header({
|
|
|
60
55
|
<span className="text-xs text-muted ml-1 flex items-center gap-1.5">
|
|
61
56
|
(Run ID: {run.runId.substring(0, 8)}...)
|
|
62
57
|
{/* Streaming chunk indicator - gray when idle, purple when receiving */}
|
|
63
|
-
<span className={
|
|
58
|
+
<span className={cn(
|
|
59
|
+
"w-2 h-2 rounded-full transition-colors duration-200",
|
|
64
60
|
isReceivingChunks
|
|
65
61
|
? "bg-purple-500 shadow-[0_0_6px_2px_rgba(168,85,247,0.6)]"
|
|
66
|
-
: "bg-gray-400"
|
|
67
|
-
}
|
|
62
|
+
: "bg-gray-400",
|
|
63
|
+
)} />
|
|
68
64
|
</span>
|
|
69
65
|
</div>
|
|
70
|
-
<div className=
|
|
66
|
+
<div className="flex justify-end items-center space-x-2 ml-auto">
|
|
71
67
|
{/* View Mode Toggle */}
|
|
72
68
|
<div className="flex items-center space-x-1 bg-muted rounded p-0.5 mt-2 lg:mt-0">
|
|
73
69
|
<Button variant={viewMode === "stacked" ? "outline" : "ghost"} size="xs" className="rounded-l-md" onClick={() => onViewModeChange("stacked")}>
|
|
@@ -88,7 +84,7 @@ export default function Header({
|
|
|
88
84
|
size="sm"
|
|
89
85
|
variant={showPlanPanel ? "primary" : "secondary"}
|
|
90
86
|
onClick={onTogglePlanPanel}
|
|
91
|
-
className=
|
|
87
|
+
className="transition-all duration-200 rounded-md"
|
|
92
88
|
title="Toggle plan panel"
|
|
93
89
|
>
|
|
94
90
|
<ClipboardList className="size-4 mr-1.5" />
|